frontend: env-filter toggle row above the branch list #16

Closed
opened 2026-08-26 19:37:27 +02:00 by hermes · 0 comments
Contributor

Goal

Above the existing branches-section, add a horizontal row of toggle buttons — one button per brencher config (envId). Toggled buttons filter the branch list down to only the configs whose buttons are on. By default, all buttons are off and all configs are shown.

Where

hermes/brencher fork, frontend:

  • frontend/index.html — add the button row container
  • frontend/app.js — toggle state, render row on environments WS message, filter branches by active envIds
  • frontend/styles.css — styles for the row + active state (re-use .toggle-button base if useful)

Open questions (deferred — to resolve before implementation)

  1. Multi-select semantics: when 2+ buttons are on, show the union (any of those envIds visible). Confirm this is what we want vs. exclusive (radio-style) or single (clicking another button turns the previous off).

  2. Source of button labels: envObj.name (human-friendly, e.g. immich) or envObj.id (stable, e.g. immich too — they look the same today). Decide on one and stick to it; mismatched labels between the toggle row and the per-env <h3> headers will confuse.

  3. Persistence: should the active toggle set survive a page reload (localStorage) or reset to "all off" on every load? The user wants "by default all off"; that may just mean "default state on first paint", not "no persistence at all".

  4. Empty filter set edge case: spec says "all off = all shown". Confirm that's the meaning of "default", not "no configs shown".

  5. Interaction with the existing Show All / Show Filtered button (#toggle-show-all). Two filter axes (env-filter and show-all) compose; should the new toggle row visually nest inside the existing control-bar, or live as a separate row above the table?

Why a ticket, not a branch

User wants to settle the semantics before implementation. No code changes until these are answered. Tracking here so it doesn't get lost between sessions.

## Goal Above the existing `branches-section`, add a horizontal row of toggle buttons — one button per brencher config (envId). Toggled buttons filter the branch list down to only the configs whose buttons are on. By default, all buttons are off and all configs are shown. ## Where `hermes/brencher` fork, frontend: - `frontend/index.html` — add the button row container - `frontend/app.js` — toggle state, render row on `environments` WS message, filter `branches` by active envIds - `frontend/styles.css` — styles for the row + active state (re-use `.toggle-button` base if useful) ## Open questions (deferred — to resolve before implementation) 1. **Multi-select semantics**: when 2+ buttons are on, show the union (any of those envIds visible). Confirm this is what we want vs. exclusive (radio-style) or single (clicking another button turns the previous off). 2. **Source of button labels**: `envObj.name` (human-friendly, e.g. `immich`) or `envObj.id` (stable, e.g. `immich` too — they look the same today). Decide on one and stick to it; mismatched labels between the toggle row and the per-env `<h3>` headers will confuse. 3. **Persistence**: should the active toggle set survive a page reload (localStorage) or reset to "all off" on every load? The user wants "by default all off"; that may just mean "default state on first paint", not "no persistence at all". 4. **Empty filter set edge case**: spec says "all off = all shown". Confirm that's the meaning of "default", not "no configs shown". 5. **Interaction with the existing `Show All / Show Filtered` button** (`#toggle-show-all`). Two filter axes (env-filter and show-all) compose; should the new toggle row visually nest inside the existing control-bar, or live as a separate row above the table? ## Why a ticket, not a branch User wants to settle the semantics before implementation. No code changes until these are answered. Tracking here so it doesn't get lost between sessions.
admin closed this issue 2026-10-05 23:38:54 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/brencher#16