Repository navigation
feat(members): a crewmate's Sessions tab groups its sessions and shows a recap in place - #28931
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The tab reuses the Crew panel's gate, tree check, groups and redactor, and adds only one read-only recap route. Notes
[DESIGN-REVIEWED] 369e868 Description read[DESCRIPTION-READ] 3f9f2f5eb14863f60ba2405ac0a540c822a01e9bac40638f37279fdfe74fab49 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: both RFCs ( Notes
What this change shipsInventory (8 items) — 6 justifiedIntent: let the person see every session a crewmate dispatched, grouped by what each needs, and read its recap without leaving the mate's page. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 369e868 Description read[DESCRIPTION-READ] e8e81a8d325db5491974c99296a7d9f1f26f814454afe8d058a8c188ef2feea5 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the Done group opened and the two new failure notices. No supplied screenshot shows them, and the blind reader said: "What 'Done · 1' holds: I never see it opened." Evidence gaps
Notes
[UX-REVIEWED] 369e868 Description read[DESCRIPTION-READ] 82b2965cb3f31052944a3440aa3445c8f1cef5c349becc43786db756ce66e195 That sha256 names everything this verdict read: the PR description, plus the 11 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 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: |
4b72208 to
87c493b
Compare
Sensitive Change ReviewSensitive files changed:
|
87c493b to
fb36cc9
Compare
fb36cc9 to
cead2fc
Compare
cead2fc to
7c07eb5
Compare
7c07eb5 to
3e2c942
Compare
b07a371 to
87f447c
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes at 87f447c for one point. The project now has a standing rule that a fix must not rely on regex to parse text, and this PR adds regex to recognise a pull-request link:
dashboard/handlers/crew_worker_recap.py:48adds_GITHUB_PR_URL = re.compile(...), and line 91 uses it (_GITHUB_PR_URL.fullmatch(value)) to decide whether an artifact value is a PR link.website/src/pages/members/MateSessionsList.tsx:54adds a regex.exec(url)to pull the PR number out of that URL.
Please replace both with a structured check:
- Backend: parse the value with
urllib.parse.urlsplit. Then requirescheme == "https",netloc == "github.com", and a path that splits into exactlyowner,repo,"pull",number(plus at most one known suffix such asfiles), withnumberbeing digits that don't start with 0. Better still, readprand the repo from the work item's typed fields, which the recap already has forpr, and build the link from those, instead of judging free-form artifact text. - Frontend: use
new URL(url), comparehostnameandprotocolexactly, and splitpathname. Or take the number straight from the recap'sprfield rather than from the URL.
Your existing tests cover the cases this must keep (a branch named pull/7 is not a PR, and a non-GitHub URL is refused), so they can stay as they are.
The open design question on this PR, whether a row click shows the recap or opens the session, is still with the maintainers. It is separate from this point.
87f447c to
56b407d
Compare
|
@bolichen97 the no-regex point is addressed in 56b407d:
|
038ad47 to
1b7e22e
Compare
…nds a recap in place
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:
Approving 369e868. The code is right. The three text fixes below are non-blocking; please make them before merge.
What this does for users: a crewmate's Sessions tab now lists every session the mate dispatched at any depth, closed ones included, in the Crew panel's groups. Clicking a row expands a records-only recap in place.
Text to fix (non-blocking):
- The description says "a Crew Mode root's routes are unchanged" and calls
_ledger_work_itemsa split. The newworker_instance_idskip (crew_workers.py:345-348) also changes the existing Crew Mode list's ledger lines (_crew_ledger_items) and the steer route's item lookup (crew_workers.py:999). It is a correct fix: it matches work_ledger.py:523 and :771, andtest_a_peer_crews_item_never_stands_for_a_local_sessionpins it. But the compatibility section should say it, or it should land separately. The Design and First Principles lanes raised the same point. - crew-mode.md says the artifact PR link is one "that
urlsplitparses". The code at this head uses the PR monitor'sparse_github_pull_request_target. That parser uses urlparse, acceptswww.github.com, and requires exactly/owner/repo/pull/Nwith no suffix. Please name that parser. The 08:17Z comment also describes the earlier implementation rather than this one. - "Stacked on #28869 (its first commit here)" is stale: #28869 has merged, and the PR is one commit.
Checked and fine:
- No model call. The recap reads the work item and the session's
timeline/approvals/toolsfolds only, and never importschat_summary. It polls every 10 s only while the tab is open. - No cross-mate leak. The route has the owner gate and refuses app callers, requires a known root, and returns 404 for a session outside that root's stamped tree or closed lineage. The client filters on the server's
mate_rootstamp. - Redaction runs before cutting, and the status/reason/state values are store-validated enums.
- The regex point from the earlier review is addressed at this head. The new code has no regex and reuses the existing PR and source-link parsers.
- i18n: 24 keys present in all 12 catalogs plus the pseudolocale, with
{{name}}kept. File sizes are well under the cap.
Evidence. Backend: 103 tests passed across the three touched files. Frontend: 227 tests passed in three of the four touched files. MembersPageProfile.drivingTitle.test.tsx was not run locally because of a local dependency gap; it is green in CI. I ran three mutations one at a time, and each reddened a named test:
- Removing the tree check reddened
test_a_session_outside_the_tree_and_a_non_root_are_refused. - Removing the redactor reddened
test_text_is_redacted_before_it_is_cutandtest_report_text_is_redacted. - Removing the peer skip reddened
test_a_peer_crews_item_never_stands_for_a_local_session.
The UI points below are from source reading only:
Follow-ups, not blocking:
replyhas no status label, so a reply report shows no status line.- An untitled session's recap prints its short key ("chat-3") as an extra heading, because the server and client fallbacks differ.
- The recap returns
artifactsand approval tool names that the UI never renders. _crew_itemduplicates the_crew_ledger_itemswalk.- "N · … to answer it" reads oddly when N > 1.
Review state: the earlier CHANGES_REQUESTED review is still open, and its reviewer should re-check this head. That review also says the click-shows-recap question is still open, while the RFC on main records it as decided. The owner should confirm which one stands. Sensitive Change Review is red waiting for its template on this head.
Sensitive change review
|
Problem / Motivation
Goal: A crewmate's Sessions tab shows every session the mate dispatched, grouped by what each needs, and a click shows that session's recap in place without leaving the page.
Today the mate Profile card's Sessions tab lists only the mate's live direct children, one status dot each. Closed sessions and grandchildren are missing, and a click leaves the page for the chat.
Why it matters
This is migration step 4 of the crewmate workers RFC (#26643), with the click behavior the owner chose in #27837. The person can see what a mate's sessions are doing from the mate's own page.
Not a goal
What changed (motivation → approach → change)
Goal → reuse the Crew panel's list and groups, rooted at the mate thread (#28869 makes the routes answer a mate), and add one records-only recap read → this change:
pages/members/MateSessionsList.tsx): the open sessions the store stampsmate_rootfor the mate, merged with the mate'sGET .../crew-workersanswer, which adds closed sessions and the ledger line. A session adopted or released away keeps its birthcreated_byand is not listed. Rows sit in the Crew panel's groups; "Waiting on the main chat" reads "Waiting on ", and Done is folded. A 404 from an older gateway is no data, not an error; a 404 that names the mate as no root yet (its thread still restoring) keeps polling. The mate side panel's session filter addsmate_root(MembersPageSidePanel.tsx), and the profile card swaps its flat list for the new component (MembersPageProfile.tsx).aria-expanded), and a second click folds it. No navigation, no side panel, no drawer. Open approvals and questions say to open that session from the sidebar to answer them (this PR hides nothing from the sidebar).GET .../crew-workers/{worker}/recap,dashboard/handlers/crew_worker_recap.py): exactly the lines the docs(rfc): ask where a crewmate's sessions live, mate home folder or lineage stamps #27837 table lists, read from the work item and the session's own crew-log folds (timeline,approvals,tools). It never reads the model-written intent summary. It uses the Crew panel's gate and tree check, so it is owner only and refuses a session outside the named root's tree. Text goes through the board's redactor. A PR link is a GitHub pull-request artifact, orpron the acceptance'sowner/namerepo, and its label is the number in that link. A closed session's folds come from its newest saved unit. The route is a registered redaction sink (src/kiro_crew/security_posture_sinks_gateway.py).crew_workers._ledger_work_itemsis split out of_ledger_itemsso both read one board seam.pages.membersPagekeys in all 12 catalogs plus the pseudolocale;driving_idle, now unused, is removed.api.crewWorkerRecap(website/src/api/client/chat.ts), theCrewWorkerRecaptype and the slot'smate_rootfield (website/src/types/index.chat.ts,website/src/types/index.ts).website/src/test/ApiClient.refactor.surface.test.ts) and route-table goldens updated.src/kiro_crew/crew_mode.pychanges only in feat(crew-mode): the Crew panel routes answer a crewmate thread as a root #28869's commit.No preview flag: the RFC gates only the hiding step, so this tab is additive.
Backwards compatibility
Compatible: the tab still lists every live session the mate created, plus more; one new GET route; a Crew Mode root's routes are unchanged.
Reader: website/src/pages/members/MembersPageProfile.tsx:sessionsBody -- crew page -- the row click no longer opens the session; it expands a recap instead (owner decision in #27837);
MembersPageProfile.drivingTitle.test.tsx"expands the clicked row in place and never opens the session"Reader: website/src/i18n/locales/en.json:pages.membersPage.driving_idle -- crew page -- its one reader was the removed flat list; no other source names it (git grep)
Tests
Backend,
test/test_crew_worker_recap.py:chat_summarycallable is patched to raise, and the module never names it;ask_questioncalls under any prefix; a closed session reads its newest saved unit.Frontend:
MateSessionsList.test.tsx: Crew panel groups with "Waiting on Ada" and Done folded; stamped store rows show without the route, and an adopted-away row does not; empty state, also with no root; anot_crew_mode_root404 keeps polling; a click (the row says Details) expands in place, the URL and history are unchanged, and neither summary API is called; the recap renders exactly the RFC lines with where to answer, "No report yet" when empty, approvals with no report, and a PR label that matches its link.MembersPageProfile.drivingTitle.test.tsx: untitled rows read "Untitled session"; a click expands and neither opens the session nor navigates.lib/crewWorkers.test.ts:liveMateWorkerstakes stamped and direct rows, never the mate or a peer's row.Proof: not provable -- other: new feature, not a fix; no production hunk to revert against a failing test.
Manual verification
The component was rendered in a browser against mocked API answers and clicked through: expand, fold, a second row, light and dark (screenshots below). Not run against a live gateway.
Screenshots / video
Mate Sessions tab with a row expanded in place. Each row says Details, and an open approval says where to answer it (light):
A full recap with a PR link (dark), and a session with no report (light):
More: collapsed list and the other theme of each
Shot from the real
MateSessionsListcomponent with mocked API answers, in a local harness (pods are not available on this host).Related Issues
Part of #28920
Stacked on #28869 (step 3, its first commit here); this PR's own change is the second commit.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.