fix(mobile): off-canvas drawers for the Files & Artifacts views #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mobile-ui-files"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On phone-width viewports the Files and Artifacts views were unreadably narrow:
MainSplitcollapses its two top-level panes at 768px, but the nested side columns had no responsive handling, so three fixed columns (240px artifact list + 280px comment sidebar, or the 220px file tree) squeezed the content to nothing.This adds Pattern A — off-canvas drawers, scoped entirely to
@media (max-width: 768px):transform: translateX(±100%)+ an.openclass).MainSplit's right-pane toolbar:tree/listimmediately right of the‹back button,comments N(open-comment count) on the right. Text labels, no emoji — matching the existingpin/savebutton convention (the project has no icon library)..scope-chipis hidden ≤768px to make room.MainSplitvia Svelte 5$bindableprops intoFileExplorerPanel(treeOpen),ArtifactsPanel(listOpen/commentsOpen/openCommentCount) andArtifactViewer→CommentSidebar(drawerOpen). Left drawers auto-close on selection; a tap-scrim closes any drawer.countOpenComments(unit-tested) backs the comment-count badge.Desktop (>768px) is unchanged by construction — every new rule is inside the media query or gated on a
.mobile-drawer/.openclass; no original column rule was touched.Opt-in gating keeps shared components safe: the drawer behavior only activates when a
mobileDrawerprop is passed, so the Config Explorer (FileExplorerPanel) and the artifact pop-out page (ArtifactViewer) render exactly as before.Pop-out page drawerization is intentionally deferred (it has no toolbar to host a toggle) — see the spec's "Out of scope".
Design spec:
docs/superpowers/specs/2026-06-21-mobile-drawers-files-artifacts-design.mdPlan:
docs/superpowers/plans/2026-06-21-mobile-drawers-files-artifacts.mdTest Plan
Automated (all green):
pnpm test(539 passed, incl. newartifact-comments),pnpm typecheck(0 errors),pnpm lint(clean).Manual ⚠️ still pending (no headless browser in the dev worker) — please verify at ≤768px:
treetoggle right of back; tree slides over and closes on file-select; scrim closes it.list(right of back) +comments N(right) toggles; both drawers slide;listcloses on artifact-select;Ntracks open comments.main.