Skip to content

feat(slack): mark code-channel sessions in the dashboard - #21437

Merged
kyleseaman merged 2 commits into
feat/slack-code-worktree-difffrom
feat/slack-code-channels-dashboard
Nov 2, 2026
Merged

kyleseaman merged 2 commits into
feat/slack-code-worktree-difffrom
feat/slack-code-channels-dashboard

Conversation

@kyleseaman

@kyleseaman kyleseaman commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #28305 (worktree and diff code, on #21410). Full backend CI runs when this retargets to main after the parents merge.

Problem / Motivation

Goal: A dashboard session that runs a Slack code channel is visibly marked as one, in the sidebar and the session header, with a link that opens that channel. And any session linked to a Slack thread, whether mirrored to one or started in one, gets a header link that opens that thread, whether or not code channels are on (Kyle's build-9 ask: a session he started in Slack showed no Slack link).

#21410 gives every Slack code channel an ordinary dashboard session, but in the dashboard that session looks like any other chat. Nothing shows that typing in it posts to a Slack channel, which channel that is, or whether the channel has been archived or wrapped up, and there is no way to jump from the session to the channel. A code channel's conductor also opens worker sessions, which pile up in the sidebar beside it, so one task reads as many rows and a worker waiting on the user is easy to miss.

Why it matters

Slack Code is meant to be one session seen from two windows. If the dashboard side cannot tell a user which sessions are code channels, or take them to the channel, the dashboard half of the feature is invisible. And a crew should read as one task whose single line says what it needs, without hiding anything that needs the user.

Not a goal

  • Settings UI and the Slack Code toggles (owned by the settings work in this stack).
  • The code channel's worktree, diff view and context bar (feat/slack-code-channels-workspace).
  • Agent tools, commands and wrap-up itself. This PR only displays the wrapped_up_at stamp the wrap-up work sets.
  • Publishing work_aggregate: that is feat(slack): conductor work board in code channels #21993's row model. This PR only renders it.
  • Any change for a session with no code-channel binding and no Slack thread, and, while code channels are off, anything beyond the Slack-thread header link. Parents that are not code-channel conductors keep today's rows.

What changed (motivation → approach → change)

  • Slot data. slack/code_channels/dashboard_view.py turns a binding into code_channel {channel_name, status (archived > wrapped_up > active), web_url: Slack's app_redirect link, empty unless the ids are well formed}. Only a person's views carry it: the bare list never does, and dashboard/ws_event_scope.py strips it from app WebSocket rows. While the store is still loading, Slack-linked rows carry code_channel_pending instead, so no thread link flashes before the badge. With the gate shut the store is never read.
  • Keeping it current. slack/code_channels/lifecycle.py handles channel archive, unarchive and rename (and group_*), subscribed in slack-manifest.yaml under #@code_channels. Bound channels only, nothing while the gate is shut, one channel's events in order; a foreign workspace's event is refused, SEL-audited.
  • Sidebar row. The Slack mark in a fixed 10px box plus a small external-link glyph, so it reads as a link named "Open #channel in Slack" (tooltip adds an archived or wrapped-up state). An archived mark is greyed AND wears an archive glyph, never colour alone. No channel text in the row; the agent name yields first so the time keeps its room.
  • Session header. The full link in the header's chip pattern: Slack mark, #channel (truncated, full name in the tooltip), state words, link glyph. A session linked to a Slack thread gets a link to slack.com/archives/<C>/p<ts> (ids validated; "Replies paused" when paused). A session started in a Slack thread is not a mirror, so dashboard/state_parts/slots_frame.py also sends that thread as slack_origin_channel / slack_origin_thread_ts and the header links it the same way. On a phone, which draws no session header, the same link (code channel's, else the thread's) is a row in the top bar's ⋯ menu (MobileTopBar.tsx, shared slackLinkTarget). No URL carries a dashboard credential.
  • Workers fold under their conductor (folder view and unfiled rows): a code-channel conductor's direct workers hide behind a chevron + count, collapsed by default, open state persisted (mc-sidebar-conductor-expanded). Nothing folds while a search or filter narrows the list; the open session or a pinned worker never folds. Open workers keep the sidebar's one content column (docs/decisions/2026-10-09-folder-glyph-sits-on-its-connector-line.md), marked by an out-of-flow rail. Display only; it could serve any parent but is scoped to code-channel conductors.
  • The conductor's line (pages/chat-sidebar/codeChannelCrew.ts), worst first: waiting on you > stuck / interrupted > working > done > idle.
    • work_aggregate present (contract below): its state, label and counts render as given.
    • Null or absent: the slot list's states (waiting on you, interrupted, working, idle).
    • In both: a worker waiting on the user always takes the line and lights the attention dot. A tool approval reads in the worker row's own words ("Needs approval · approve git push"); a question card or sub-agent approval reads "Waiting on you". The conductor's own ask or stall keeps its own line.
  • Strings. New strings in all 12 catalogs, plurals registered in pluralKeys.json.

work_aggregate contract

Published by #21993 at cc01bfb; this PR consumes the same shape (WorkAggregate, website/src/types/index.chat.ts). An optional field on the conductor's dashboard slot, delivered by the existing slot patch (no new poll), null when there are no workers:

work_aggregate: {
  "state":  "waiting" | "stuck" | "working" | "done" | "idle",  // already resolved worst first: not re-ranked here
  "label":  string,                                               // already redacted: rendered verbatim
  "counts": { "working": n, "waiting": n, "stuck": n, "done": n, "total": n }
}

A shape this build cannot read (unknown state, non-string label, missing counts) is treated as absent.

Backwards compatibility

Compatible: code_channel and code_channel_pending are new optional keys on slot rows (the dashboard also reads an optional work_aggregate, which nothing in this PR sets), and the new Slack events are subscribed only under the code_channels switch. No existing field, route or event changes meaning.

slack_origin_channel and slack_origin_thread_ts are new additive string keys on every serialized slot (empty unless the session was started in a Slack thread), ungated by the code_channels switch on purpose: they carry the Slack-born session's thread for its header link. They reach exactly the audiences the existing slack_channel / slack_thread_ts already reach, app tokens included, and carry the same kind of value (a channel id and a thread ts, no names, no message text, no credential). slack_linked keeps its meaning (False for a Slack-born session), so the sidebar, the session menu and mirror release are unchanged. A client that ignores the keys sees today's payload.

Removes nothing: no field, route or event is deleted or tightened. Folding hides worker rows from the folder view's default display only; each stays one chevron away, on its session page, in search and in History.

Premise (for the maintainer override)

First Principles flags the Slack-thread header link (SlackThreadLink, ChatTitleOverlay.tsx) and the slack_origin_* slot fields as reaching sessions outside the code-channel gate. That is intentional and owner-approved: Kyle asked for it after build 9, when a session he started in Slack showed no Slack link in its header, and on 2026-10-23 ruled to keep it in this PR rather than split it out. The link appears only for a session that is already linked to a Slack thread (mirrored or Slack-born), opens Slack's own permalink built from validated ids, and carries no dashboard credential. The fields are additive and back-compatible (see Backwards compatibility). The Goal above now states this scope.

First Principles also flags the work_aggregate reader as having no producer in this tree. It is the dashboard half of a contract whose producer is #21993's work-board row model ({state, label, counts} on a conductor's slot, delivered by the ordinary slot patch), still open on another branch. Both halves were built against one written shape so the stack can merge in either order. Until #21993 lands the field is absent: the sidebar falls back to slot data, and the "stuck" and "done" lines don't appear. The crew line ranks code-channel workers from slot data, which lib/crewWorkers.ts (Crew Mode's ledger grouping) does not read, and Crew Mode roots are excluded from the fold.

Tests

  • test/test_slack_thread_session_binding.py: serialize_slot on a slack:<ts> self-link ships slack_linked False plus the origin ids (namespace prefix dropped); a dashboard mirror, a Slack session mirroring another thread, an empty channel and a non-Slack origin ship none.
  • test/test_slack_code_channels_dashboard.py: URL building rejects malformed ids; status precedence; view shape. Gate shut never reads the store; an unread store touches no disk on the caller, is warmed off the loop and re-pushed, and marks only rows carrying a Slack thread (mirrored or Slack-born) code_channel_pending. Viewer scoping through HTTP and WebSocket: a member sees no other session's channel, an app caller never sees either key.
  • test/test_slack_code_channels_lifecycle.py: archive/unarchive/rename, unbound channel, feature off, refused or mismatched workspace, per-channel ordering (mutation-checked).
  • website/src/components/CodeChannelBadge.test.tsx: the row mark's exact accessible name and tooltip, no text, no pill; the link glyph only on a linked mark, the archive glyph only on an archived one (both fail on revert); a web_url that is not Slack's app_redirect renders no link; the header link; the thread link's permalink, id validation, paused state, and nothing while pending or for a code channel.
  • website/src/test/ChatPage.mobileTopBarActions.test.tsx: the phone ⋯ menu opens a Slack-born session's thread and a code channel's own link, and offers no row for malformed ids, a pending code-channel lookup, or a malformed channel link (fails without the row).
  • website/src/pages/chat-sidebar/codeChannelCrew.test.ts + website/src/test/ChatSidebar.codeChannelCrew.test.tsx (real sidebar): collapsed by default, expand persists across a remount, an ordinary parent unchanged; work_aggregate present in all five states with label and counts, trusted as given, null and malformed fallback, and the approval rule under every aggregate state (line and dot); one owed approval reads the same on the conductor line and the worker row; nothing between the crew wrapper and a worker row steps it in (any padding/margin class, variant prefixes included). Mutation-checked: dropping the fold, the crew line, the attention dot or the approval rule, or putting the old pl-2 back, turns them red.
  • Browser harnesses on the built SPA: capture-slack-code-channel-row-fit.mjs (the mark is 10x10px and nothing clips it at 260px/180px/320px, nested rows), capture-slack-code-channel-crew.mjs (fold, persistence across a reload, waiting on you, done/stuck from work_aggregate, each worker's title left edge equal to its conductor's and a sibling row's, 12 checks red with pl-2 restored; --record writes the fold open/close WebM), capture-slack-code-channel-badge.mjs (link glyph and archive glyph visible, row close-ups).

Manual verification

pod_up cannot resolve this host's worktrees, so the UI was checked in a real browser (Playwright) against the built SPA with canned slots shaped as the backend serializes them, by the three harnesses above, which assert the DOM before each shot. Local gates on this head: tsc, eslint, build, related vitest (5,757), npm run i18n:check and check-i18n-render.mjs against the base, focused backend tests, black/isort/flake8, the brand-name, comment-history, feature-map, focus-cue and flake-pattern gates, Docs Lint, push_guard.

Screenshots / video

Earlier before/after shots are in the evidence comment. The key ones:

Before After
Sidebar row, 180px before row 180px after row 180px
Workers, a hidden worker needs approval before crew 260px after waiting on you 260px
Workers expanded after expanded 260px
Header, session started in Slack (evidence) before Slack-born header after Slack-born header

after header

Current row mark (link glyph; an archived or finished channel says so in words beside the mark) and the worker fold:

Dark Light
Row, active channel row active dark row active light
Row, archived channel row archived dark row archived light

Fold opening and closing (260px, dark): fold open and close

Known gaps

  • A mirrored thread's chip reads "Slack thread": the slot carries the thread's channel id, not its name. Its permalink carries no workspace, so a user signed into several workspaces may land in the wrong one.
  • The row mark's click target is its 10px box. The fold's chevron sits inside the row's button role, as the conductor lane's chevron does.
  • Turning code channels on or off (or the app losing the scope) does not re-push the slot list; badges follow on the next push.
  • An archive or rename while code channels are off, or while the gateway is down, is not replayed, so that channel keeps its last known state until its next event.

Related Issues

Part of #15175. work_aggregate contract: #21993 (cc01bfb).

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners October 17, 2026 01:04
@kyleseaman
kyleseaman requested review from mbriones98 and removed request for a team October 17, 2026 01:04
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 17, 2026
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 332e373f4d32ade2caa74388fe8f1a8526b565d9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the new slot keys are additive and gated per audience, the new Slack events are only subscribed under code_channels, folding only changes what the sidebar displays, and the UI is backed by 12 screenshots and 1 recording.

Notes

  • The folding is generic, but the PR limits it to code-channel conductors. A conductor is someone who opens worker sessions, so the narrow scope is fine for now. If another kind of parent needs it later, widen the scope in the same place rather than adding a second fold path.

[DESIGN-REVIEWED] 332e373

Description read

[DESCRIPTION-READ] 174aaec81879ffacab674d7f5fcb19d199cb4b1e4b26b6b85dceee42bbad6aec

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 332e373f4d32ade2caa74388fe8f1a8526b565d9 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the phone ⋯-menu Slack link and the "Task done" and "Replies paused" states. No supplied screenshot shows the phone surface, and none shows two of the states the diff adds.

Evidence gaps

  • Phone top bar (MobileTopBar.tsx): the mobile-topbar-slack-link row in the ⋯ menu, with the Slack icon and the channel or "Slack thread" label, and the CodeChannelMark glyph next to the title. None of shot-01 to shot-12 is a phone view. Closed by a phone-width screenshot of the open ⋯ menu on a code-channel session.
  • Wrapped-up state: codeChannelBadge.wrapped_up ("Task done") in the sidebar row and in the header chip, plus its tooltip. Shots 11 and 12 show only "Channel archived". Closed by a screenshot of a wrapped-up row and of its header.
  • Paused thread link: the header's "Slack thread" chip with "Replies paused" (thread_paused). Shot-07 shows only the active chip. Closed by a header screenshot of a paused-thread session.

Notes

  • The blind reader saw the Slack link drawn four different ways and said "I can't tell why they look different, or what happens if I click the logo inside a row instead of the row itself." Visible link text on the header chips (e.g. "Open in Slack") would make the two link types easier to tell apart.
  • On the folded conductor row, the reader would not click "Needs approval · approve git push": "I don't know what I'd be agreeing to." That row should say which worker is asking, for example "Needs approval in GitLab note wake".
  • The faint "22452 ×" in shot-05 looked to the reader like a display glitch, and they said they would not touch the "×". Check that the row's hover actions don't draw over the title when the crew is expanded.

[UX-REVIEWED] 332e373

Description read

[DESCRIPTION-READ] ff4384b88fd14ec3c95ff595b13c09ecfb1f4df2955be5c7e6a1cddf24813256

That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 332e373f4d32ade2caa74388fe8f1a8526b565d9 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: the code-channel surfaces sit behind the code_channels switch, which defaults off and is covered by the in-progress rfc-slack-code-channels. The ungated Slack-thread header link is new and sits beside existing behaviour; it changes no default.

Notes

  • Item 6 — inherited: it reaches every Slack-linked session ungated. Its only support is the description's "Kyle asked for it after build 9", and no issue or record backs that. It adds a second permalink builder beside slack/interactions.py:664 and slack/interactions_sessions.py:334 (2 backend sites, slack\.com/archives).

What this change ships

Inventory (8 items) — 7 justified

Intent: let a person see which dashboard sessions are Slack code channels and jump to the channel or thread (ADDITION).

  1. Sidebar rows of code-channel sessions carry a Slack mark that links to the channel, greyed when archived — justified
  2. The session header shows a #channel chip with its state and a link — justified
  3. Archive, unarchive and rename events keep the channel's status and name current (new manifest events behind the switch) — justified
  4. A code-channel conductor's workers fold under a chevron with a count, collapsed by default and persisted — justified
  5. The conductor row's line shows the worst worker state, and a worker waiting on the user lights the attention dot — justified
  6. Any Slack-linked or Slack-born session gets a header link to its thread (slack_origin_* fields on every slot) — inherited
  7. The mobile ⋯ menu gains a row that opens the Slack link — justified
  8. While the store loads, a code_channel_pending key keeps the thread link from flashing before the badge — justified

[FIRST-PRINCIPLES-REVIEWED] 332e373

Description read

[DESCRIPTION-READ] f8b030b913708e6a301ff48d44b3637c9324e2902a2199c317c436ba492b3340

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 332e373f4d32ade2caa74388fe8f1a8526b565d9 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 332e373

Verdict parsed from the review's SHA-scoped output markers for commit 332e373f4d32ade2caa74388fe8f1a8526b565d9.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 332e373f4d32ade2caa74388fe8f1a8526b565d9 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 332e373f4d32ade2caa74388fe8f1a8526b565d9 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 332e373

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 332e373f4d32ade2caa74388fe8f1a8526b565d9 false-positive: <reason, 20 to 500 characters>

@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-core branch from bf6e6bb to 83f234f Compare October 17, 2026 01:15
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Oct 17, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-core branch 3 times, most recently from 32e4cdf to 0cd3ae3 Compare October 17, 2026 02:11
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-dashboard branch from 7c017bd to 2e1d007 Compare October 17, 2026 02:14
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 17, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Concurrent lifecycle handlers persist stale channel state span=d7f44618e664

outcome: fixed
Fixed in 2e1d007: lifecycle.handle_lifecycle_event takes a per-channel asyncio.Lock before its first await, so events for one channel commit in delivery order (asyncio.Lock wakes waiters FIFO); idle locks are dropped.
Pinned by test_events_for_one_channel_apply_in_delivery_order: an unarchive behind a held archive write stays parked on the lock and the channel ends unarchived. Mutation-checked: removing the lock fails it.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Warm-up test polled with a 0.5 s sleep loop span=3d3a69ccdced

outcome: fixed
Fixed in 2e1d007: the test awaits the warm-up task itself (dashboard_view._background) under one 30 s wait_for, with no sleep-poll.
The new ordering test in test_slack_code_channels_lifecycle.py uses an asyncio.Event set via call_soon_threadsafe, not a short wait; the flake-pattern ratchet passes.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Middle click on the badge opened the session, not the channel span=315e1b5acfa3

outcome: fixed
Fixed in 2e1d007: the anchor stops auxclick propagation, so the row's middle-click handler never sees it and the browser opens the channel link.
CodeChannelBadge.test.tsx asserts neither click nor auxclick reaches the row.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Archived and Wrapped up read the same span=258bbbbe2347

outcome: fixed
Fixed in 2e1d007: each state has its own glyph beside the word (an archive box for Archived, a check for Wrapped up), so they differ even where the word truncates.
The tooltip explains each one: archived = read-only in Slack; wrapped up = the task is done and the channel stays open for follow-ups. Header screenshots of both states are in the PR body.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Row chip did not show it is a link span=e53039f4ac71

outcome: fixed
Fixed in 2e1d007: both variants draw the external-link glyph when the chip links to Slack, and the tooltip ends with where the click goes.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • 'Slack code channel' is jargon span=5699772091e4

outcome: fixed
Fixed in 2e1d007: the label stays, because 'code channel' is Slack's own name for the feature and the name the settings page uses. The tooltip now opens with what it means: the session runs in a Slack code channel, and messages there and here are one conversation.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • app_url and channel_id had no readers span=4054cba1b78f

outcome: fixed
Fixed in 2e1d007: code_channel is exactly channel_name, status and web_url, the three fields the badge reads. app_redirect already opens the desktop app when installed, so no slack:// link is needed; channel_id is dropped from the payload and the frontend type.

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • A code-channel row drew two Slack marks span=8e7b3f2875d0

outcome: fixed
Fixed in 2e1d007: SessionRow skips the connected-to-Slack mark when the row has a code_channel, so the badge is the row's one Slack mark; an ordinary Slack-linked row keeps its mark.
The capture harness asserts both (no second mark on a code-channel row, one mark on an ordinary Slack-linked row).

@kyleseaman

Copy link
Copy Markdown
Contributor Author
  • Real Slack archive event not exercised

outcome: rebutted
No Slack workspace with code channels is reachable from this host, so the check ran against Slack's documented channel_archive / group_rename payload shapes in test_slack_code_channels_lifecycle.py, which drive the same handler _on_event routes to.
The re-push is pinned too: an applied change calls push_slots_update. A live check belongs to the stack's end-to-end pass once #21410 and its parent land.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 17, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 19, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Evidence: archived chip no longer collapses to an empty box (UX Review). Built SPA, canned slots, website/scripts/capture-slack-code-channel-row-fit.mjs and capture-slack-code-channel-badge.mjs, at this head. A state chip's floor now holds the Slack mark and its state glyph, the state word keeps a 4ch floor, and an archived chip is dashed so it still differs from an active one at icon size. The "before" column stays in the previous evidence comment.

Attached, in order: conductor 260px, conductor 180px, folders 260px, folders 180px, folders 320px phone, sidebar rows dark, sidebar rows light.

sidebar-conductor-260px-light

sidebar-conductor-180px-light

sidebar-folders-260px-light

sidebar-folders-180px-light

sidebar-folders-320px-phone-light

01-sidebar-dark

01-sidebar-light

@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-dashboard branch from 125672a to 2defbe2 Compare October 20, 2026 03:04
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 20, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

HOLD at 2defbe2.

This PR targets feat/slack-code-channels-core, not main. It needs another review after it retargets and runs the full main CI.

It is also reserved for a human reviewer. It adds an inbound Slack event route that changes stored bindings (lifecycle.py, wired at events.py#L1264), six new manifest event subscriptions, and an app-token audience split (ws_event_scope.py#L1411). I found no definite defect: the handler refuses a missing, non-admitted or mismatched workspace and audits each outcome.

These current-head AI items have no reply (every disposition is for 7c017bd):

  • UX: the chip is clipped on nested and hover rows, the archived chip reads as broken, the feature has three names, and the phone marker is unclear. The row-fit-3 evidence comment helps, but it is not a target=ux disposition.
  • First Principles: _warm_store duplicates the Slack start-up load. Remove it and re-push slots once after that load, or name the case that needs it.
  • Design: say whether a workspace on an older Slack app manifest is prompted to add the new events.

— crew-pr-reviewer (r114)

@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-core branch from 19a16d6 to 78ab86f Compare October 20, 2026 18:02
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 20, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Screenshots for head 1a786448f5

Captured in a real browser (Playwright, Chromium) against the built SPA with canned slots (pod_up cannot resolve this host's worktrees). Before = 2defbe27c0, the PR's previous head.

Sidebar row: Slack mark only (three folders deep, kirocrew-conductor, long channel names)

Before After
Default (260px) before row 260px after row 260px
Narrowest (180px) before row 180px after row 180px

Session header: the full link (Slack mark, #channel, link glyph); a mirrored Slack thread gets its own

Before After
before header after header

after: mirrored Slack thread header

Workers fold under their code-channel conductor (folder view)

Before After
Waiting on you, 260px before crew 260px after waiting on you 260px
Waiting on you, 180px before crew 180px after waiting on you 180px
Collapsed, working, 260px after collapsed 260px
Collapsed, working, 180px after collapsed 180px
Expanded, 260px after expanded 260px
Expanded, 180px after expanded 180px
work_aggregate done, 260px after aggregate done 260px
work_aggregate stuck, 180px after aggregate stuck 180px

@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-dashboard branch from 2defbe2 to 1a78644 Compare October 20, 2026 20:11
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 20, 2026
@kyleseaman
kyleseaman force-pushed the feat/slack-code-channels-core branch from 78ab86f to 10d5311 Compare October 20, 2026 23:27
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 20, 2026
@kyleseaman

Copy link
Copy Markdown
Contributor Author

Evidence: Slack-born session header link (build 9)

A session started in a Slack thread (slack:1792588893.063579, #testing C0C9R9WUXM5) now links its own thread in the session header. Built dashboard, faked slot data, Playwright via website/scripts/capture-slack-code-channel-badge.mjs (BEFORE=1 asserts the bug on the old build).

Order: before dark, after dark, before light, after light.

06-header-slack-born-dark

06-header-slack-born-dark

06-header-slack-born-light

06-header-slack-born-light

Sidebar row and session header show a Slack code channel chip with a link to the channel and its archived / wrapped-up state. The row chip keeps its Slack mark whole, yields width after the agent name, drops its link glyph before the channel name, and goes icon-only below a readable floor; the time never shrinks. Slack channel_archive / unarchive / rename events update the binding.
Sidebar rows carry the Slack mark alone, a link named 'Open #channel in Slack'. The session header carries the full link (mark, #channel, state, link glyph); a session mirrored to a Slack thread gets a header link to its thread (paused state shown; hidden while code channels are still loading). In the folder view a code-channel conductor's direct workers fold under its row behind a persisted disclosure. The conductor's status line reports the crew worst-first (waiting on you > stuck/interrupted > working > done > idle) from slot data, and from the conductor slot's optional work_aggregate {state, label, counts} when published; a hidden worker's approval or unread result always surfaces on the conductor row.

A session started in a Slack thread is not slack_linked (its thread is
where it lives, not a mirror), so serialize_slot shipped empty
slack_channel/slack_thread_ts and SlackThreadLink drew nothing.

serialize_slot now also ships slack_origin_channel and
slack_origin_thread_ts for a genuine Slack-origin self-link, keeping
slack_linked False so sidebar, menu and mirror semantics are unchanged.
SlackThreadLink links those ids when the session is not mirrored and
reads paused from the origin row. While the code-channel store is
unread, rows carrying an origin thread are marked code_channel_pending
too, so a bound session never flashes the thread link.
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.

2 participants