feat(web): collapsible Focus Mode sidebars (desktop)#1375
Open
simple-agent-manager[bot] wants to merge 8 commits into
Open
feat(web): collapsible Focus Mode sidebars (desktop)#1375simple-agent-manager[bot] wants to merge 8 commits into
simple-agent-manager[bot] wants to merge 8 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the shared three-state Focus Mode model and the nav-sidebar half: - lib/focus-mode.ts: FocusMode type, width helpers, cycle/persist helpers - AppShell: shared context + localStorage hydration + F-key cycle, dynamic grid column width, focus-aware aside, zen seam - NavSidebar: iconOnly (56px) rail variant across all three layouts - FocusModeToggle: segmented + cycle controls - ZenPeekRail: 0px glowing edge seam with hover/focus peek panel Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire FocusStrip (64px status-icon rail) and ZenPeekRail into project-chat sidebar so it collapses with Focus Mode alongside the nav. Extract shared ATTENTION_ICON map into chat-session-utils so SessionItem and FocusStrip render identical status iconography. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…udit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ooltip portal, reduced-motion) Adds behavioral coverage flagged by the task-completion-validator: - AppShell: persists focus mode to localStorage + collapses nav column, hydrates persisted mode across reload, F-key cycle, F-key ignored in inputs, mobile-disabled, and prefers-reduced-motion opt-out. - FocusStrip: tooltip is portaled to document.body (escapes glass clipping), hover/focus peek, onSelect/onNewChat wiring, blur close-delay. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- F-key guard ignores <select> (type-ahead) — HIGH
- FocusStrip tooltip id + aria-describedby association (WCAG 1.3.1) — HIGH
- aria-live region announces Focus Mode changes — MEDIUM
- Escape closes zen peek + refocuses seam button — MEDIUM
- motion-reduce on zen glow transition — MEDIUM
- keep peek open while focus is inside, aria-hidden rotated label,
drop noise aria-hidden={false} — LOW
- add SELECT-guard + aria-describedby regression tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
localStorage(sam:focus-mode) and is cycled with theFkey. Forced todefaulton mobile.01KVK5TMZXFA1YQC1M8KYEGZ2F.Validation
pnpm lint(0 errors; pre-existing a11y warnings only)pnpm typecheckpnpm test(2420 web tests pass)Staging Verification (REQUIRED for all code changes — merge-blocking)
N/A: staging deployment explicitly skipped by user request for this PR. Feature is desktop-only UI with no API/infra/DB changes; verified locally via 2420 unit tests + Playwright visual audits (desktop + mobile, overflow asserted).
focus-mode-audit.spec.tsdesktop/mobile passAppShellmobile tests + Playwright mobile audit)Staging Verification Evidence
Staging skipped at user's explicit request. Local evidence:
focus-mode-audit.spec.tsdrives the segmented toggle andFcycle at 1280x800 and assertsscrollWidth <= innerWidthin every desktop state; mobile (375x667) confirms the toggle never renders andFis a no-op.UI Compliance Checklist (Required for UI changes)
SessionTreeItem, sharedATTENTION_ICONmap)End-to-End Verification
focus-mode-audit.spec.tsdrives toggle + F-key across all three states)Data Flow Trace
F→AppShell.tsxkeydown handler /FocusModeToggle→cycleFocusMode()/setFocusMode()focus-mode.ts:cycleFocusModeadvancesFOCUS_MODE_ORDER, persists tolocalStorageAppShellrecomputesgridTemplateColumnsvianavWidthForMode(focusMode); providesfocusModethroughAppShellContextproject-chat/index.tsxreads context →sessionWidthForMode(focusMode); rendersFocusStrip(focus) /ZenPeekRail(zen)Untested Gaps
N/A: full flow covered by automated tests (unit + Playwright).
Post-Mortem
N/A: not a bug fix (new feature).
Specialist Review Evidence
Exceptions
Agent Preflight (Required)
Classification
External References
N/A: uses existing React + Tailwind + react-router patterns already in the codebase.
Codebase Impact Analysis
apps/web/src/components/AppShell.tsx,apps/web/src/components/NavSidebar.tsx,apps/web/src/components/ZenPeekRail.tsx,apps/web/src/components/FocusModeToggle.tsx,apps/web/src/lib/focus-mode.ts,apps/web/src/lib/chat-session-utils.ts,apps/web/src/pages/project-chat/index.tsx,apps/web/src/pages/project-chat/FocusStrip.tsx. No API/shared/infra changes.Documentation & Specs
N/A: no public-facing behavior docs affected; feature documented in archived task file
tasks/archive/2026-06-20-collapsible-focus-mode-sidebars.md.Constitution & Risk Check
Principle XI (no hardcoded values): widths centralized in
focus-mode.tshelpers, storage key is a named constant. Risk: layout overflow — mitigated by Playwright overflow assertions on all states + viewports.