Repository navigation
feat(crewmates): a crewmate's schedules in its own side panel tab - #14925
Conversation
437fb03 to
1cd6be6
Compare
1cd6be6 to
a0e30a5
Compare
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of 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
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 |
UX Review (Fable 5) — 🟡 CONCERNSUX-level review of 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
Suggestions
[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 |
First Principles Review (Fable 5) — ✅ human override accepted@chenmingwei23 overrode this lane for |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
a0e30a5 to
ba4f3cd
Compare
Opus 5 Review — ✅ no blocking findingsReviewed Review detailsNo 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 FINDING — website/src/pages/members/MembersPage.tsx:1579 — with a dirty Schedules draft the Ask path answers the selection seam FINDING — website/src/pages/KiroCrewAgentsPage.tsx:2484 — FINDING — website/src/pages/chat/SidePanel.tsx:1893 — the new badge span sits inside a chip that always renders with [OPUS-REVIEWED] 3e685f8 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
ba4f3cd to
822fbe0
Compare
822fbe0 to
f7516e0
Compare
f7516e0 to
6a64b4c
Compare
|
/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 |
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. |
|
|
Rebuttal on F1 (
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. |
|
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`).
|
/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 |
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. |
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
/schedulepage lists every job in the install with no crewmate on the row, so it does not answer it either.Not a goal
/schedulestays their only home.MemberRowrebuilt from a single<button>; it is its own change.GET /api/crons. The client already groups, and nothing here made that cost more./scheduleis not replaced, narrowed or moved.Product-shape decision: section 06 is amended here
rfc-crewmates-launch.mdisacceptedand 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.mdgains 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.MembersPage.tsxcrew-schedulestabSidePanel.tsxSidePanelLeadingTab.badgecrewWakeQueryKeyfetch the body usesCrewWakeSection.tsxWakeScopeisDefaultCrew, the panel setsownedOnlyCrewWakeSection.tsxdense,heading,blurb,emptyLineA crewmate has TWO identities and
wakesCrewnow takes both: a private schedule'smember_idis the IMMUTABLE id, whileagentandagent_sequencehold 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 theslugand 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_idAND 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 throughwakesCrew's last fallback; that fallback is allownedOnlywithholds. The chip carries no count when the list is unreadable or there are none, since0/0would 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;beforeunloadcovers 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.tsinvalidates thecronsprefix alongsidecron-jobs: a refresh touching only the flat list left every per-crewmate pane stale.densepins the row's stacked layout on: itssm:classes ask the viewport and cut a job name to ten characters here. The copy props exist because the editor says AGENT.NavigationLeaveGuard.test.tsxpins the per-caller rules,MemberMemoryIdentity.test.tsxthe identity split. Specs:crew-mode.md,learn-cron-dashboard.mdanddocs/feature-map/README.mdcarry 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.jsonregenerated.Backwards compatibility
Compatible:
ownedOnly,dense,heading,blurb,emptyLineandbadgeare 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 reads1/2for a crewmate with one of two active; the tab body mountscrew-wake-sectionand 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.agentandmember_idare different fields and the tab has to pass both, sinceJobFormfalls back to''and/schedulethen labelled the job as the default crew's. Which valueagenttakes is whatwakesCrewwill read: the provider TEMPLATE for a crewmate whose identity persists, and the DISPLAY NAME for one whosemember_idthe 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.CrewWakeSection.test.tsx, bothKiroCrewAgentsPageguard suites) still pass unchanged, which is what pins the editor keeping the unowned-job fallback..github/coverage-baselines/frontend.txtdrops itssrc/pages/chat/SidePanel.tsxline: the new badge andonBeforeLeavetests 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 mddescribe inMembersPage.test.tsxleavesuseIsMobileanswering 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:
radarwith one active schedule of two,scribewith one,courierwith none, and two jobs carrying nomember_id. A Playwright driver mounts the realMembersPagefrom 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 wasGET /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/2forradarand1/1forscribe; each pane lists that crewmate's own jobs and neither of the two ownerless ones;couriercarries 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;/schedulestill 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 upstages its unit but/api/healthdoes 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 refusesunshare(CLONE_NEWUSER)-- soMembersPagenever 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.mjsis committed as the repeatable version of the same checks: it runs the built SPA behind the repo's ownserveDist+stubDashboardApihelpers, needs no gateway, and so works anywhere CI or a reviewer runs it.Screenshots / video
radar, with the chip readingSchedules 1/2in the strip and its two schedules -- and neither of the two jobs that belong to nobody:courier, a crewmate nothing wakes: no badge on the chip, and one quiet line in the panel's own wording: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 guard, on screen. Every exit raises this same confirm over a typed create form; Cancel keeps what was typed:
/scheduleunchanged, still the cross-crewmate view -- all five jobs, including the two that appear on no crewmate's tab:A second crewmate, and the create form
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:
NavigationBackGuardcannot 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 bySidePanelLayoutandNewCrewmateDialog, 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.Also in this PR
test/test_session_control_revive.pyclosed a session and revived it inside one clocktick, so
closed_atand the resume's own boundary read as the same float andclear_closed's compare-and-clear refused on equality. Linux returns a finer value percall, 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, and97 pass on the normal clock too.
Fixes #15364