-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: investigate replacing Sidebar tablet overlay with shared Drawer component #918
Copy link
Copy link
Closed
Labels
scope:smallLess than 1 day of workLess than 1 day of worktype:refactorCode restructuring, cleanupCode restructuring, cleanupv0.5Minor version v0.5Minor version v0.5v0.5.1Patch release v0.5.1Patch release v0.5.1
Description
Context
PR #917 (feat/frontend-polish) implements a tablet-mode overlay sidebar with backdrop, FocusScope trap, Escape-to-close, and close-on-navigate behavior. CodeRabbit flagged that this custom overlay duplicates modal behavior that the shared Drawer component already centralizes.
Current state
The sidebar overlay (Sidebar.tsx lines 116-160) uses:
- Manual backdrop div with
onClickclose <aside>withrole="dialog"andaria-label- Radix
FocusScope trapped loop - Custom Escape key handler
- Close-on-navigate via
useEffectonlocation.pathname
Investigation needed
The shared Drawer component (web/src/components/ui/drawer.tsx) is a right-side slide-in panel. The sidebar overlay is a left-side panel with unique content (navigation items + footer with WS status, collapse toggle, command palette).
Evaluate:
- Can
Drawerbe adapted to support left-side rendering? - Does
Drawer's focus trap and backdrop behavior match what the sidebar needs? - Would the refactoring simplify the Sidebar component meaningfully?
- Are there any behavioral differences that would be lost (close-on-navigate, specific ARIA attributes)?
Source
Found by CodeRabbit (PR #917, inline comment on Sidebar.tsx:159), validated by local review agents.
Acceptance criteria
- Evaluate feasibility of using
Drawerfor sidebar overlay - If feasible, refactor Sidebar to use
Drawer(or addsideprop to Drawer) - If not feasible, document why in a comment in Sidebar.tsx
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope:smallLess than 1 day of workLess than 1 day of worktype:refactorCode restructuring, cleanupCode restructuring, cleanupv0.5Minor version v0.5Minor version v0.5v0.5.1Patch release v0.5.1Patch release v0.5.1