Skip to content

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

@memtomem

Description

@memtomem

Summary

In More / Settings on the prod surface, the Runtime group header expands to nothing: all four child entries are marked data-ui-tier="dev" and hidden in prod, but the group header itself has no tier marker so it stays clickable. Users see the arrow flip from collapsed to expanded with no children, and the content panel keeps showing whatever was previously selected.

Found by Playwright UX review of v0.1.34 prod (2026-05-02). See docs/reports/mm-web-prod-v0.1.34-playwright-review.md (P2 — Settings navigation expands sections without visible child content).

Evidence

packages/memtomem/src/memtomem/web/static/index.html:

<button class="settings-nav-group" type="button" data-group="runtime" aria-expanded="false">  <!-- 645 -->
  <span data-i18n="settings.nav.runtime">Runtime</span>
</button>
<!-- All 4 children are data-ui-tier="dev": -->
<button class="settings-nav-btn" data-ui-tier="dev" data-section="harness-sessions" ...>  <!-- 649 -->
<button class="settings-nav-btn" data-ui-tier="dev" data-section="harness-scratch" ...>   <!-- 656 -->
<button class="settings-nav-btn" data-ui-tier="dev" data-section="harness-procedures" ...> <!-- 663 -->
<button class="settings-nav-btn" data-ui-tier="dev" data-section="harness-health" ...>    <!-- 670 -->

The dev-tier hide pass (app.js:160) only walks [data-ui-tier="dev"], so the group header itself never gets hidden.

Suggested fix (two valid approaches)

  1. Mark the header as dev-tier too — add data-ui-tier="dev" to the settings-nav-group button at line 645. Smallest diff. Acceptable if Runtime is always dev-only.

  2. Compute group visibility from children — in app.js:160 (or wherever the dev-tier pass runs), for each .settings-nav-group, hide the header when every child .settings-nav-btn in the same data-group is dev-tier and STATE.uiMode is prod. More robust if other groups acquire dev-only tabs later.

Either fix should also include an empty-state path: if a future group ends up with zero visible children at runtime (e.g., feature-flagged), render a "no items" message instead of leaving expansion silent.

References

  • Review: docs/reports/mm-web-prod-v0.1.34-playwright-review.md
  • Tracking umbrella: TBD

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions