← Back to Pull requests

feat: fold the navigation sidebar to a mini rail (#346) #347

Closed
unknown closed this pull request without merging on Nov 27, 2026 06:48 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 06:32 UTC
Author

Closes #346

Implements the design export's collapsed sidebar state (bookmarkit_manager_sidebar_collapsed, beside the updated expanded page): the persistent rail folds to a 64px mini rail, desktop-only.

What changed

  • The toggle. The rail's brand header gains a collapse control (dock_to_left / dock_to_right from the new icon pair) carrying aria-expanded and aria-controls="workspace-sidebar"; the aside answers with id and data-collapsed. The label promises the state a press delivers — "Collapse sidebar" unfolded, "Expand sidebar" folded.

  • The fold. Collapsed, the prose is unmounted, not hidden: brand title and tagline, the help button, both captions (with the manage switch), every row label and count, and the saved-views bar go away whole. Rows keep their names on aria-label + title — label and count, as the mockup titles them — and Add Bookmark squares to its 40px icon. FolderTree gains an iconOnly reading: flat, named icon rows, no carets, every folder visible, selection and drops still live.

  • One variable moves the frame. useSidebarCollapsed persists the preference (bm_sidebar_collapsed, read before first paint like the view mode is), BookmarkApp stamps data-sidebar-collapsed on the shell, and the ≥lg block re-points --app-sidebar-width to 4rem — the rail, the shell's padding and the fixed header and toast dock fold in the same step, the width animating on --ui-duration-enter/--ui-ease-enter under the existing global reduced-motion rules.

  • The drawer never folds. SidebarNav guards folded = collapsed && !onClose, and BookmarkApp passes the flag to the rail mount alone — below lg the drawer keeps its prose, its help entry and no toggle, whatever the preference says.

  • Design record. The checked-in manager mockup takes on the export's collapsible scaffold (ids, toggle, sidebar-label/sidebar-count/sidebar-nav-item hooks, the toggle handler), and the collapsed state lands as its own page (bookmarkit_manager_sidebar_collapsed) — both ported with the recorded #339 corrections kept (Ctrl/Cmd+K, the demo toast and form staying hidden). README documents the fold; DESIGN.md records it beside the #283/#294 chrome decisions. Stories gain Collapsed; changeset (minor).
  • Acceptance

  • The toggle flips the rail and the frame's inline-start inset with the width transition; its label, icon and aria-expanded follow the state

  • Folded: labels, counts, captions, saved views and the help button are gone; rows keep accessible names and tooltips; Add Bookmark keeps its name

  • Expanding restores the full rail exactly

  • The drawer content never collapses; the preference persists across reloads and applies only from lg up

  • Stories cover both states; user-visible → changeset (minor); npm run ci green
  • New suites: useSidebarCollapsed.test.js (persistence, storage-refused fallbacks), five mini-rail pins in SidebarNav.test.jsx (folded names, drawer immunity), four FolderTree icon-only pins (flat rows, live drops, root row, no manage), and two shell wiring tests (fold + frame attribute + persistence, mount-already-folded). 1395 tests green locally; the branch landed as five GitHub-signed bot commits and the landed tree was byte-compared against the staged snapshot (tree hash identical) before opening this PR.

    <!-- agent-bot-write: ghw_e912eb30a814f9ad session=ba9070074325 bot=trueline-zcode-agent[bot] conversation_id=sess_f455d119-306c-4563-9b87-5178a9d572d2 conversation_id_source=self-reported -->

    Diff: 443 lines (+332 / -111) across 5 files Reviewer: qwts Review duration: 15m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 443 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.365
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #347"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.9% · Safe to merge
    17.9%