Repository navigation
feat(threads): a thread is a full session anchored to one message, openable mid-stream - #14928
chenmingwei23 wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Threads now ship on by default on every chat surface, yet the PR's own RFC amendment says no maintainer has accepted that scope. Watch
[DESIGN-REVIEWED] eecd81a Description read[DESCRIPTION-READ] f61867c0b7c3d1f85c41abfa57cf6e9dc50b4337e977fcc5d1abb153cffa9f5e 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 |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING --
BLOCKING --
[BLOCK-MERGE] 04fcc5f Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: the cursor is written at F2: every input the summarizer sees is already redacted ( 🏷️ Fenced finding(s) machine-flagged as likely edge caseThe security fence keeps these findings blocking regardless of adjudication; the only clearance path is a human override. The annotate-only pass judged the condition combination each one requires extreme, and pre-drafted the override rationale below. A repository writer must independently verify a rationale before posting it — it is machine-authored, and a wrong override on a security-class finding ships exactly the class the fence exists to stop.
False positive or not applicable? A repository writer can comment: |
UX Review (Opus 5.5) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK A thread opened on an older answer shows the main chat's current, unrelated reply under its quote, and the blind reader had "no idea" why. BlockersThread panel shows an unrelated reply as the thread's context
Watch
Suggestions
[UX-REVIEWED] eecd81a Description read[DESCRIPTION-READ] 74422ab1faebce2b106b05add1991fb3e165114ebfce13326ea09ccbca5ea033 That sha256 names everything this verdict read: the PR description, plus the 36 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 |
First Principles Review (Opus 5.5) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: threads are now on by default on every Not justified as shipped
What this change shipsInventory (9 items) — 6 justifiedIntent: let a person keep talking in a thread on any message, and open one while the reply is still streaming. ADDITION.
Blockers
[FIRST-PRINCIPLES-REVIEWED] 04fcc5f Description read[DESCRIPTION-READ] f766cc65d78426f41ddddc252bdc01d6993c4a660fdcd9a2aff4c01ffc69bde6 That sha256 names the PR description this verdict read. Recompute it with |
5da7ac7 to
ed90f94
Compare
ed90f94 to
ffa9a79
Compare
ffa9a79 to
4da0a68
Compare
6e7e659 to
9179dcc
Compare
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
self-added: yes
|
|
span=2f6082500a24 FIXED. The row was accurate when written and stopped being accurate in this same PR: the seed mechanism it described ( The row now states the mechanism the code has: a thread opened by a bare click starts EMPTY, nothing is injected at open, and its first turn is given a bounded SUMMARY of the parent conversation -- anchor quote included -- with Verified against the diff rather than restated: |
|
span=741fde857d5c FIXED, not overridden. The fence's own clearance path is a human override and the annotate-only pass pre-drafted one, but the finding names a real invariant the controller was not enforcing, and enforcing it is six lines -- so there is nothing here worth spending an override on. I verified the adjudicator's reachability analysis independently and it holds: a chat-page session switch rewrites the URL and deletes What it does expose is that the invariant lives in the HOSTS. Every piece of state the controller holds -- During render rather than in an effect, which is the part that matters: an effect would let one frame paint the previous parent's drawer over the new one. React re-renders on a render-phase adjustment without committing, and each setter bails out when its value is already correct, so a render where the slot did not move costs nothing -- pinned by a test. Four tests in |
|
span=d2196525dad2 FIXED. Upheld and correct, and the adjudicator named the precedent: this is the same persist-before-you-publish hazard as the cursor entry, in the same file, one write earlier. A thread's parent edge lives in
Both of the emitter's early returns call Three tests in |
|
span=da0ca1eea756 FIXED to Why it was relaxed, and why So |
|
span=d2196525dad2 Both findings on this span, one FIXED and one answered as adjudicated. F2 ( The fix is the one the finding names: compute F1 ( What matters is that the close itself is already durable first and deliberately so: the anchor transition is written before the card, |
|
|
|
|
|
|
|
|
|
|
|
|
If this PR's board carries Root cause and the fix are on #15651 (comment 5923360639): the orphan alias-lock sweep unlinks while still holding its own descriptor open, and Windows refuses to delete a file with an open handle. #15280 carries the fix -- a Windows-only reordering in |
|
/ai-review override first-principles 90e5499: Product decision by the owner: a reply thread is a full chat session, on by default on the chat surface, replacing the bounded section 07 reply panel. The RFC amendment in this diff is the record of that decision, not a draft proposal. The crewmate page keeps its flag-gated panel until the stacked follow-up #15410 moves it onto the same controller. |
Human judgment recorded@chenmingwei23 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
Sensitive Change ReviewSensitive files changed:
A human reviewer with write access must approve the CURRENT head and |
|
Addressed on head GPT 6.1 — both security-class findings FIXED in
First Principles — BLOCK, split:
UX/Design reviews are advisory (CONCERNS); their flag-consistency point is covered by the Item 2 fix above. |
A reply thread on a crewmate's chat was a bounded reply list: replies in a
sidecar, every reply in a throwaway `thread:<slot>:<mid>` session that could
never resume, a forced read-only tool posture, no memory, the whole envelope
re-seeded each turn, and a one-reply-in-flight lock. It lived only on the
Crewmates page, only behind the `dashboard.crewmate_threads` flag, and only on
a message whose turn had already finished.
A thread is now an ordinary chat session plus an anchor to one message.
Anchor is (surface, conversation, message id): (dashboard, parent slot, mid) and
(slack, channel id, thread_ts). It is stored on the thread session's own metadata
and in a per-parent index -- the old reply sidecar, at version 2. Version 1 files
are read in place and render as a read-only fold, because their replies came from
a cold read-only session with no memory and replaying them as a full session's
transcript would assert a history that session never had.
Opening never touches the running turn: no semaphore, no `_handle_busy` branch,
no `messaging.queue_mode` value. It reads a non-consuming snapshot of the parent's
partial text, so every messaging invariant holds. A streaming row has no mid, so
the anchor resolves to the user message that started the turn, which is already
persisted.
Two openers, one coroutine: `POST /api/chat/threads/{mid}/open` for a person
clicking a message, and MCP `thread_open` for an agent opening one on the message
it is answering. `open_thread` calls `create_session` directly and lets its
refusals through verbatim rather than adding a bypass.
Slack already keyed one session per thread_ts and never recorded it; that session
is now recorded as anchored, with nothing re-keyed and the 1:1 DM fold and the
dashboard mirror binding untouched.
`thread/opened` and `thread/closed` join `session/opened` in the crew log, so the
ledger is the existing one. `dashboard.crewmate_threads` is removed, not defaulted
on. Retired with it: `thread_session_key`, the `thread:` stateless prefix,
`_run_thread_turn`, `build_thread_message` and its envelope constants, the
read-only spec posture, the per-reply byte caps, and `409 not_crewmate_chat`.
Specs updated alongside: history.md (new Surfaces section), session.md,
slack-gateway.md, crew-mode.md, docs/feature-map/README.md.
|
GPT 6.1 F1 ( Also addressed this head:
First Principles Item 1 (threads always-on, governance) and the Sensitive Change approval remain with the maintainer — not overridden. |
|
Closing this after an audit. As written, this makes reply threads always on at the API for every user. On The branch ( |
Problem / Motivation
Goal: a thread on any chat message becomes a full conversation you can keep talking in, and you can open one on a reply while it is still being written.
A reply thread on a crewmate's chat was a bounded reply list, not a conversation. It stored replies in a sidecar beside the transcript, ran every reply in a throwaway session keyed
thread:<slot>:<mid>that could never resume, forced a read-only tool posture because the panel had no approval card to fall back on, injected no memory, and re-seeded its whole envelope every turn because the session was always cold. It refused a second message while the crewmate was replying (409 thread_turn_in_flight). It existed only on the Crewmates page, only behind thedashboard.crewmate_threadsdeveloper flag, and only on a message whose turn had already finished: the "Reply in thread" action was withheld while a reply was still streaming, which is exactly the moment a reader wants to ask about it.Four of those were reproduced live on main on 2026-09-30, and they share one cause. Legacy threads were not sessions. A reply lived in a sidecar beside the parent's transcript and its turn COLD-STARTED a throwaway
thread:<slot>:<mid>session every time, handed a rebuilt envelope: the instructions, a clipped copy of the parent's surrounding rows, the parent message and the replies so far. So a thread had no durable context of its own -- what it knew was re-pasted per reply and clipped to fit. In the same session the thread composer did not grow with its content, so a second line hid the first; a turn in a thread could not call a tool; and the composer offered no steer or queue chooser while its own turn ran. D1 fixes all four structurally rather than one at a time: a thread is its own slot with its own durable context, and the pane rendersChatPane-- the real composer and the real transcript row set -- so the thread inherits auto-grow, tool cards and the busy-send chooser by construction. What the thread is told about its parent is a bounded summary its own projector builds at its first turn (see the parent-context projection indocs/system-specs/modules/history.md), never the parent's context and never the reverse.website/src/test/threadInheritsChatSurface.contract.test.tspins the delegation.A second, unrelated thread convention had grown up agent-side. A resident manager opened a "thread" with
session_createplus a folder naming convention, and the app hung it under the user's message by convention alone. There was no anchor, so nothing connected the two models, and no channel could join either.Why it matters
You cannot work in a thread you cannot talk in. Every real use of one -- follow up on a single point, change direction, let the agent run a tool and approve it -- needs an ordinary conversation, and the old thread refused all three by construction.
Opening one also cost a wait. The action appeared only after the reply finished, so the moment you wanted to branch off was the one moment you could not.
And a thread could not travel. Slack threads, member DMs and the ordinary chat page each had their own idea of a thread, or none, so the same gesture meant something different on every surface.
Not a goal
thread_openis the only tool on that surface; an agent asking "is one already open here?" reads the footer.session_control.py.open_threadpasses that module's refusals through verbatim rather than adding a bypass.What changed (motivation -> approach -> change)
A thread is now an ordinary chat session plus an anchor to one message.
The old machinery existed because a thread was not a session. Each limitation traces to that one choice:
_in_flightlock, because the thread had no session to queue on409 thread_turn_in_flightdeletedthread:sat in_STATELESS_PREFIXESand_run_thread_turnpublished a read-only spec, because a bounded panel has no approval card_run_thread_turn, the read-only spec and the boundary prompt deletedmid; ids are minted when the row persists, post-turninflightsentinel and never invents a midThreadHooksarrived only whenMembersPagepassed themwebsite/src/pages/chat/useThreads.ts, wired by bothChatPageandMembersPage.409 not_crewmate_chatdeletedthread_tsand never recorded itThe anchor is
(surface, conversation, message id):(dashboard, parent slot, mid)and(slack, channel id, thread_ts). Each surface keeps ONE record of it, in the only place that surface can make durable: the dashboard writes a per-parent index, so a parent lists its threads in one read, and the old reply sidecar becomes that index at version 2. Slack has no parent transcript to hang an index off, so its anchor belongs on the thread session's own metadata, which its writer also reads as an idempotency guard -- seam only in this change; that writer ships separately. A second copy on the dashboard side was written for durability, had no reader, and is gone.Version 1 files are read in place and never rewritten. Their replies came from a cold read-only session with no memory injection and a curated envelope; replaying them as a full session's transcript would assert a history that session never had. The read-only fold that draws them is cut from this PR for the review diff cap and ships in a follow-up: the anchor index still reports
kind: "legacy"with its count and last reply time, so the parent's footer names such a thread, and the panel states it cannot draw it yet rather than rendering an empty thread. Nothing on disk is migrated, moved or deleted.Opening never touches the running turn. No semaphore, not a fourth
_handle_busybranch, not amessaging.queue_modevalue. It reads a non-consuming snapshot of the parent's partial text:chat_utils._collapse_wire_rowsnever mutates its input, andpurge_chunksrebinds rather than mutates, so a reader that copies first cannot be emptied underneath. Every messaging invariant holds -- one turn per session, exact FIFO, one combined drain turn, the receipt edited and never deleted.Two openers, one coroutine.
POST /api/chat/threads/{mid}/openfor a person clicking a message, MCPthread_openfor an agent opening one on the message it is answering.open_threadcallscreate_sessiondirectly, so a thread faces the same authorization gate as any session opening another.The drawer is a pane of the chat row, and the pop-out switches the slot. At 1100px and up the thread is a
shrink-0flex child of the chat surface row, the slot the side panel and the docked search panel already take, so the parent reflows instead of sitting behind the drawer; below that a split leaves neither column readable, so it stays an overlay. The rule and its reasoning live inwebsite/src/pages/chat/threadDrawerLayout.ts. The header's pop-out dispatches the ordinary slot switch rather than pushing/chat?sid=<thread>: on this page a pushed?sid=reaches nothing, because the session controller honours only a Back/Forward for that param and the activeSlot-to-URL effect then rewrites it back to the slot on screen -- which made the pop-out land on the PARENT.The ledger is the existing crew log.
thread/openedandthread/closedjoinsession/opened, which already carries the parent link. No second store.Backwards compatibility
The rebase onto
origin/maindeleted the version-1 crewmate side-chat replymechanism wholesale (it is superseded by the session-anchored thread model), so
PR Hygiene's take-away check names its removed public defs. Each had exactly one
reader, all inside that same removed mechanism or its route registration, and
each reader is removed or repointed in this diff:
Reader: src/kiro_crew/dashboard/routes/chat.py:configure_chat_routes -- chat -- the only reader of api_chat_thread_reply was the POST /api/chat/threads/{mid}/reply registration; this diff drops that line and registers the new /open and /close routes instead, so no route resolves the removed handler
Reader: src/kiro_crew/dashboard/chat_threads.py:api_chat_thread_reply -- chat -- thread_session_key, build_thread_message and threads_enabled were called only from api_chat_thread_reply and its helpers in this same file, all removed together in the rewrite, so no caller survives
Reader: src/kiro_crew/session.py:_THREAD_PREFIX -- chat -- the one reference to build_thread_message outside chat_threads.py was a code comment beside the _THREAD_PREFIX session-prefix constant; the comment is updated and nothing imports the removed symbol
Reader: src/kiro_crew/dashboard/chat_threads.py:broadcast_thread_reply -- chat -- broadcast_thread_reply (in ws.py) was imported and called only by the removed reply path in chat_threads.py; the new path broadcasts the chat.thread_anchor frame instead, so the removed def has no reader
Breaking: three contracts narrow. Writer sweep on
origin/main@b5ca357ba8:dashboard.crewmate_threadsis kept, not removed (an earlier revision of this body claimed removal; corrected on the 2026-10-07 rebase). The backend thread routes and thethread_openMCP tool are ungated so a thread is openable from any surface, but the flag still gates the Crewmates page's own thread panel:config/sections.py,config/loader.py,dashboard/handlers/core.py's editable-key map,useCrewmateThreadsFlag.ts,CrewmatesSection.tsx. A storedtrue/falsein an existingconfig.jsonkeeps its meaning for that surface, so no operator config fails to load. (Making threads always-on on every surface is the open §07 governance decision — see the RFC amendment; it is not asserted as accepted here.)chat.thread_replyws frame is renamedchat.thread_anchorand its payload dropsrun_id,roleandcontent. Writers:dashboard/ws.py,dashboard/ws_event_scope.py; readers:website/src/hooks/useWebSocket.ts,website/src/app-sdk/index.ts,website/src/state/threadLiveStore.ts. All updated here. No alias is kept: the payload shares no field with the old one, so a client written against the old frame would read every field as absent. A renamed event it does not subscribe to is a frame it ignores, which is the honest failure.POST /api/chat/threads/{mid}/replyis replaced byPOST /api/chat/threads/{mid}/openplus ordinary chat sends on the thread's own slot, and409 not_crewmate_chatis gone from all three thread routes. The only caller waswebsite/src/api/threads.ts, updated here.Compatible: stored version 1 sidecars keep reading, and their replies keep rendering.
Tests
test/test_chat_threads.py(48) covers the anchor index at both versions, the open core, both entry points, the close card, and that a thread mints a real session rather than forking the parent's transcript.test/test_mcp_dashboard_registration.py(23),test/test_channel_blocked_tools.py(62),test/test_json_object_body_guard.pyandtest/test_transcript_derivation_seam.py(85 together),test/test_agent_spec_hardened_reads.py(81) andtest/test_config_baseline.py(17) carry the cross-file pins that name the removed route and the removed flag.website/src/pages/chat/threadDrawerLayout.test.ts(4) pins the drawer's placement: overlay by default, and at the breakpoint an unshrinkable pane that undoes every base rule which would keep it out of the flex row, with the transcript still a shrinkable child of that row. Flex decides the width, so there is no computed value to read back and jsdom lays nothing out; the measured proof is in R3 above.threadInheritsChatSurface.contract.test.tsgained the pop-out case.Frontend: 52 across
ThreadPanel.test.tsx,useThreads.test.ts(new),threads.test.ts,threadHooks.test.ts(new),threadLiveStore.test.tsandThreadFooter.test.tsx.MembersPage.test.tsx(221) and the renderer suites (241) are unchanged.tsc,eslint,mypy,npm run lint:i18nandnpm run i18n:checkclean.Two consequences of "always on" surfaced in the suites and are fixed with the flag:
MembersPage.test.tsx's sharedthreadsSummaryspy now resolves by default, because with no flag the footer read goes out on every render and a rejecting default put a thread notice on three cases that assert no alert; and the create-dialog case asserts the['kirocrewConfig']cache is invalidated rather than refetched, because the flag hook was the only observer of that query.Manual verification
Against a pod serving this branch, with real model turns.
POST /api/chat/threads/<mid>/openanswered 201 while the parent readrunning: true, and the parent's own reply then finished at 4103 characters rather than being cut short. Six turns ran inside the thread withgrepandshellactually executing. Ashellcall raised a real permission row thatPOST /api/chat/slots/<thread>/approvegranted with 200. A version 1 sidecar and a version 2 anchor were served from one file. A separate 24-check end-to-end run exercised the real routes, the real anchor store, the realcreate_sessionand the real delivery verb with only the ACP turn body stubbed.One measured limitation, not a defect: opening with the
inflightsentinel is refused on a brand-new chat's FIRST turn (409 transcript_missing). A transcript row is written after its turn and an anchor is durable only through the row it hangs off, so on a first turn the anchored message exists on screen and not yet on disk. An explicitmidon a busy parent answers 201, which is the case the goal names. The UI says "not yet" rather than reporting a failure.Screenshots / video
One heading per functional requirement, in the order a reader should meet the feature. Every frame is from a pod serving this branch at 1600x1000 with real model turns; the caption says what that frame proves.
R1 -- Open a thread on any message
The action lives on an ordinary crewmate reply, in the row's own More menu.
The same action on a user message: either side of the conversation can be anchored.
R2 -- Open while the reply is still streaming
Bubble measured at 1433px against a 1000px window, the stop control still armed: the opener stays reachable on a reply that is both long and unfinished, so you do not wait for the turn to end.
R3 -- The thread sits beside the parent, not over it
Measured in the browser: the parent's scroll container went from 1104px to 584px, losing exactly the 520px the pane takes; its right edge and the pane's left edge both land on 1080px; zero elements overflow the container, and the parent's composer ends at 1057px, inside its own pane. Below 1100px the drawer goes back to an overlay, where a split would leave neither column readable.
R4 -- The thread mirrors the parent's reply as it arrives
Two frames seven seconds apart: the mirror grew from 113 to 1487 characters while the parent's turn was still running. It is read-only -- the parent's turn runs in the parent's own process.
R5 -- No seeded reply: the thread starts empty and streams for real
Nothing is pre-written into a thread. The anchored message is quoted once above; the transcript below is genuinely empty.
A turn inside a thread is an ordinary turn -- its own receipt, its own streaming reply, its own stop.
R6 -- The parent's context arrives by reference, not by pasting
Asked what it is about, the thread answers from the anchor summary alone.
Asked for the exact wording, it calls
thread_context_readand quotes it: the verbatim text is fetched on demand rather than front-loaded into every prompt. Re-probed live on this head with the two parent replies made separable first (0 shared long words between their first numbered points), the thread quoted the SECOND reply, the one it is anchored to, scoring 10/10 on that needle and 0 on the first reply's: "Its first numbered point, quoted verbatim: Record durable state (goal, phase, next step) to a ledger so progress survives context compaction or restarts." The answer names its own coordinates, seq 11/16, andGET /api/chat/threads/contextwith the thread's own session key returnsparent_log_seq16 -- the second reply's row, so the anchor is right at the layer the tool reads it from and not only in the panel.R7 -- Tools run inside a thread
A thread is a real surface, so a tool call renders as the ordinary card and the ordinary rows.
R8 -- Steer and queue work in the thread composer
Sending into a busy thread offers the same choice the main composer offers, rather than silently picking one.
R9 -- The thread sees what the parent said after it opened
Asked what the main chat has said since, it names both later exchanges and says how far the parent's log reaches. The window follows the parent instead of freezing at the anchor. Re-probed live on this head with a code word typed only into the parent while the thread was open, the thread retrieved it: "The code word, quoted verbatim: MARIGOLD-8812", with no claim that the parent rows were unreadable. The same read reports
last_seq26, past the row the thread was opened on, which is the reach this requirement needs.R10 -- The thread never leaks into the parent
The parent is asked something unrelated and answers only that. Two sessions, two contexts.
R11 -- The parent shows the thread it carries
A thread is reachable from the message it hangs off, not only from the menu that made it. A LIVE thread's footer carries no reply count by design: the count is the version-1 fold's, where the replies were the record; a real session's rows are its transcript, and
ThreadFooterrenders the count only on that older branch.R12 -- A long anchor stays out of the way
The quoted anchor is capped so a long parent message cannot push the thread's own conversation off screen.
R13 -- Ending a thread
Ending is recorded where the conversation happened, so the parent still points at what was said.
An ended thread stays readable and keeps its history.
The two state transitions a still frame cannot carry, recorded on the live pod:
Anchor quote clamp, then End thread. The drawer opens as a split pane beside the
parent, the anchored 10-point message expands and collapses again on
Show more/Show less, thenEnd threadis pressed with its hint on screen -- and the parent's ownfooter flips to
Endedwith aThread ended.card written into the transcript. Endingcloses the drawer, which is why the panel's own badge is in the second clip.
thread-transitions.mp4
The panel's side of a finished thread. Reopening it from the same footer draws the
Endedbadge in the header, drops theEnd threadbutton, keeps the thread's turn andits tool rows readable, and the composer reads "This thread has ended. You can still
message it, and replies land here." The anchor clamp still works on a closed thread.
ended-panel.mp4
Both recorded from
fb2f4da2de4aec6d8967a6f014b416b56fd3206aon a Kiro Crew pod builtfrom that commit (bundle
main-Bjxu8iPi.js), driven through the real UI against a realsession -- no fixtures and no stubbed thread state. Two harness facts, the same ones the
stills disclose: the capture browser holds the pod's own auth cookie, and ONE response is
rewritten,
/api/kiro-prerequisite, because a fresh pod is first-run and its sandbox probewalls the app behind a setup screen. Nothing about threads is touched by that patch and
nothing on the pod was modified.
R14 -- Pop out to a full page
The pop-out opens the thread's own session, verified by the landed URL naming the thread slot and the thread's own reply being on the page. The drawer and the full page are two views of one session, so leaving one for the other loses nothing.
R15 -- A version 1 thread says it cannot draw its replies yet
A thread written before this change keeps its anchor on the parent's footer, and
the footer still counts the replies:
2 replies.Opening it from that footer draws the fold rather than a transcript.
These replies can't be shown yet.withStart a new thread herebeside it. Itsays the replies exist and cannot be drawn yet, NOT that there are none: the
footer the reader just clicked counts them, so "none" would read as data loss.
R16 -- A tool waiting for approval inside a thread
A tool call raised inside a thread waits in that thread:
Approval needed, thecommand
echo hello > note.txt, andWaiting for approval. The parent is notasked.
The card's own body, legible.
The controls are the thread's own, and the jump affordance uses the thread
wording:
Show this tool call in this thread. While an approval is pending thepanel keeps its composer dock but holds no writable input -- the card occupies
that area, so the thread's last line is
Allow once / Trust / Reject.R17 -- A thread with nothing in it yet
A thread opened and not yet used reads
This thread is empty. Type a message to start it., with theEnd threadrow above it and a live composer below.The same state legible, beside its composer placeholder
Message this thread(which ends in an ellipsis on screen).
One correction to the review's wording. The request named
No replies yetforthis frame. That string is real but belongs to a different state:
ChatPane.tsxrenders
pages.chat.thread.no_replies_yetonly whenthreadSurface === 'closed',so it is what an ended thread with zero replies says. A thread that is merely
empty says
pages.chat.thread.empty_hint, which is the string above. Twosurfaces, two strings; these frames are captioned with the one actually on screen.
R18 -- The ended thread, re-shot on this revision
Ending is recorded where the conversation happened:
Thread ended.followed bythe thread's title.
That card carries the way back into the ended thread.
Reopened from
Read it: the header carries theEndedbadge and noEnd threadcontrol, and the composer still works -- its placeholder reads
This thread has ended. You can still message it, and replies land here.Ending releases theanchor, not the session, so the hint says so where the reader is about to type
rather than disabling an input that is still writable from the thread's own page.
The header badge
Ended(pages.chat.thread.closed) and the transcript card'sThread ended.(pages.chat.thread.card_ended) are two different strings; eachcaption above names the one in its own frame.
No flag is involved in any of these. This change deletes
website/src/hooks/useCrewmateThreadsFlag.tsoutright, so every surface aboveappears without a developer flag set.
Recorded runs
Two earlier end-to-end takes were recorded against a pod on this branch (99s and 70s) and are held by the crew alongside the frame-by-frame notes. The frames above supersede them for layout: both takes predate the split-pane change in R3.
Related Issues
no linked issue: this is a new capability tracked outside this repository, so no GitHub issue was filed.
Other notes
Why ending a thread swaps the chip for a card rather than animating one element.
website/AGENTS.mdasks for one element animated between two states, and for astated reason when it is a swap instead. The reason: these are not one element in
two states. The footer chip is an affordance ON the anchored message -- a way into
a thread that is open -- and the close card is a new transcript ROW recording that
the thread ended, carrying the title and the back-link. They live in different
places in the transcript, so a shared-element flight would animate the way-back-in
away from the message it belongs to and across rows it never belonged to.
Keeping both was the earlier shape and this lane rejected it: the chip-plus-card
stack read as two controls the reader could not tell apart. Suppressing the chip
once the anchor carries
closed_atis the answer to that finding, and the way backin is not lost -- it moves to the row that records the event and names the thread.
Follow-up, not in this change:
pod_upcannot seed the data home, so a fresh pod is first-run and walled when the diag mask races (pod tooling gap). The images above were taken on such a pod by rewriting ONE response in the capture browser; nothing on the pod was modified.Follow-up, not in this change: legacy version-1 thread sidecars -- their read-only fold lands in a follow-up PR (review diff cap). The sidecar files are untouched on disk and the parent's anchor footer still counts them; the panel says it cannot draw them yet and offers a real thread. Only installs that ran the developer-flagged version-1 feature have any.
Follow-up, not in this change: two placement contract tests from
threadRowActions.test.tsxmove to that same stacked branch, to make room for the redaction fix described under "What changed". Both assert WHERE a control sits -- the thread trigger standing where the copy-link button stood, and Pin keeping its one click while the permalink moves -- which the screenshots above show directly. The two tests in that module asserting SCROLL behaviour stay, because no still can carry them: the action row is sticky, and it sits outside the clipping bubble so sticky can work at all.Follow-up, not in this change: seven regression tests move to the stacked branch with that Slack slice (review diff cap -- the AI lanes refuse a diff over 1 MB and fail closed). They cover the anchor's forward join into the parent log, the window's reach past the row a thread was opened on, and a thread resolving its own parent edge across log sessions. Every behaviour they assert is asserted here too, by the tests that stayed; what moves is the second, probe-derived angle on it. The blocking-fix regression (a cursor rejected at the writer's ceiling publishes nothing) stays in this PR.
Follow-up, not in this change: the Slack anchor recorder lands in feat(threads): record a Slack thread's anchor on every dispatch #15410 (review diff cap). A Slack thread keeps its anchor on its own
_thread_anchormetadata line, and the recorder that writes it is two one-name imports away from everything else, so it splits cleanly. Slack's native threading is already on main and is unaffected.Known limitation: the Opus review lane warns that this change touches 15,983
reviewable lines, above its 15,000 advisory threshold for one reliable pass. The diff
is already split once -- feat(threads): record a Slack thread's anchor on every dispatch #15410 carries the
Slack anchor recorder, the read-only version 1 fold and several contract tests -- and
a second split now would discard a verified R1-R14 evidence set and restart five
reviewers for a warning that is not what any lane failed on. Reviewable-line budget is
tracked as its own item for the next round.
Follow-up, not in this change: a screenshot harness that feeds the approval store the way the gateway does, so the thread's approval card can be captured rather than argued from tests. The one used for these images staged the row by hand and got that field wrong, which is exactly why it is not committed.
The thread drawer renders a second full composer dock -- model chip, mic, attach, reasoning chip -- so two of every control sit beside the parent's. Kept deliberately: a thread is a full session, and reducing the dock means deciding which controls a thread may not have, which is the partial-session shape this change removes. If the density is wrong, the fix is to reduce the drawer and reach the rest from the popped-out full page, one click away. That is a product call.
Trading Desk's agent-side convention migrates by a patch rather than a commit here, because that tree is outside this repository: five
THREAD CLONEsites in itsengine/orchestrate.pyand five edits toskills/thread-routing/SKILL.md, whose key-shape rule ("am I in achat-*session?") becomes "am I anchored?". The patch builder asserts each substitution matches exactly one site, so a desk that has moved on fails loudly instead of half-migrating.Checklist
history.md(new Surfaces section),session.md,crew-mode.md,docs/feature-map/README.mdThe four still frames that used to sit here were taken on a superseded build and
have been removed: their header read
ThreadandThread: Ready.at once, thethread was announced twice (chip and card), and
empty/start itsat besideended-- none of which this revision renders, afterthreadTitle.ts,messageRenderers.tsxandChatPane.tsxcollapsed those duplicates. Theirreplacements are captioned in R15, R16 and R17 below, each re-shot on this head.
One of the four, a thread opened on a reply still streaming, is not replaced.
It was stale like the others, and re-shooting it would evidence a claim no review
asked about; R7 already shows a tool running inside a thread. Said plainly rather
than quietly dropped.
The version-1 fold is evidenced in R15. The read-only view that draws version 1
replies is still cut from this change and ships in the follow-up (see "Other
notes").
This PR no longer touches
src/kiro_crew/vector_memory_runtime/lessons.pyAn earlier revision carried a one-line
F821fix there --lessons.py:1206called_row_stem_tokens_for_scanunqualified while its two siblings called it as_text_scoring._row_stem_tokens_for_scan, a runtimeNameErrorthat reproduced on aclean
origin/maincheckout and reddedBackend Lint & Type Check, shard 5 and shard 6.It is filed as #15762 and has since landed
upstream, so the rebase dropped the hunk and this branch is back to threads-only.
CI fix round (head 8e57711, rebased from 547c7e5)
Rebase-induced backend failures fixed: the session-control strict set is now 16
(main's
session_reload+ this PR'sthread_open),_DASHBOARD_TOOL_CALLSandthe strict-rows invariant updated to match,
thread_context_read's schema movedfrom
MCP_DASHBOARD_SCHEMAStoMCP_CORE_SCHEMAS(it is a core tool, not adashboard TABLE row), and the two
start_prioritycases naming the removedside-chat
_run_thread_turn/api_chat_thread_replydropped. Semgrep: the twoautouse fixtures in
test_chat_threads.pynow request_floor_monkeypatch(D11).Bundle:
ChatPanegets its own 546 KB budget (measured 519.6 KB; the thread rowaffordances and sticky header are part of the always-loaded chat surface, no new
dependency).
GPT 6.1 (both security-class, FIXED in
thread_projection.py):window.start - 1on anyfinal trim, incomplete folds included, so a trim that cut a summary can never
retire the row it summarized. Repeating a window is recoverable; a dropped row
is not.
cursor_source_sid(the parent log itscursor counts against); the next turn resets to first-turn when the resolved
parent log differs, so a reset parent's early rows are read rather than skipped.
New field declared on
thread/context_projected;effective_cursor_for_logcarries the decision with a unit test.
First Principles (BLOCK) — the two items split:
MembersPagecomment no longer claimdashboard.crewmate_threadsis "removed"or that the routes 404 when it is off. The flag is kept and still gates the
Crewmates panel; the amendment now describes the real state (ungated API,
flag-gated Crewmates UI).
threads reachable on every surface by default expands the accepted §07 scope.
The amendment records the implemented scope but does not assert acceptance —
this needs a maintainer's RFC acceptance on main or an
/ai-review overrideonFirst Principles. Flagged as the needs-human call, not coded around.