fix(tmux): merge-time fixes for the exited-agent report (#466)

- docs/wiki/The-Dashboard.md: the tab-appearance table gains the exited
  state (muted dot plus an `exited (137)` badge) and explains the bare
  `exited` variant.
- The detailed sidebar and rail no longer pair the muted dot with an "idle"
  pill: an exited session's pill reads "exited" (neutral styling) and its
  since stamp measures from the observed exit. This is a label override on
  the row model, not a new state, so SESSION_ACTIVITY_RANK and the home
  screen order are untouched, and a pending alert still keeps its own pill.
  The row signature includes the flag so the incremental path repaints it.
- The exited badge is aria-hidden like its sibling badges, and the exit is
  appended to the tab's aria-label in both render paths through one helper.
- test/tmux-manager.test.ts re-adds the junk-trailing-field parser case
  against parsePaneRows.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-09-23 11:40:27 +02:00
parent 43d4be8eeb
commit cbd1fa639d
6 changed files with 140 additions and 10 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ describe('watching badge on a rich session row', () => {
// pill that says which one still decides the row; this badge only adds a fact.
const meta = app.slice(app.indexOf('_sidebarRichMetaHTML(row) {'));
const body = meta.slice(0, meta.indexOf('_sidebarRichStampText(timestamp, format) {'));
expect(body).toContain('tab-pill tab-pill--${escapeHtml(row.state)}');
expect(body).toContain('tab-pill tab-pill--${escapeHtml(pillMod)}');
expect(body).toContain('tab-pill tab-pill--watching');
expect(body).toContain('Still running in the background:');
});
@@ -93,7 +93,7 @@ describe('watching badge on a rich session row', () => {
// The meta line is rebuilt only when this signature moves, so a badge left out of
// it would appear and disappear a render late, or not at all.
expect(app).toContain(
'const sig = `${row.state}:${row.since ? row.since.at : 0}:${row.createdAt}:${row.watching}`'
"const sig = `${row.state}${row.exited ? '+exited' : ''}:${row.since ? row.since.at : 0}:${row.createdAt}:${row.watching}`"
);
});