Skip to content

Fix sidebar/quick-phrases toggles occluded in empty state (#687)#689

Closed
niiyeboah wants to merge 2 commits into
mainfrom
agt_a167c98602cb/issue-687
Closed

Fix sidebar/quick-phrases toggles occluded in empty state (#687)#689
niiyeboah wants to merge 2 commits into
mainfrom
agt_a167c98602cb/issue-687

Conversation

@niiyeboah

Copy link
Copy Markdown
Collaborator

Summary

Fixes #687 — after the #685 Changes-tab rework, the center pane offered no visible way to reopen a collapsed sidebar in the empty / no-focused-agent state. The user appeared stuck unless they knew the keyboard shortcut.

Root cause

The investigation found the real cause is not the hasActiveAgent gating hypothesized in the issue (that affects only the media toggle, which is intentionally per-agent). The actual culprit:

The center-pane tab-bar backdrop (agents-view.tsx, the full-width, opaque bg-background, z-10 strip behind the centered CenterPaneTabBar) shares a z-index with the corner toggle controls and, being later in DOM order, paints over them. Because the backdrop is pointer-events-none, hit-testing passes through to the buttons — so they stay clickable and keyboard-reachable, but are visually hidden. This is why the toggles appear "missing" yet the hotkeys still work, and why it's a regression from the #685 layout rework.

This was confirmed empirically: document.elementFromPoint() returned the toggle's SVG icon (topmost, correct color, opacity 1), yet the rendered screenshot showed the corners blank — the signature of a pointer-events-none opaque overlay occluding paint without affecting hit-testing.

Fix

Raise the left (Open-sidebar / quick-phrases) and right (media) corner toggle controls from z-10 to z-20 so they always paint above the tab-bar backdrop — in both the empty and focused-agent states. Two-class CSS change; no behavioral/state changes.

Validation

  • Reproduced and verified the fix with Playwright against a live dev stack — before: empty state with collapsed sidebar shows no affordance; after: the Open-sidebar and quick-phrases toggles are visible (screenshots attached in the agent thread).
  • pnpm --filter @dispatch/server check ✓ and pnpm --filter @dispatch/web check
  • pnpm run finalize:web (web production build) ✓

Notes / out of scope

🤖 Generated with Claude Code

niiyeboah and others added 2 commits June 25, 2026 13:00
The center-pane tab-bar backdrop (full-width, opaque `bg-background`,
`z-10`) shares a z-index with the corner toggle controls and, being
later in DOM order, painted over them. Because the backdrop is
`pointer-events-none`, hit-testing passed through to the buttons — so
they stayed clickable and keyboard-reachable, but were visually hidden.
In the empty / no-focused-agent state this left the user with no visible
way to reopen a collapsed sidebar (regression from the #685 Changes-tab
rework).

Raise the left (Open sidebar / quick-phrases) and right (media) corner
toggle controls to `z-20` so they always paint above the tab-bar
backdrop, in both the empty and focused-agent states.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…687)

- Add inline comments noting the z-20 corner controls must paint above the
  opaque z-10 tab-bar backdrop, so a future z-index cleanup doesn't revert
  the fix (architecture-review).
- Widen the tab-bar backdrop from px-16 to px-24 so the centered tab bar
  stays clear of the two-button left toggle group (~80px), preventing the
  now-z-20 controls from overlapping the tab bar in the focused-agent +
  collapsed-sidebar state on a narrow pane (frontend-ux-review).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@niiyeboah
niiyeboah requested a review from selfcontained June 25, 2026 20:26
@selfcontained

Copy link
Copy Markdown
Owner

Closing — the occlusion bug was already resolved on main by #696 (ef4e8db), which restructured the center pane from absolute-positioned overlays to a flex column layout. The z-index fix here is no longer needed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar toggle missing after Changes/diff update (#685) — no on-screen way to reopen sidebars in empty state

2 participants