Somfy Links tab + shade/group/room add-at-capacity fixes#2
Merged
Conversation
Introduce a dedicated "Links" subtab under Somfy that consolidates all linking actions: pick a source shade, view its linked shades/remotes (app shades shown by name), add a link to another app shade via a dropdown, link a physical remote via the press-a-remote flow, and unlink any entry. The Shades editor keeps its linked-remotes list display but no longer hosts the Link Remote button. WebShades: honor SomfyShade::linkRemote's return value so a full linked-remote table reports an error instead of silently no-opping, and stop double-sending the response on the error branches. Web assets: shared .info-text size class; cache-bust bumped to v0.7.1h. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- main.css: remove dead rules and merge duplicate blocks (field-group / button-container, input/select); drop the .field-group1 variant in favour of .field-group + .field-sep / .radioPins. - Reorder the top tabs to Somfy, HomeKit, Radio, Network, System (System stays the initial landing tab). - Links tab: source-shade picker now uses the same field-group look as the Virtual Remote selector. - Replace the CSS-drawn config gear/home with Bootstrap Icons house-gear-fill / house-fill, served from LittleFS and registered in WebFiles.cpp; recoloured via CSS mask so they stay white on the button. Toggle now flips a `show-home` class instead of swapping icss classes. - Delete the now-unused icss-gear/icss-gears/icss-home definitions. - Add THIRD-PARTY-NOTICES.md and a README License section clarifying that the Unlicense covers only this project's own code; bundled components (Bootstrap Icons, ArduinoJson, etc.) keep their own licenses. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
New SVG icons, web UI for shade linking, and matching third-party notices. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Key shade AIDs by stable id instead of name (with one-time migration of existing name-keyed entries), and prune orphaned AID entries on boot and shade delete. Stops hap_main filling the nvs partition, which broke PHY calibration writes (0x1105). Adds an NVS-usage diagnostic at boot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
It served its purpose diagnosing the hap_main bloat; drop the per-boot per-key enumeration and its log noise. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…omfyTab in settings. Fixed a bug when adding 30 shades. Needed to extend the licenses because the remote is used from google.
Guard capacity (return nullptr instead of null-deref/assert) and decouple slot index from id, which persistence compacts on load. Extract the shared lowest-free-id/first-empty-slot logic into SlotArray.h with a per-type NO_ID sentinel, plus unit tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Somfy Links tab (shade-to-shade and remote linking) with its GUI assets/icons, plus a set of fixes and a refactor found while stress-testing it at capacity.
Features
Fixes
assert-panicked (group/room). Now guarded — the add returnsnullptrand the web layer reports "maximum exceeded".add*()no longer indexes byid-1(which could overwrite an existing record after a reboot). Corrected the id-allocation off-by-one so the full array capacity is usable.Refactor
SlotArray.h(single-pass, concept-constrained,NO_IDsentinel per record type), replacing three hand-rolled copies.Tests
test/unit/test_slotArray.cpp(parameterized over both sentinel conventions) plus controller regressions for the capacity/compaction cases. Host suite: 799 + 100 tests green locally.🤖 Generated with Claude Code