Skip to content

Fix: resolve showIf per field, not per key - #61

Merged
SandObserver merged 1 commit into
mainfrom
fix/duplicate-field-keys-showif
Aug 13, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/duplicate-field-keys-showif

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Add visibleFieldFlags, which resolves each field's showIf by its position and returns one flag per field, and keep visibleFieldKeys as a wrapper over it.
  • Resolve a showIf dependency against every field carrying the named key, so a duplicated controller key still gates its dependants.
  • Apply visibility to the rendered rows by index in _wireShowIf, instead of looking each row up by field key.
  • Cover a manifest whose two branches declare the same field key.

Testing
All green, including the homelab Docker build. Added 1 test for branch fields sharing a key, and updated the source-shape assertion that pinned the old lookup.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

@SandObserver SandObserver added bug Something isn't working javascript Pull requests that update javascript code labels Aug 13, 2026
@SandObserver
SandObserver force-pushed the fix/duplicate-field-keys-showif branch from e7696e3 to f70e02f Compare August 13, 2026 05:44
Two fields may share a key, one per branch of a showIf. Resolving
visibility by key gave both the same answer, so the backup widget showed
the Duplicati job picker alongside the Kopia one, and showed no picker at
all for Duplicati.

Add visibleFieldFlags, which answers by position, and apply it to the
rendered rows by index.
@SandObserver
SandObserver force-pushed the fix/duplicate-field-keys-showif branch from f70e02f to aa41b1c Compare August 13, 2026 05:46
@SandObserver
SandObserver merged commit b33f65b into main Aug 13, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/duplicate-field-keys-showif branch August 13, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant