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(template): add node drill-down and resume copy button
Erenb0e278c5c66d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0da2e95..8d7e146 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## [Unreleased]### Added+- Drill-down side panel in the map: clicking a node or session shows title, kind, summary, why, timestamps and the owning session, with a "Copy resume command" button (`cd '<path>' && claude --resume <id>`, clipboard plus a `file://` fallback). `build` marks sessions whose Claude Code transcript no longer exists, disabling the button with "session no longer available".- Nested lineage graph in the map: React Flow 12 renders epochs → sessions → nodes as collapsible groups, ELK lays them out top-down in the page, with a minimap, controls and kind colours; the latest session opens expanded. 495 nodes lay out in ~96–155 ms per change in Chromium from `file://`.- Status card at the top of the map: goal, done, pending and next from the most recently updated session, with `needsUser` items merged from every session active within 7 days (deduplicated by text, newest first).- Template workspace (`packages/template`): React 19 + Vite 8 + `vite-plugin-singlefile`, dev fixture and the shared lineage view-model contract (`packages/cli/src/view/model.ts`).diff --git a/packages/cli/src/commands/build.ts b/packages/cli/src/commands/build.tsindex f673483..66a5851 100644--- a/packages/cli/src/commands/build.ts+++ b/packages/cli/src/commands/build.ts@@ -10,6 +10,7 @@ import { loadProject, loadSession } from "../store/stores.js";import { buildViewModel, embedViewModel } from "../view/lineage.js";import type { LineageViewModel } from "../view/model.js";import { TEMPLATE_HTML } from "../view/template.js";+import { collectTranscriptIds } from "../view/transcripts.js";export interface BuildOptions {dir: string;@@ -68,6 +69,7 @@ export async function buildProject(opts: BuildOptions): Promise<LineageViewModelsessions: await loadAllSessions(root, io),path: root,generatedAt: io.now(),+ transcripts: await collectTranscriptIds(io.env),});// The skill already avoids secrets; this is the safety net before rendering.const redacted = redactDeep(model);diff --git a/packages/cli/src/view/lineage.ts b/packages/cli/src/view/lineage.tsindex 72c1fce..72d6998 100644--- a/packages/cli/src/view/lineage.ts+++ b/packages/cli/src/view/lineage.ts@@ -108,7 +108,7 @@ export function statusCard(sessions: Session[], now: string): StatusCard {};}-function toViewSession(session: Session): ViewSession {+function toViewSession(session: Session, transcripts?: ReadonlySet<string>): ViewSession {return {sessionId: session.sessionId,agent: session.agent,@@ -118,8 +118,9 @@ function toViewSession(session: Session): ViewSession {updatedAt: session.updatedAt,status: session.status,nodes: buildNodeTree(session.nodes),- // Story 2.5 adds the transcript lookup; a record without one still renders.- transcriptAvailable: true,+ // Undefined means the caller did not ask (fixtures, unit tests); then the+ // record is shown as resumable rather than pretending the transcript is gone.+ transcriptAvailable: transcripts === undefined ? true : transcripts.has(session.sessionId),};}@@ -134,6 +135,8 @@ export interface ViewModelInput {/** Absolute project path shown on the page. */path: string;generatedAt: string;+ /** Session ids whose Claude Code transcript still exists; omit to skip the check. */+ transcripts?: ReadonlySet<string>;}/**@@ -148,7 +151,7 @@ export function buildViewModel(input: ViewModelInput): LineageViewModel {const sessions = [...input.sessions].sort(byStartedAt);for (const session of sessions) {- const view = toViewSession(session);+ const view = toViewSession(session, input.transcripts);const bucket = session.epoch === null ? undefined : buckets.get(session.epoch);(bucket ?? unassigned).push(view);}diff --git a/packages/cli/src/view/resume.ts b/packages/cli/src/view/resume.tsnew file mode 100644index 0000000..b34a0ce--- /dev/null+++ b/packages/cli/src/view/resume.ts@@ -0,0 +1,19 @@+/**+ * Builds the shell command shown by the resume button. Kept free of Node+ * imports because the browser template imports it too.+ */++/** Single-quotes a value for POSIX shells; embedded quotes are escaped. */+export function shellQuote(value: string): string {+ return `'${value.replace(/'/g, `'\\''`)}'`;+}++/** Leaves plain ids alone so the command matches the documented shape. */+function sessionArg(sessionId: string): string {+ return /^[A-Za-z0-9._:/-]+$/.test(sessionId) ? sessionId : shellQuote(sessionId);+}++/** `cd '<project path>' && claude --resume <sessionId>` */+export function resumeCommand(projectPath: string, sessionId: string): string {+ return `cd ${shellQuote(projectPath)} && claude --resume ${sessionArg(sessionId)}`;+}diff --git a/packages/cli/src/view/transcripts.ts b/packages/cli/src/view/transcripts.tsnew file mode 100644index 0000000..b26246d--- /dev/null+++ b/packages/cli/src/view/transcripts.ts@@ -0,0 +1,40 @@+import { readdir } from "node:fs/promises";+import { homedir } from "node:os";+import { join } from "node:path";++/** Where Claude Code keeps its state: `$CLAUDE_CONFIG_DIR` or `~/.claude`. */+export function claudeConfigDir(env: NodeJS.ProcessEnv = process.env): string {+ return env.CLAUDE_CONFIG_DIR ?? join(homedir(), ".claude");+}++/**+ * Session ids that still have a transcript under `projects/<encoded>/*.jsonl`.+ * Best effort: an unreadable Claude home means "none found", never a failed build.+ */+export async function collectTranscriptIds(+ env: NodeJS.ProcessEnv = process.env,+): Promise<Set<string>> {+ const ids = new Set<string>();+ const projectsDir = join(claudeConfigDir(env), "projects");++ let projectDirs;+ try {+ projectDirs = await readdir(projectsDir, { withFileTypes: true });+ } catch {+ return ids;+ }++ for (const entry of projectDirs) {+ if (!entry.isDirectory()) continue;+ let files: string[];+ try {+ files = await readdir(join(projectsDir, entry.name));+ } catch {+ continue;+ }+ for (const file of files) {+ if (file.endsWith(".jsonl")) ids.add(file.slice(0, -".jsonl".length));+ }+ }+ return ids;+}diff --git a/packages/cli/test/resume.test.ts b/packages/cli/test/resume.test.tsnew file mode 100644index 0000000..2595cc1--- /dev/null+++ b/packages/cli/test/resume.test.ts@@ -0,0 +1,112 @@+import { chmod, mkdir, writeFile } from "node:fs/promises";+import { join } from "node:path";+import { beforeEach, describe, expect, it } from "vitest";+import { buildProject } from "../src/commands/build.js";+import { epochAdd } from "../src/commands/epoch.js";+import { init } from "../src/commands/init.js";+import type { Session } from "../src/schema/session.js";+import { projectPaths } from "../src/store/paths.js";+import { resumeCommand, shellQuote } from "../src/view/resume.js";+import { claudeConfigDir, collectTranscriptIds } from "../src/view/transcripts.js";+import { envFor, fakeIo, T0, tempDir } from "./helpers.js";++function session(over: Partial<Session> & { sessionId: string }): Session {+ return {+ schema: 1,+ agent: "claude-code",+ title: "",+ epoch: null,+ startedAt: T0,+ updatedAt: T0,+ status: { goal: "", done: [], pending: [], next: "" },+ nodes: [],+ ...over,+ };+}++describe("resumeCommand", () => {+ it("quotes the project path and leaves a plain session id alone", () => {+ expect(resumeCommand("/home/me/proj", "abc-123")).toBe(+ "cd '/home/me/proj' && claude --resume abc-123",+ );+ });++ it("escapes a single quote in the path", () => {+ expect(shellQuote("/tmp/it's here")).toBe("'/tmp/it'\\''s here'");+ expect(resumeCommand("/tmp/it's here", "id")).toContain("cd '/tmp/it'\\''s here'");+ });++ it("quotes an unusual session id", () => {+ expect(resumeCommand("/p", "a b")).toBe("cd '/p' && claude --resume 'a b'");+ });+});++describe("collectTranscriptIds", () => {+ it("collects .jsonl names from every project directory", async () => {+ const dir = await tempDir();+ const env = envFor(dir);+ const projects = join(claudeConfigDir(env), "projects");+ await mkdir(join(projects, "-home-me-proj"), { recursive: true });+ await mkdir(join(projects, "-home-me-other"), { recursive: true });+ await writeFile(join(projects, "-home-me-proj", "s1.jsonl"), "{}\n");+ await writeFile(join(projects, "-home-me-other", "s2.jsonl"), "{}\n");+ await writeFile(join(projects, "-home-me-other", "notes.txt"), "x");++ expect(await collectTranscriptIds(env)).toEqual(new Set(["s1", "s2"]));+ });++ it("skips a project directory it cannot read", async () => {+ const dir = await tempDir();+ const env = envFor(dir);+ const projects = join(claudeConfigDir(env), "projects");+ const locked = join(projects, "-locked");+ await mkdir(locked, { recursive: true });+ await chmod(locked, 0o000);+ try {+ expect(await collectTranscriptIds(env)).toEqual(new Set());+ } finally {+ await chmod(locked, 0o755);+ }+ });++ it("returns an empty set when the Claude home is missing", async () => {+ const dir = await tempDir();+ expect(await collectTranscriptIds(envFor(dir))).toEqual(new Set());+ });+});++describe("buildProject transcript availability", () => {+ let dir: string;+ let root: string;++ beforeEach(async () => {+ dir = await tempDir();+ root = join(dir, "proj");+ await mkdir(root);+ await init(root, { name: "proj", retention: "keep", language: "auto" }, fakeIo(envFor(dir)));+ await epochAdd(root, "e1", "First", fakeIo(envFor(dir)));+ const paths = projectPaths(root);+ await writeFile(+ paths.session("alive"),+ JSON.stringify(session({ sessionId: "alive", epoch: "e1" })),+ );+ await writeFile(+ paths.session("gone"),+ JSON.stringify(session({ sessionId: "gone", epoch: "e1" })),+ );+ });++ it("marks sessions whose transcript file exists", async () => {+ const env = envFor(dir);+ const projectDir = join(claudeConfigDir(env), "projects", "-home-me-proj");+ await mkdir(projectDir, { recursive: true });+ await writeFile(join(projectDir, "alive.jsonl"), "{}\n");++ const model = await buildProject({ dir: root, io: fakeIo(env) });+ const sessions = model.epochs[0]?.sessions ?? [];+ expect(sessions.map((s) => [s.sessionId, s.transcriptAvailable])).toEqual([+ ["alive", true],+ ["gone", false],+ ]);+ });+});diff --git a/packages/template/src/Graph.tsx b/packages/template/src/Graph.tsxindex d6cea84..2d54fd4 100644--- a/packages/template/src/Graph.tsx+++ b/packages/template/src/Graph.tsx@@ -3,6 +3,7 @@ import {Controls,Handle,MiniMap,+ type NodeMouseHandler,type NodeProps,type NodeTypes,Position,@@ -22,6 +23,7 @@ import {layoutGraph,type SessionFlowNode,} from "./graph.js";+import { DrillDown, type Selection } from "./SidePanel.js";/** Toggle callback reaches the group headers without threading props through React Flow. */const GraphActions = createContext<{ toggle: (id: string) => void }>({ toggle: () => {} });@@ -132,6 +134,7 @@ function minimapColor(node: GraphNode): string {function Flow({ model }: { model: LineageViewModel }) {const [expanded, setExpanded] = useState<Set<string>>(() => defaultExpanded(model));+ const [selection, setSelection] = useState<Selection | null>(null);const [layout, setLayout] = useState<Awaited<ReturnType<typeof layoutGraph>> | null>(null);const [error, setError] = useState<string | null>(null);const { fitView } = useReactFlow();@@ -172,6 +175,14 @@ function Flow({ model }: { model: LineageViewModel }) {});}, []);const actions = useMemo(() => ({ toggle }), [toggle]);+ const closePanel = useCallback(() => setSelection(null), []);+ const onNodeClick = useCallback<NodeMouseHandler<GraphNode>>((_event, node) => {+ if (node.type === "lineage") {+ setSelection({ type: "node", node: node.data });+ } else if (node.type === "session") {+ setSelection({ type: "session", sessionId: node.data.sessionId });+ }+ }, []);if (error) return <p className="error graph-status">{error}</p>;if (!layout) return <p className="graph-status">Laying out the map…</p>;@@ -186,6 +197,7 @@ function Flow({ model }: { model: LineageViewModel }) {edges={layout.edges}nodeTypes={nodeTypes}defaultEdgeOptions={{ style: { stroke: "#4f5b74", strokeWidth: 1.5 } }}+ onNodeClick={onNodeClick}fitViewminZoom={0.05}maxZoom={2}@@ -198,6 +210,7 @@ function Flow({ model }: { model: LineageViewModel }) {<MiniMap pannable zoomable nodeColor={minimapColor} /><Controls showInteractive={false} /></ReactFlow>+ <DrillDown model={model} selection={selection} onClose={closePanel} /></GraphActions.Provider>);}diff --git a/packages/template/src/SidePanel.tsx b/packages/template/src/SidePanel.tsxnew file mode 100644index 0000000..154dce7--- /dev/null+++ b/packages/template/src/SidePanel.tsx@@ -0,0 +1,246 @@+import { useEffect, useRef, useState } from "react";+import type { LineageViewModel, ViewSession } from "../../cli/src/view/model.js";+import { resumeCommand } from "../../cli/src/view/resume.js";+import { formatTime } from "./format.js";+import type { LineageData } from "./graph.js";++/** What the drill-down shows: a graph node or a whole session. */+export type Selection =+ | { type: "node"; node: LineageData }+ | { type: "session"; sessionId: string };++function findSession(model: LineageViewModel, sessionId: string): ViewSession | undefined {+ for (const epoch of model.epochs) {+ for (const session of epoch.sessions) {+ if (session.sessionId === sessionId) return session;+ }+ }+ return model.unassigned.find((session) => session.sessionId === sessionId);+}++/**+ * `navigator.clipboard` is unavailable or rejected in some `file://` contexts,+ * so fall back to the hidden-textarea + `execCommand("copy")` path.+ * Returns false when both fail, letting the caller select the text instead.+ */+export async function copyText(text: string): Promise<boolean> {+ try {+ if (navigator.clipboard?.writeText) {+ await navigator.clipboard.writeText(text);+ return true;+ }+ } catch {+ // fall through to the legacy path+ }++ try {+ const area = document.createElement("textarea");+ area.value = text;+ area.setAttribute("readonly", "");+ area.style.position = "fixed";+ area.style.top = "-1000px";+ area.style.opacity = "0";+ document.body.appendChild(area);+ area.select();+ const copied = document.execCommand("copy");+ area.remove();+ return copied;+ } catch {+ return false;+ }+}++type CopyState = "idle" | "copied" | "failed";++function ResumeRow({ model, session }: { model: LineageViewModel; session: ViewSession }) {+ const [state, setState] = useState<CopyState>("idle");+ const code = useRef<HTMLElement>(null);+ const command = resumeCommand(model.project.path, session.sessionId);++ if (!session.transcriptAvailable) {+ return (+ <div className="resume">+ <button type="button" className="resume-button" disabled>+ Copy resume command+ </button>+ <p className="muted resume-note">session no longer available</p>+ </div>+ );+ }++ const copy = (): void => {+ setState("idle");+ void copyText(command).then((ok) => {+ if (ok) {+ setState("copied");+ return;+ }+ // Last resort: select the command so the user can press Ctrl+C.+ const element = code.current;+ if (element) {+ const range = document.createRange();+ range.selectNodeContents(element);+ const selection = window.getSelection();+ selection?.removeAllRanges();+ selection?.addRange(range);+ }+ setState("failed");+ });+ };++ return (+ <div className="resume">+ <button type="button" className="resume-button" onClick={copy}>+ Copy resume command+ </button>+ {state === "copied" ? <p className="muted resume-note">Copied.</p> : null}+ {state === "failed" ? (+ <p className="muted resume-note">Copy failed — press Ctrl+C to copy.</p>+ ) : null}+ <pre className="resume-command">+ <code ref={code}>{command}</code>+ </pre>+ </div>+ );+}++function Field({ label, children }: { label: string; children: React.ReactNode }) {+ return (+ <div className="drilldown-field">+ <dt>{label}</dt>+ <dd>{children}</dd>+ </div>+ );+}++function SessionSummary({ model, session }: { model: LineageViewModel; session: ViewSession }) {+ return (+ <>+ <dl className="drilldown-meta">+ <Field label="Agent">{session.agent}</Field>+ <Field label="Session">+ <code>{session.sessionId}</code>+ </Field>+ <Field label="Started">{formatTime(session.startedAt)}</Field>+ <Field label="Updated">{formatTime(session.updatedAt)}</Field>+ </dl>+ <ResumeRow model={model} session={session} />+ </>+ );+}++function NodeDetails({ model, node }: { model: LineageViewModel; node: LineageData }) {+ const session = findSession(model, node.sessionId);+ return (+ <>+ {node.summary ? (+ <section>+ <h3>Summary</h3>+ <p>{node.summary}</p>+ </section>+ ) : null}+ {node.why ? (+ <section>+ <h3>Why</h3>+ <p>{node.why}</p>+ </section>+ ) : null}+ <dl className="drilldown-meta">+ <Field label="Recorded">{formatTime(node.at ?? null)}</Field>+ <Field label="Session">+ {session ? (+ <>+ {session.title || session.sessionId} <code>{session.sessionId}</code>+ </>+ ) : (+ <code>{node.sessionId}</code>+ )}+ </Field>+ {session ? (+ <>+ <Field label="Session started">{formatTime(session.startedAt)}</Field>+ <Field label="Session updated">{formatTime(session.updatedAt)}</Field>+ </>+ ) : null}+ </dl>+ {session ? <ResumeRow model={model} session={session} /> : null}+ </>+ );+}++function SessionDetails({ model, session }: { model: LineageViewModel; session: ViewSession }) {+ return (+ <>+ <section>+ <h3>Goal</h3>+ <p>{session.status.goal || "No goal recorded."}</p>+ </section>+ <section>+ <h3>Next</h3>+ <p>{session.status.next || "No next step recorded."}</p>+ </section>+ <SessionSummary model={model} session={session} />+ </>+ );+}++/** Side panel for a clicked node or session, with the resume button. */+export function DrillDown({+ model,+ selection,+ onClose,+}: {+ model: LineageViewModel;+ selection: Selection | null;+ onClose: () => void;+}) {+ useEffect(() => {+ if (!selection) return;+ const onKey = (event: KeyboardEvent): void => {+ if (event.key === "Escape") onClose();+ };+ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [selection, onClose]);++ if (!selection) return null;++ if (selection.type === "session") {+ const session = findSession(model, selection.sessionId);+ if (!session) return null;+ return (+ <aside className="drilldown" role="dialog" aria-label="Session details">+ <header className="drilldown-head">+ <div>+ <span className="kind">session</span>+ <h2>{session.title || session.sessionId}</h2>+ </div>+ <button type="button" className="drilldown-close" aria-label="Close" onClick={onClose}>+ ×+ </button>+ </header>+ <div className="drilldown-body">+ <SessionDetails model={model} session={session} />+ </div>+ </aside>+ );+ }++ const { node } = selection;+ return (+ <aside className="drilldown" role="dialog" aria-label="Node details">+ <header className="drilldown-head">+ <div>+ <span className={`kind kind-${node.kind}`}>{node.kind}</span>+ <h2>{node.title}</h2>+ </div>+ <button type="button" className="drilldown-close" aria-label="Close" onClick={onClose}>+ ×+ </button>+ </header>+ <div className="drilldown-body">+ <NodeDetails model={model} node={node} />+ </div>+ </aside>+ );+}diff --git a/packages/template/src/graph.ts b/packages/template/src/graph.tsindex b3cfd59..c7ead31 100644--- a/packages/template/src/graph.ts+++ b/packages/template/src/graph.ts@@ -46,6 +46,8 @@ export type LineageData = {summary?: string;why?: string;at?: string;+ /** Owning session, so the drill-down panel can show and resume it. */+ sessionId: string;};export type EpochFlowNode = FlowNode<EpochData, "epoch">;@@ -314,7 +316,7 @@ export async function layoutGraph(},});if (!sessionExpanded) continue;- collectFlowNodes(session.nodes, id, nodes, sizes);+ collectFlowNodes(session.nodes, id, session.sessionId, nodes, sizes);}}@@ -324,6 +326,7 @@ export async function layoutGraph(function collectFlowNodes(nodes: ViewNode[],parent: string,+ sessionId: string,out: GraphNode[],sizes: Map<string, Sized>,): void {@@ -347,8 +350,9 @@ function collectFlowNodes(...(node.summary === undefined ? {} : { summary: node.summary }),...(node.why === undefined ? {} : { why: node.why }),...(node.at === undefined ? {} : { at: node.at }),+ sessionId,},});- collectFlowNodes(node.children, parent, out, sizes);+ collectFlowNodes(node.children, parent, sessionId, out, sizes);}}diff --git a/packages/template/src/styles.css b/packages/template/src/styles.cssindex 5354f83..896eb52 100644--- a/packages/template/src/styles.css+++ b/packages/template/src/styles.css@@ -115,6 +115,7 @@ ul {}.graph-wrap {+ position: relative;height: clamp(480px, 72vh, 900px);margin-top: 24px;background: #12151b;@@ -208,6 +209,15 @@ ul {border: 1px solid var(--line);border-left: 3px solid var(--accent);border-radius: 8px;+ cursor: pointer;+}++.lineage-box:hover {+ border-color: var(--accent);+}++.session-group:hover {+ border-color: var(--accent);}.lineage-box.kind-phase {@@ -281,6 +291,147 @@ ul {font-style: italic;}+/* Drill-down panel: overlays the graph from the right, scrolls on its own. */+.drilldown {+ position: absolute;+ top: 12px;+ right: 12px;+ bottom: 12px;+ z-index: 10;+ display: flex;+ flex-direction: column;+ width: min(380px, calc(100% - 24px));+ background: rgba(20, 23, 30, 0.97);+ border: 1px solid var(--line);+ border-radius: 10px;+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);+}++.drilldown-head {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ gap: 12px;+ padding: 14px 16px;+ border-bottom: 1px solid var(--line);+}++.drilldown-head h2 {+ margin: 6px 0 0;+ font-size: 16px;+ overflow-wrap: anywhere;+}++.drilldown-close {+ flex: none;+ width: 28px;+ height: 28px;+ padding: 0;+ font-size: 18px;+ line-height: 1;+ color: var(--muted);+ background: #1d222c;+ border: 1px solid var(--line);+ border-radius: 6px;+ cursor: pointer;+}++.drilldown-close:hover {+ color: var(--text);+ border-color: var(--accent);+}++.drilldown-body {+ flex: 1;+ padding: 14px 16px;+ overflow-y: auto;+}++.drilldown-body section {+ margin-bottom: 14px;+}++.drilldown-body h3 {+ margin-bottom: 4px;+ font-size: 11px;+ text-transform: uppercase;+ letter-spacing: 0.08em;+ color: var(--muted);+}++.drilldown-body p {+ overflow-wrap: anywhere;+}++.drilldown-meta {+ display: grid;+ gap: 8px;+ margin: 0 0 16px;+}++.drilldown-field {+ display: grid;+ grid-template-columns: 110px 1fr;+ gap: 8px;+ font-size: 13px;+}++.drilldown-field dt {+ color: var(--muted);+}++.drilldown-field dd {+ margin: 0;+ overflow-wrap: anywhere;+}++.drilldown-field code {+ font-size: 12px;+ overflow-wrap: anywhere;+}++.resume {+ padding-top: 12px;+ border-top: 1px solid var(--line);+}++.resume-button {+ width: 100%;+ padding: 8px 12px;+ color: var(--text);+ background: #243040;+ border: 1px solid var(--line);+ border-radius: 7px;+ font: inherit;+ cursor: pointer;+}++.resume-button:hover:not(:disabled) {+ border-color: var(--accent);+}++.resume-button:disabled {+ color: var(--muted);+ cursor: not-allowed;+ opacity: 0.7;+}++.resume-note {+ margin-top: 6px;+}++.resume-command {+ margin: 10px 0 0;+ padding: 8px;+ overflow-x: auto;+ background: #12151b;+ border: 1px solid var(--line);+ border-radius: 6px;+ font-size: 12px;+ white-space: pre-wrap;+ overflow-wrap: anywhere;+}+time {color: var(--muted);font-size: 12px;