Skip to content

feat: arc-style sidebar-driven split view, remove top session tabs#2092

Open
benjaminshafii wants to merge 1 commit into
devfrom
feat/arc-sidebar-split-view
Open

feat: arc-style sidebar-driven split view, remove top session tabs#2092
benjaminshafii wants to merge 1 commit into
devfrom
feat/arc-sidebar-split-view

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

Summary

Remove the ephemeral top session tab bar and use the left sidebar as the single source of truth for session navigation, inspired by Arc browser's sidebar-first tab model.

What changed

Area Before After
Session tabs Ephemeral useState tab bar at the top of the main content area. No persistence, no drag reorder. Removed entirely. Sidebar is the only session navigation.
Split state Ephemeral useState in SessionPage. Lost on reload. Persisted in session-management-store (Zustand + localStorage) per workspace. Survives reloads.
Split controls Tiny Columns2 button inside each tab Right-click context menu + dropdown '...' menu on any sidebar session: 'Open in split view' / 'Close split'.
Split indicator Tab highlighted with primary color Sidebar session gets a Columns2 icon + primary left border accent
Drag-to-split Not possible Drag a session from the sidebar onto the main content area to open side-by-side. Drop zone appears on drag.
Session navigation Duplicate: sidebar + tabs Single source: sidebar only

Files changed (4)

  • session-page.tsx: Remove tab bar UI, sessionTabs state, openSessionTab/closeSessionTab. Use store for split. Add drag-to-split drop zone.
  • session-management-store.ts: Add splitByWorkspace state, setSplitSession action, useSplitSessionId selector.
  • app-sidebar-provider.tsx: Add splitSessionId, onSplitSession, onCloseSplit to SidebarContextValue.
  • app-sidebar.tsx: Add SplitIndicator, split actions in SessionActions + SessionContextMenu, wire through context.

Testing

  • tsc --noEmit: 0 new errors (pre-existing terminal-dock errors only)
  • Daytona proof pending

How to verify

  1. Open the app with 2+ sessions in a workspace
  2. Right-click a session in the sidebar -> 'Open in split view' -> two sessions side-by-side
  3. The split session shows a Columns2 icon + left border accent in the sidebar
  4. Right-click the split session -> 'Close split' -> back to single view
  5. Drag a session from the sidebar toward the right side of the main area -> drop zone appears -> drop to split
  6. Reload the page -> split state is preserved
  7. No top tab bar visible anywhere

@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview, Comment Jun 4, 2026 9:37pm
openwork-den Ready Ready Preview, Comment Jun 4, 2026 9:37pm
openwork-den-worker-proxy Ready Ready Preview, Comment Jun 4, 2026 9:37pm
openwork-landing Ready Ready Preview, Comment, Open in v0 Jun 4, 2026 9:37pm

Remove the ephemeral top tab bar and use the sidebar as the single
source of truth for session navigation (Arc browser pattern).

Changes:
- Remove sessionTabs useState and the top tab bar UI from SessionPage
- Move splitSessionId to persisted session-management-store (Zustand)
  so split state survives page reloads
- Add split indicators (Columns2 icon + primary left border) on the
  sidebar SessionMenuItem for the split session
- Add 'Open in split view' / 'Close split' to both SessionActions
  dropdown and right-click SessionContextMenu
- Add drag-to-split: dragging a session from the sidebar onto the
  main content area reveals a drop zone to create a side-by-side view
- Wire splitSessionId and split callbacks through SidebarContext
- Sidebar onOpenSession now routes directly instead of going through
  the removed openSessionTab wrapper

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/app/src/react-app/domains/session/sidebar/app-sidebar.tsx">

<violation number="1" location="apps/app/src/react-app/domains/session/sidebar/app-sidebar.tsx:224">
P3: New split action labels are hardcoded instead of using i18n keys, causing untranslated UI text.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

{ctx.onSplitSession && !isActive ? (
<DropdownMenuItem onClick={() => isSplit ? ctx.onCloseSplit?.(workspaceId) : ctx.onSplitSession?.(workspaceId, sessionId)}>
{isSplit ? <X className="size-4" /> : <Columns2 className="size-4" />}
{isSplit ? "Close split" : "Open in split view"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: New split action labels are hardcoded instead of using i18n keys, causing untranslated UI text.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/app/src/react-app/domains/session/sidebar/app-sidebar.tsx, line 224:

<comment>New split action labels are hardcoded instead of using i18n keys, causing untranslated UI text.</comment>

<file context>
@@ -214,6 +218,12 @@ function SessionActions({ className, sessionId, workspaceId, isPinned, isArchive
+        {ctx.onSplitSession && !isActive ? (
+          <DropdownMenuItem onClick={() => isSplit ? ctx.onCloseSplit?.(workspaceId) : ctx.onSplitSession?.(workspaceId, sessionId)}>
+            {isSplit ? <X className="size-4" /> : <Columns2 className="size-4" />}
+            {isSplit ? "Close split" : "Open in split view"}
+          </DropdownMenuItem>
+        ) : null}
</file context>

@benjaminshafii

Copy link
Copy Markdown
Member Author

Daytona Proof

Recording

Full flow recording: https://8090-qesirtmxkg4fcyie.daytonaproxy01.net/recordings/arc-sidebar-split.mp4

Screenshots

1. No top tabs - sidebar only navigation:
https://8090-qesirtmxkg4fcyie.daytonaproxy01.net/screenshots/daytona-screenshot-20260604-213800.png

2. Split view active (two sessions side-by-side) + split indicator in sidebar:
https://8090-qesirtmxkg4fcyie.daytonaproxy01.net/screenshots/daytona-screenshot-20260604-214120.png

3. Context menu showing 'Close split' for the split session:
https://8090-qesirtmxkg4fcyie.daytonaproxy01.net/screenshots/daytona-screenshot-20260604-214153.png

Verified flows

Flow Result
App loads, no top tab bar PASS
Create workspace + 2 sessions PASS
Right-click non-active session -> 'Open in split view' appears PASS
Click 'Open in split view' -> two sessions side by side PASS
Split indicator (Columns2 icon) shows on split session in sidebar PASS
Right-click split session -> 'Close split' appears PASS
Click 'Close split' -> returns to single view PASS
Split state is in Zustand store (persisted to localStorage) PASS

Test commands

tsc --noEmit  # 0 new errors (pre-existing terminal-dock.tsx errors only)

Sandbox: openwork-test-20260604-143153

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.

1 participant