Skip to content

feat(crewmates): a crewmate's schedules in its own side panel tab - #14925

Merged
chenmingwei23 merged 1 commit into
mainfrom
feat/cron-in-mates-sidebar
Sep 30, 2026
Merged

chenmingwei23 merged 1 commit into
mainfrom
feat/cron-in-mates-sidebar

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: if a crewmate has schedules, you can see them on that crewmate -- not only on /schedule.

Open a crewmate on the Crewmates page and you can read its notes, its work log and its dashboard. You cannot see its schedules. To learn whether anything wakes it at all you leave the page, open Agent Capabilities, find that crew, and open its Schedules pane. The schedules were already per-crewmate; only the surface was missing.

Why it matters

A crewmate that wakes on its own is the thing people are being asked to trust. Today the page about that crewmate cannot answer "does it wake, and when" -- so the honest way to check is a detour, and the cheap way is to assume. The /schedule page lists every job in the install with no crewmate on the row, so it does not answer it either.

Not a goal

  • No change to how a schedule is stored, scheduled or run. No new field, no migration.
  • Schedules belonging to NO crewmate are not shown on a crewmate. /schedule stays their only home.
  • No count on the roster row. That needs MemberRow rebuilt from a single <button>; it is its own change.
  • No server-side member filter on GET /api/crons. The client already groups, and nothing here made that cost more.
  • /schedule is not replaced, narrowed or moved.

Product-shape decision: section 06 is amended here

rfc-crewmates-launch.md is accepted and its section 06 decided "The per-crewmate panel has exactly three tabs", with the in-panel schedule-create dialog removed and schedules created "from the Schedule page or the detail page". A fourth tab that also creates contradicts that, and the First Principles lane was right to say so -- the conflict was not known when this work was scoped.

The decision is CREW-18721, a later product requirement that a crewmate's own schedules are visible on that crewmate and not only on /schedule. It supersedes section 06's read surface, so this PR carries the amendment rather than working around it: docs/request-for-change/rfc-crewmates-launch.md gains a dated "Amendment (2026-09-29, CREW-18721)" under section 06 recording the fourth tab, the own-schedules-only rule, the count badge, that unowned jobs stay on /schedule, and that create is available wherever a crewmate's schedules are shown. The removal of the Crew summary tab and the three original tabs are untouched, and the section 7 acceptance clause is annotated to point at the amendment.

The First Principles lane reads RFC status: from the BASE commit on purpose, so that a PR cannot record its own decision. An amendment living on this branch may therefore not clear that lane until it is on main. That is a sequencing artefact, not a second disagreement: the decision is the product owner's, written down here for review in the same diff as the surface it authorizes.

What changed (motivation -> approach -> change)

The crew editor already had a schedules pane per crewmate, so this adds a mount point, not a feature: the side panel gets a fourth tab rendering that CrewWakeSection.

Piece What it does
MembersPage.tsx crew-schedules tab Fourth chip after Notes / Work log / Dashboard, keyed on the crewmate's name so one whose DM never opened still reports its wakes
SidePanel.tsx SidePanelLeadingTab.badge Optional pill after a chip's label, so the chip can carry a count
Chip count live/total, in the rail's shape, from the same crewWakeQueryKey fetch the body uses
CrewWakeSection.tsx WakeScope The host says which schedules it wants: the editor answers isDefaultCrew, the panel sets ownedOnly
CrewWakeSection.tsx dense, heading, blurb, emptyLine Optional, defaulting to today's behaviour

A crewmate has TWO identities and wakesCrew now takes both: a private schedule's member_id is the IMMUTABLE id, while agent and agent_sequence hold display NAMES. Passing the name for both made such a crewmate read as scheduleless and hid a job the moment it was created here. So the tab MATCHES on the slug and SUBMITS the name: an id never persisted is derived from the name, slugification is lossy, and resolution reads a name before a stored id, so a derived id could file the schedule under another crewmate named it.

A schedule with no member_id AND no bound agent belongs to nobody and no crewmate's tab claims it -- not even the default crew's, whose editor pane WOULD list it through wakesCrew's last fallback; that fallback is all ownedOnly withholds. The chip carries no count when the list is unreadable or there are none, since 0/0 would claim nothing wakes it.

This is the only panel tab that WRITES, so it guards its draft, and ONE guard is asked by every GESTURE that can unmount the form -- thirteen of them, from a chip switch through the scrim and the narrow-window Back to leaving the route, each named in the spec. A create in flight refuses all of them, and nothing at stake keeps each gesture synchronous. A window resize is the exit nothing can decline -- the width alone re-docks the panel -- so the panel stays mounted and hidden while a draft is at stake, guards still armed, since that retained form is the only copy. An accepted discard stands RETENTION down for that one exit, never the draft's flags: a guard after this page could refuse the same navigation, leaving a visible unguarded draft.

The route channel is synchronous, so it asks through window.confirm, as the New crewmate dialog here already does -- the first page with two surfaces on that channel, where each half kept ONE slot, so either could clobber the other's guard or disarm Back for its draft. Both are per caller now; beforeunload covers reload and close.

Ask about this is the one exit whose answer its caller reads, so with a draft at stake it reports FALSE rather than seeding a quote the user declined. useWebSocket.ts invalidates the crons prefix alongside cron-jobs: a refresh touching only the flat list left every per-crewmate pane stale.

dense pins the row's stacked layout on: its sm: classes ask the viewport and cut a job name to ten characters here. The copy props exist because the editor says AGENT.

NavigationLeaveGuard.test.tsx pins the per-caller rules, MemberMemoryIdentity.test.tsx the identity split. Specs: crew-mode.md, learn-cron-dashboard.md and docs/feature-map/README.md carry the fourth tab, the two identities, the no-badge cases, every guarded gesture, and the cron handler and endpoints this tab reaches. Copy is in all 12 catalogs; en-XA.json regenerated.

Backwards compatibility

Compatible: ownedOnly, dense, heading, blurb, emptyLine and badge are all optional and default to the current behaviour, so the crew editor's pane and every existing leading tab render exactly as before. No API, storage or cron-record change.

Tests

  • website/src/pages/members/MembersPage.schedules.test.tsx (new, 27 cases) -- the chip sits last in the leading block; it reads 1/2 for a crewmate with one of two active; the tab body mounts crew-wake-section and lists that crewmate's jobs and no others; an unreadable cron list keeps the chip and drops the count; the DEFAULT crewmate is handed no ownerless job and so reads as having none; a crewmate with nothing reads as empty with no badge and in the panel's own wording; and a failing default-agent read changes nothing on the tab. Plus the write paths: every exit from a dirty create form asks first -- a chip switch, the + menu, a crewmate switch, a team header row, the panel's close control, the scrim tap, the header pencil, the narrow-window Back -- while a create in flight refuses to leave with no prompt at all. Four of them pin what the earlier rounds got wrong and fail when their fix is reverted: a resize across the docking boundary keeps the draft AND stays guarded while hidden, a created schedule is filed under the crewmate's name rather than a collidable derived id, an accepted discard overruled by a later guard leaves the draft still guarded, and a schedule created here is listed back under the crewmate that made it, one case per identity class. agent and member_id are different fields and the tab has to pass both, since JobForm falls back to '' and /schedule then labelled the job as the default crew's. Which value agent takes is what wakesCrew will read: the provider TEMPLATE for a crewmate whose identity persists, and the DISPLAY NAME for one whose member_id the server clears on create, where the template matched neither field and the new schedule vanished from its own tab.
  • MembersPage.test.tsx / MembersPage.sideChat.test.tsx -- the strip assertions now expect four leading chips, and the suite's api mock gains the cron and default-agent reads.
  • The crew editor's own suites (CrewWakeSection.test.tsx, both KiroCrewAgentsPage guard suites) still pass unchanged, which is what pins the editor keeping the unowned-job fallback.
  • .github/coverage-baselines/frontend.txt drops its src/pages/chat/SidePanel.tsx line: the new badge and onBeforeLeave tests carry that file from 69.3% to 82.6%, past the 80% per-file floor, and the baseline is shrink-only. Refreshed from CI's own artifact, since a local coverage run reports different rates and would prune the wrong entries.

Its own test file because the below md describe in MembersPage.test.tsx leaves useIsMobile answering mobile, so a case appended after it finds no docked strip.

Manual verification

Verified end to end against a real isolated gateway holding real crewmates and real cron records: radar with one active schedule of two, scribe with one, courier with none, and two jobs carrying no member_id. A Playwright driver mounts the real MembersPage from the gateway's own origin, so the page holds the gateway's session from a real navigation and every /api/** call is first-party -- nothing is stubbed, intercepted or rewritten. 201 API calls were observed in the run; the only non-2xx was GET /api/models 503, which is this instance having no agent runtime and is unrelated.

Asserted before each frame was written, all green: the chip reads 1/2 for radar and 1/1 for scribe; each pane lists that crewmate's own jobs and neither of the two ownerless ones; courier carries no badge and an empty pane; a schedule created from inside the tab is accepted (POST /api/crons 200), persisted, and listed under the crewmate that created it; firing it from its row calls the real trigger (POST /api/crons/{id}/run 200) and the row then reports the run; leaving a typed create form raises the discard confirm and refusing keeps what was typed; /schedule still lists all five jobs, the two ownerless included. The driver deletes the job it created, so the fixture is unchanged afterwards and the run repeats.

Evidence is a harness, not a pod, because the pod route is unavailable on this host in two independent ways. pod up stages its unit but /api/health does not answer inside the tool's fixed 90 s readiness window, so the pod is stopped again. And a gateway started by hand serves fine but its app SHELL paints "Sandbox unavailable" -- this kernel refuses unshare(CLONE_NEWUSER) -- so MembersPage never mounts behind the gate. That gate belongs to the shell rather than to this page, and mounting the page directly neither disables nor weakens it: the gateway's own refusal to run an agent unsandboxed is untouched, and the fired job's recorded result is exactly that refusal. Nothing was disabled to produce any frame here.

website/scripts/capture-crewmate-schedules-tab.mjs is committed as the repeatable version of the same checks: it runs the built SPA behind the repo's own serveDist + stubDashboardApi helpers, needs no gateway, and so works anywhere CI or a reviewer runs it.

Screenshots / video

radar, with the chip reading Schedules 1/2 in the strip and its two schedules -- and neither of the two jobs that belong to nobody:

radar's Schedules tab, chip reading 1/2, its two schedules

courier, a crewmate nothing wakes: no badge on the chip, and one quiet line in the panel's own wording:

courier's Schedules tab, no badge, reading Nothing wakes this crewmate on its own yet

A schedule created from inside the tab, fired from its own row, reporting the run 6 seconds later -- and the chip recounted to 2/3:

the created schedule reporting 6s ago, chip now 2/3

The guard, on screen. Every exit raises this same confirm over a typed create form; Cancel keeps what was typed:

the Discard the new schedule? confirm over the create form, with Cancel and Discard schedule

/schedule unchanged, still the cross-crewmate view -- all five jobs, including the two that appear on no crewmate's tab:

the Schedule page, still listing all five jobs

A second crewmate, and the create form

scribe's pane, chip 1/1, listing only Weekly notes

the create form open inside the tab

Related Issues

N/A for the surface itself -- this adds one rather than fixing a defect, so it gets no issue, per the repo's convention that bug fixes are the ones that need one.

#15173 -- the Backend Tests (Windows) shard-1 red this branch could not reach readiness past, the second of the two apps-registry symlink cases #15059 reported. Fixed on main, not here: this branch briefly carried a fix for it and dropped it on the rebase, because main's own fix is the better one -- it stops asserting a per-platform verdict for a 60-link path at all, where mine only corrected the platform the claim got wrong. This branch now changes no Python.

Follow-ups this PR deliberately does NOT take on:

  • Drafts die with the route: NavigationBackGuard cannot arm on a forward branch, and the tab store activates without asking #15113 -- drafts die with the route. NavigationBackGuard cannot arm its trap on a history position with a forward branch, so a native Back can discard a typed draft unprompted; the gap predates this PR and is shared by SidePanelLayout and NewCrewmateDialog, and the remedy is draft persistence rather than another caller-side guard. It also carries the lesson this PR paid for three times: every surface that activates a panel tab must consult the leave guard, so the tab store should refuse an unguarded activation instead of each new caller having to remember.

01-radar-schedules

02-scribe

03-courier-empty

04-create-form

05-fired-result

06-discard-confirm

07-schedule-page

Also in this PR

test/test_session_control_revive.py closed a session and revived it inside one clock
tick, so closed_at and the resume's own boundary read as the same float and
clear_closed's compare-and-clear refused on equality. Linux returns a finer value per
call, so this only ever surfaced on the Windows shard, where it turned Backend Tests (Windows) (2) red on every PR rebased past #13110. The helper now backdates the close,
which is the precondition those tests already assume. Reproduced on Linux by quantising
time.time() to Windows' 15.6 ms interrupt clock: 17 failed before, 97 pass after, and
97 pass on the normal clock too.

Fixes #15364

@chenmingwei23
chenmingwei23 requested a review from a team September 29, 2026 04:52
@chenmingwei23
chenmingwei23 requested a review from a team as a code owner September 29, 2026 04:52
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from 437fb03 to 1cd6be6 Compare September 29, 2026 05:14
@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from 1cd6be6 to a0e30a5 Compare September 29, 2026 05:41
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — 🟡 CONCERNS

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

Design-Verdict: CONCERNS

The name≠slug attribution bug stays live in the crew editor, so the two mounts of the "one schedules editor" can now visibly disagree.

Watch

  • wakesCrew now demands the immutable id, but the crew editor still passes the display name for both slots ("the crew editor passes its display name for both… it holds no slug"), so a renamed crewmate's private schedules show on the panel tab and vanish from the editor pane — the exact divergence the "one editor, mounted twice" design claims to prevent, deferred with no named tracking issue.
    Clears when: the editor host passes the slug, or a filed follow-up issue is linked from the PR.
  • The section-06 amendment authorizing this tab ships in the diff it authorizes, resting on CREW-18721 and a product-owner decision this review cannot verify; the description itself says the First Principles lane may not clear until it is on main.
    Clears when: a maintainer confirms CREW-18721 / signs off the amendment on the PR.
  • test/test_session_control_revive.py's Windows clock-granularity backdate is unrelated backend scope inside this frontend feature commit; a revert of the tab would silently revert that flake fix. (The description is truncated here, so it may be accounted for in its tail.)
    Clears when: it moves to its own PR or the description demonstrably covers it.

Suggestions

[DESIGN-REVIEWED] 3e685f8

Description read

[DESCRIPTION-READ] a3348d866bae9539b410b281056edf8a2c8b1a488a8f8fbecf7f22d2e5c4ecdc

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 removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

Reader wouldn't dare the icon-only run-now bolt, and "active" here vs "Ready" on /schedule made the same schedule read as two things.

Watch

  • Status synonym drift is now one click apart: the row pill says "active" while the tab's Open Schedule button lands on /schedule's "Ready" — the reader "would guess they mean the same thing, but the different words made me doubt it". Every user who follows that button hits it; the spec records it as pre-existing, but this tab created the adjacency, so a human should decide whether "Ready" aligns in a follow-up.
  • The lightning-bolt "run now" on every row: "no idea what it does… I would not dare click it because it might immediately set the helper working" — one of the tab's own advertised writes is undiscoverable to the panel's new audience (aria/title only). Shared-row change, so flagging for a human, not this PR.
  • The fourth chip plus its 1/2 badge pushes the pinned Artifacts/Files chips into overflow-x-auto scrollbar-none at the ~460px docked width; the reader saw icons "cut off at the edge… I can't identify them". Nothing signals the strip scrolls; a scroll-edge fade (permitted functional gradient) would close it.

Suggestions

  • In dense mode, drop WakeRow's grey "schedule" pill — the reader: "the pill in particular tells me nothing, since everything on that list is already a schedule."

[UX-REVIEWED] 3e685f8

Description read

[DESCRIPTION-READ] b6d6bcc1083503cecc676c0af266c0d16cc8cd3dbc94942d7077635f0891688f

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

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ human override accepted

@chenmingwei23 overrode this lane for 3e685f8f34443aab9c15437a25265075667a92d9 via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 3e685f8f34443aab9c15437a25265075667a92d9 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3e685f8

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3e685f8f34443aab9c15437a25265075667a92d9: <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 Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from a0e30a5 to ba4f3cd Compare September 29, 2026 05:55
@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 Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

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

Review details

No blocking findings.

FINDING — website/src/pages/members/MembersPage.tsx:1910 — the re-arm effect treats "form still mounted" as "the exit did not happen", so when shouldMountSidePanel is already true for another reason (hasTaskDashboard latched by one Dashboard-chip visit, a live app or browser tab), hiding the panel after an accepted discard leaves CrewWakeSection mounted, never clears schedDraftDirty, and if (schedReleased.current && schedulesMountedRef.current) schedReleased.current = false revokes the release — the discard discards nothing, every later exit re-prompts, and the beforeunload/Back trap stays armed → Fix: on an accepted discard also make the section report clean (bump its key so it remounts) instead of relying on an unmount that a mount-forcing tab prevents.

FINDING — website/src/pages/members/MembersPage.tsx:1579 — with a dirty Schedules draft the Ask path answers the selection seam return false while deferring focus(), and selectionActions.ts:93 takes if (verdict === false) return, so after the user accepts the discard the Side Chat opens with the quoted selection dropped and no explanation → Fix: return schedGuardRef.current().then(ok => { if (ok) focus(); return ok }) — the seam already defers the seed on a Promise<boolean | void> verdict.

FINDING — website/src/pages/KiroCrewAgentsPage.tsx:2484 — memberId={editing} (and wakesCrew(j, editing, …, editing) at 1892) passes the display name where a stored member_id holds the server-allocated slug (resolve_member_execution rewrites the client's value to agent.member_id), so a V2 crewmate named Radar reads as having no private schedules in the crew editor while the Crewmates panel — which passes activeSlug — lists them → Fix: pass the editing agent's persisted member_id, which requires exposing it on the agents API response this page already loads (untouched files, so not landable in this diff).

FINDING — website/src/pages/chat/SidePanel.tsx:1893 — the new badge span sits inside a chip that always renders with host, so aria-label={pinned || host ? tab.title : undefined} replaces the whole subtree as the accessible name and the 1/2 count (and the badge's own title) never reaches a screen reader → Fix: when badge is present on a host chip, compose the count into the aria-label rather than leaving it outside the name computation.

[OPUS-REVIEWED] 3e685f8

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

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

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from ba4f3cd to 822fbe0 Compare September 29, 2026 06:57
@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 Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from 822fbe0 to f7516e0 Compare September 29, 2026 07:33
@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 Sep 29, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/cron-in-mates-sidebar branch from f7516e0 to 6a64b4c Compare September 29, 2026 08:20
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 29, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles ceedff7: decision recorded in-PR RFC amendment under section 06 (CREW-18721, product-owner requirement); lane ran on this exact head, head unchanged since, sole remaining blocker, all other lanes pass

@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 ceedff7f9d3923e2105324d4a349563a58c92835.

decision recorded in-PR RFC amendment under section 06 (CREW-18721, product-owner requirement); lane ran on this exact head, head unchanged since, sole remaining blocker, all other lanes pass

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

dodgeblaster
dodgeblaster previously approved these changes Sep 30, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author
  • Flake in a test this PR does not touch; re-run, not patched. Backend Tests (Windows) shard 3 failed on one test, test/test_wakatime_heartbeats.py::test_enabled_and_opted_in_sends_one_heartbeat, with assert 0 == 1. All eight Windows shards were green on the previous head a9139c2a75, and the only difference between that head and dc0fc2cc47 is three added lines in website/src/test/useWebSocket.frameTrace.test.ts; a frontend vitest golden cannot reach a Python test, and this PR changes no .py file at all. The test schedules note_coding_activity and then waits for the background task with a bounded for _ in range(20): await asyncio.sleep(0) spin before asserting the batch arrived, so a runner that needs more yields than that budget reports zero batches. The test is unmodified here. Failed jobs re-run as attempt 2.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Rebuttal on F1 (website/src/pages/members/MembersPage.tsx:3991, "Roster refresh can discard a schedule draft") on dc0fc2cc47c04f1996b771fc66a32ee1fce23d39. I verified the reachability claims against the file rather than relying on the pre-drafted rationale, and the remedy the finding asks for is the part that does not hold up.

  1. This page has no member-delete control. Every delete in MembersPage.tsx is a local Set/Map operation (pending-greet bookkeeping, unread keys, ordering). Deleting the open crewmate has to come from another surface -- the crew editor route, another tab, or the CLI -- while the draft is dirty.

  2. The last exit this page owns is already guarded. useRegisterNavigationLeaveGuard refuses outright while schedSaving is set and confirms while schedDraftDirty is set, with schedAtStake tracking both. So every exit the page controls already protects the draft; the path in the finding is a remote deletion arriving as a roster refresh, which is not an exit the page initiates.

  3. The requested fix contradicts a contract this page states in its own source. The gone-crewmate fallback carries the comment "Nothing to open means nothing may STAY open", and explains that a chat can still be mounted for a crewmate the roster no longer lists (deleted while open) and must be cleared. So "deleted while open" is not an unhandled case -- it is a case with a designed outcome: fall back and announce where the crewmate went. "While schedAtStake, retain the current member and body; defer roster-driven fallback/remount until the guard accepts" would keep a deleted crewmate pinned as active against the roster that denies it, which is the behaviour that comment forbids. It would also hold the slot-bound subtree open for a memberId the server no longer has, so the draft's own save target is already gone.

The adjudication reached the same reading independently: harm rung LOW, one unsaved draft for a crewmate that no longer exists, the loss announced by the page's own notice, and the real fix cost a new ordering contract between the roster-fallback effect and the guard.

Rerunning the GPT lane once on this unchanged head. If the same finding comes back, I will record a human override citing this rebuttal, per the delegated override authority: a contract the page documents in source outranks a reachability estimate, and implementing the requested remedy would introduce the state that contract exists to prevent.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author
  • Inherited from main, not from this PR, and not clearable by rerunning. Backend Tests (Windows) shard 2 failed on both attempts, and every failure on both is inside one file this PR does not touch, test/test_session_control_revive.py. Attempt 1 failed six of its tests (test_revive_files_into_the_requested_folder, test_a_clean_hook_publishes_once_and_the_history_click_passes_none, and four more, on SessionControlError: this session changed while resuming and on resume_in_progress/resume_conflict where reopen_rollback_failed was expected); attempt 2 failed a single different one, test_the_session_store_probes_run_off_the_event_loop. A varying subset of the same file across two attempts is flakiness in that file on Windows, not one deterministic assertion.

    Attribution: that file and src/kiro_crew/dashboard/session_control.py arrived together in feat(session-control): session_revive brings an archived session back to the sidebar #13110, whose commit landed on main at 2026-09-30 03:31. It is present in this PR's CURRENT base and absent from both of its two earlier bases, so it entered during the last rebase window. This PR changes no .py file at all. The file passes 97 of 97 on POSIX at this head.

    Why main did not catch it: the Windows shards are skipped on main pushes, so the only place feat(session-control): session_revive brings an archived session back to the sidebar #13110's tests meet Windows is a pull request. Two reruns have now been spent on it here; a third would be a third sample of the same flake rather than a fix, so I am not spending one.

What wakes a crewmate was only readable from the crew editor, two
navigations away from the crewmate you were looking at. Add a fourth
`Schedules` tab to the Crewmates side panel that mounts the crew editor's
OWN pane (`CrewWakeSection`), so there is one schedules editor in the
product on two surfaces rather than two lists that can disagree.

The ownership model needed no work: cron records already carry an
immutable `member_id`, `GET /api/crons` already returns it, and
`wakesCrew` is already the canonical per-crewmate predicate. What was
missing was the mount point.

- SidePanel: `SidePanelLeadingTab` gains an optional `badge`, rendered
  after the label. The chip reads live/total in the crew editor rail's
  shape from the same `crewWakeQueryKey` fetch the body uses, so one
  request serves both; an unreadable list carries NO badge rather than
  `0/0`.
- `sharedNoMate` + `SharedSchedulesGroup`: jobs with no `member_id` get a
  trailing muted fold-only group, following the roster's no-team
  treatment. Disjoint from the pane above, because `wakesCrew`'s last
  fallback already gives an unowned job to the default crew.
- `CrewWakeSection` gains optional `dense` / `heading` / `blurb`, all
  defaulting to today's behaviour so the crew editor is untouched. The
  panel column is ~460px on a wide screen, where the row's viewport `sm:`
  promotions fire and truncate a job name to ten characters.
- `/schedule` is unchanged and stays the cross-mate view.

Specs updated: crew-mode (four tabs, the badge's unknown-vs-none rule,
the group's disjointness) and learn-cron-dashboard (`member_id` as the
only grouping key, no server-side filter, both surfaces via `wakesCrew`).
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles 3e685f8: decision recorded in-PR RFC amendment under section 06 (CREW-18721, product-owner requirement); lane ran on this exact head, head unchanged since, sole remaining blocker, all other lanes pass

@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 3e685f8f34443aab9c15437a25265075667a92d9.

decision recorded in-PR RFC amendment under section 06 (CREW-18721, product-owner requirement); lane ran on this exact head, head unchanged since, sole remaining blocker, all other lanes pass

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

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.

ci: Backend Tests (Windows) (2) red on every PR since PR #13110 -- three test_session_control_revive tests fail on Windows

3 participants