Skip to content

fix(web): hide Settings Runtime group header in prod (closes #701)#736

Merged
pandas-studio merged 1 commit intomainfrom
fix/701-settings-runtime-group-dev-tier
May 3, 2026
Merged

fix(web): hide Settings Runtime group header in prod (closes #701)#736
pandas-studio merged 1 commit intomainfrom
fix/701-settings-runtime-group-dev-tier

Conversation

@memtomem
Copy link
Copy Markdown
Owner

@memtomem memtomem commented May 3, 2026

Summary

  • The Runtime group header in Settings nav had no data-ui-tier marker, so _applyUiModeFilter (app.js:170) walked past it. In prod the header stayed clickable and expanded to nothing — caret flipped, no children appeared, content panel kept showing the previously-selected section.
  • Mark the group header data-ui-tier="dev" so it shares the same hide pass as its four already-dev-tier children (harness-sessions, harness-scratch, harness-procedures, harness-health).
  • Picked option 1 (smallest diff) from the issue. Option 2 (compute visibility from children) would be more robust if a future runtime child becomes prod-tier, but all four are dev-only by design today, so option 1 is the right scope.

Closes #701.

Test plan

  • In prod mode (default), open Settings — confirm Runtime group is no longer visible in the nav column.
  • In dev mode (?ui_mode=dev or env toggle), confirm Runtime group still expands and shows all four children (Sessions / Working Memory / Procedures / Health Report).
  • Toggle dev → prod → dev round-trip without page reload via the dev-mode banner; confirm Runtime header visibility flips with it (covered by _applyUiModeFilter re-run).

Copy link
Copy Markdown
Collaborator

@pandas-studio pandas-studio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide mechanism is doubly safe — _applyUiModeFilter (app.js:170) sets both hidden=true and inline display:none, plus the global [hidden] { display: none !important } rule at style.css:6 backstops it. Click-handler / collapse-state passes that still iterate the now-hidden runtime group in prod are harmless (wasted work, not a bug).

Trade-off vs. option 2 (compute group visibility from children) correctly justified — all four runtime children are dev-only by design today, so the smaller diff is the right scope. If a future contributor adds a prod-tier child to runtime, breakage is obvious in dev preview.

Approving.

The Runtime nav group at index.html:650 contained four dev-tier child
buttons (harness-sessions/scratch/procedures/health) but the group
header itself had no `data-ui-tier` marker, so `_applyUiModeFilter`
(app.js:170) walked past it. In prod the header stayed clickable and
expanded to nothing — caret flipped, no children appeared, content
panel kept showing the previously-selected section.

Mark the group header `data-ui-tier="dev"` so it shares the same hide
pass as its children. All four runtime children are dev-only by design
(packages/memtomem/src/memtomem/web/static/index.html:654-680), so the
header is unconditionally dev-tier — no need for the more general
"compute group visibility from children" approach (option 2 in #701).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@memtomem memtomem force-pushed the fix/701-settings-runtime-group-dev-tier branch from cd909c6 to 8406067 Compare May 3, 2026 07:47
@pandas-studio pandas-studio merged commit 213410f into main May 3, 2026
9 checks passed
@pandas-studio pandas-studio deleted the fix/701-settings-runtime-group-dev-tier branch May 3, 2026 07:54
@github-actions github-actions Bot locked and limited conversation to collaborators May 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings Runtime group header visible in prod despite all dev-tier children (empty expansion)

2 participants