spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

mods/diff: docked, the pane keeps the built-in's blank top row and last columnBrowse files
poteat authored on Sep 10, 2026 parent d03baa0 · commit 9518d8f380dc
5 changed files+25 -2compared with d03baa0
Mmods/diff/hooks/limits/columns/index.ts
Amods/diff/hooks/limits/columns/pane-right-pad-columns.ts
Mmods/diff/hooks/limits/sizes/index.ts
Amods/diff/hooks/limits/sizes/pane-top-pad-rows.ts
Mmods/diff/hooks/views/pane-view.tsx
@@ -1,5 +1,6 @@
11 export * from './auto-open-min-columns.js'
22 export * from './open-min-columns.js'
3+export * from './pane-right-pad-columns.js'
34 export * from './widest-bucket-columns.js'
45
56 export * as default from '.'
@@ -1,0 +1,5 @@
1+/**
2+ * The blank column the docked pane keeps at its right edge, as the built-in
3+ * sidebar's body does (its `paddingX`): rows wrap one column short of it.
4+ */
5+export const PANE_RIGHT_PAD_COLUMNS = 1
@@ -5,5 +5,6 @@
55 export * from './max-lines-per-file.js'
66 export * from './max-listed-directories.js'
77 export * from './max-untracked-probes.js'
8+export * from './pane-top-pad-rows.js'
89
910 export * as default from '.'
@@ -1,0 +1,5 @@
1+/**
2+ * The blank row the docked pane keeps above its header, as the built-in
3+ * sidebar's header does (its `paddingY`).
4+ */
5+export const PANE_TOP_PAD_ROWS = 1
@@ -3,6 +3,7 @@
33 /* @jsxFrag Fragment */
44 import type { RenderElement } from 'claude-code'
55
6+import Limits from '../limits'
67 import Names from '../names'
78 import PaneState from '../pane-state'
89 import { currentPane } from './current-pane'
@@ -15,7 +16,9 @@
1516 * the picked turn's edits while that turn still exists (a rewind drops it).
1617 *
1718 * Seated inline (no room beside the transcript), only the built-in's line
18- * asking for a wider terminal, as the built-in shows no panel there.
19+ * asking for a wider terminal, as the built-in shows no panel there. Docked,
20+ * the body keeps the built-in's blank row above the header and blank last
21+ * column, so its rows sit and wrap where the built-in's do.
1922 *
2023 * @param kit the elements, the handlers, the width
2124 * @param model the pane's state
@@ -35,5 +38,13 @@
3538 return <Box>{Sections.dimNote(kit, Names.RESIZE_TERMINAL_TEXT)}</Box>
3639 }
3740
38- return isCurrent ? currentPane(kit, model) : turnPane(kit, model, turn)
41+ const right = Limits.PANE_RIGHT_PAD_COLUMNS
42+ const top = Limits.PANE_TOP_PAD_ROWS
43+ const inset: Kit = { ...kit, columns: Math.max(1, kit.columns - right) }
44+
45+ return (
46+ <Box flexDirection="column" paddingTop={top} paddingRight={right}>
47+ {isCurrent ? currentPane(inset, model) : turnPane(inset, model, turn)}
48+ </Box>
49+ )
3950 }