Arrange the window the way VS Code arranges one - #64
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
⌘W. An emptied group folds away unless it is the last, which shows a watermark.web/src/lib/layout.tsowns 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:
Shortcuts:
⌘Bsidebar ·⌘\split ·⌘Wclose ·⌘1–⌘6areas, alongside the existing⌘K,⌘J,⌘I.Validation
pnpm build(style check, Next build, TypeScript) clean.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.