fix(smarthome): tidy deferred TP3 rule minors + close coverage gaps - #211
Merged
Conversation
- rule-limit 409 shows banner only (no double alert) - rule-name maxlength=20 client-side (3 themes) - limitWarn derives from deconzCapabilities.ruleLimit.warnAtGcRules (single source) - correct cancelConditionsFrom comment (daylight is eq-invertible, included) - tests: daylight trigger translation, unknown_button_action, deleteSchedule
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.
Cleanup of the deferred minors from the TP3 whole-branch review (#209), plus test coverage for previously-untested paths. No behavior change beyond the two UX fixes; no migration.
Fixed
#shr-limitbanner (early return) instead of banner and a redundantalert.maxlength="20"on the rule-name input (all 3 themes) matches the server-side cap, avoiding a raw 400.limitWarnnow derives fromdeconzCapabilities.ruleLimit.warnAtGcRules(=38) instead of the duplicated× 4 > 150magic numbers (behavior identical: warn at ≥38 GC rules).cancelConditionsFromcomment corrected — daylight useseq true/falseand is binary-invertible/included; only button (numeric code) is excluded.Tests (coverage gaps from the review)
daylight eq false(sunset) +lastupdated dxunknown_button_actionrejection for an unsupported button actiondeconzClient.deleteScheduleDELETEs/schedules/:idFull smart-home suite: 88/88 green.
Deliberately left (not minor bugs)
No gateway selector (multi-gateway UI = feature; single-gateway deployment),
firstIdnull-on-empty (defensive; deCONZ never returns that post-POST), xy colour edit-prefill (xy→hex is lossy),loadCountalert (pure polish).🤖 Generated with Claude Code