Repository navigation
feat(session-ui): surface declined settings-seed share as a notice row - #20651
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Two pieces of new surface have no reader: the row's Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: let a user see why a new claude session has no Crew MCP tools, and what to do about it (#12989). ADDITION.
[FIRST-PRINCIPLES-REVIEWED] d54e74d Description read[DESCRIPTION-READ] 1fe30c4f107356222173ec7159d259d60e1778e84a3b60b00e09c5b03a2bcfea That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The row reads the same governed predicate that withholds the Notes
[DESIGN-REVIEWED] d54e74d Description read[DESCRIPTION-READ] d8ddb7c31cec5cf0a6b452e53b1a79cb1939e494600c676c43839b0b0f58b8ca 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed 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: |
df1cc0f to
a8b80fe
Compare
a8b80fe to
62761a2
Compare
62761a2 to
7008866
Compare
7008866 to
95157e5
Compare
|
This PR now conflicts with main. Main moved the runner turn helpers into Checked: head 95157e5 is open and GitHub reports it as conflicting with main. |
A new claude session whose MCP tools are withheld because a settings file Crew does not govern holds .claude/settings.local.json gets one info notice naming whose file it is (another open Crew session's seed, or the project's own file) and what to do. The row reads AcpClient.settings_withheld_cause(), which answers from the live _permission_surface_governed state that withholds the array, so every decline path and a later re-earn are covered with no extra flag. Fixes #12989
95157e5 to
d54e74d
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Approving head d54e74d.
The rebase resolves the earlier merge conflict, and this revision fixes every point from the first round:
- The notice helper now lives in
chat_turn/turn_spec_hooks.pybeside its siblings, andturn_admission.pycalls it on a new session. - The row reads the live governed state (
_seeds_local_settingsand not_permission_surface_governed). The claude mirror reads the same flag to withhold themcpServersarray, so the row cannot drift from the tools. The old one-way latch is gone, so the held-by-sibling branch and a later re-earn are covered. - The project-owned file path now gets its own text and no longer tells the user to close a session.
- The crewmate chat edits are dropped. Main already drops every notice row there.
- The committed screenshots are gone, and no frontend file changes.
What I verified on this head:
- The 20 new tests and the binding tests pass locally (550 passed). The new test file fails on main (20 failed), so it guards the behaviour.
git merge-treeagainst current main reports no conflict.- The row text is a constant. It names no model id, permission mode, path or other session.
- No file is on the security path list. The linked issue is tier T2. Every required check is green and the label is
readiness: passed. The Design, First Principles, Opus and GPT lanes pass on this head.
Optional follow up, not blocking: the First Principles lane notes that the cause constants and the notice table spell the same values twice. Importing the constants in _SEED_DECLINED_NOTICES would keep them in one place.
Problem / Motivation
Goal: Surface the declined settings-seed share in the session UI so a user whose sibling session governs the settings file can see why MCP tools are missing and what to do.
When a sibling session's
settings.local.jsondiffers from this session's (model or permissions differ), the seed path declines the share and_log_declined_sharefires. The session starts without Crew's MCP tools and there is no user-visible explanation — only a gateway log line.Why it matters
Without a notice, a user sees a session with no MCP tools and no reason. They cannot tell whether Kiro Crew is broken, whether the agent has no tools configured, or whether a sibling session is blocking the seed. The missing explanation has caused confusion and unnecessary debugging.
Not a goal
What changed (motivation → approach → change)
A new claude session whose tools are held back now gets one info row in Sessions that says so, names whose file holds the path, and says what to do.
.claude/settings.local.jsoncontrols tool approvals; the gateway log names the reasonThe row reads the same live state that withholds the tools, so it cannot drift from it.
AcpClient.settings_withheld_cause()(inacp/client_seed_ownership.py) returns""whenever_permission_surface_governedholds or the backend seeds no file; otherwise it reads the file's durable record to tell a Crew seed from a project file. Every decline path and a later re-earn are covered with no extra flag.LLMProvider.settings_withheld_cause()(providers/base.py) defaults to"";AcpProvider(providers/acp.py) forwards it from a rawAcpClient._notice_seed_declinedindashboard/chat_turn/turn_spec_hooks.pyruns the read off the event loop once on a new session (called fromturn_admission.py) and appends anoticerow taggedSEED_DECLINED_NOTICE_KIND(chat_utils_injected_rows.py). A failed read draws nothing. The crewmate chat already drops every notice row, so no frontend file changes.Backwards compatibility
Compatible: adds one
AcpClientmethod plus a helper split out of_foreign_settings_owner(same answer), one provider method with a""default, one notice kind, and one new transcript row. Nothing that works today changes.Removes nothing: the diff only adds a read and a row.
Tests
test/test_settings_seed_declined_notice.py(20 tests):TestSettingsWithheldCause— realAcpClients on onetmp_path:""for a kiro client, no file, own seed, identical sibling seed;"session"for a sibling seed with another model or permission mode;"project"for a project-owned file the session cannot leave out; the answer clears when the share is re-earned.TestProviderForwards— the provider forwards a string answer and reads any other shape as"".TestNoticeEmitted— one tagged row with the right text per cause; no row for"", an unknown answer, a client without the read, or a read that raises; a real withheld client gets one row. These fail onmain, where_notice_seed_declineddoes not exist.test/test_client_bindings.py,test/test_acp_bindings.pyand thechat_utilsfacade inventory list the new names.Manual verification
N/A — unit coverage sufficient: the cause is computed from real
AcpClientseed writes on disk, and the row goes through the sameappend_and_surfacepath as the existing session-start notices.Screenshots / video
No frontend file changes. The row draws as the existing
infonotice card used by the other session-start notices.Related Issues
Fixes #12989
Checklist
Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.