Skip to content

feat(ui): add resizable session sidebar#228

Open
tpn wants to merge 5 commits intowesm:mainfrom
tpn:tpn/218-resizable-sidebar
Open

feat(ui): add resizable session sidebar#228
tpn wants to merge 5 commits intowesm:mainfrom
tpn:tpn/218-resizable-sidebar

Conversation

@tpn
Copy link
Contributor

@tpn tpn commented Mar 24, 2026

Summary

  • add shared sidebar-width helpers and persist the preferred desktop sidebar width in the UI store
  • add a desktop-only draggable resize handle between the session list and main content pane
  • clamp rendered width against the current layout while preserving the stored preferred width across passive layout changes and harden drag lifecycle edge cases

Test Plan

  • cd frontend && npm test -- src/lib/components/layout/sidebar-width.test.ts src/lib/stores/ui.test.ts src/lib/components/layout/ThreeColumnLayout.test.ts
  • cd frontend && npm run build
  • git diff --check
  • local roborev 3-agent matrix review (codex, claude-code, gemini) on upstream/main..HEAD with no medium+ findings
  • cd frontend && npm run check
    Existing unrelated upstream failures remain in:
    • frontend/src/lib/components/sidebar/SessionItem.svelte
    • frontend/src/lib/utils/tool-params.ts
    • frontend/src/lib/components/content/ToolBlock.test.ts
    • frontend/src/lib/utils/model.test.ts
    • frontend/src/lib/virtual/VirtualizerTest.svelte
    • frontend/src/lib/virtual/CacheTestWrapper.svelte

Closes #218.

@roborev-ci
Copy link

roborev-ci bot commented Mar 24, 2026

roborev: Combined Review (bc350c0)

Verdict: The code changes look solid, and no issues of medium
or higher severity were found.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@tpn tpn force-pushed the tpn/218-resizable-sidebar branch from bc350c0 to 9db8e12 Compare March 24, 2026 22:53
@tpn tpn force-pushed the tpn/218-resizable-sidebar branch from 9db8e12 to c4c2a0d Compare March 24, 2026 23:19
@roborev-ci
Copy link

roborev-ci bot commented Mar 24, 2026

roborev: Combined Review (c4c2a0d)

Summary Verdict: The PR implements a persistent, resizable sidebar for the desktop layout, but requires a fix to correctly handle active resizing when the sidebar closes.

Medium

  • Location: frontend/src/lib/components/layout/ThreeColumnLayout.svelte
    • Problem: An
      active resize is only cancelled when the viewport leaves desktop mode or the component unmounts. If ui.sidebarOpen becomes false during a drag, the handle is removed from the DOM but isResizing, the global pointer listeners, and body.sidebar-resizing remain active until a
      later pointer event arrives, so a closed sidebar can still keep mutating ui.sidebarWidth.
    • Fix: Call stopResizing() when the sidebar closes and add a regression test that closes the sidebar mid-drag.

Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@tpn
Copy link
Contributor Author

tpn commented Mar 25, 2026

Rebasing and addressing comments now, expect a push soon when done.

@roborev-ci
Copy link

roborev-ci bot commented Mar 25, 2026

roborev: Combined Review (0345afc)

Verdict: The PR successfully implements a resizable sidebar with persistence, but contains a Medium severity breakpoint mismatch that needs to be addressed.

Medium

  • Location: frontend/src/lib/components /layout/sidebar-width.ts:6, frontend/src/lib/components/layout/ThreeColumnLayout.svelte
  • Problem: The new resize/persistence logic uses a 960px "desktop" breakpoint, but the layout CSS still switches to the mobile overlay only at
    767px. Between 768px and 959px, the app remains in the desktop two-column layout while the sidebar width style is removed and the stored preference is ignored, so the "persisted sidebar width" feature silently stops working across that viewport range.
  • **
    Fix:** Make the JS breakpoint match the actual layout breakpoint, or update the layout CSS to switch to the non-resizable/mobile behavior at 960px as well so the rendering and resize logic stay in sync.

Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

@roborev-ci
Copy link

roborev-ci bot commented Mar 25, 2026

roborev: Combined Review (cfb764c)

Verdict: All reviewers agree the code is clean and introduces no issues.

The changes successfully implement a persistent, resizable sidebar layout with local storage persistence, bounded width clamping, and comprehensive pointer event handling without introducing any security or structural vulnerabilities.


Synthesized from 3 reviews (agents: codex, gemini | types: default, security)

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.

feat: resizable sidebar/session pane

1 participant