Skip to content

feat(chat): punctuate joined option picks like a sentence - #34007

Closed
smeyffret wants to merge 1 commit into
kirodotdev:mainfrom
smeyffret:feat/option-chip-punctuation
Closed

smeyffret wants to merge 1 commit into
kirodotdev:mainfrom
smeyffret:feat/option-chip-punctuation

Conversation

@smeyffret

@smeyffret smeyffret commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Picking several follow-up options fills the composer with text that reads like sentences.

The option chips joined the draft and every pick with , . Two capitalised picks read "Merge it now, Show me the diff", and a draft that already ended a sentence got a second separator: "Looks good., Merge it now".

Why it matters

The composer text is what gets sent. People who type a short note and then click one or more chips have to fix the punctuation by hand before they send.

Not a goal

  • Re-casing labels. Option labels often start with a name or an identifier (CR-123, Kiro), so a lowercased first letter would change them.
  • The app SDK composer's multi-select path (app-sdk/useComposerDraft.ts). It reads picks back from the draft by their , separators, so changing it needs its own change to that read-back. Its single-select path already goes through followUpToggle and gets the new rule.

What changed (motivation → approach → change)

renderTail in lib/followUpToggle.ts now picks the separator before each piece instead of always using , :

Text before the piece Next piece Separator
ends with . ! ? ; : , or …, with optional closing quotes or brackets any a space
anything else starts with an uppercase letter .
anything else anything else ,

The owned-span model is unchanged: the tail is still rendered from { base, options }, so removing a pick re-renders the separators around it and the "user edited the tail" check still compares against the exact rendered text.

Backwards compatibility

Compatible. No setting, API or stored state changes. Only the text a chip click writes into the composer changes.

Tests

  • followUpToggle.test.ts: a draft ending with a period, a question mark, a comma, or a closing quote after a period gets only a space; two capitalised picks join with . ; a lowercase pick joins with , ; removing the middle of three picks re-renders the separators; a label ending with . gets only a space before the next pick.
  • ChatPage.followUpToggle, ChatPane.followUpOptions and useComposerDraft (single-select): expected strings updated to the new separators. The comma-bearing label tests (fix(chat): remove only the complete generated suffix on a ChatPane chip un-toggle #7616 F1) use lowercase labels and keep , .

Local gates: tsc -p tsconfig.app.json, eslint on the changed files, and vitest on the follow-up, composer, ChatEmbed and QuickSend test files all pass.

Manual verification

Built SPA in two isolated pods with fake data, one on main and one on this branch. One session ends with [OPTIONS: Merge it now | Show me the diff | Run the tests].

Screenshots / video

Before After
Two picks Two picks before: comma join Two picks after: sentence join
"Looks good." then one pick Draft ending with a period before: doubled separator Draft ending with a period after: single space

Dark theme, two picks: Two picks after, dark theme

Related Issues

N/A: no issue filed.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

Clicking option chips joined the draft and each pick with ", ", which
produced "Looks good., Merge it now" and "Merge it now, Show me the
diff". A draft that already ends with punctuation now gets only a
space, a capitalised pick starts a new sentence (". "), and a
lowercase pick keeps ", ". Labels are never re-cased.
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ⚠️ could not complete

The first-principles review did not produce a verdict for 3d6d5c847f783e229f789f2e12312709ad76ecda (the review step never ran, because an earlier step in this job failed — no model call was made). See the Fork First Principles Review job logs. Does not block merge.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

UX-level review of 3d6d5c847f783e229f789f2e12312709ad76ecda via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing the screenshots of the composer text after picking options. The description's five SCREENSHOT … entries are placeholders, and the image and recording lists are both empty.

Evidence gaps

  • Composer text after two capitalised picks (renderTail now joins them with . ): nobody has seen how the result looks in the composer, in the light or the dark theme. Attaching after-two-picks and after-two-picks-dark closes this gap; before-two-picks shows the comparison.
  • Composer text when a draft ending in . gets one pick (separatorBefore now adds only a space): nobody has seen this state. Attaching after-period-draft closes it; before-period-draft shows the comparison.
  • Composer text after a lowercase pick (still joined with , ): no screenshot shows this branch. A screenshot of the composer after a lowercase pick closes it.

Notes

  • When the description is edited, replace each SCREENSHOT <name> placeholder with a real attachment, either through the description itself or by committing the images under temp-screenshots/, because the workflow only reads images from those two places.

[UX-REVIEWED] 3d6d5c8

Description read

[DESCRIPTION-READ] b9a287b3dd9e69c49025fc3e039c36fcd0d45a1105ec4a6e5432c7ab568adc68

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 .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 Nov 9, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of 3d6d5c847f783e229f789f2e12312709ad76ecda via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the separator rule stays inside renderTail's owned-span model, so removing a pick and detecting an edited tail still work.

Notes

  • The description promises before/after screenshots, but the evidence file lists 0 images. Either attach them or drop the table. No new surface needs them, since only the composer text changes.
  • The app SDK multi-select path (useComposerDraft.ts:435-447) still joins with , . Single-select and multi-select offers in app composers will now punctuate differently until the follow-up the PR defers ("Not a goal") lands.

[DESIGN-REVIEWED] 3d6d5c8

Description read

[DESCRIPTION-READ] 5855c7b5be203be5b31b1835166afe04c63476c18dc5b3f9d03be5dc3a016fab

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 Nov 9, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed 3d6d5c847f783e229f789f2e12312709ad76ecda via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3d6d5c8

@smeyffret

Copy link
Copy Markdown
Contributor Author

Moved to #36085 (same commit, branch now on kirodotdev).

@smeyffret smeyffret closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant