Skip to content

(session-state): one icon slot per sidebar row, resolved by the domain module - #268

Merged
devsuitup merged 1 commit into
mainfrom
feat/246-icon-slot
Sep 11, 2026
Merged

devsuitup merged 1 commit into
mainfrom
feat/246-icon-slot

Conversation

@devsuitup

Copy link
Copy Markdown
Owner

Step 3b of #246, after #267.

What

  • One .session-icon element per session and subagent row (sidebar.js creates it; session-activity-dom.js is its only writer, via paintSessionIcon / writeIconSlot from renderSessionIcon(snapshot)). It replaces .session-status-dot on rows and absorbs the spinner slot. .remote-badge and .remote-host-dot untouched; the .session-status age text stays next to the slot for both kinds.
  • renderSessionIcon now also returns slotClasses (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.js greps style.css and fails on any :not( selector targeting .session-icon.
  • Row classes (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.
  • Local rows build their snapshot from the Maps plus 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.
  • Docs: 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.
  • Mutations: swapping the busy / agentsBusy entries in the rung table turns red the three slot-markup tests and five session-state.test.js tests; 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).

…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.
@devsuitup
devsuitup merged commit ca28a34 into main Sep 11, 2026
10 checks passed
@devsuitup
devsuitup deleted the feat/246-icon-slot branch September 11, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant