Skip to content

Commit 46a1b0c

Browse files
obviyusclaude
andcommitted
feat(status): lead the rich status card with the version title
The card opened straight into a table because the title lived in the header row. The version now renders as the presentation title with the clock line below it, matching the sectioned plain body's reading order, and the header row returns to plain column labels. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 3b4da44 commit 46a1b0c

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎src/status/status-message.test.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,13 @@ describe("buildStatusMessageParts presentation", () => {
6969
);
7070
expect(parts.text).toContain("⏱️ Uptime: gateway 1h · system 2d");
7171
expect(parts.text).toContain("Telegram rich messages: on");
72-
expect(parts.presentation.title).toBeUndefined();
72+
expect(parts.presentation.title).toMatch(/^🦞 OpenClaw /);
7373
const table = parts.presentation.blocks.find((block) => block.type === "table");
7474
expect(table).toBeDefined();
7575
if (table?.type !== "table") {
7676
throw new Error("expected table block");
7777
}
78-
expect(table.headers[0]).toBe("🦞 OpenClaw");
79-
expect(table.headers[1]).toMatch(/^\d{4}\.\d+\.\d+/);
78+
expect(table.headers).toEqual(["Item", "Value"]);
8079
expect(table.rowHeaderColumnIndex).toBe(0);
8180
const rowLabels = table.rows.map((row) => row[0]);
8281
expect(rowLabels).toContain("🧠 Model");

‎src/status/status-message.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,24 +1218,25 @@ export function buildStatusMessageParts(args: StatusArgs): StatusMessageParts {
12181218
]
12191219
.filter(Boolean)
12201220
.join(" · ");
1221-
// The header row doubles as the card title on native renderers, so the
1222-
// presentation carries no separate title.
12231221
// Silence means nominal: the pressure line renders only when the context
12241222
// window is running hot, so its presence alone is the signal.
12251223
const contextPressureLine =
12261224
contextPct !== null && contextPct >= 80 ? `⚠️ Context ${contextPct}% full` : null;
1225+
// Lead with the product/version title and the clock so the card does not open
1226+
// straight into a table; the header row then just labels the two columns.
12271227
const presentation: MessagePresentation = {
1228+
title: versionLine,
12281229
blocks: [
1230+
...contextBlock(clockUptimeValue),
12291231
{
12301232
type: "table",
12311233
caption: "Session status",
1232-
headers: ["🦞 OpenClaw", `${VERSION}${commit ? ` (${commit})` : ""}`],
1234+
headers: ["Item", "Value"],
12331235
rows: statusRows,
12341236
rowHeaderColumnIndex: 0,
12351237
},
12361238
// A warning is not low-emphasis context; keep it a plain text block.
12371239
...(contextPressureLine ? [{ type: "text", text: contextPressureLine } as const] : []),
1238-
...contextBlock(clockUptimeValue),
12391240
...contextBlock(mediaLine),
12401241
...contextBlock(args.usageLine),
12411242
...contextBlock(args.subagentsLine),

0 commit comments

Comments
 (0)