Skip to content

fix(crew): a worker report asks the crewmate to update its Dashboard page - #23576

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/crewmate-dashboard-current
Oct 24, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/crewmate-dashboard-current

Conversation

@buluoray

@buluoray buluoray commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A crewmate whose worker finishes or moves a job puts the news on its Dashboard page in that same turn, without the user having to ask.

A crewmate ran a whole remediation job through its workers and its Dashboard page stayed empty. It filled the headline and the Needs-you cards only after the user asked why the page was blank, and it said it had never updated the fields. Nothing reminded it at the moment the work changed:

  • The [Worker report] wake, where a dispatched job's state changes, only said "tell the user in this thread" (worker_report.guidance). It said nothing about the page.
  • The check-ins that do ask for the page (Daily Goal Reminder, Heartbeat in dashboard/goal_reminder.py) only run when there is a goal and their switch is on, so a one-shot job never reaches them.
  • The [DASHBOARD] block that lists the page's fields is part of the member section. That section is injected at session start, on a slim resume and after a compaction, not on every wake.

Why it matters

The Dashboard tab is where a crewmate's user follows its work when they are not reading the thread. A crewmate that does real work and leaves the page empty looks idle, and the decisions waiting on the user never reach the page they read.

Not a goal

  • Creating workstream items automatically for a job run without tracked work. The project-report tree reads work-ledger items, and whether a dispatched worker should create one is a product decision.
  • Changing the check-ins, the [DASHBOARD] block or how often the member section is injected.
  • Changing how worker reports are batched or delivered.

What changed (motivation → approach → change)

Symptom (the page stays empty after a worker-run job) → cause (the only wake on the path of a dispatched job asks for a chat reply and never names the page, and the wakes that do name it are gated on a goal) → put the page on that wake, worded for the page's state at that moment.

  • dashboard/mate_thread_wakes.py: page_line(slug) reads the crewmate's tab off the event loop, once per flush, before the idle check. with_page adds that line at the end of the [Worker report] prompt. It returns one of three things:
    • A page in force that has fields the crewmate writes gets the new worker_report.dashboard_fields piece. It names those fields (for project-report: ci, for_you, verdict) and asks for them to be written with dashboard_write before the turn ends.
    • A tab still on the suggestions page gets dashboard_agentic.SUGGESTIONS_LINE, the turn block's existing build-your-page line.
    • After the read, the wake starts only if the same thread is still there, is still a crewmate thread and is not closing. Otherwise its reports stay pending for the thread's next turn end.
    • No line with agent.crew_panel off, under the person's lock while the tab shows suggestions (an apply would be refused), or for a page whose every field is folded. A page that cannot be read also costs only the line.
  • crewmate_prompts.json: one new key, worker_report.dashboard_fields, plus its _about entry. Both sit away from the lines feat(crew): let a crewmate request tools for its worker (preview) #23562 edits.
  • docs/system-specs/modules/crew-mode.md: the "A worker reports back on its own" paragraph describes the line.

Backwards compatibility

Compatible: the wake gains one closing line; report_prompt's signature and output are unchanged, and every existing caller keeps working.

Removes nothing: the diff only adds a line to a gateway-authored prompt and one prompt key.

Tests

  • test_mate_thread_wakes.py::test_the_wake_a_worker_report_starts_carries_the_page_line: a worker's turn end makes the crewmate's wake end on the page line, read for the crewmate's own slug.

  • test_a_report_on_a_page_names_its_fields_to_write_this_turn, test_a_report_on_the_suggestions_page_carries_the_build_line and test_no_page_line_without_page_tools_or_fields check each state page_line answers: page in force, suggestions page, suggestions under lock, panel off, no writable fields, empty slug.

  • The wake-path fixtures in test_mate_thread_wakes.py and test_cron_crewmate_report.py stub page_line. The cron test's _settle now waits for the flush task, because the page read is a thread hop.

  • test_a_thread_closed_during_the_page_read_gets_no_wake[closing|removed|replaced]: the fake page read closes, removes or replaces the crewmate thread while it runs (no sleeps). No wake starts and the report stays pending.

Proof: PROVEN test/test_mate_thread_wakes.py::test_the_wake_a_worker_report_starts_carries_the_page_line, test/test_mate_thread_wakes.py::test_a_thread_closed_during_the_page_read_gets_no_wake[closing], test/test_mate_thread_wakes.py::test_a_thread_closed_during_the_page_read_gets_no_wake[removed], test/test_mate_thread_wakes.py::test_a_thread_closed_during_the_page_read_gets_no_wake[replaced] (head bfc4042)

Manual verification

  • page_line was run against the real instance store and the shipped templates in a throwaway KIROCREW_HOME. An unadopted crewmate got the suggestions line. After instance.adopt(slug, "project-report") it got: "The user follows this work on your Dashboard page, not in this thread. Before you end this turn, write what these reports changed to its fields (ci, for_you, verdict) with dashboard_write; ...".
  • Not verified: a live crewmate on a pod actually writing its fields on a [Worker report] turn. That is model behaviour and needs a pod run.
  • scripts/local-gate.py: backend related tests passed (29). The frontend leg could not start in this worktree, because website/node_modules is not installed. The diff touches no frontend file.

Related Issues

Refs: an internal bug report on crewmate Dashboard pages (issue 4 of that report). There is no public issue.

Sibling sweep

Swept: git grep -n "dispatch_hidden_turn(" -- src/kiro_crew/dashboard (every gateway-authored wake in a crewmate's thread)
Sibling: src/kiro_crew/dashboard/goal_reminder.py -- not affected -- the daily and heartbeat prompts already ask for the page fields, gated on a goal by design
Sibling: src/kiro_crew/dashboard/goal_setup.py -- not affected -- goal kickoff and milestone wakes hand research to a worker, whose report now carries the line
Sibling: src/kiro_crew/mate_upgrade_notice.py -- not affected -- a one-time notice about the worker, no work state to record

Pattern harvest

Rule candidate: review-prompt
Pattern: an instruction that must fire when state changes lives only in session-start context or in a wake gated on unrelated settings, so the turn where the state actually changes never carries it.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • 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

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners October 23, 2026 22:41
@buluoray
buluoray requested a review from mbriones98 October 23, 2026 22:41
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision bfc40429aaf8f05684316b6c93631c23467b1df6 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of bfc40429aaf8f05684316b6c93631c23467b1df6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the instruction now sits on the one wake a dispatched job always reaches, and every failure path just drops the extra line.

Notes

  • When the thread is busy, page_line runs again on every pass of the _flush loop, even though nothing is dispatched yet. Reading the page only after _idle(slot) is true avoids those wasted reads.
  • app_is_stopping is checked before the to_thread hop but not after it, so a shutdown that starts during the page read can still start a wake. Re-check it next to the slot-identity check.

[DESIGN-REVIEWED] bfc4042

Description read

[DESCRIPTION-READ] 1aab58068c1d2f28a8aa82e6df4db427eb04a742b64a997bd11826a329378690

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 23, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of bfc40429aaf8f05684316b6c93631c23467b1df6 — 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 does not.

First-Principles-Verdict: PASS

Nothing blocks. One note: page_line works out the page state a second time, separately from turn_block, and the two already give different answers in one case.

Notes

  • Item 1 — duplicate of src/kiro_crew/dashboard_agentic.py:1061 (turn_block): page_line repeats turn_block's branches (panel off, suggestions, lock, page in force, folded fields) a second time. The copies already disagree. turn_block resolves an older record's bound page via package_on_screen and _package_manifest and names its fields. page_in_force skips that step, so for that crewmate page_line returns "". They also differ under the lock: turn_block emits LOCKED_REFUSAL, page_line returns nothing. Subtraction: delete page_line's branches and close the wake with turn_block(slug) plus the one imperative sentence from worker_report.dashboard_fields. One decision, one place.

What this change ships

Inventory (6 items) — 5 justified

Intent: a crewmate records its worker's job progress on its Dashboard page in the same turn, without being asked. FIX.

  1. A worker-report wake now ends by asking the crewmate to write its page fields, named, with dashboard_write before the turn ends — duplicate of dashboard_agentic.turn_block's page decision
  2. A crewmate still on the suggestions page instead gets the existing build-your-page line on that wake — justified
  3. No page line with the crew panel off, under the lock on suggestions, or when every field is folded — justified
  4. A thread closed, removed or replaced during the page read gets no wake, and its reports stay pending — justified
  5. New prompt key worker_report.dashboard_fields — justified
  6. The crew-mode.md worker-report paragraph now describes the page line — justified

[FIRST-PRINCIPLES-REVIEWED] bfc4042

Description read

[DESCRIPTION-READ] b0b4f211a61d6c17ff1ccfb245ad7fbb5d4648e29b9c53e56a6dd6b2c5463ef5

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 23, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] bfc4042

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

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

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] bfc4042

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

…page

A dispatched job's state changes on the [Worker report] wake, and that wake
told the crewmate only to tell the user in chat. The check-ins that ask for
the page run only with a goal and a switch on, so a one-shot job left the
page empty. The wake now ends on one line: the page's own fields to write
with dashboard_write before the turn ends, or the suggestions page's
build-your-page line.
@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 23, 2026
@buluoray
buluoray force-pushed the fix/crewmate-dashboard-current branch from 31c7aa5 to bfc4042 Compare October 23, 2026 23:23
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 23, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 24, 2026 01:04

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tier 1 auto-approve: fix (5 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: a worker-report wake now ends with one line naming the crewmate's Dashboard fields to write, and skips the wake when the thread closes during the page read; covered by new tests. Spec files changed as a ride-along (a minority of the diff on both file count and changed lines), not reviewed as a design decision: docs/system-specs/modules/crew-mode.md.

@KiroCrewCaptain
KiroCrewCaptain merged commit 20998bf into main Oct 24, 2026
155 of 157 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/crewmate-dashboard-current branch October 24, 2026 01:04
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 24, 2026
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.

2 participants