fix(web): a dead process outranks its own unread flags
Review caught two holes in the previous commit. interrupted was ranked below error/attention/done, so an interrupted session with a stale error flag still blinked red, one with pending attention still wore the amber dot, and one with a done flag still turned green. In the plugin there is no interrupted at all: any non-running row is exited (sessions.lua:75-78) and exited sits at the top of dot_hl. interrupted now shares that slot. The subagent tables were not actually consolidated: subagent-view.tsx and telemetry.tsx each kept their own SUB_DOT, still painting interrupted amber and completed green. All three now go through subagentDot(); in a subagent view the row is the one you have open, so a failed child is steady red there.
This commit is contained in:
1 parent
b6335a21a4
commit
668f77bf51
4 files changed
+31
-21
No files matched your search
@@ -122,6 +122,16 @@ describe("sessionDot (parent rows)", () => {
|
||||
expect(sessionDot(state)).toEqual({ status: "dead" });
|
||||
});
|
||||
|
||||
it("interrupted is a dead process too (outranks error, attention and done)", () => {
|
||||
// The plugin has no `interrupted`: any "not running" row is `exited`
|
||||
// (sessions.lua:75-78), and `exited` sits at the top of dot_hl.
|
||||
expect(sessionDot(makeSession({ status: "interrupted", flags: { error: true } })).status).toBe("dead");
|
||||
expect(sessionDot(makeSession({ status: "interrupted", flags: { attention: true } })).status).toBe("dead");
|
||||
expect(sessionDot(makeSession({ status: "interrupted", flags: { done: true } })).status).toBe("dead");
|
||||
// …and it never wears the blue current marker either.
|
||||
expect(sessionDot(makeSession({ status: "interrupted" }), { viewed: true })).toEqual({ status: "dead" });
|
||||
});
|
||||
|
||||
it("attention beats done (flags.attention outranks flags.done)", () => {
|
||||
const state = makeSession({
|
||||
flags: { attention: true, done: true },
|
||||
|
||||
Reference in new issue
Block a user