Skip to content

feat(fork): turn the area right of the thread list into a work area of split panes - #216

Open
orbitingflea wants to merge 25 commits into
mainfrom
proto/fullscreen-panels
Open

orbitingflea wants to merge 25 commits into
mainfrom
proto/fullscreen-panels

Conversation

@orbitingflea

@orbitingflea orbitingflea commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

This prototype turns the area right of the thread list into split panes with a Chat tab. It is not meant to merge.

Behaviour change

Behaviour change: yes, web and desktop users on this branch see split panes instead of a chat beside a right panel.

  • Only a mini-player tab hides. It returns when the player closes, Chat hides, or preview permission ends.
  • Preview: Toggle floats the tab, docks it, or closes an empty New tab.
  • Diff: Toggle closes or reopens the Diff tab.
  • The terminal drawer is gone, so terminals open as tabs.
  • Cmd+J and Ctrl+J leave keybindings and reach the shell.
  • Dragging a file or chat link opens or moves it at the drop spot.
  • The Details popover opens under the Chat tab bar when Find is closed, or below the Find bar when Find is open.

Why

Hidden tabs were hard to track, so this removes them, the terminal drawer, and its shortcut. It rebases PR #249 link drops onto panes, removes the empty row above Details, and adds review and bug-sweep fixes.

Checks

  • About 520 fork and related unit tests pass. Work-area, Find, reply, and mini-player browser tests pass.
  • Format, lint, knip, and typecheck pass on changed files.
  • Browser tests that time out in parallel pass alone.
  • Real web app checks passed. Popover top moved from 96 px to 60 px (toggle row ends at 52 px). Reloaded linked files kept line 1 instead of jumping to line 300. Only browser tests cover drag and drop.

Undo

Revert the commit. There is no server, contract, or database change.

Design notes
  • A playing mini-player tab floats unsaved and returns to its pane on close, Preview: Toggle, dock, reveal, or reload. Old hidden lists load in panes. Forced reveals add a pane if no Chat shows.
  • Run and scripts reuse idle terminals. Unattached ones open in background. Closing a terminal tab hides it until reload, even when the viewer cannot stop the shell. Saved split drawers become split tabs once live terminals list, skipping closed ones. Opened files keep focus. Headers drop the terminal button, top band, and New thread in project; project text is plain.
  • Only the Details popover moves under the tab bar, keeping its width and right edge. The inline details card in wide panes stays below the header.
  • Drops target strip slots, edge quarters, or middle by origin. Clicks or keys cancel slow drops. Sub-360 px panes refuse Chat drops with no ghost. Other drops keep valid layouts and match clicks. Links in linked files (even if Chat hides), side Files trees, and other links (like remote PRs) drag where clicks open.
  • Reopen Closed Tab keeps source thread after a NUL byte in the path (shared code unchanged), skips reopened linked files, and opens the next closed tab.
  • Edge drags split panes. Move shifts tabs across panes. Last-tab close drops a pane. Moving Chat in a strip fixes splits so panes return on widen. Reorders keep the divider. Chat links show open tabs, split one pane right, or use the nearest non-Chat pane. Auto opens skip Chat, reply, side-chat, and subagent tabs.
  • Reply tabs keep own drafts. Find shows hidden or closed Chat first (as behind Files in a strip). Replies open in a fitting pane (Chat keeps focus) or under Find in a strip. Main steps return to Chat. Side-Chat Find keeps that thread's layout. Opening a result shows its Chat. Quote jumps and modifier/middle clicks match upstream. Same-project thread drags open Chat tabs.
  • State saves workArea, one floating tab max, and cited lines. Reload keeps place. New citations, repeat clicks, or reopens jump. Writes keep a Chat and 360 px floor. Unfit layouts use a strip. One table holds tab rules. Subagents act as own threads. PR chip opens beside Chat. Strip fallback keeps unique pane ids. Fork hooks 49 upstream files, English only.

Known limits:

  • Link browsers may flash elsewhere before moving beside source.
  • A lone floating browser moves to another pane if its pane closes.
  • Sourceless main-Chat opens (like subagent clicks) may cover side chats.
  • Side-thread tool diffs open beside main Chat.
  • Side chats under 360 px stay a strip until moved or closed.
  • Other-environment thread links open upstream's read-only view in a pane.
  • Open Details covers the header right end, including Stop sharing.
  • Rarely, a file round-trip before a late terminal list lets the terminal take focus. Opening a split's second terminal early gives it its own tab. Some three-pane layouts stay a strip after a narrow Chat move and widen.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XL labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

This PR changes the test suite by +137 test cases (browser +19, unit +118, server 0).

New browser test files: apps/web/src/fork/subThreads/subThreadFind.browser.test.tsx, apps/web/src/fork/workArea/WorkArea.browser.test.tsx, apps/web/src/fork/workArea/changeRequestLink.browser.test.tsx, apps/web/src/fork/workArea/useLinkDrops.browser.test.tsx.
Each browser test file costs CI seconds of module loading before its first test runs; a unit test costs milliseconds.

Keep tests that would fail for a real reason, and test logic below the UI where it can be. See Testing.

@orbitingflea
orbitingflea force-pushed the proto/fullscreen-panels branch from 377fc32 to 547954f Compare November 20, 2026 00:43
@orbitingflea orbitingflea changed the title feat(fork): make the chat a tab of the maximized right panel feat(fork): turn the area right of the thread list into a work area of split panes Nov 20, 2026
@github-actions github-actions Bot added size:XXL and removed size:XL labels Nov 20, 2026
@orbitingflea
orbitingflea force-pushed the proto/fullscreen-panels branch 2 times, most recently from 05fe5d0 to 66e542e Compare November 20, 2026 02:26
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 2c6f91c.

This comment will update automatically after the next completed run.

orbitingflea and others added 6 commits November 23, 2026 01:20
…f split panes

Everything right of the thread list is one work area of nested panes, and
the chat is one kind of tab in it. Dragging a tab onto an edge of a pane
splits that pane; closing a pane's last tab closes the pane. Dragging a
thread of the same project from the thread list into the area opens its
chat as another Chat tab, whose file links open that thread's files. The
last Chat tab cannot close. Each thread keeps its own layout in its
right-panel record, and the right panel's show, hide and maximize
controls are gone.

A tab opened from a chat or a linked file shows a tab already open, or
splits a lone pane to the right, or else lands in the nearest other pane,
preferring one not showing a Chat, looking right, left, down, then up.
A whiteboard chip in the composer and a board:// link in a chat show the
region on the Whiteboard and never open a file.

A pane holding a chat, reply or side-thread box is at least 360 px wide,
and automatic opens never cover a reply or side-thread tab. The chat
header loses its terminal button and the band above it, and its details
toggle sits at the right end of the pane's tab bar. A lone pane has a
Split right button that opens a New tab launcher beside it. A thread link
of the same project opens that thread as a Chat tab by the same rule; a
thread of another project or environment opens on its own page.
Subagents and side chats use upstream's side-thread tabs. Each Replies
sub-thread opens as its own tab with its own draft. A quote link shows
its reply tab; a Find step keeps the Find field and never covers its
chat. Both reuse the reply tab the last reveal opened until the user
takes it over.

The only tab in no pane is a browser or device tab that floats in the
mini player. Preview: Toggle, picture-in-picture and device Float move
it there; closing the player, Open in panel or Preview: Toggle again
puts it back, and so does any view that stops drawing the Chat that
holds the player. Preview: Toggle on an empty browser tab closes it.
Diff: Toggle closes the Diff tab when shown and opens it otherwise, so
Reopen Closed View sees the close.

There is no terminal drawer under the chat. A request to open the drawer
becomes a terminal tab in the PTY's own thread record, so scripts, chat
code-block Run and the setup banner keep working; server terminals with
no tab are adopted as background tabs, and a tab the user closed stays
closed while the server still lists it. Terminal: Toggle (Cmd/Ctrl+J) is
filtered out of the web client's keybindings and settings, so the key
reaches the shell; split, new and close act on the focused terminal tab.

Files tree rows and chat links (upstream's drag sources, moved into the
work area) drop onto a pane's tab strip, one of its four edges, or its
middle, through the same open origin a click uses; a press or key before
a slow open lands cancels the drop place. On a subagent's own page its
child's side thread is the page's own thread; the composer's pull
request chip opens beside its chat; pane ids are not reused after the
layout falls back to the default. Upstream files carry only small hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The details toggle moved from the chat header into the Chat pane's tab
bar, but the popover still opened from the header's bottom edge, one
header row below the toggle. While Find is closed it now opens from the
header's top edge, which is the tab bar's bottom edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared Details card now only calls the fork's offset helper instead
of holding the work-area anchoring rule itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
orbitingflea and others added 19 commits November 23, 2026 01:20
…ce expires

A linked file's persisted `shown` flag never expires, while the saved place
it protects does after 30 days. With no saved place the file opened at
line 1. Mark the reload as shown only while a saved place exists, matching
a regular tab, whose receipt expires with the same TTL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A closed linked file is kept in history under a synthetic file surface
id that never appears in the panel's surfaces, so the planner did not see
it as open again and re-revealed it instead of restoring the next closed
tab.

Before planning, the shortcut now splits history into entries still
closed and linked-file entries whose tab is open again in their owner's
layout, and drops the latter as it drops other open entries. This also
clears entries saved before the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a Files tab active in one strip, or the primary Chat closed, the
Chat column is placed away and inert, so Find opened its field inside it:
the shortcut was consumed and no usable search field showed.

Each Find request now shows the thread's primary Chat first, unless it is
already drawn or one strip shows the thread's reply under the Find bar.
A store subscriber does this inside the Find store's update, before the
field's focus effect runs, so every entry point (shortcut, palette,
search results) is covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s in

A file chip or anchor in a linked file's Markdown took its drag owner
from the source thread's panel host, which exists only while the source
Chat is mounted. Once that Chat was hidden, the link was registered to
the source thread while the drop listener belonged to the layout owner,
so the drop did nothing.

The drag owner now comes from the same opener the click uses, whose
target writes to the layout that shows the link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nal tabs

At startup a drawer saved open was converted by opening only its active
terminal; the other sessions were later adopted as separate tabs, so the
drawer's grouping, member order and split direction were lost.

The startup pass now opens each saved group as one terminal tab, its
members split in their saved order and direction, with the group's first
member active (the saved active terminal for its own group). That tab is
selected. Terminals a tab already holds stay there. Requests made later in
the session still open a single terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… collapsed

Moving a Chat tab onto a pane in the strip view kept the split's old ratio.
The strip view has no fit check and hides the divider, so after the window
widened the panes still did not fit and stayed collapsed with no way to fix
the ratio.

The strip-view join now settles the splits around the target pane, and
settleSplit falls back to the ratio that fits at the smallest size when no
ratio fits at the current one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A browser tab that floated into the mini player recorded only its tab id,
not where it came from. Closing the mini player, Preview: Toggle and a
reload all put it back through the fallback placement, so it often landed
in another pane.

The floating record now keeps the home pane and the next tab there, and
unfloating puts the tab back in that pane in the background. When the home
pane is gone the tab stays in no pane and the old fallbacks place it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Floating a second tab overwrote the first float's saved pane before the
first tab was put back, so repair placed it in the wrong pane. floatTab now
docks the earlier float in its home pane first, then floats the new tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atio

Every strip-view move settled the splits around its target pane, so
reordering two file tabs rewrote a ratio the user set. Only a move that
gives the pane a Chat it lacked needs the room, so only that move settles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n widened

The strip-view join settled the splits above its pane outermost first. With
no ratio fitting at the strip size, the outer split took its fallback from
the inner split's old ratio, so after widening the primary Chat had too
little room. The join now settles from the pane up to the root, so each
outer split counts the inner ratios it keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upgrade of a drawer saved open ran before the thread's first session
list, so a split member closed on another client came back in the new
terminal tab, where the old drawer dropped it. The saved groups now wait
for that list and become tabs of their listed members only, keeping order,
split direction and the active terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…click opens

A chat anchor took its drag owner from the opener's layout, but a click on a
pull request or issue link in a Chat from another environment writes that
thread's own record. Such a link offered drops on the owner's panes and
then opened in a record drawn nowhere. An anchor's drag owner is now the
record its click writes, found the way the click finds it inside the
opener's origin. File chips keep the owner's layout, where their link-file
open lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Find in a thread shown as another thread's side Chat ran open-thread on
that thread's own record, which is drawn nowhere, so the thread later
opened on its Chat instead of its focused tab. Find now shows the primary
Chat only for a thread whose panel is not hosted elsewhere; the side Chat
it searches is already drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its session list

Startup closed a drawer saved open at once but kept its pending conversion only in
memory, so a reload or restart before that thread's first session list turned each
shell into its own tab. The threads still awaiting conversion are now persisted, and
the conversion reads the groups the terminal store already keeps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ehind the user's file

When a thread's first session list arrived after the user had opened something, the
conversion of a drawer saved open activated the terminal and took focus from it. Each
waiting thread now keeps the tab focused when its drawer was found open. If the focus
changed since, the tabs open in the background (splitTerminal gains the same
`automatic` flag openTerminal has); otherwise the saved active terminal is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…it again when widened

In the strip view, moving a Chat onto another pane settled only the splits above the
destination pane. The branch the Chat left kept its old ratio, so after widening the
panes did not fit although usable ratios existed. The move now settles the splits
above the destination pane and above each pane the moved tabs came from, innermost
first. Other splits and plain reorders keep their ratios.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…as a side Chat

A sidebar message result opens Find before the route to its thread commits. While that
thread was still shown as another thread's side Chat, the Find follower skipped its own
layout, so the thread's page then opened on its file and Find's Chat was not drawn.
openThreadFindOnQuery, which every search result uses to open its thread's page, now
marks its request, and the follower shows the Chat for it. Find opened in place in a
side Chat still leaves that thread's own layout alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…thers

Each app tab wrote the map of drawers awaiting terminal tabs from its own
in-memory copy, so one tab could put back a drawer another tab had
already converted, and a later reload converted it again and took focus.
Read the stored map before every write instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s side Chat's layout

The mark for a Find request that opens a thread's page was a plain flag,
so an in-place Find for another thread started from a store listener
during that request inherited it and rewrote the side Chat thread's own
layout. Mark the thread whose page opens instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@orbitingflea
orbitingflea force-pushed the proto/fullscreen-panels branch from f17bea7 to 2c6f91c Compare November 23, 2026 03:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant