Skip to content

Arrange the window the way VS Code arranges one - #64

Merged
rajanbor merged 1 commit into
mainfrom
feat/vscode-shell
Sep 16, 2026
Merged

rajanbor merged 1 commit into
mainfrom
feat/vscode-shell

Conversation

@rajanbor

Copy link
Copy Markdown
Owner

Change

The shell was a sidebar and one full-width surface. Reading an agent while looking at the sandbox it runs in meant clicking between them and holding the first one in your head — and everything in this app is an object worth putting next to another object.

Three columns now, the arrangement VS Code uses:

Column What it is
Activity strip One icon per area — agents, search, source control, sandboxes, models, workflows — with settings and the account at its foot. The lit icon marks the window's edge; clicking it again collapses the sidebar.
Sidebar Whichever area is lit, in collapsible sections, resizable by its right edge.
Work area Tabs in groups. Any tab splits to the right, drags into another group, closes with the middle button or ⌘W. An emptied group folds away unless it is the last, which shows a watermark.

web/src/lib/layout.ts owns the model: a tab is a key, a view, a title, an icon and the id of the object it points at; every operation returns a new layout and none mutates its argument. Tabs come from named constructors (agentTab, sandboxTab, modelTab…), so a title and an icon are decided once wherever the view is opened from. Opening a key that is already on screen focuses it rather than repeating it. Three groups is the limit — beyond that no pane is readable, so the split control disappears instead.

The arrangement is written to this machine's storage and read after mount, so the first render still matches the prerendered HTML. A restored tab pointing at an agent or sandbox the engine no longer has is dropped rather than rendered.

Two sidebar areas are new rather than moved:

  • Search reads the objects this window already holds — agents, their chats, sandboxes, models, workflows — and says plainly that file contents need the daemon.
  • Source control shows branch, working tree and recent commits without going through a top-bar menu.

Shortcuts: ⌘B sidebar · ⌘\ split · ⌘W close · ⌘1⌘6 areas, alongside the existing ⌘K, ⌘J, ⌘I.

Validation

  • pnpm build (style check, Next build, TypeScript) clean.
  • In the browser: opened an agent, split it right and confirmed two groups render side by side with their own strips; reloaded and the two groups came back; clicked through agents, models and usage; checked light and dark.
  • No new console errors. (The console carries older errors from a dev-server state that predates this branch; the count did not move during these interactions.)

Security impact

None. Presentation and local layout state only — no credential, command or network path. The stored layout holds object ids and titles, nothing more, and is read defensively: unreadable storage falls back to the default layout in silence.

Closes #60.

The shell was a sidebar and one full-width surface, so reading an agent while
looking at the sandbox it runs in meant clicking between them and holding the
first one in your head. Everything here is an object worth putting next to
another object, which is exactly the problem that layout solves.

Three columns now:

- an activity strip of areas — agents, search, source control, sandboxes,
  models, workflows — with settings and the account at its foot;
- a sidebar showing whichever area is lit, resizable, collapsing when its own
  icon is clicked again;
- a work area of tabs in groups, where any tab splits to the right, drags into
  another group, closes with the middle button or ⌘W, and an emptied group
  folds away unless it is the last, which shows a watermark.

`lib/layout.ts` owns the model. A tab is a key, a view, a title, an icon and
the id of the object it points at; every operation returns a new layout and
none mutates its argument. Tabs are built by named constructors, so a title and
an icon are decided once wherever a view is opened from. Opening a key that is
already on screen focuses it instead of repeating it.

The arrangement is written to this machine's storage and read after mount, so
the first render still matches the prerendered HTML. A restored tab pointing at
an agent or sandbox the engine no longer has is dropped rather than rendered.

Two areas are new rather than moved. Search reads the objects this window
already holds — agents, their chats, sandboxes, models, workflows — and says
plainly that file contents need the daemon. Source control shows the branch,
the working tree and recent commits in the sidebar instead of only in a top-bar
menu.

Closes #60
@rajanbor
rajanbor merged commit cd21215 into main Sep 16, 2026
11 checks passed
@rajanbor
rajanbor deleted the feat/vscode-shell branch September 16, 2026 11:56
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.

Shell: activity bar, sidebar and editor groups like VS Code

1 participant