(session-state): one icon slot per sidebar row, resolved by the domain module - #268
Merged
Merged
Conversation
…n module Step 3b of #246. Each session and subagent row carries one .session-icon element written only by the projection file from renderSessionIcon(); the status dot and the spinner slot are absorbed into it. The rung is resolved in session-state.js and exposed as a session-icon--<rung> class, so the CSS keys on that class alone: the row-class :not() chains are gone, and a source test keeps them out. Row classes stay for tint and tests; the age text stays next to the slot for local and remote rows alike.
This was referenced Sep 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 3b of #246, after #267.
What
.session-iconelement per session and subagent row (sidebar.jscreates it;session-activity-dom.jsis its only writer, viapaintSessionIcon/writeIconSlotfromrenderSessionIcon(snapshot)). It replaces.session-status-doton rows and absorbs the spinner slot..remote-badgeand.remote-host-dotuntouched; the.session-statusage text stays next to the slot for both kinds.renderSessionIconnow also returnsslotClasses(session-icon--busy,--agents-busy,--response-ready,--needs-attention, …). The CSS keys on that class alone: the row-class:not()chains that used to arbitrate between the four row classes are gone; the one compound left is.has-busy-agents .session-icon--busy(row tint + rung, not a tie-break).test/session-icon-slot-css-boundary.test.jsgrepsstyle.cssand fails on any:not(selector targeting.session-icon.cli-busy,needs-attention,response-ready,has-busy-agents) stay on the row for tint and tests; the lint from (session-state): pure domain module, single DOM writer, enforced by lint #266 is untouched..running(PTY attached) stays orthogonal on the slot.session.status/statusUpdatedAt(snapshotForLocal); remote rows use the adapter's snapshot from (session-state): feed remote sessions through the remote-ssh adapter #267. Subagent spawn/complete repaints the parent's slot.session-state.md(projection + slot sections, status "steps 1-3b done", CSS rule).Proof
test/dom-sidebar-icon-slot.test.js: a busy local row and a busy remote row produce the same slot markup; a remote row after decay shows the age with no response-ready glyph; subagent rows get a slot.busy/agentsBusyentries in the rung table turns red the three slot-markup tests and fivesession-state.test.jstests; reintroducing a:not()slot selector turns the CSS boundary test red. Both reverted.task check: 1189 + 119 pass, 0 fail, pre-existing skips.Visual change for the user: none intended beyond the element rename — same 6 px dot, same spinner, same colours. Not verified in the running app (tests only).