Repository navigation
feat(titles): let users edit the naming style of chat titles - #46603
amadsalmon wants to merge 1 commit into
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The editable part is limited to the style block, the fixed limits and the SKIP/KEEP rules come after it, and the removed prompt constants have no code readers left in this tree. [DESIGN-REVIEWED] ce06733 Description read[DESCRIPTION-READ] 2143552430201d2388f1c4e8f20cf97597825786daf6f717fbd9e9acd8ebfbd1 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, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The new setting is off unless someone fills it in, and the one change to the built-in prompt (it now states the length limits the reply check already enforces) is declared in the description. What this change shipsInventory (10 items) — 10 justifiedIntent: let a user decide how their dashboard chat titles read, while the prompt's safety rules stay fixed. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] ce06733 Description read[DESCRIPTION-READ] 6a14e6fc549fc74335dc7a5ea49acffa3f7fb1a2b0691248b247ad26aac66019 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the two error states this PR adds. If the first load fails, an inline error line takes the place of the whole Title Instructions row; if a save fails, an error line appears under the editor. No attached screenshot shows either one. Evidence gaps
Notes
[UX-REVIEWED] ce06733 Description read[DESCRIPTION-READ] 4e9d72df6de0979e71369102082b2624d02a0cf8a1d891ab3176a8fac29ce0e9 That sha256 names everything this verdict read: the PR description, plus the 6 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 (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — 🔴 changes requested (blocking)Reviewed Adjudication upheld 1 of 1 blocking finding(s); those must be resolved before merging. BLOCKING -- website/src/pages/settings/TitleInstructionsSetting.tsx:46 -- Failed prompt refreshes silently leave a stale preview
[BLOCK-MERGE] ce06733 Adjudication (Opus 5.5) — is blocking on each finding proportionate?The finding stays blocking (UPHOLD). The rule it cites carries F1 —
|
4a58030 to
58ed3ae
Compare
|
|
|
|
|
|
Scope change: the Title Model row moves to a follow-up PR, once @bolichen97 rules on #46568 (comment). Until then titles keep the shared Background settings. This PR keeps Title Instructions and imports the shared — Sent by an AI Agent on behalf of Amad |
|
The red |
33bc99d to
7960a25
Compare
7960a25 to
20301f5
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving on 20301f52cb. The maintainer (Bolin) accepted the one design point the Captain held for a person: dashboard.title_instructions joins _CANNOT_WIDEN_SETTINGS (an agent may propose it on a normal-risk card, which a person still presses) and the config PATCH schema. The text is capped at 1000 characters, the reply is format-checked, and the title call carries no tools.
Since my last review the branch was only rebased onto main; the one conflict was the generated settings-registry.generated.json, where main's side was taken and the file regenerated. The real-machine evidence (comment 7436730906) still stands.
20301f5 to
9b01519
Compare
|
mechanism: LanguageProvider resets the title-prompt query when the gateway accepts a language write
|
bolichen97
left a comment
There was a problem hiding this comment.
Re-approving on 9b01519a35 under Bolin's sign-off from earlier today. Since my approval on 20301f52cb the branch was rebased onto main again and took one fix from the Opus review: TITLE_PROMPT_QUERY_KEY is exported from website/src/api/client/chat.ts, and LanguageProvider.setLanguage resets that query when a language write is accepted, so the preview no longer keeps the previous language's prompt. That is a frontend cache fix inside this PR's own feature and does not touch the settings-list change Bolin signed. Auto merge stays on.
9b01519 to
ce06733
Compare
|
self-added: yes
|
|
mechanism: the gateway pushes a config refresh frame when dashboard.language changes, and the frame's refresh targets include the title-prompt query
|
|
Thanks @amadsalmon. I read the rebased The push dismissed my approval. One thing still blocks the merge: the GPT 6.1 Review finding on this head, which the adjudication upheld ( When that head is green, I will approve again and turn auto merge back on. AI-assisted, sent by Bolin Review bot |
Problem / Motivation
Goal: Let users write their own naming style for chat titles, while the title prompt's safety rules stay fixed.
Kiro Crew names every dashboard chat with a background model call. The naming style (3 to 6 words, no quotes, no punctuation) is hardcoded, so a user who wants titles that lead with the repo or ticket, or that read "Fix dictation caret jump", cannot get them.
Why it matters
The sidebar is how people find a chat again. Generic 3-6 word titles do not follow the pattern a user scans for, and renaming by hand freezes the title so it stops following the chat.
Not a goal
src/kiro_crew/messaging/auto_title.py). They use a separate prompt and keep doing so; tracked in Apply the title model and title instructions to Slack and Telegram conversation names #46610.What changed (motivation → approach → change)
One setting for dashboard chats, in Settings › Chat › Sessions after the title refresh interval: Title Instructions, stored as
dashboard.title_instructions(trimmed, at most 1000 characters). Empty means the built-in instructions. The text box shows them, Reset to default puts them back, and "See the full prompt" shows both title prompts with the text in place.Every title call (first, refresh, fork, "Regenerate title") reads the instructions from one off-loop config load, so a save applies to the next title. Titles still run on the background session with
model="auto", as on main.The two title prompts moved to
src/kiro_crew/dashboard/chat_title_prompt.py. Each carries the instructions in a "Title style" block outside the transcript delimiters, ending with the limits the unchanged reply check enforces, so a custom style cannot ask for a title that is then thrown away. The SKIP and KEEP rules follow it. The unspaced-language hint moved into the built-in instructions. With nothing set, the first-title prompt changes only here:The refresh prompt gets the same block, and its "reply with ONLY a short new title (3-6 words). No quotes, no punctuation." becomes "reply with ONLY a new title, in that style."
GET /api/chat/title-prompt(owner only, writes nothing) gives Settings the built-in instructions, their cap, and both prompts split around the instructions slot, so the browser holds no copy of the prompt;website/src/api/client/chat.tscalls it. The answer changes only with a gateway update or the dashboard language, so the query never goes stale on its own. Once a newdashboard.languageis in force, from any writer, the gateway's config watcher (server_runtime/config_watch.py) pushes a config refresh frame.website/src/hooks/websocket/serverState.tsthen re-reads the prompt in every open dashboard, the one that saved the language included, and again after a reconnect. The re-read keeps the cached answer until the new one arrives, so the editor stays mounted with its draft.TitleInstructionsSetting.tsxmounts the sharedPromptInstructionsEditorfrom #46597. A save writes the stored value from the PATCH reply into the config cache, so the editor does not depend on the follow-up config read. A failed first load shows an error in place of the editor, with no hand-off to the agent, because leaving the page would discard the panel's unsaved drafts; a failed later read keeps the editor and its draft.In
src/kiro_crew/config, the setting is read through the loader (loader_builders.py, re-exported byloader.py) with its cap insections_limits.py; the PATCH gate incore_config_schema.pyrefuses a value over the cap.change_card_catalog_kinds.pylists it as a setting that cannot widen what an agent may do, androute_access.pylabels the new route. The help, hint and docs say the setting applies to dashboard chats and name the reply limits. New strings are in all 12website/src/i18ncatalogs, andsrc/kiro_crew/docs,config-baseline.jsonand the settings search files inwebsite/src/componentsandwebsite/scriptsare regenerated or extended. Comments inchat_auto_tag.py,chat_summary.py,suggestions.pyandtips.pyname the language template's new module.Backwards compatibility
Compatible: the setting is new and empty by default, which sends the built-in instructions. Titles keep running on the same model as before.
Removes nothing: no key, route or validator is removed or narrowed.
Tests
test/test_chat_title_prompt.py: in both prompts the instructions sit before the transcript and ahead of the SKIP/KEEP rules, custom instructions replace the built-in ones, and the reply limits follow them; with custom instructions and a UI language, no built-in length rule is left.test/test_chat_title.pyTestTitleCallSettings: custom instructions reach the first title and the refresh, both still onmodel="auto"; unset instructions use the built-in ones; a failed config read titles as an unconfigured install does.test/test_title_refresh.py: the refresh tests stub the one config read.test/test_config_patch_titles.py: instructions round-trip trimmed; a PATCH over the cap is refused and a hand edit over the cap is cut.test/test_title_prompt_handler.py: the owner gets the instructions, the cap and both prompts split around the slot; anyone else gets 403.website/src/pages/settings/TitleInstructionsSetting.test.tsx: the preview shows the edited instructions in both prompts; Save PATCHesdashboard.title_instructions; when the config read after a save fails, Reset then Save still sends''; a failed first load shows only the error, with no "Ask the agent" hand-off; a failed later read keeps the typed draft; a config refresh frame swaps in the new language's prompts and keeps the typed draft in the same box; and a reconnect re-reads the prompt.test/test_config_live_server_appliers.py: adashboard.languagechange pushes one config refresh frame, and an unrelated key pushes none.website/src/test/SettingsChatPanelCoverage.test.tsx,website/src/test/ChatPanel.railRegistry.test.tsxandwebsite/src/test/settingsCoverage.test.ts: the Sessions page mounts the editor and the settings search indexes it aschat.title-instructions.Manual verification
Rendered Settings › Chat › Sessions on an isolated
./dev-backend.shgateway from this branch with #46597's editor (loopback, its own data home, a built and staged dist), captured with scripted Playwright. The capture host cannot build the agent's OS sandbox, so the harness stubbed only the/api/kiro-prerequisitestatus read to get past the setup gate; the Settings rows,GET /api/chat/title-promptand the save were served by the real gateway. Seen: the box holding the built-in instructions; custom text typed, unsaved, with Save and Reset to default enabled and the full prompt showing the custom text in its "Title style:" block; and after Save, the box keeping the saved text with Save disabled, andGET /api/config/kirocrewreturning it.Real-machine verification
Machine: Amazon Linux 2 dev desktop, Linux 5.10 x86_64, 16 vCPU / 62 GiB, kiro-cli 3.8.2.
Method: one fixed conversation (a dictation caret bug in the kirocrew repo), English UI language. A harness imported this head's own prompt builders (
_build_title_prompt,_build_refresh_prompt) and title validator (_validate_title_reply) and sent each exact prompt to a real model through kiro-cli, the way the background titler does: the tool-lesskirocrew-liteagent, modelauto, no tools trusted. Every raw reply went through the validator. The first title used the opening turn; the refresh used the whole six-message conversation and that run's first title as the current title. Each case ran 3 times. The full gateway path (create a chat, Regenerate title) could not run on this host: the agent sandbox here refuses the gateway's own nested user namespace (unshare(CLONE_NEWUSER)fails with EPERM), so no chat turn starts. The prompts and validator are the same code the gateway calls.Model:
auto(kiro-cli reports the requested model only, not the model it routed to).Composer caret jumps after dictation·Dashboard composer caret jumping·Composer caret jumps after dictationKEEP·KEEP·KEEPStart with the repo name, then a verbkirocrew: Fix dashboard composer caret jumping to end after dictation·kirocrew: Diagnose dashboard composer caret jumping to end after dictation·kirocrew: Fix dashboard composer caret jumping after dictationStart with the repo name, then a verbKEEP·KEEP·KEEPEvery After title starts with the repo name and then a verb, and the guard dropped none of them. The default title on this head matches main: main's first-title prompt, sent the same way 3 times, gave
Composer caret jumps after dictationtwice andDashboard composer caret jumps after dictationonce, the same 4-6 words and style as this head with Title Instructions empty.Cleanup: no setting was changed in any real config and no chat was created; the harness and its replies stayed in the agent's scratch folder, and the main checkout used for the comparison was removed.
Screenshots / video
Settings › Chat › Sessions, Title Instructions at rest:
Custom instructions typed and not yet saved: Save and Reset to default are enabled, and the full prompt shows them in the "Title style:" block:
After Save: the box keeps the saved text and Save is disabled again:
Related Issues
Closes #46568
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits