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.
TypeScript
mods/diff: the pre-session rows sit under the built-in's blank rows, and a rule under the file's name
poteatdbe663d94840
diff --git a/mods/diff/hooks/views/current-pane/current-pane.tsx b/mods/diff/hooks/views/current-pane/current-pane.tsxindex bc4cb544..6bc7137d 100644--- a/mods/diff/hooks/views/current-pane/current-pane.tsx+++ b/mods/diff/hooks/views/current-pane/current-pane.tsx@@ -19,7 +19,8 @@ import { messagePaneOf } from './message-pane-of'* body at a time): header, base line, todo bar, pickers, rows, detail.** The tests-and-generated toggle sits above the rows; the elision count, the- * withheld-untracked note, the pre-session line and rows below them; the+ * withheld-untracked note, the pre-session line and rows below them, a blank+ * row above that line and above its rows as the built-in leaves; the* selected file last. With no rows to list, the loading line, the empty* state or the too-many and only-hidden lines take the body instead* (messagePaneOf), the header keeping only the close.@@ -90,7 +91,11 @@ export function currentPane(onPress: kit.actions.togglePreSession,}): null- const earlierRows = model.isPreSessionShown ? partition.preSession : []+ const earlierFiles = model.isPreSessionShown ? partition.preSession : []+ const earlierRows =+ earlierFiles.length === 0+ ? []+ : [<Box height={1} />, ...earlierFiles.map(rowOf)]const isUntrackedNoted = data?.isUntrackedWithheld === true && !emptyconst listed = listBodyOf(kit, { data, partition, totals, empty })const notes = listed.filter(line => typeof line === 'string')@@ -136,7 +141,7 @@ export function currentPane(message,controls: Sections.controlsView(kit, model),earlier: earlierToggle,- rest: [...earlierRows.map(rowOf), ...detail],+ rest: [...earlierRows, ...detail],})}@@ -153,8 +158,9 @@ export function currentPane(),notShownNote,untrackedNote,+ hasEarlier ? <Box height={1} /> : null,earlierToggle,- ...earlierRows.map(rowOf),+ ...earlierRows,...detail,])}</Box>diff --git a/mods/diff/hooks/views/current-pane/message-pane-of/message-pane-of.tsx b/mods/diff/hooks/views/current-pane/message-pane-of/message-pane-of.tsxindex 35a6c759..7c441468 100644--- a/mods/diff/hooks/views/current-pane/message-pane-of/message-pane-of.tsx+++ b/mods/diff/hooks/views/current-pane/message-pane-of/message-pane-of.tsx@@ -16,7 +16,8 @@ import Layout from '../../layout'* sit where the built-in centers them (half the spare rows above, rounded* down; each wrapped line centered on its own), the pickers right under* them and the pre-session line at the foot; otherwise it all stacks from- * the top.+ * the top, the pickers on the blank row the built-in leaves above the+ * pre-session line (that blank row itself when there are none).** @param kit the elements, the width, the body's rows* @param pane the header block, the message's lines, the pickers, the@@ -41,6 +42,10 @@ export function messagePaneOf(const drawn = lines.map(line => <Text dimColor>{line}</Text>)const controlRows = controls === null ? [] : [controls]const earlierRows = earlier === null ? [] : [earlier]+ const aboveEarlier =+ controlRows.length > 0 || earlierRows.length === 0+ ? controlRows+ : [<Box height={1} />]const middleRows = kit.rows - top.length - 1 - (earlier === null ? 0 : 3)const above = Math.floor((middleRows - lines.length) / 2)const isCentered =@@ -54,7 +59,7 @@ export function messagePaneOf(...top,<Box height={1} />,...drawn,- ...controlRows,+ ...aboveEarlier,...earlierRows,...rest,]}diff --git a/mods/diff/hooks/views/detail/detail-view.tsx b/mods/diff/hooks/views/detail/detail-view.tsxindex 8c61f5e7..3505a78d 100644--- a/mods/diff/hooks/views/detail/detail-view.tsx+++ b/mods/diff/hooks/views/detail/detail-view.tsx@@ -5,6 +5,7 @@ import type { RenderElement } from 'claude-code'import type { Kit } from '../kit'import Layout from '../layout'+import Sections from '../sections'import { codeBlocksOf } from './code-blocks-of'import type { DetailModel } from './detail-model'import { HUNK_DIVIDER } from './hunk-divider'@@ -13,7 +14,8 @@ import { placeholderOf } from './placeholder-of'/*** The selected file under the list: its bold path and asides, each name- * cut from its start to the width, the ask Button, the body.+ * cut from its start to the width, the ask Button, the built-in's dim rule+ * under them, the body.** The body is a placeholder, or the hunks as the engine's diff `Code` blocks* (codeBlocksOf) named by the path, a dim divider where two meet at a hunk;@@ -81,6 +83,7 @@ export function detailView(...ask,]}</Box>,+ Sections.divider(kit),...(placeholder ? notes : hunks),...footer,]}diff --git a/mods/diff/hooks/views/sections/divider.tsx b/mods/diff/hooks/views/sections/divider.tsxindex 22ee9ec4..0510aee5 100644--- a/mods/diff/hooks/views/sections/divider.tsx+++ b/mods/diff/hooks/views/sections/divider.tsx@@ -6,7 +6,8 @@ import type { RenderElement } from 'claude-code'import type { Kit } from '../kit'/**- * A dim rule across the body, between the list and the selected file.+ * A dim rule across the body: between the list and the selected file, and+ * under that file's name.** @param kit the elements and the width* @returns the rule