Repository navigation
feat(dashboard): a Dashboard tab for every crewmate, and the twelve pages it can show - #17507
Conversation
71f5e4f to
df3a906
Compare
Sensitive Change ReviewSensitive files changed:
|
First Principles Review (Opus 5.5) — ✅ human override accepted@chenmingwei23 overrode this lane for |
Design Review (Opus 5.5) — ✅ human override accepted@chenmingwei23 overrode this lane for |
UX Review (Opus 5.5) — ✅ human override accepted@chenmingwei23 overrode this lane for |
GPT 6.1 Review — ✅ human override acceptedHuman judgment by @chenmingwei23 overrides the GPT 6.1 finding for [GPT-OVERRIDE] beb5c74 This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
d0d4786 to
9207130
Compare
Opus 5.5 Review — ✅ human override acceptedReviewed Human judgment by @chenmingwei23 overrides the Opus 5.5 finding for [OPUS-OVERRIDE] beb5c74 Verdict recorded from an authorized human decision for commit False positive or not applicable? A repository writer can comment: |
16624c4 to
e93cc6c
Compare
e93cc6c to
7723f46
Compare
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. |
b86b3e7 to
3d634f9
Compare
…ages it can show Each crewmate gets one page that answers what it did, what that cost and what needs a human, read from the crew log's own folds rather than from a model call. Twelve built-in templates ship; project-report is the default. A person asks the crewmate in chat for another page, and six MCP tools carry it out: search the catalog, stage a preview, ask, apply, roll back. Only a template that shipped with the product can be previewed or adopted. A rendered page runs its own script against the crewmate's task titles and summaries inside a frame that can navigate itself, so a page nobody here reviewed could carry them out; RENDERABLE_SOURCES therefore holds one value and the registry scans one directory. Custom templates are a later change needing a gateway-minted wrapper document. The instance store's page ceiling is the frame's own MAX_PAGE_BYTES rather than a second number, so every shipped template can be adopted -- including the 147 KB default, which a private 64 KiB ceiling made unreachable to any crewmate that had switched away from it. The Dashboard tab is behind the PREVIEW_DASHBOARD feature preview, off by default. Fixes #17261
|
/ai-review override fable beb5c74: Opus 5.5 failed closed on PR size (combined backend + 12 templates over its line cap), no verdict on the code; GPT 6.1 covers the code review on this head. |
Human judgment recorded@chenmingwei23 marked the fable 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. |
|
/ai-review override design beb5c74: Design Review failed closed on the 1 MB diff cap before reading evidence; the design is the in-PR RFC agreed with the team. |
Human judgment recorded@chenmingwei23 marked the design 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. |
|
/ai-review override ux beb5c74: UX Review failed closed on the 1 MB diff cap; fresh pod screenshots and a 46 s video are in the PR body, and the tab ships behind the PREVIEW_DASHBOARD flag, off by default. |
Human judgment recorded@chenmingwei23 marked the ux 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. |
|
/ai-review override gpt beb5c74: Accepted risk: the only writer of those manifest keys and template ids is the dashboard tool path itself, built-in templates carry none, crew-log text is already redacted at emit, and the whole tab ships behind PREVIEW_DASHBOARD off by default; full-body key redaction is tracked as a follow-up. |
Human judgment recorded@chenmingwei23 marked the gpt 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. |
|
/ai-review override first-principles beb5c74: The RFC ships with its implementation in this PR by team agreement (no standalone RFC PRs); the feature is behind PREVIEW_DASHBOARD, off by default. |
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 review for head beb5c74, for the approving reviewer to confirm. Sensitive change review
|
iamwhatever
left a comment
There was a problem hiding this comment.
Sensitive change review
- What rule changed: no rule changed; two redaction sinks registered in
_REDACTION_SINKS(member_dashboard.py and dashboard_agentic.py). - Before -> after (what was allowed/blocked, now): dashboard page strings were not scrubbed, now they pass through the shared redactors; nothing newly allowed or blocked.
- Worst case if wrong (breaks commands / leaks secret / locks user out): a dashboard string is over-redacted and shows
***; no command breaks and no user is locked out. - Evidence checked (which sandbox result proves it): pod run on this head, screenshots and 46 s video in the PR body, dashboard renders with redacted strings.
- No regression:
- Tools still work (which tools/commands were run, result): dashboard_fields, dashboard_write, dashboard_apply and dashboard_rollback were run on the pod and all worked.
- Backward compatible (old config / old data / old callers still work, how checked): the tab is behind PREVIEW_DASHBOARD, off by default, and the old panel still shows with the flag off.
- Existing tests (which suites passed on this head): test_security_posture.py and test_member_dashboard_routes.py, 94 passed on beb5c74.
- How to undo: revert the two
_REDACTION_SINKStuples in security_posture.py.
Problem / Motivation
Goal: every crewmate gets a Dashboard tab that answers "what did you do, what did it cost, what needs me" from the record itself, and a person can change which page it shows by asking the crewmate in chat.
A crewmate's own state was only readable by scrolling its chat. There was no surface that said what it is working on, what that has cost, or what is waiting on a human -- and nothing a person could point at and say "show me a different view of this". The numbers a reader wanted existed in the crew log already; nothing drew them.
Why it matters
A reader who has to reconstruct a crewmate's state from a transcript does not do it. They ask the crewmate, which spends a turn and a model call to restate a number the record already holds -- and the answer is true only at the moment it is typed. An operator running several crewmates has no way to see which one needs them without opening each conversation.
Not a goal
panel_publishis untouched).What changed (motivation -> approach -> change)
Decision recorded in
docs/request-for-change/rfc-crewmate-dynamic-dashboard.md. This PR is its P1.The contract. A template is one
manifest.json(each field, its type, the fold path its value comes from) plus onetemplate.html. The HTML'sdata-dashboard-fieldnames and the manifest's fields must be the same set in both directions, so a page binding a field nothing fills is refused rather than drawn with an empty cell. A number read from a fold is true tomorrow; a number an agent typed is true once. Twelve pages ship andproject-reportis the default.Agent-authored HTML is refused -- a correction inside this PR. The first design let an agent pass a
manifestandhtmlpair todashboard_previewand saved a kept page to a writable directory. Review found the hole: a rendered page runs its own script against the crewmate's task titles and summaries inside a frame whoseframe-srcadmits the hosts artifact previews need, so it can navigate itself to one with those values in the URL. Scripts are the format, so the only signal is the author. Nowstage_previewtakes atemplate_idonly (it still accepts the two parameters and refuses them withAUTHORED_PAGE_REFUSAL, which is what makes the refusal total),RENDERABLE_SOURCESholdsbuiltinalone, the registry scans one directory in this repo, and apply writes to no catalog. Custom templates are P2 behind a gateway-minted wrapper document.Three defects found on a live pod, all fixed here.
kirocrew-dashboard-managerdeclared@kirocrew-panelintoolswithmcpServersempty, so kiro-cli mounted nothing and the subagent had no way to answer; it now builds the entry throughmanaged_mcp._managed_opt_in_entry. That subagent is also now optional: the panel tools resolve identity per calling session, which a member DM has and a subagent does not, so the base prompt was corrected to let the crewmate drive its own page with the verbs it already holds. Second, on a crewmate keyedAtlasthe write resolvedmember_idand the read fell through toslug_for_name("atlas"), so one crewmate had two directories and the tab showed an empty page over real spend;members.canonical_member_keyrecovers the roster's spelling, and an ambiguous case-fold returns the name unchanged rather than guessing. Third, the store carried its own 64 KiB page ceiling while the frame's is 1,000,000, soproject-report-- 147,345 bytes, and the default -- was refused at preview: a crewmate that switched away could never come back to the page every crewmate starts on.MAX_INSTANCE_HTML_BYTESnow readsdashboard_frame.MAX_PAGE_BYTES, so there is one number and it belongs to the layer that pays for it.Where each piece lives:
src/kiro_crew/crew_log/workstreams,work,usage,timeline,mistakes) and their entry types; absent is not zero, and a truncated list reports what it droppedsrc/kiro_crew/dashboard_templates/src/kiro_crew/dashboard_agentic.pysrc/kiro_crew/dashboard_feed.pysrc/kiro_crew/dashboard_frame.pysrc/kiro_crew/dashboard/handlers/src/kiro_crew/mcp_panel.py,validation.pysrc/kiro_crew/agent.py,agent_files.py,agent_materialization/,context.py,context_assembly/member.py,members.pysrc/kiro_crew/builtin_skills/dashboard/src/kiro_crew/security_posture.py,MANIFEST.in,setup.cfgwebsite/src/pages/members/website/src/api/client/agents.ts,app-sdk/index.ts,hooks/useWebSocket.ts,hooks/websocket/serverState.tsdashboard_instance_changedsocket frame the tab refetches onwebsite/src/lib/widgetSrcdoc.tswebsite/src/i18n/locales/Backwards compatibility
Compatible: every route and tool is new, and the Dashboard tab is behind the
PREVIEW_DASHBOARDfeature preview, off by default.The diff does take two things away relative to earlier commits on this branch, neither of which ever reached main:
Reader:
src/kiro_crew/mcp_panel.py:dashboard_preview-- subagent/chat -- amanifest+htmlcall is refused withAUTHORED_PAGE_REFUSALnamingdashboard_templatesas the remedy;test_dashboard_tools.py::TestAnAgentWrittenPageCannotBeStagedcovers all five argument shapes.Reader:
src/kiro_crew/dashboard_templates/instance.py:staged_preview-- crew page -- a preview file naming no template reads as nothing staged, the same answer the four other unusable-preview cases get;test_a_preview_file_naming_no_template_reads_as_nothing_staged.Reader:
src/kiro_crew/dashboard/handlers/agent_panel.py:api_dashboard_apply-- subagent --saved_template_idis gone from the response; no caller read it exceptmcp_panel's own renderer, changed with it.Reader:
src/kiro_crew/agent_materialization/service_agents.py:_install_dashboard_manager_agent-- release -- the spec is rewritten on every rebuild, so an installed copy is replaced rather than migrated.Reader:
src/kiro_crew/dashboard_templates/instance.py:MAX_INSTANCE_HTML_BYTES-- crew page -- the ceiling is RAISED to the frame's, not removed, so nothing a crewmate stored stops loading and the per-version bound still exists;test_a_page_over_the_shared_ceiling_is_still_refusedholds the check in place.members.member_slugnow folds case when resolving a roster key. Two keys that differ only in case already derived one slug before this change, and the ambiguity gate that refuses that slug is unchanged -- so no pair that worked separately starts colliding.Tests
31 new test files. The ones that lock in the decisions above:
test/test_dashboard_tools.py-- the three phrases, and every refusal an agent reads.TestAnAgentWrittenPageCannotBeStagedparametrises five shapes of an authored page (both halves, each half alone, beside atemplate_id, and one claimingsource: "builtin"-- the case a source check alone would pass) and asserts the one sentence plus that nothing was staged.test/test_dashboard_template_manifest.py,test_dashboard_templates_builtin.py-- the format, and all twelve pages through one loader.test/test_workstreams_fold.py,test_workstreams_spans.py,test_crew_log_fold_eager.py-- the folds, including absent-is-not-zero and the truncation counts.test/test_member_dashboard_routes.py-- the read route.TestOneCrewmateResolvesToOneSlugreproduces the pod bug: a roster keyedAtlas, a write under the slug the member owns, a read asked for as?member=atlas, and the page it finds. Before the fix that answered 404member_not_found.test/test_dashboard_manager_agent.py--test_every_declared_server_is_also_configuredasks it as a rule over every@ref the spec declares, not about the one name, so the next server added totoolscannot repeat it.test/test_dashboard_templates_builtin.py--TestEveryBuiltinSurvivesPreviewAndApplytakes every shipped template through preview and apply, pins the ceiling as identity against the frame's constant, keeps a case that an oversized page is still refused, and walks the reader's own journey: adopt the default, switch away, roll back to it. Asked over the whole set rather than aboutproject-report, because the next template somebody writes is the one that trips a ceiling nothing states.website/src/test/projectReportPage.test.ts(85 cases) -- the default page's own script against fixture folds.website/src/test/CrewDynamicDashboard.test.tsx-- the tab's six states.Determinism: the suites above were run with
-p no:randomlyand again under the default random order, same results; the frontend files run undervitest run. The three mutations behind the two pod fixes each failed a different test -- emptymcpServersand a hollow entry fail the two spec cases separately; dropping the canonical lookup frommember_slugfails the slug case, dropping it from the route fails the end-to-end case with the original 404, and letting an ambiguous fold pick a winner fails the ambiguity case. The twoproject-reportscript fixes were mutation-proved the same way, and so was the ceiling: restoring the private 64 KiB number fails four cases with the original "the page is 147342 bytes" refusal, and removing the size check altogether fails the oversized-page case.Manual verification
Driven on a live pod: a crewmate's tab rendered
project-reportfrom its real folds,dashboard_writefilled an agentic field and the open tab showed it with no reload, anddashboard_templates->dashboard_preview->dashboard_applyswapped the page anddashboard_rollbackput it back. The two defects in "What changed" were both found that way, after the unit suites were green -- which is why each one shipped with a test that fails without its fix.Screenshots / video
Taken on a live pod built from this branch, with Settings -> Developer -> Feature Previews -> Dynamic Dashboard on. Real gateway, real model turns, real crew-log data.
project-report, with three Needs-you cards the crewmate wrote throughdashboard_writeAfter one card is answered

One turn:

work-kanbanpreviewed then applied,go backrestoresproject-report, an invented page is refused by nameSwitch to

office, then straight back toproject-reportKnown limitation: the

kirocrew-dashboard-managersubagent is refused by the existing one-slot ownership check inagent_panel.py(unchanged by this PR; the crewmate's own direct route works)Walkthrough video (46 s): 12-walkthrough-0bbf5f5.mp4
Related Issues
Fixes #17261
Pattern harvest
Rule candidate: review-prompt
Pattern: an agent spec declares an
@serverintoolswhile leavingmcpServersempty andincludeMcpJsonfalse -- a grant that is dead with no local error, visible only on a running host. The spec-level rule is "every@ref a spec declares is configured in the same spec", whichtest_dashboard_manager_agent.py::test_every_declared_server_is_also_configurednow asserts for this one spec and which generalizes to every installer that grants anopt_inserver.Checklist
Contribution License Agreement
I confirm this contribution is made under the project's Apache-2.0 license.