You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0ea9e96
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add a split-screen-horizontally toggle for the right panel (pingdotgg#41)
* feat: add a split-screen-horizontally toggle for the right panel
Adds a third toggle beside the terminal-drawer and right-panel buttons
that moves the right panel under the chat column instead of beside it,
splitting the screen into top and bottom the way the terminal drawer
already does.
Splitting is a placement change rather than an open/close one, so every
press has to leave a panel on screen: pressing from a closed panel opens
it at the bottom, and pressing while maximized un-maximizes first, since
maximizing hides the chat entirely — the opposite of a split.
The panel gains a row-resize handle on its top edge. Height persists
under its own key, separate from width, so flipping orientation restores
the size that orientation last had. Orientation itself is a per-browser
preference like the panel's width, not thread state.
Which surface owns the window's top-right follows the panel: its tab bar
when it sits beside the chat, the chat header when it is split off the
bottom or closed.
Supporting changes:
- useResizableWidth -> useResizableSize, now driving height as well via
an "top" edge, with the pointer math extracted as a pure, tested
function.
- ChatHeader's rightPanelOpen prop -> hostsLayoutControls, which is all
it ever meant; the split makes the old name wrong.
- New rebindable command rightPanel.toggleHorizontalSplit, mod+alt+0.
Co-Authored-By: Claude Opus 5 <[email protected]>
* docs(fork): record the split-screen delta, and give the inventory an upstream to check against
The split-screen toggle adds a delta to ten upstream files, so it needs a
Fork Inventory row, a delta section, Path Policy rows and a convergence
watch entry. Eight of the ten were byte-identical to upstream before it.
The fork owns no file in that row except one: useResizableWidth.ts is
renamed to useResizableSize.ts, so upstream's edits to the hook will
arrive as a modify/delete conflict rather than a mergeable hunk. Recorded
rather than reversed, with the cheaper shape written beside it.
Two corrections found while verifying ownership against upstream, which
a sandbox can now do — the fork's clone is shallow and has no upstream
remote, but adding pingdotgg/t3code and fetching --depth=1 takes seconds,
so both commands go in Path Policy:
- .plans/** was marked ours while upstream owns 32 of its 35 files. That
blanket ours would have discarded every upstream plan edit, which is
the failure the paragraph above the table describes. Row split.
- messageOrigin.ts is confirmed absent upstream, clearing the caveat the
previous log entry left on it. The other twelve ours paths verify
clean too.
Co-Authored-By: Claude Opus 5 <[email protected]>
* refactor(web): keep the split-screen delta additive, per AGENTS.md
AGENTS.md asks for fork changes that upstream merges cheaply: put the code
on a path upstream does not have, reach it from upstream files through the
smallest hook, and prefer a branch above upstream's to a rewrite of it.
Three parts of this branch did the opposite.
useResizableWidth.ts was renamed to useResizableSize.ts, which deletes a
path upstream owns and edits — every future upstream change to that hook
would have landed as a modify/delete conflict. Upstream's hook is restored
byte for byte, and the vertical axis moves to a fork-only sibling,
apps/web/src/fork/useResizablePanelHeight.ts, which also owns the max-height
helper and its tests.
The orientation preference was appended to upstream's rightPanelLayout.ts;
it moves to apps/web/src/fork/rightPanelOrientation.ts, leaving that file
byte-identical to upstream again.
ChatHeader's rightPanelOpen prop was renamed to hostsLayoutControls. It
keeps upstream's name and meaning now, with an optional
layoutControlsOverHeader beside it for the case the split introduces.
PreviewPanelShell keeps every upstream line as upstream wrote it: the
stacked classes are appended after upstream's own and resolved by twMerge,
and the width path is untouched. Net effect on merges: eight upstream
files with additive hunks, three fork-only modules, no renamed or deleted
upstream paths. Behaviour is unchanged.
Verification scoped to the change, per AGENTS.md: web typecheck, lint on
the touched files, fmt, and vp test run over apps/web/src/fork,
apps/web/src/components/preview and rightPanelStore — 24 files, 128 tests.
Model: Claude Opus 5. Harness: Claude Code.
Co-Authored-By: Claude Opus 5 <[email protected]>
* docs: fork code lives where the code it works with lives
apps/web/src/fork/ was reading as a ghetto for anything fork-authored,
which makes the tree look like a fork rather than like the app it is.
AGENTS.md said to put fork code there; it now says to write a new file and
put that file where it belongs, named for what it does. A path upstream
does not have merges for free wherever it sits, so the merge argument was
never a reason for an odd home. fork/ keeps only what is about being a
fork: the surface-gating registry and the mobile modules.
Two rules go with it. Mark fork code where someone will look — a line in
the module's doc comment, a short // Fork: on a hunk inside an upstream
file — so a merge can see what it is holding without diffing against
upstream. And never rename, move or delete an upstream file for a fork
reason, which is the lesson the useResizableWidth rename in this branch
taught.
The split-screen modules move accordingly: rightPanelOrientation.ts next
to upstream's rightPanelLayout.ts, useResizablePanelHeight.ts next to
upstream's useResizableWidth.ts. Imports and the fork inventory follow.
Behaviour is unchanged.
Verification: web typecheck, lint on the touched files, fmt --check, and
vp test run over apps/web/src/hooks and apps/web/src/components/preview —
25 files, 87 tests.
Model: Claude Opus 5. Harness: Claude Code.
Co-Authored-By: Claude Opus 5 <[email protected]>
* docs: trim the fork-change rules back to what they need to say
The placement rule arrived with two extra bullets and a paragraph of
justification aimed at the mistake that prompted it. Folded back into the
three bullets that were already there: where a new file goes and how it
says it is ours, the additive hook, and upstream's file keeping its name
and shape. The inventory and the log entry lose the same padding.
Model: Claude Opus 5. Harness: Claude Code.
Co-Authored-By: Claude Opus 5 <[email protected]>
* docs: fork code says so in the file
Dropped the placement bullet from AGENTS.md — where a file sits is a
judgement call, not a rule worth spending lines on. What replaces it is
the part that pays off at merge time: a fork-only module says it is ours
in its doc comment, and a fork hunk inside an upstream file carries a
short // Fork: above it, so a merge can see what it is holding without
diffing against upstream first.
Applied to this branch's own hunks: ChatView's two split derivations,
RightPanelTabs' orientation prop, PanelLayoutControls' third toggle, and
the two keybindings entries. The two fork-only modules already said it.
Model: Claude Opus 5. Harness: Claude Code.
Co-Authored-By: Claude Opus 5 <[email protected]>
---------
Co-authored-by: Claude Opus 5 <[email protected]>
Copy file name to clipboardExpand all lines: AGENTS.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,9 @@ So most of what upstream's product is built around is not this fork's product. T
16
16
17
17
Upstream owns most files here and works in them steadily, and every line of ours inside one of their files is a conflict we pay for at each merge. So make fork changes surgically:
18
18
19
-
-**Put the code somewhere upstream does not have.**`apps/web/src/fork/`, `docs/fork/`, a new module beside the upstream one. A fork-only path merges for free.
20
-
-**Reach it from upstream files through the smallest hook you can find.** A call, a gate read from `apps/web/src/fork/features.ts`, one element in a list — additive, and never re-indenting an upstream block, because a re-indented block turns a nearby upstream edit into a conflict.
21
-
-**Prefer a toggle to a rewrite.** Something the fork must not show gets hidden by a flag, not deleted. Something it must do differently gets a branch above upstream's, leaving upstream's path intact.
19
+
-**Say in the file that it is ours.**A line in a fork-only module's doc comment, a short `// Fork:` above a hunk inside an upstream file. A merge should be able to see what it is holding without diffing against upstream first.
20
+
-**Reach it from upstream files through the smallest hook you can find.** A call, a gate read from `apps/web/src/fork/features.ts`, one element in a list, one optional prop — additive, and never re-indenting an upstream block, because a re-indented block turns a nearby upstream edit into a conflict.
21
+
-**Prefer a toggle to a rewrite.** Something the fork must not show gets hidden by a flag, not deleted. Something it must do differently gets a branch above upstream's, and their file keeps its name, its exports and its shape.
22
22
-**Write the delta down so it can be re-stated, not re-merged.** The inventory records behavior that must survive; the point is to reapply it on top of an upstream rewrite, not to defend our version of their file.
23
23
-**Shrink the delta when upstream catches up.** The convergence watch list says what to drop when upstream ships an equivalent.
0 commit comments