Repository navigation
fix(followup): name the renamed Start button and skip blank lines in the preview - #34483
Conversation
…the preview Three leftovers from #25926 that the readiness review listed as optional: - The follow-up card endpoint's no-project warning, which the model reads, still named the old "Start in new worktree" button. It now names "Start in a separate copy", as the directive path already does. - The collapsed prompt preview counted leading blank lines, so a prompt that opened with three empty lines showed only the ellipsis. The preview and the Show prompt check now start at the first line with text. The send trims the prompt, so those lines never reach the new session. - The follow-up Start tests move from ChatPageW3Coverage.test.tsx (1,673 lines) into ChatPage.followUpStart.test.tsx. The 87 tests are unchanged: 42 stay and 45 move.
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The warning text now matches the directive path's wording, and the preview fix lives inside the component, which already owns preview logic. [DESIGN-REVIEWED] f4b0c35 Description read[DESCRIPTION-READ] 2dd4dfb9407b8efb1876ea27b4330c9dec719b99e756ddacfe0a892340c51143 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. All four items are the three follow-ups that #25926's readiness review named, and each one fixes the code where the problem starts. What this change shipsInventory (4 items) — 4 justifiedIntent: make the model's warning name the button the user actually sees, and stop a prompt that opens with blank lines from previewing as only "…". FIX.
[FIRST-PRINCIPLES-REVIEWED] f4b0c35 Description read[DESCRIPTION-READ] b8d790b798996f44ebb574379e19db365c8081d48da4b22478421d00e6faa7ac That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff adds no control, label or state. It only changes which existing preview state a prompt with leading blank lines gets, and it fixes one model-facing string. [UX-REVIEWED] f4b0c35 Description read[DESCRIPTION-READ] d4174d31137cc572c804e5fa41ebe219913b2a6f1259429e005cad4299c70d24 That sha256 names everything this verdict read: the PR description, plus the 3 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] f4b0c35 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
bolichen97
left a comment
There was a problem hiding this comment.
Approving f4b0c35. Two small product fixes plus a test split:
FollowUpCard.tsx: the collapsed prompt preview now starts at the first line with text (followupPromptLines,findIndex+trim, no regex). Before, a prompt that began with blank lines filled all three preview lines with nothing and showed only "…".followupPromptHasMorecounts the same lines, so a short prompt after blank lines shows in full with no toggle. The send already trims the prompt, so this only changes the preview.followup_card.py: the no-project warning now names the renamed button, "Start in a separate copy".- The Start-handler tests move unchanged from
ChatPageW3Coverage.test.tsxintoChatPage.followUpStart.test.tsx, with the same setup.FollowUpCard.test.tsxadds the two blank-line cases.
Checks: every check is green on this head. The one red PR Policy run (09:46, no screenshot) is followed by a passing PR Policy run at 10:17 on the same head. I am leaving auto-merge off while that older failure still shows in the check list.
Problem / Motivation
Goal: Finish three optional points from the #25926 readiness review: the model-facing button name, the preview of a prompt that opens with blank lines, and the test file size.
#25926 renamed the follow-up card's first button to "Start in a separate copy" and added a three-line prompt preview. The readiness review on its last head listed three optional points, and the PR merged before they were done:
POST /api/chat/slots/{slot}/followupstill tells the model that an unscoped session offers "Start in new chat" instead of "Start in new worktree". No button has that name now.website/src/test/ChatPageW3Coverage.test.tsxgrew to 1,673 lines, more than the 1,600-line split target.Why it matters
The warning is the model's only view of the card in an unscoped session, so it must name the button that the user sees. A preview that shows only "…" hides the prompt that Run sends with one click.
Not a goal
No change to the send path, the setting, the footer text or the button labels.
What changed (motivation → approach → change)
followup_card.pynow says "Start in a separate copy" in the no-project warning. The directive path insession_directive_apply_slot.pyalready uses that name.FollowUpCard.tsxgetsfollowupPromptLines, which returns the prompt's lines from the first line with text. The preview and the Show prompt check both use it. The send trims the prompt (composerSend.tsline 307), so the skipped lines never reach the new session. A prompt with three lines or fewer after the blank lines now shows in full with no toggle. No regular expression is added.The
ChatPage — follow-up "start in worktree"describe block moves without changes intoChatPage.followUpStart.test.tsx, with a copy of the setup it needs. Unused imports and recorders are removed from both files. The old file has 973 lines and 42 tests, the new file has 1,000 lines and 45 tests, and the total is 87 as before.Backwards compatibility
Compatible. The warning is text only. The
suggest_followuptool's arguments and result fields are unchanged.Tests
FollowUpCard.test.tsxadds two tests: a prompt after three blank lines previews its first three text lines with Show prompt, and a one-line prompt after blank lines shows in full with no toggle.npx vitest runonFollowUpCard,ChatPage.followUpStart,ChatPageW3Coverage,ChatPageFollowup,ChatPage.followUpBusySendandChatPage.followUpToggle: 6 files, 179 tests pass.pytest test/test_followup_suggest.py test/test_mcp_followup_dispatch.py test/test_dashboard_chat_handlers_coverage.py: 191 pass.npm run typecheckandeslinton the changed files are clean.Proof: not provable -- frontend test (prove.py runs Python only)
I swapped the file by hand instead. Both new tests fail with origin/main's
FollowUpCard.tsxand pass with this one.Manual verification
I built the SPA two times, once with main's
FollowUpCard.tsxand once with this one, and rendered it with every API call stubbed and dummy data. The first card item has a prompt that opens with three blank lines.Screenshots / video
Before, on main: the first item's preview shows only "…".
After: the preview shows the first three lines from the first line with text, then "…" and Show prompt. A prompt with no leading blank lines renders as before.
Related Issues
Follow-up to #25926.
Sibling sweep
Sibling: src/kiro_crew/dashboard/session_directive_apply_slot.py:607 -- not affected -- it already says "Start in a separate copy"
Sibling: src/kiro_crew/mcp_tools/control_parts/schemas.py:1086 -- not affected -- the tool description already uses the new name
Sibling: docs/request-for-change/rfc-followup-start-sends.md:23 -- not affected -- the accepted RFC describes the card before the rename
Pattern harvest
Not generalizable: one string that a rename did not reach, and the old label is ordinary prose that no rule can tell from valid text.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)