Skip to content

[Bug] Firefox: the process sidebar becomes an extra tab stop and fails the F2 keyboard gate #77

Closed

Description

@DavidVFitzGerald

Summary and impact

In Firefox, the process sidebar (aside.sidebar, labelled "Process selection") is an extra keyboard tab stop between Sign out and Collapse processes. As a result, e2e/f2-gate.spec.ts:48 › "verified shell tabs, sidebars, settings and signout work from the keyboard" fails deterministically in the firefox project (5/5 with --repeat-each=5). After Shift+Tab from Collapse processes, focus lands on the aside instead of Sign out.

This breaks the F2 keyboard gate in a supported browser and blocks the full-suite requirement of the F4 gate (#26 AC7, O5). Chromium passes.

The F3 record (#19, docs/engineering/f3-verification.md) shows this spec passing in Firefox. The regression is therefore post-F3. Playwright 1.65.1 has not changed since #10. The maintainer has authorized fixing this before #26.

Delivery phase

Phase 1 - frontend with mock services (found by the F4 gate, #26).

Steps to reproduce

docker compose -p <project> exec -T workspace bash -lc 'cd apps/frontend && npx playwright test e2e/f2-gate.spec.ts:48 --project=firefox --repeat-each=5 --reporter=list'

Manually or by probe:

  1. Sign in with the demo account ([email protected] / demo-password) at the Playwright default viewport of 1280 × 720, in mock mode, with nothing selected.
  2. Focus Collapse processes.
  3. Press Shift+Tab.

Expected behavior and authority

Shift+Tab from Collapse processes moves focus to Sign out in both browsers, matching the F2 gate's tab order:
Settings → Sign out → Collapse processes → Process Name → Advanced search → tree → Selected processes (0) → tabs.

Authority:

PM decision: the overflow is the defect, not the focusability.

  • At 1280 × 720 with an empty selection, the sidebar's content should fit. The sidebar overflows by 30 px only because of a stale layout height.
  • Firefox making a genuinely scrollable region a tab stop is correct, accessibility-positive browser behaviour, consistent with §6.8. The fix must not suppress it.
  • When the sidebar legitimately overflows (a large selection or a short viewport), it must still scroll. A Firefox tab stop on it is then acceptable. The F2 gate does not cover that state, and its expectations stay unchanged.

Actual behavior

A probe (not committed) measured the sidebar at 1280 × 720 in both browsers:

  • overflow-y: auto; scrollHeight 635 px against clientHeight 605 px.
  • Children: the collapse button (42 px) and #process-sidebar (525 px).

The sidebar overflows by 30 px, so it is a scroll container, and Firefox makes it keyboard-focusable. Tab order in Firefox: Settings → Sign out → aside.sidebar → Collapse processes. In Chromium: Settings → Sign out → Collapse processes.

Environment and version

  • Rootless workspace container: @playwright/test 1.65.1, Firefox 159.0 and Chromium 159.0.8154.6 (the Playwright builds).
  • Mock adapter, default synthetic catalog.
  • main at 0a8bc4b; branch feat/f4-flows-gate.
  • Also failing in the hosted workflow_dispatch full suite (run 43734192952).

Context and dependencies

Dependencies: none. This issue is ready now.

Suspected cause (PM analysis, to be confirmed): dd85fa1 (#24) made the page exactly viewport-tall and added overflow-y: auto to .sidebar in apps/frontend/src/app/shell.css. Before that, the page grew and the sidebar never scrolled. The tree height is still height: calc(100dvh - 480px); min-height: 12rem in apps/frontend/src/components/process-tree/process-tree.css, from #18. That magic offset assumes the pre-#24 page layout. The fixed 12rem of .selected-list (selected-processes.css) is also part of the sum.

Likely files:

Fix constraints:

  • Prefer a structural layout to a new magic number. For example, make the sidebar a flex column whose tree takes the remaining height, with a minimum.
  • The result must not depend on font metrics, because [Bug] Identity-block "Location" label overflows with hosted CI fonts, failing Flows layout e2e in both browsers #79 may bundle a font that changes line heights.
  • Not allowed:
    • tabindex="-1", or any other change that removes the sidebar's focusability while it scrolls.
    • overflow: hidden or clip, or anything else that hides content or stops the sidebar scrolling.
    • Shrinking controls below legible or target sizes.
    • Changing the viewport in the F2 gate.
    • Changing the F2 gate's assertions or tab-order expectations.
  • The tree keeps a usable minimum height and stays virtualized. Collapse and expand still work, and the indicator sidebar is unaffected.

Related issues: #75 and #79 (fixed in parallel), #24, #18, #34, #26 (blocked on this).

Acceptance criteria

  • AC1: The cause of the 30 px overflow is identified, with the responsible rule(s) and commit, and the fix is recorded on this issue.
  • AC2: In both projects at 1280 × 720 with an empty selection, the process sidebar's scrollHeight ≤ clientHeight. A new focused e2e assertion in f2-gate.spec.ts (or a new small spec file) checks this. It fails at 0a8bc4b and passes after the fix.
  • AC3: In both projects, Shift+Tab from Collapse processes reaches Sign out. npx playwright test e2e/f2-gate.spec.ts --project=firefox --repeat-each=5 passes 5/5, with the gate's assertions and order unchanged (the diff shows no removed or relaxed expect).
  • AC4: When content exceeds the height, the sidebar still scrolls internally and stays reachable by keyboard:
  • AC5: The tree keeps at least its existing 12rem minimum and remains a single tree tab stop. Collapse and expand of the process and indicator sidebars still pass f2-gate.spec.ts and flows-grid.spec.ts:242.
  • AC6: Standard checks pass: format:check, lint, typecheck, test:unit, build and the full npm run test:e2e in both projects. [Bug] Firefox content process crashes in the column-operations default journey (Playwright) #75 and [Bug] Identity-block "Location" label overflows with hosted CI fonts, failing Flows layout e2e in both browsers #79 failures are allowed only while those fixes are unmerged, and must be named exactly. The hosted PR quality run passes.

Regression and verification plan

Container setup (existing commands). Use a dedicated worktree, for example fix/77-sidebar-overflow, with Compose project lca-diff-bug77 and port 5177. From the worktree root on the Docker host (rootless daemon):

COMPOSE_PROJECT_NAME=lca-diff-bug77 FRONTEND_PORT=5177 ./dev up
COMPOSE_PROJECT_NAME=lca-diff-bug77 FRONTEND_PORT=5177 ./dev check

In the container (docker compose -p lca-diff-bug77 exec -T workspace bash -lc 'cd apps/frontend && …'):

npm ci --no-audit --no-fund
# Before the fix: the new assertion and the F2 gate fail in Firefox
npx playwright test e2e/f2-gate.spec.ts --project=firefox --reporter=list
# After the fix
npx playwright test e2e/f2-gate.spec.ts --project=firefox --repeat-each=5 --reporter=list
npx playwright test e2e/f2-gate.spec.ts e2e/flows-composition.spec.ts e2e/flows-grid.spec.ts e2e/selection.spec.ts e2e/process-tree.spec.ts --reporter=list
npm run format:check && npm run lint && npm run typecheck && npm run test:unit && npm run build
npm run test:e2e -- --reporter=list

Prove that the new assertion fails before the fix: temporarily revert only the CSS fix (for example git stash of the CSS files), or run the new spec against 0a8bc4b. Record the result.

After pushing, run the hosted full suite: gh workflow run frontend.yml --ref <branch>, then gh run watch <run-id> --exit-status. Record the run URL.

Evidence is mock-only.

Out of scope and follow-ups

Parallel-work conflicts.

Activity

  1. added
    bug
    frontend
    on Nov 15, 2026
  2. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: READY

    Phase: Phase 1, frontend with mock services (F4). The maintainer authorized this fix before #26.

    Dependencies: none. This issue blocks #26.

    Spec references: §6.1, §6.8 (sidebars keyboard accessible), §9.2, the F2 gate (#15) and #24 O3 (the page is viewport-tall and the sidebars scroll internally).

    Decision: the overflow is the defect, not the focusability.

    Regression: a new no-overflow assertion at 1280 × 720 that fails before the fix and passes after, plus a 1280 × 560 reachability check.

    Parallel conflicts:

    Next: Software Engineer, worktree fix/77-sidebar-overflow, Compose project lca-diff-bug77, port 5177.

    🤖 Generated with Claude Code

  3. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: state → implementing. Software Engineer assigned on fix/77-sidebar-overflow from 0a8bc4b, in the isolated worktree /tmp/lca-diff-bug77 (Compose project lca-diff-bug77). Implemented in parallel with the other #26 blockers (#75, #77, #79).

    🤖 Generated with Claude Code

  4. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA

    Branch / SHA: fix/77-sidebar-overflow @ 680cd6c (from main 0a8bc4b). PR: #83 (Refs #77, no closing keyword, not merged).

    Merge-order dependency (must read): merge #79 (PR #80) before this PR. Without the bundled font, the hosted runner's fallback font is taller than the local container's (local sans-serif resolves to WenQuanYi Zen Hei). The sidebar's minimum content then exceeds 1280 × 720 by 4 px (Chromium) or 12 px (Firefox), so this PR alone fails its own new test and the Firefox F2 gate in the hosted full suite. With #79 merged in, the hosted full suite passes except #75.

    AC1: cause and fix

    Criteria

    Commands and results (container, docker compose -p lca-diff-bug77 exec -T workspace bash -lc 'cd apps/frontend && …')

    Limitations / risks for PM

    • Thin headroom: with Inter, the tree renders 205 px against its 192 px minimum at 1280 × 720, which is about 13 px of slack. The Selected processes (0) header wraps to 78 px next to Clear all in the 198 px column. Any future addition to the sidebar, or a larger root font, makes it overflow again (it is still accessible, just a tab stop). The test will catch that. Restoring more slack would need a spacing or selected-header layout change, which this issue excludes.
    • Evidence is mock-only.

    Manual verification

    In mock mode at 1280 × 720, sign in as [email protected] / demo-password. The process sidebar shows no scrollbar, and in Firefox Shift+Tab from Collapse processes reaches Sign out. At 1280 × 560 the sidebar scrolls, and Tab from the tree reveals Selected processes (0) fully.

    Next: QA on 680cd6c, ideally after #80 merges and this branch is rebased (the rebase reruns the suite, per PM).

    🤖 Generated with Claude Code

  5. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: state → waiting on #79. Engineering READY FOR QA at 680cd6c (PR #83), but the branch only passes the hosted full suite with #80 merged (run 43746845326). Order: QA #79 → maintainer merges #80 → rebase #83 on main and rerun the full suite → QA #77 on the rebased SHA. PM risk noted: ~13 px slack at 1280×720 with Inter; the new fit test guards it.

    🤖 Generated with Claude Code

  6. added 2 commits that reference this issue on Nov 15, 2026
  7. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA (updated)

    Branch / SHA: fix/77-sidebar-overflow @ 8d4fc5f. PR: #83 (not merged).

    The branch now includes latest main, with #79 (#80, e72b99c) and #75 (#84, f1fd944). Both were brought in by non-fast-forward merges with no history rewrite or force-push: 95ba179 merges e72b99c and 8d4fc5f merges f1fd944. Both merges were clean. The diff against origin/main is unchanged from 680cd6c: shell.css (.sidebar rules only), process-tree.css and the appended f2-gate.spec.ts describe. The cause and fix are as in the previous handoff.

    Hosted (8d4fc5f)

    Local (Compose lca-diff-bug77, port 5177; ./dev check PASS; /tmp at 65% after cleaning my own test-results and report)

    • npm ci, format:check, lint, typecheck, build: all pass.

    • npx playwright test e2e/f2-gate.spec.ts --project=firefox --repeat-each=5: 30/30 passed.

    • npm run test:e2e (both projects): 64/64 passed. No failures.

    • npm run test:unit: not a clean local pass. Three runs gave 402/403, 401/403 and 402/403. Two long timing tests failed intermittently:

      • flows-grid.test.tsx › "deep scrolling pages rows in bounded steps and cancels windows left behind" (every run)
      • selection.test.tsx › "bounds mounted list items for 300 selections…" (once)

      flows-grid.test.tsx passes 12/12 when run alone, and the hosted unit run passed 403/403. This branch changes no TS/TSX, and Vitest does not process CSS by default (css is unset in vite.config.ts). So this is local timing flakiness under shared-host load (load average about 4–17 during this work), not a [Bug] Firefox: the process sidebar becomes an extra tab stop and fails the F2 keyboard gate #77 regression. The same tests failed intermittently on 680cd6c. Recommend a linked Bug for the timing budget of these long unit tests if the coordinator or QA sees it on main.

    Remaining risk

    With Inter, the sidebar has about 13 px of slack at 1280 × 720 (the tree renders 205 px against its 192 px minimum). The new test catches any regression.

    Next: QA on 8d4fc5f.

    🤖 Generated with Claude Code

  8. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: state → QA. Engineering READY FOR QA at 8d4fc5f (PR #83, includes merged #80 and #84). Independent QA assigned in detached worktree /tmp/lca-diff-bug77-qa. Local unit timing flakes in the deep-scroll and 300-selection tests are the budget problem already tracked in #76.

    🤖 Generated with Claude Code

  9. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS

    Reviewed SHA: 8d4fc5f7d70a9fb1652ce6ca5baf6399e7f19610 (PR #83, head fix/77-sidebar-overflow; merges main f1fd944 with #79's bundled Inter and #75's workaround). Fix commits: 2935b75 (tests) and 680cd6c (CSS).
    Mode: mock adapter only. This is no evidence of real backend, auth or security behaviour.
    Environment:

    • Detached QA worktree /tmp/lca-diff-bug77-qa.
    • Rootless Compose project lca-diff-bug77-qa, FRONTEND_PORT=5211. ./dev up and ./dev check passed.
    • Playwright 1.65.1 builds of Chromium and Firefox. The pages rendered in Inter (computed font-family: Inter, …).
    • All commands ran via docker compose -p lca-diff-bug77-qa exec -T workspace bash -lc 'cd apps/frontend && …'.

    Diff scope (vs origin/main f1fd944)

    • Only 3 files change:
      • e2e/f2-gate.spec.ts: +93 lines, one appended describe, with no removed lines.
      • src/app/shell.css: +22 lines, in the .sidebar rules only.
      • src/components/process-tree/process-tree.css: 1 line replaced.
    • None of the forbidden fixes are present: no tabindex="-1", no overflow: hidden/clip, no :root or font-family change and no control-size change.
    • The F2 gate test (:48) is untouched. Its viewport, assertions and tab-order expectations are unchanged. The only setViewportSize and tabindex matches are in the new tests: viewport setup, and a locator for the roving tree item.
    • No TS/TSX changes. [hidden] { display: none !important } still beats the new display: flex on #process-sidebar, so collapse still hides it.
    • No stale 480px reference remains anywhere.
    • This is an ordinary implementation fix within the spec, so no ADR or PRD/spec update is needed.

    Criteria

    • AC1 PASS: cause confirmed.
    • AC2 PASS: new test fails before the fix and passes after.
      • Pre-fix run: origin/main CSS restored temporarily in the QA worktree (git checkout origin/main -- shell.css process-tree.css, i.e. f1fd944 plus only 2935b75's test file, with Inter present).
      • npx playwright test e2e/f2-gate.spec.ts gave 4 failed, 8 passed:
        • 720 fit test, chromium and firefox: Expected <= 605, Received 640
        • Firefox F2 gate :48: toBeFocused failed
        • Firefox 560 test: Expected <= 559.88, Received 601.68
      • At the SHA all pass (below). The CSS was restored afterwards, and git status is clean.
    • AC3 PASS. npx playwright test e2e/f2-gate.spec.ts --project=firefox --repeat-each=5 --reporter=line gave 30 passed. QA probe at 720 in Firefox: Shift+Tab from Collapse processes goes to Sign out, then Settings. The aside is no longer a tab stop.
    • AC4 PASS: the sidebar still scrolls at 1280 × 560. QA probe, both projects:
      • The sidebar overflows: scrollHeight 592 > clientHeight 445. The tree stays at its 192 px minimum.
      • The page does not scroll: page height 560, scrollY 0.
      • Forward Tab and Shift+Tab through the sidebar (Collapse processes → Process Name → Advanced search → tree → Selected processes (0)) left every focused control fully inside the scrollport. scrollTop moved: 62 (Chromium) and 147 (Firefox).
      • Firefox adds the aside as a tab stop (Sign out → ASIDE → Collapse processes). The PM accepted this.
      • flows-composition.spec.ts:354 (50 processes, both sizes) passed in the full suite in both projects.
    • AC4: scroll-padding-block rationale confirmed. With only that line removed temporarily, the Firefox 560 test failed (Received 601.68 > 559.88). Chromium still passed. Restored afterwards.
    • AC5 PASS.
      • The tree has flex: 1 0 12rem; min-height: 12rem, and both new tests assert height ≥ 12rem.
      • The F2 gate still shows a single tree tab stop.
      • Collapse and expand of both process and indicator sidebars work at 720 and 560 (QA probe; F2 gate). flows-grid.spec.ts:242 passed in the full suite.
      • Before/after probe at 720: every control kept its size (Collapse 170/176 px, Advanced search, inputs 198 px, Selected 124/121 × 78, Clear all). Collapsed and indicator sidebar widths are identical. Only the tree height changed (240 → 205).
    • AC6 PASS.

    Observations (not blocking)

    • Headroom confirmed: about 13 px at 1280 × 720 with Inter (tree 205.2 px Chromium, 205.0 px Firefox, against a 192 px minimum). Adding anything to the sidebar, or a larger root font, will make it scroll again. It stays accessible as a tab stop, and the new 720 test will flag it.
    • align-items: flex-start and .sidebar > * { flex: none } also apply to the indicator sidebar and the locked-layout sidebar. The probe showed no size change in the indicator sidebar.
    • The temporary QA probe spec was kept out of the worktree (copy in a scratchpad). It and the test-results/report output were removed. The Compose project is down.

    Not run: real-integration checks (Phase 1, mock-only). Safari is out of scope (#34).

    Next: maintainer review and merge of PR #83. After that, the coordinator closes #77 and unblocks #26.

    🤖 Generated with Claude Code

  10. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: QA PASS at 8d4fc5f (#77 (comment)). State → ready for maintainer review of PR #83. #77 closes after the maintainer merges PR #83; then #26 (PR #78) is updated to main and its gate rerun.

    Carried forward (non-blocking): ~13 px headroom at 1280×720 with Inter, guarded by the new fit test; the new flex rules also apply to the indicator and signed-out sidebars (indicator sizes measured unchanged).

    🤖 Generated with Claude Code

  11. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: closed. QA PASS at 8d4fc5f; the maintainer merged PR #83 to main. All three #26 blockers (#75, #77, #79) are now merged; #26 resumes.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions