Skip to content

feat(dashboard): the Dashboard tab renders the package, with no default page - #18760

Closed
chenmingwei23 wants to merge 2 commits into
feat/18642-dashboard-renderersfrom
feat/18642-dashboard-frontend
Closed

chenmingwei23 wants to merge 2 commits into
feat/18642-dashboard-renderersfrom
feat/18642-dashboard-frontend

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a crewmate's Dashboard tab draws the dashboard its agent composed, and shows an honest empty state when there is none.

The parent PR gives a layout package a validated home, but nothing renders it. The tab reads the template registry, so a package-bound member's page cannot be drawn. Worse, a read with no page makes the tab compose a DEFAULT from whatever data is to hand, so a member whose agent composed nothing sees the fallback's guess.

Two live-update faults sit alongside: a fold push uses the FULL-PAINT type, so a canvas-owning block gets a second canvas, and the gap check drops any version at or below the one held, so a restart arming a fresh page at 0 freezes the tab.

Why it matters

A dashboard a reader cannot trust is worse than none: the composed default cannot be told apart from a real page, so "my report says X" stops being a statement about the project. Both live-update faults are silent: the canvas duplication corrupts the page while every assertion passes, and the restart fault shows stale numbers, then resumes having missed the gap entirely.

Not a goal

  • No write path, renderer or server push: the PRs under and over this one own those.

What changed (motivation -> approach -> change)

Goal: render the package, invent no page.

  • The tab reads a dashboard artifact's layout package, draws from it, and composes no default page.
  • One home per value: the patch carries field NAMES in blocks, values once in read. A copy would show a bare 1200000000 where the paint showed 1.2 GB.
  • A fold push is not a full repaint: the constant is renamed PAGE_FULL_PAINT_MESSAGE_TYPE and the push forwards the renderer's block_patch() output verbatim. blockPatchMessage() is deleted, so this side builds no payload.
  • The gap check is strict equality; held advances only from a read.
  • Probation compares a revision, not the package version, which is 0 for every template page, so two compared equal and a template apply swapped onto the screen without proving it loads.
  • postMessage carries an inline nosemgrep for the wildcard-target rule, matching four existing sites: sandboxed without allow-same-origin, the document's origin cannot be named. Its controls: no network, no agent script, a sender-is-parent check.
  • The empty state names a next step, instead of leaving a reader nothing to do.
  • A dashboard artifact gets an aim badge in the Artifacts library and Artifact.kind widens to dashboard; no picker offers it, the backend keeps it out of USER_SELECTABLE_KINDS.
  • package_json_schema() (draft 2020-12) is built FROM the live catalogs, so a type added to one needs no second edit. dashboardPackage.schema.json is its output and dashboardPackage.ts is generated from that; its enum is the renderers' ten block types.

The no-template design comes from #18642's design doc.

Backwards compatibility

Breaking: a crewmate who has adopted no template stops seeing the registry default page and gets the empty state.

The fix sits at SYMPTOM level. default_instance() returns the registry default with its state left at STATE_EMPTY and api_member_dashboard renders it, so an unadopted crewmate arrives with state: 'empty' AND a page attached, and the gate declines to draw it. Scoping the gate to package-bound members was tried and abandoned: it makes five tests here assert the opposite of their intent.

Writer sweep on origin/main: the only writer of the empty-with-default contract is api_member_dashboard, unmodified.

Reader: website/src/pages/members/CrewDynamicDashboard.tsx -- crew page -- declines the attached page for ANY member whose read says empty -- CrewDynamicDashboard.test.tsx
Reader: src/kiro_crew/dashboard/handlers/member_dashboard.py -- crew page, unmodified -- still substitutes and renders the default, now declined rather than unsent -- test_member_dashboard_routes.py
Reader: src/kiro_crew/dashboard/handlers/agent_panel.py read_instance -- the agent's panel tool -- resolves empty to the DEFAULT's manifest, so an unadopted crewmate's write is accepted against a page this tab does not draw. FIXED with the template line (drop-templates) -- test_agent_panel_routes.py
Reader: src/kiro_crew/dashboard_package.py:322 _from_template_instance (from #18707) -- the WRITE route -- substitutes the default at :362, so a write lands on a Model this tab will not render. LEFT with the other three: all four go with the template line (drop-templates) -- test_dynamic_dashboard.py
Reader: website/src/pages/members/dashboardBlockPush.ts -- crew page -- reads blocks for which moved, read for values -- its own test
Reader: website/src/hooks/useWebSocket.ts -- app bundle -- forwards the patch frame; an empty patch re-reads -- useWebSocket.frameTrace.test.ts
Reader: website/src/api/client/agents.ts -- app bundle -- carries the package, template and push-version wire keys, shape unchanged -- ApiClient.refactor.surface.test.ts

The rest is compatible: package_json_schema() is additive, the renamed constant internal.

Tests

vitest run, this PR's 4 own files   -> 194 passed, 0 skipped (exit 0)
vitest run, those plus 4 neighbours -> 421 passed, 0 skipped (exit 0)
pytest -n 2, test_artifact_dashboard_package.py -> 92 passed    (exit 0)
tsc -p tsconfig.app.json  -> exit 0
eslint, the changed files -> exit 0

Zero skips, and no skipIf left in this PR's test files. Three were cross-language pins on modules the later PRs own, moved out with them. The fourth pinned dashboard_frame.py, which IS here: it is unconditional, and readFileSync throwing IS the assertion.

Five mutations, each reverted after its run: a lower push version tolerated fails 5 cases; held advanced from a refetched frame fails position-from-read; the full-paint type for a fold push makes the capture refuse the R5 shots; probation on layout fails the changed-template case; the schema's block enum bound to the field catalog fails enums-follow. The last two restores are sha256-verified.

Manual verification

The component, providers, theme tokens and i18n catalogs are real; the controller response, the mint and the host document are stand-ins, and each capture header says which. R6 mounts the real LibraryTable over two stand-in records.

Screenshots / video

R1 the tab draws the package. The HOST stays dark in both shots: the light one shows the component's own light surfaces inside it, so what these evidence is the cards' tokens and not a light page.
light
dark
R2 a member with no package gets the empty state.
empty
R3 the tab declines a page it was sent, and the same on the PACKAGE-BOUND shape. Frontend half only: the route is stubbed, so this is the tab refusing, not the server declining.
refused
package-bound
R4 the body carries a full dashboard and the tab still shows the empty state.
no compose
R5 before/after a fold push, both card palettes on the same dark host: only subscribing blocks moved, values formatted by the renderer's rules, nothing re-initialised.
before
after
before dark
after dark
R6 the Artifacts library lists a dashboard artifact, its kind badged in the same aim variant as the webapp row beside it, in the raw kind word.
library

Related Issues

Refs #18642. Depends on #18705 and #18784; the T3 one-pager is approved.

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; style guidelines followed
  • Documentation updated where applicable
  • No secrets, credentials or internal references in the diff

Contribution License Agreement

Made under Apache-2.0, per CONTRIBUTING.md.

@chenmingwei23
chenmingwei23 requested review from a team and KiroCrewCaptain as code owners October 10, 2026 07:12
@chenmingwei23
chenmingwei23 requested review from cruisercohen and removed request for a team October 10, 2026 07:12
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 10, 2026
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — 🟡 CONCERNS

UX-level review of 5810f07129d85e5215b13636447674409fb9f535 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

The new empty state tells the user to "Ask this crewmate to build its dashboard" but gives them no way to do it from there, so they have to find the chat on their own.

Watch

  • The instruction has no action. The diff changes dashboard_none_yet to "No dashboard set up for this crewmate yet. Ask this crewmate to build its dashboard." This PR also stops showing a default page to members who haven't adopted a template, so far more users will now land here. The blind reader understood the message but said: "There's no button or link that takes me to the chat, so I'd have to find it myself." Severity: every newly empty member hits it on every visit, and it costs friction rather than failure. Fix: add one action that opens this crewmate's chat.
  • Live updates change values with no visible cue. In shots 09→10 the fold push swaps 12→31, 1.2 GB→2.4 GB and 2→0 in place. The reader said: "I could only spot the changes by comparing with shot 09." On a live dashboard people watch every day, a value that changes silently is easy to miss. Severity: moderate, since it happens on every push. Fix: briefly highlight a block when its value changes, on the node the patch updated.
  • The light theme hasn't been shown on a light page. In shots 01, 07 and 08 the light-theme cards sit on a dark host, so the dark text is unreadable. The reader thought the cards looked "greyed out or still loading". The author says the dark host was chosen on purpose, but no screenshot shows the light theme as a user would actually see it. Fix: add a light-theme screenshot with a light host.

Suggestions

  • dashboard_none_yet: don't repeat "crewmate". For example: "No dashboard yet. Ask this crewmate to build one." Put the chat action next to it.

[UX-REVIEWED] 5810f07

Description read

[DESCRIPTION-READ] 14cfa01a969ccc7f1785457293d57068b8231b935c02ecb059d5cbac2e8cda5e

That sha256 names everything this verdict read: the PR description, plus the 14 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 Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — 🟡 CONCERNS

Design-level review of 5810f07129d85e5215b13636447674409fb9f535 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: CONCERNS

The server still writes and renders a default page for crewmates with no dashboard, and only the tab declines to show it, so agent writes succeed against a page nobody sees.

Watch

  • The agent and the reader disagree about whether a dashboard exists. The description says default_instance() "returns the registry default with its state left at STATE_EMPTY" and that agent_panel.read_instance "resolves empty to the DEFAULT's manifest". The new gate in CrewDynamicDashboard.tsx is if (data.state === 'empty') return. So when an unadopted crewmate's agent writes to its panel, the write is accepted against the default manifest, the agent reports success, and the person still sees the empty state with no sign anything happened. The fix lives in one frontend if while every server path keeps the old contract. Until the deferred drop-templates work lands, any second consumer of this route has to know to refuse an empty page that arrives with a page attached.
    Clears when: drop-templates is linked as a tracked follow-up that lands before this ships to users, or the write and read routes in this PR stop substituting the default for an empty state.
  • The receive side merges with no sender. Nothing in this tree broadcasts dashboard_block_patch: member_dashboard_push.py is absent. The new useWebSocket case and the strict-equality gap check therefore can't be tested against a real server here, and the frame-name pin points at a module that doesn't exist yet.
    Clears when: the PR that adds member_dashboard_push.py is linked and merges with or before this one, or the router case is gated off until it does.

[DESIGN-REVIEWED] 5810f07

Description read

[DESCRIPTION-READ] be6e164ffebd52a198539453f1ea0ca2154b0870bfc3bc178a3482733ee955ee

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 Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — 🔴 BLOCK

Premise-level review of 5810f07129d85e5215b13636447674409fb9f535 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: BLOCK

product-shape change without accepted RFC: crewmates with no adopted template stop seeing the default page, which the in-progress RFC says they must see.

Not justified as shipped

  • Item 2 — symptom-level: the description itself says "The fix sits at SYMPTOM level". api_member_dashboard still swaps in default_instance(), and only the tab declines it.
    Subtraction: stop the server read from substituting the default, and delete the client-side empty decline gate.
    Clears when: an unadopted read carries no page.
  • Item 6 — zero consumers: package_json_schema(), dashboardPackage.schema.json and dashboardPackage.ts are imported only by tests. I grepped package_json_schema|import .*dashboardPackage|DashboardPackage\b and found 0 production imports.
    Subtraction: defer commit 5810f07 until a renderer imports the types.
    Clears when: one counted production importer exists.

What this change ships

Inventory (7 items) — 4 justified

Intent: a crewmate's Dashboard tab draws the package its agent composed, and makes up no page. This is an ADDITION.

  1. Tab renders a crewmate's dashboard-artifact package — justified
  2. Unadopted crewmate sees the empty state instead of the default page — symptom-level; changes the default with no recorded decision
  3. A fold push updates only the affected blocks, with no second canvas — justified
  4. The tab no longer freezes after a restart re-arms the page at 0 — justified
  5. Dashboard artifacts get an aim badge in the Artifacts library — justified
  6. JSON Schema and generated TypeScript types for the package — zero consumers
  7. Empty state names a next step — justified

Blockers

  • product-shape change without accepted RFC: the default page is removed for unadopted crewmates. The description says: "a crewmate who has adopted no template stops seeing the registry default page". The base RFC rfc-crewmate-dynamic-dashboard.md (status in-progress) records the opposite: "A crewmate that has adopted nothing renders the default". The description cites "Dynamic Dashboard v3: drop built-in templates, compose a dashboard from a data-type catalog and store it as a dashboard artifact #18642's design doc", which is not an RFC on the base list.
    Clears when: an RFC covering a package-only tab with no default merges non-draft on base, followed by a push or rebase; or a maintainer posts /ai-review override first-principles 5810f07129d85e5215b13636447674409fb9f535: <decision>.

[FIRST-PRINCIPLES-REVIEWED] 5810f07

Description read

[DESCRIPTION-READ] cfda6cd1e160fe7755b2c8b34ddd78b33ab75e9bf88bacd9dd9cedf168eea30a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 5810f07129d85e5215b13636447674409fb9f535 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 5810f07

Verdict parsed from the review's SHA-scoped output markers for commit 5810f07129d85e5215b13636447674409fb9f535.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 5810f07129d85e5215b13636447674409fb9f535: <one-sentence reason>

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 5810f07129d85e5215b13636447674409fb9f535 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 5810f07

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 5810f07129d85e5215b13636447674409fb9f535: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 10, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from f90731b to 6e42e0c Compare October 10, 2026 08:41
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-artifact-dashboard branch from f31db48 to a3979d5 Compare October 10, 2026 09:30
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from 6e42e0c to bf1837b Compare October 10, 2026 09:32
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-artifact-dashboard branch from a3979d5 to 846c847 Compare October 10, 2026 11:47
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from bf1837b to 718f6a4 Compare October 10, 2026 11:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-renderers branch from 4d7bf2f to 42f6ae9 Compare October 10, 2026 21:48
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from 2f6be4e to bc1d575 Compare October 10, 2026 21:49
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 10, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-renderers branch from 42f6ae9 to 4ae57d9 Compare October 11, 2026 00:54
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from bc1d575 to a192e65 Compare October 11, 2026 00:58
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Oct 11, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles a192e65: design approved via T3 one-pager for #18642; RFC amendment ships in #18755

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 marked the first-principles AI finding as false positive, not applicable, or explicitly accepted for a192e65281a7de614cbe4201c38e2fce743c5312.

design approved via T3 one-pager for #18642; RFC amendment ships in #18755

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Oct 11, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-renderers branch from 4ae57d9 to 05ab809 Compare October 11, 2026 05:33
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from a192e65 to d48ff15 Compare October 11, 2026 05:33
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Oct 11, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-renderers branch from 05ab809 to 1303279 Compare October 11, 2026 05:43
…lt page

The v3 Dashboard tab reads a dashboard artifact's layout package and draws
from it. There is no composed default page: a member with no package gets an
empty state, scoped to PACKAGE-BOUND members so the shipped templates keep
working. An absence is the whole subject here -- no page drawn, no mint, no
held page -- so the capture entry carries one row per state, and the row
whose body holds a full dashboard while the tab shows the empty state is the
one a reviewer should look at hardest. Its header names which parts are real
(the component, the providers, the theme tokens, the i18n catalogs) and which
are stand-ins (the controller response, the mint, the document), and the two
no-fallback captions say they prove the frontend half only.

One home per value, on the receive side too. The block patch carries field
NAMES in `blocks` and every value once in `read`, redacted and formatted by
the renderer's own rules, so `blocks` is read for WHICH blocks moved and
never for a value -- a copy there would show a bare 1200000000 where the
first paint showed 1.2 GB. The apply path posts `read` whole, under the
document's own message type, which the bootstrap listener compares exactly.

A fold push is not a full repaint. The patch constant held the full-paint
value, and that listener replaces the whole read and re-initialises every
block, so a fold advancing gave a canvas-owning block a second canvas with
two scenes animating over each other. The constant is renamed to
PAGE_FULL_PAINT_MESSAGE_TYPE, a fold push forwards the renderer's own
block_patch() output verbatim, and blockPatchMessage() is gone so the
narrowing, the formatting and the message name stay in one language. Three
pins read Python: each type against the module that owns it, plus an
inequality between them, because convergence is the bug.

A lower push version is a restart, not a replay. The push counter lives in
server memory per live page, so a gateway restart arms a fresh page at 0 and
the next frame arrives below what the tab holds; read as a replay it was
dropped, and so was every frame after it, until the counter climbed back and
the page resumed having missed the gap. The check is strict equality, and
`held` is taken from the read rather than from a frame that failed it,
because a refetch exists precisely for when what the tab holds cannot be
trusted.

Mutations pin the halves that a passing suite would not otherwise prove:
tolerating a lower version reddens 5 tests, advancing `held` from a refetched
frame reddens the case asserting the position comes back from the read, and
posting the full-paint type for a fold push makes the capture run refuse to
write the R5 shots.

Refs #18642
…from

The schema is built from the live data-type and block catalogs rather than
written out beside them, so a type added to a catalog appears in the schema
with no second edit. website/src/types/dashboardPackage.schema.json and the
dashboardPackage.ts types it generates are its only consumers, which is why it
ships here rather than with the write gate.
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Oct 11, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/18642-dashboard-frontend branch from d48ff15 to 5810f07 Compare October 11, 2026 05:43
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Oct 11, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Superseded by #19060: the page host now serves agent-written pages on the dashboard_frame contract and pushes fields by subscription, which covers this PR. The one remaining piece (the Artifacts library badge) moves to the library PR. Branch kept. See #18642.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 11, 2026
@bolichen97
bolichen97 deleted the feat/18642-dashboard-frontend branch November 6, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant