Web: render line 2 on every session card #120

Closed
opened 2026-08-25 12:18:01 +01:00 by naps62-yolo · 1 comment
Collaborator

Implement the amended card contract in the web sidebar. Read docs/SIDEBAR.md after #116 lands — it is the specification, and this issue is not licensed to depart from it.

What changes in web/src/:

  • showsMetaLine in activity.ts:48 is the gate that hides line 2, and catalog.ts:121 is its one caller. The gate goes: renderLeaf always emits the meta line.
  • In metaLine (catalog.ts:30), the showCmd condition — s.command !== name — goes. The command fragment renders on every card.
  • activityDurationLabel stays exactly as it is. What changes is when it is called: keep the 30-second threshold, now suppressing only the duration span. META_LINE_MIN_HOLD_MS keeps its value and loses its "keeps the card to one line" comment.
  • The blocked-work, exited, and detail fragments keep their existing conditions untouched.

Card height is now fixed, so check styles.css for rules that assumed a card could be one line or two — a min-height or a conditional margin that existed to stop the list jumping is now dead weight, and the row height should be stated once rather than emerging from the content.

Tests: activity.test.ts has a showsMetaLine block that goes with the function. catalog.test.ts gains the cases that matter now — a freshly spawned session renders two lines with a dot and a command and no duration; the same session past 30 seconds renders the duration; a session whose name equals its command still renders the command on line 2.

Depends on: #116

Implement the amended card contract in the web sidebar. Read `docs/SIDEBAR.md` after #116 lands — it is the specification, and this issue is not licensed to depart from it. What changes in `web/src/`: - `showsMetaLine` in `activity.ts:48` is the gate that hides line 2, and `catalog.ts:121` is its one caller. The gate goes: `renderLeaf` always emits the meta line. - In `metaLine` (`catalog.ts:30`), the `showCmd` condition — `s.command !== name` — goes. The command fragment renders on every card. - `activityDurationLabel` stays exactly as it is. What changes is when it is called: keep the 30-second threshold, now suppressing only the duration span. `META_LINE_MIN_HOLD_MS` keeps its value and loses its "keeps the card to one line" comment. - The blocked-work, exited, and detail fragments keep their existing conditions untouched. Card height is now fixed, so check `styles.css` for rules that assumed a card could be one line or two — a `min-height` or a conditional margin that existed to stop the list jumping is now dead weight, and the row height should be stated once rather than emerging from the content. Tests: `activity.test.ts` has a `showsMetaLine` block that goes with the function. `catalog.test.ts` gains the cases that matter now — a freshly spawned session renders two lines with a dot and a command and no duration; the same session past 30 seconds renders the duration; a session whose name equals its command still renders the command on line 2. Depends on: #116
naps62-yolo added this to the TUI shell milestone 2026-08-25 12:18:01 +01:00
naps62-yolo added the area/webtype/featdifficulty/easy labels 2026-08-25 12:18:01 +01:00
naps62-yolo added a new dependency 2026-08-25 12:18:46 +01:00
Author
Collaborator

The mandated full gate completed formatting/clippy and all earlier checks, but one unrelated existing e2e test failed: maestro-e2e::retained_store_survives_a_daemon_restart (connection reset while listing /api/worktrees after daemon restart). The other 23 e2e tests passed; no Rust/TUI files were changed for #120.

The mandated full gate completed formatting/clippy and all earlier checks, but one unrelated existing e2e test failed: maestro-e2e::retained_store_survives_a_daemon_restart (connection reset while listing /api/worktrees after daemon restart). The other 23 e2e tests passed; no Rust/TUI files were changed for #120.
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#120