Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.
JavaScript ai-codingclaudeclaude-codeclaude-code-pluginclicoding-agentsdeveloper-toolsgitllmtypescript
feat(map): quieter map rows, Outline and canvas
Eren15b4c705cba5
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 3d98caf..1edf901 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,7 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]+### Changed+- Map rows show the date only on a day's first row (the rest show the time), the `mN` label is quieter, and "↑ continues <session> · m37" is now "↑ m37" with the session in its tooltip.+### Removed+- The map is quieter: no "experimental" badge or "you" labels in the Outline, no dot grid, minimap or React Flow credit, and the toolbar shows only the session count. The author shows only when more than one person recorded sessions.- The map no longer draws the dashed return arrow and the "↩ mN" mark (a branch already shows the return; the details panel still lists it), nor the epoch tag on session rows.### Changeddiff --git a/packages/template/src/GitGraph.tsx b/packages/template/src/GitGraph.tsxindex 04a459c..6391610 100644--- a/packages/template/src/GitGraph.tsx+++ b/packages/template/src/GitGraph.tsx@@ -1,7 +1,7 @@import { type MouseEvent, useMemo } from "react";import { formatChange, isBigChange } from "../../cli/src/view/change.js";import type { ViewNode } from "../../cli/src/view/model.js";-import { formatStamp } from "./format.js";+import { dayOf, formatClock, formatStamp } from "./format.js";import {branchPath,type GitLayout,@@ -20,13 +20,15 @@ function color(index: number): string {return `var(--l${index % LANE_COLORS})`;}-function rowRange(row: GitRow): string {- if (row.kind === "more") return "";- return row.message.at ? formatStamp(row.message.at) : "";+/** Date and time on a day's first row; the rows under it on the same day show the time only. */+function rowRange(row: GitRow, sameDay: boolean): string {+ if (row.kind === "more" || !row.message.at) return "";+ return sameDay ? formatClock(row.message.at) : formatStamp(row.message.at);}function Row({row,+ sameDay,selected,branchSelected,searchHit,@@ -38,6 +40,8 @@ function Row({onContinue,}: {row: GitRow;+ /** The row above is on the same day, so this one shows only the time. */+ sameDay: boolean;selected: boolean;branchSelected: boolean;/** The message matches the search (Story 8.14). */@@ -102,7 +106,7 @@ function Row({}}title={message.summary || message.title}>- <span className="git-time">{rowRange(row)}</span>+ <span className="git-time">{rowRange(row, sameDay)}</span><span className="git-id">{message.label ?? message.id}</span><span className="git-title">{message.title}</span>{row.tags.length > 0 ? (@@ -144,8 +148,7 @@ function Row({onContinue(message.continues as NonNullable<ViewNode["continues"]>);}}>- ↑ continues {message.continues.sessionTitle} ·{" "}- {message.continues.label ?? message.continues.id}+ ↑ {message.continues.label ?? message.continues.id}</span>) : null}{row.head ? <span className="left-off">left off here</span> : null}@@ -258,12 +261,17 @@ export function GitGraph({})}</svg><div className="git-rows" style={{ left: git.graphWidth + 8, width: git.rowWidth }}>- {git.rows.map((row) => {+ {git.rows.map((row, at) => {const messageId = row.kind === "message" ? row.message.id : null;+ const above = git.rows[at - 1];+ const day = row.kind === "message" ? dayOf(row.message.at) : null;+ const sameDay =+ day !== null && above?.kind === "message" && dayOf(above.message.at) === day;return (<Rowkey={row.kind === "more" ? `${row.segmentId}-more` : row.message.id}row={row}+ sameDay={sameDay}selected={messageId !== null && selectedId !== null && messageId === selectedId}branchSelected={activeSegmentId !== null && row.segmentId === activeSegmentId}searchHit={messageId !== null && highlightIds?.has(messageId) === true}diff --git a/packages/template/src/Graph.tsx b/packages/template/src/Graph.tsxindex 2c5b56a..74d5513 100644--- a/packages/template/src/Graph.tsx+++ b/packages/template/src/Graph.tsx@@ -1,7 +1,5 @@import {- Background,Controls,- MiniMap,type Node,type NodeProps,type NodeTypes,@@ -730,7 +728,7 @@ function Flow({ model, search }: { model: LineageViewModel; search: MapSearchSta<span className="map-title">{`${sessionGraph.git.rows.length} session${sessionGraph.git.rows.length === 1 ? "" : "s"- } · click a session to open or close its messages`}+ }`}</span>{leftOff ? (<button@@ -877,12 +875,6 @@ function Flow({ model, search }: { model: LineageViewModel; search: MapSearchSta);}-/** A theme colour for an SVG attribute (the minimap cannot read CSS variables). */-function cssVar(name: string, fallback: string): string {- if (typeof window === "undefined") return fallback;- return getComputedStyle(document.documentElement).getPropertyValue(name).trim() || fallback;-}-/*** One React Flow canvas for the whole map. It frames the map once on load (or* centres a deep-linked message); opening or closing a session and live data@@ -977,6 +969,7 @@ function MapCanvas({return (<ReactFlow+ proOptions={{ hideAttribution: true }}nodes={nodes}edges={[]}nodeTypes={nodeTypes}@@ -989,13 +982,6 @@ function MapCanvas({elementsSelectable={false}colorMode={theme}>- <Background gap={24} size={1} color="#242a36" />- <MiniMap- pannable- zoomable- nodeColor={() => cssVar("--active", "#243040")}- maskColor={`${cssVar("--bg", "#0f1115")}b3`}- /><Controls showInteractive={false} /></ReactFlow>);diff --git a/packages/template/src/Outline.tsx b/packages/template/src/Outline.tsxindex 8a4f321..662de53 100644--- a/packages/template/src/Outline.tsx+++ b/packages/template/src/Outline.tsx@@ -144,7 +144,10 @@ function SessionRow({})}>- <span className={`kind kind-${message.kind}`}>{kindLabel(message.kind)}</span>+ {/* Every node is a message now; older records still carry other kinds. */}+ {message.kind === "message" ? null : (+ <span className={`kind kind-${message.kind}`}>{kindLabel(message.kind)}</span>+ )}<span className="label">{message.title}</span></button></div>@@ -204,7 +207,6 @@ export function Outline({<nav className="outline" aria-label="Project outline"><header className="outline-head"><span className="outline-title">Outline</span>- <span className="outline-badge">experimental</span><buttontype="button"className="drilldown-close"diff --git a/packages/template/src/SessionMap.tsx b/packages/template/src/SessionMap.tsxindex 5388594..3fdda7c 100644--- a/packages/template/src/SessionMap.tsx+++ b/packages/template/src/SessionMap.tsx@@ -21,6 +21,7 @@ function color(index: number): string {function SessionRow({row,session,+ showAuthor,selected,open,searchHit,@@ -29,6 +30,8 @@ function SessionRow({}: {row: GitMessageRow;session: ViewSession;+ /** More than one person recorded sessions here; otherwise the name says nothing. */+ showAuthor: boolean;selected: boolean;/** Its messages are open below the row. */open: boolean;@@ -65,7 +68,7 @@ function SessionRow({</span><span className="git-time">{session.startedAt ? formatStamp(session.startedAt) : ""}</span><span className="git-title">{session.title || session.sessionId}</span>- {session.author ? (+ {showAuthor && session.author ? (<span className="muted session-author" title={`Recorded by ${session.author}`}>{session.author}</span>@@ -87,7 +90,7 @@ function SessionRow({onContinue(continues);}}>- ↑ continues {continues.sessionTitle} · {continues.label ?? continues.id}+ ↑ {continues.label ?? continues.id}</span>) : null}{row.head ? <span className="left-off">left off here</span> : null}@@ -116,6 +119,10 @@ export function SessionMap({}) {const { git } = graph;const segments = new Map(git.segments.map((segment) => [segment.id, segment]));+ const authors = new Set(+ [...graph.sessions.values()].flatMap((s) => (s.author ? [s.author] : [])),+ );+ const showAuthor = authors.size > 1;const open: (row: GitRow) => void = (row) => {if (row.kind === "message") onOpen(row.message.id);@@ -204,6 +211,7 @@ export function SessionMap({key={row.message.id}row={row}session={session}+ showAuthor={showAuthor}selected={selectedSessionId === session.sessionId}open={openIds.has(session.sessionId)}searchHit={highlightSessionIds.has(session.sessionId)}diff --git a/packages/template/src/format.ts b/packages/template/src/format.tsindex 59c7a6e..5d51b72 100644--- a/packages/template/src/format.ts+++ b/packages/template/src/format.ts@@ -23,6 +23,21 @@ export function formatStamp(iso: string | null): string {return `${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;}+/** The local calendar day of a timestamp, for "same day as the row above"; null if unparseable. */+export function dayOf(iso: string | undefined): string | null {+ if (!iso) return null;+ const date = new Date(iso);+ return Number.isNaN(date.getTime()) ? null : date.toDateString();+}++/** Only the time (`14:05`); the row's date is already shown above it. */+export function formatClock(iso: string): string {+ const date = new Date(iso);+ if (Number.isNaN(date.getTime())) return iso;+ const pad = (value: number): string => String(value).padStart(2, "0");+ return `${pad(date.getHours())}:${pad(date.getMinutes())}`;+}+/** Phases are shown as topics, messages as what the user said. */export function kindLabel(kind: string): string {return kind === "phase" ? "topic" : kind === "message" ? "you" : kind;diff --git a/packages/template/src/gitLayout.ts b/packages/template/src/gitLayout.tsindex 8924eba..ea84c5c 100644--- a/packages/template/src/gitLayout.ts+++ b/packages/template/src/gitLayout.ts@@ -262,8 +262,8 @@ export function rowHeight(Math.min(row.tags, TAGS_PER_LINE) * TAG_WIDTH +(row.head ? 92 : 0) +(message.unsummarized ? 116 : 0) +- // The "↑ continues <session> · m67" mark sits in the row, next to the title.- (message.continues ? 150 + message.continues.sessionTitle.length * 6.4 : 0);+ // The "↑ m67" mark sits in the row, next to the title; its session is in the tooltip.+ (message.continues ? 34 + (message.continues.label ?? message.continues.id).length * 7 : 0);const room = Math.max(TITLE_MIN_WIDTH, rowWidth - fixed);const titleLines = Math.max(1, Math.ceil((message.title.length * TITLE_CHAR) / room));const tagLines = Math.ceil(row.tags / TAGS_PER_LINE);diff --git a/packages/template/src/styles.css b/packages/template/src/styles.cssindex 69660ae..f6b2edb 100644--- a/packages/template/src/styles.css+++ b/packages/template/src/styles.css@@ -248,13 +248,6 @@ main.map-page {container-type: inline-size;}-/* On a narrow map the minimap would sit on top of the message text. */-@container (max-width: 900px) {- .react-flow__minimap {- display: none;- }-}-@media (max-width: 1100px) {main.map-page {padding-right: 16px;@@ -2205,7 +2198,8 @@ time {flex: none;color: var(--muted);font-family: ui-monospace, SFMono-Regular, Menlo, monospace;- font-size: 11px;+ font-size: 10px;+ opacity: 0.7;}/* The title wins over the chips around it (Story 9.2): it keeps its minimum@@ -2255,7 +2249,7 @@ time {border-style: dashed;}-/* "↑ continues <session> · m67": a jump to the earlier session's message. */+/* "↑ m67": a jump to the earlier session's message; the tooltip names the session. */.git-continues {flex: 0 1 auto;min-width: 0;diff --git a/packages/template/test/session-git.test.ts b/packages/template/test/session-git.test.tsindex 78fdba5..4deb2a6 100644--- a/packages/template/test/session-git.test.ts+++ b/packages/template/test/session-git.test.ts@@ -34,21 +34,29 @@ function modelOf(current: ViewSession): LineageViewModel {}describe("Story 9.3 on the map", () => {- it("shows the author on the session row", () => {- const model = modelOf(session);- const html = renderToStaticMarkup(- createElement(SessionMap, {- model,- graph: layoutSessionGraph(model),- selectedSessionId: null,- openIds: new Set<string>(),- highlightSessionIds: new Set<string>(),- onOpen: () => {},- onContinue: () => {},- }),- );+ it("shows the author on the session row only when several people recorded", () => {+ const render = (model: LineageViewModel): string =>+ renderToStaticMarkup(+ createElement(SessionMap, {+ model,+ graph: layoutSessionGraph(model),+ selectedSessionId: null,+ openIds: new Set<string>(),+ highlightSessionIds: new Set<string>(),+ onOpen: () => {},+ onContinue: () => {},+ }),+ );+ expect(render(modelOf(session))).not.toContain("session-author");++ const two = modelOf(session);+ two.unassigned = [+ { ...session, sessionId: "s2", author: "Ada", startedAt: "2026-10-26T11:00:00.000Z" },+ ];+ const html = render(two);expect(html).toContain('class="muted session-author"');expect(html).toContain("Eren");+ expect(html).toContain("Ada");});it("says a missing conversation lives on another machine", () => {