Skip to content

feat(sidebar): show a crew's own folders inside its crew group - #18766

Merged
iamwhatever merged 1 commit into
mainfrom
feat/crew-group-spaces
Oct 10, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/crew-group-spaces

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A crew group in the Sessions sidebar shows the crew's own folders (spaces), so it reads machine -> space -> chat.

Today a crew group is one flat list of the crew's chats. The crew files those chats into folders on its own sidebar, but none of that reaches the hub. A real test reported it as "chat session lacks space": with many chats on a crew you cannot tell which project each one belongs to.

Why it matters

Folders are how people sort chats. A crew group without them loses that sorting the moment a chat lives on another machine, and the list gets harder to scan as the crew's chat count grows.

Not a goal

  • Editing the crew's folders from the hub. Create, rename, move and drag stay on the crew; this is a read-only mirror.
  • Filing a crew's chats into LOCAL folders, or local chats into crew folders.
  • Mirroring the crew's folder sort mode, colours, icons or hidden flags.
  • Older (closed) crew sessions (RFC wave 5).

What changed (motivation → approach → change)

The crew already knows where each chat is filed; the hub just dropped it. The chat-slots route forwards each crew row through a strict allowlist, and folder_id was not on it.

Part Change
handlers_instances.py chat-slots allowlist admits folder_id, clamped and redacted like key
folder names read from the crew's api/chat/folders through the existing owner-only, redacting proxy (the api/chat row already admits it), once a minute per connected crew
useInstanceSessions.ts carries the row's folder as peer_folder_id (never folder_id, which names a LOCAL folder) and returns each crew's checked folder list
CrewGroups.tsx nests the group's rows under the crew's folders, in the crew's stored order, unfiled chats last; a folder with no chat below it is left out
folder look a crew folder draws with a local folder's header, glyph and connector body, so the recorded folder geometry holds; no menu, no drag
bad folder data a repeated id keeps its first row; the tree is built by the sidebar's own orderFoldersWithPaths walk, which puts cycle members at the top and stops at 20 levels, so the tree always ends and every chat shows
collapse per (crew, folder), kept in this browser; reveal opens every folder above the target row

A crew whose folder read fails lists its chats flat, as today, under an ErrorNotice that says so (one new string, crew_spaces_unavailable, in every website/src/i18n/locales catalog). An older crew that sends no folder_id shows the same flat list as today. No new proxy prefix and no new route.

This is design section 1 of rfc-remote-crew-sidebar (status partial): "Folders, pins and the conductor lane apply within a group."

Backwards compatibility

Compatible: one more optional field on the chat-slots reply; a hub or crew on an older build simply lists the crew's chats flat, as today.

Removes nothing: the change only adds a field and a nested rendering; every row the group showed before is still shown, with the same count.

Tests

  • test_remote_crew_peer_slots.py: the allowlist whole-dict tests now carry folder_id, so dropping it from the allowlist fails.
  • crewSpaces.test.ts: the tree keeps only folders with a chat below, sorts like the sidebar (stored order, then name, never the browser locale), files unknown-folder rows as unfiled, places a parent cycle at the top, and stops a 20,000-deep chain at 20 levels with its chat kept; crewSpaceChain names every ancestor; peerFoldersOf drops malformed and repeated crew folders.
  • ChatSidebar.machineGroups.test.tsx: chats nest under the crew's folders with unfiled last and the group count unchanged; one folder collapses on its own and is remembered; a failed folder read falls back to the flat list and shows the failure notice. Each wait on the instances -> slots/folders chain has an explicit bound.
  • ChatSidebar.ownerComposition.test.ts pins the one new owner hook, useCollapsedCrewSpaces.

Manual verification

Ran website/scripts/capture-crew-group-spaces.mjs against the dev server: the real ChatSidebar over a stubbed crew. Its five behaviour checks pass and it took the shots below. Measured on that render: each crew folder's glyph starts on its connector line's x, and its name lands on its chats' text column.

Screenshots / video

The sidebar at its stored 520px width. A local space (Planning) sits above the crew group astro, so the two can be compared.

Before (what main sends: no folder on the rows), the crew's six chats are one flat list:

before: flat crew group

After, the same chats sit under the crew's own spaces Docs (with API guides inside it) and Customer Support. The headers, counts and connector lines match the local Planning space. The unfiled chat comes last, and the empty Archive is left out:

after: crew spaces nested in the group

Customer Support collapsed on its own (pointer off the row):

one space collapsed

When the crew's folder read fails (here a 502), the chats still list flat, under a notice in the crew group:

folder read failed

Related Issues

Closes #18745

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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 10, 2026 07:27
@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

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4804c90287ea61d88e565a47c5308a410d71919e — 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: PASS

Check one cost: every connected crew now gets an api/chat/folders read once a minute, and per the diff's own comment that read "walks its archived sessions on disk".

What this change ships

Inventory (8 items) — 8 justified

Intent: when chats live on another machine, a person can still see which of that crew's folders each chat belongs to (#18745, RFC rfc-remote-crew-sidebar §1, partial on base, a shape main has not moved away from). This is an ADDITION.

  1. Inside a crew group, chats now sit under the crew's own folders, with unfiled chats last — justified
  2. The hub now passes each crew chat's folder id through the chat-slots allowlist — justified
  3. Every connected crew's folder list is now fetched in the background once a minute — justified
  4. A notice now appears in the crew group when the folder read fails, and the chats list flat — justified
  5. Each crew folder now collapses on its own, and this browser remembers it under a new localStorage key — justified
  6. Revealing a chat now opens every crew folder above it — justified
  7. Crew folders with no chat below them are left out, and each folder header shows a count — justified
  8. A capture page and script for manual screenshots are committed, following the existing website/capture/ pattern — justified

[FIRST-PRINCIPLES-REVIEWED] 4804c90

Description read

[DESCRIPTION-READ] f0816680f1a6d0faa73d54c4c1d9e2e606f65bf6c6d1049716c03231411dc50b

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

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Check one thing before merge: does each hub's 60-second api/chat/folders poll put noticeable disk load on a crew with many archived sessions? The PR says that route walks archived sessions on disk.

[DESIGN-REVIEWED] 4804c90

Description read

[DESCRIPTION-READ] 9c7c5f1a87b1ee7fdcc4640896889f3fb29316351b3ff9a52ca2f98757f18e96

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

UX Review (Opus 5.5) — 🟡 CONCERNS

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

UX-Verdict: CONCERNS

The folder-failure notice shows raw proxy text and an "Ask the agent" action the blind reader didn't understand, next to a green "Online" badge.

Watch

  • The failure notice reads as a contradiction. The notice passes message={group.foldersError}, which is the crew's raw error string, and it sits under the green "Online" badge. The blind reader quoted "…listed without them. the crew did not answer", said "I do not know what 'the crew' is", and called "Online" next to "did not answer" "confusing". This only appears when a crew is degraded, but it shows on every refresh until the crew recovers. Fix: drop the raw message (or map it to a full sentence in the user's words). The title already says what happened and what the sidebar did about it.
  • "Ask the agent" puts a vague action on a failure that fixes itself. The blind reader said "I do not know what it would send or start… feels risky" and gave only a "maybe" on whether they'd click it. The folders retry every 60s on their own, so the user can't do anything useful here. Fix: remove askAgent and add a clause to the title saying the sidebar will try again.
  • Open and closed folders are hard to tell apart. The blind reader said they "would not have noticed the closed state" and that the glyph "reads like 'done' or 'selected'". FolderGlyph is the same one local folders use, so this isn't new to this PR. Crew folders now make the problem more common. Worth a follow-up, not a fix in this PR.

Evidence gaps

  • No recording of a crew folder collapsing or expanding. Only stills are supplied (shot-02 and shot-03). The motion comes from the existing FolderBody, so I'm not counting this as a blocker. Attaching a short recording of the toggle would close this gap.

[UX-REVIEWED] 4804c90

Description read

[DESCRIPTION-READ] 0227ece20dcb1e934c442a507f2d478f537b69948fb6c208b33698427e631abb

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

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 4804c90

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

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4804c90287ea61d88e565a47c5308a410d71919e: <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 4804c90287ea61d88e565a47c5308a410d71919e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4804c90

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4804c90287ea61d88e565a47c5308a410d71919e: <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
@iamwhatever
iamwhatever force-pushed the feat/crew-group-spaces branch from 89fa8a3 to c52a97f Compare October 10, 2026 09:37
@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 10, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Deep peer folder chains crash the chat page / Crew folders violate the recorded sidebar alignment span=a1dad843e277

Outcome: fixed.
Fixed in c52a97f. crewSpaces places folders with a non-recursive queue and stops nesting at MAX_SPACE_DEPTH (6); deeper folders sit at the last level, so render recursion is bounded and every chat still shows (crewSpaces.test.ts: a 20,000-deep chain).
The space header now uses the local folder header geometry (px-3.5, 14px FolderGlyph, gap-[5px]) and the body is ChatSidebar's own FolderBody + FOLDER_BODY_CLS, passed in as spaces.body.
Measured on the capture render: glyph x equals its connector line x (25, nested 44) and the name equals its chats' text x (44).

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Chained-query waits omit required explicit bounds span=25620cf9df92

Outcome: fixed.
Fixed in c52a97f. Every new findBy*/waitFor in the spaces block takes CHAIN_WAIT = { timeout: 5_000 }, with a comment naming the instances -> slots/folders chain.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • sibling tie-break used the browser locale span=5184f56a0445

Outcome: fixed.
Fixed in c52a97f. Siblings sort with bySidebarOrder (stored order, then a code-unit name compare), the comparator the local sidebar uses; pinned in crewSpaces.test.ts.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The list rearranges itself after it appears span=bb8fbe05c961

Outcome: rebutted.
Rebutted as disproportional. The slots and folders reads start together at mount and are cached per crew, so the move happens once, on the first answer, not on each refetch.
Holding the rows until the folder read answers would hide every chat behind the slower read, and a failed folder read must not hide chats (the flat-fallback test pins that).

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Nesting costs title width span=5ad55b36e412

Outcome: rebutted.
Rebutted: the per-level indent is the recorded decision docs/decisions/2026-10-09-folder-glyph-sits-on-its-connector-line.md ("Width for session titles is never bought by moving the glyph"), the same 19px a local folder costs. Nesting stops at 6 levels.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • No recording of a crew folder opening or closing span=20a59c0d36ee

Outcome: rebutted.
Rebutted: the open/close motion is the shared FolderBody that local folders use, with no crew-specific motion. The capture script checks the collapse (aria-expanded=false) and the shots show both states.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • add a title on crew folder headers span=22ba61b64cc7

Outcome: rebutted.
Rebutted as out of goal: the folder sits under the crew group header that names the machine, and a drop onto it does nothing, as on any crew row. A tooltip is a new string in every locale for a hint the group header already gives.

@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 10, 2026
@iamwhatever
iamwhatever force-pushed the feat/crew-group-spaces branch from c52a97f to affcdfa Compare October 10, 2026 10: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 10, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Flat-to-nested re-layout on load span=606dd60a24b8

Outcome: rebutted.
Rebutted as disproportional. The two reads start together at mount and are cached per crew, so the regroup happens once per page load, on the first folder answer.
Holding the group until the folder read settles would hide every crew chat behind the slower read (the peer walks its archive on disk to answer it), and a failed folder read must keep showing chats; the flat-fallback test pins that.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Titles lose too much at depth span=d238fe985815

Outcome: rebutted.
Rebutted. The truncation in those shots came from the capture window, not the indent: at 620px the sidebar is clamped to its 180px floor. The capture now runs at the sidebar's stored 520px, where both nested titles read in full.
The per-level indent is the recorded decision docs/decisions/2026-10-09-folder-glyph-sits-on-its-connector-line.md, the same 19px a local folder costs; spaces match local spaces by design.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Folder headers were identified only as a guess span=731348dc266b

Outcome: rebutted.
Rebutted as out of goal: the header is the shared local folder look (FolderGlyph, name, count) on purpose, so a crew space reads as a local space does. Changing the shared glyph is a change to every local folder.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • title saying the folders are edited on the crew span=33809f287e7c

Outcome: rebutted.
Rebutted as out of goal: the space sits under the crew group header that names the machine, and a drop or right-click on it does nothing, as on any crew row. A tooltip is a new string in every locale for a hint the group header already gives.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Crew folder-query failures are silently discarded span=a1dad843e277

Outcome: fixed in ebe289a.
A connected crew whose folder read failed with no cached tree now carries the error text (folderFailures -> CrewGroup.foldersError), and the group renders it through ErrorNotice (askAgent on: a list read holds no draft) above its rows, which stay listed flat.
Pinned in ChatSidebar.machineGroups.test.tsx: the failed-read case asserts the notice and its error text.

@iamwhatever
iamwhatever force-pushed the feat/crew-group-spaces branch from ebe289a to 4804c90 Compare October 10, 2026 13:02
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Crew-space controls bypass the required button primitive span=a1dad843e277

Outcome: fixed in 4804c90. The crew space header is Btn, keeping its disclosure attributes and the folder geometry classes (twMerge overrides Btn's pad, size and border).
Measured on the capture render: the header is 32px tall with a 14px left pad and the glyph at 14px, the same as the local Planning folder header.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Open and closed folders look nearly the same / missing failure-state evidence span=a6304dc3ed02

Outcome: fixed. The body attaches folder-read-failed.png: the astro group with the failure notice above its flat chat list at 520px. collapsed-one-space.png is recaptured with the pointer moved off the row.
The open/closed glyph is the shared local FolderGlyph, kept on purpose so crew spaces read as local spaces do.

@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
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • The failure notice reads as a contradiction span=a2842ae0cb6f

Outcome: rebutted.
Rebutted. The badge is the tunnel state and is true: the crew is online and its chats did load; only its folder read failed, which is exactly what the title says. Showing the read's own error text beside it is the ErrorNotice contract (errors-use-error-notice), the same as the group's existing tunnel-error notice.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Ask the agent on a failure that fixes itself span=db35cc755688

Outcome: rebutted.
Rebutted. errors-use-error-notice requires an explicit hand-off decision; a list read holds no draft, so it is on, matching the crew group's existing sessions_from_instance_unavailable notice. A failure that persists past the 60s refetch is one the agent can diagnose.

@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Open and closed folders are hard to tell apart span=c2cf0e6efce5

Outcome: rebutted.
Rebutted as out of goal: the glyph is the shared local FolderGlyph, kept on purpose so crew spaces draw exactly as local spaces do; changing it changes every local folder and belongs in its own change.

@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 10, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: approve. A crew group now nests its chats under that crew's own folders, as a read-only copy of the crew's tree. The data stays scoped per crew, users without the preview see nothing new, and nothing blocking survived verification.

What it brings

With many chats on a crew, the crew group used to be one flat list, so you could not tell which project each chat belonged to. Now the group reads machine → folder → chat. It uses the crew's own folder names and stored order, puts unfiled chats last, and lets each folder collapse on its own. Folders are still edited on the crew. If the crew's folder list cannot be read, the group lists its chats flat as before and says why.

Verified (at 4804c90287ea61d88e565a47c5308a410d71919e)

  • Default users are unchanged. The folder reads are gated by the same enabled && isConnected(inst) as the slot reads (website/src/hooks/useInstanceSessions.ts:466, :481). With the preview off, crewGroupsFor is never called (website/src/pages/chat-sidebar/sessionSources.ts:161), so there are no groups, no folder requests and no new DOM.
  • A crew's folders can never land in a local folder.
    • The crew's folder id travels as peer_folder_id, never as folder_id (useInstanceSessions.ts:421). Local placement, the folder filter and drag never read peer_folder_id.
    • Local slots whose turns run on a crew have no peer_folder_id, so they list as unfiled inside that crew's group.
  • One crew's folders never show under another crew.
    • The folder list is keyed by instance id, and each group gets only its own instance's list (crewGroupsFor).
    • Rows reach a group through crewOf.
    • Collapse state is keyed by JSON.stringify([crew, folder]) (website/src/pages/chat-sidebar/CrewGroups.tsx:69), so two crews that use the same folder id do not share it.
  • No chat disappears.
    • A row whose folder the crew did not list counts as unfiled (CrewGroups.tsx:81).
    • Every folder the tree walk skips (parent cycles, anything deeper than 20 levels) is added back at the top level (website/src/utils/folderTree.ts:298). So every folder that holds a row gets a header, and its rows render.
  • Bad folder data from the crew is handled.
    • peerFoldersOf (useInstanceSessions.ts:249) drops entries without a string id and name, keeps the first of any repeated id, and treats a non-finite order as 0.
    • Folder names render as React text.
  • The new field is allowlisted and redacted. folder_id was added to _PEER_SLOT_STR_FIELDS (src/kiro_crew/dashboard/handlers_instances.py:1973), which passes through _cap_str (redact, then clamp) like key.
  • No new route. The folder list comes from the crew's existing GET /api/chat/folders. That route returns a bare list (chat_folders.py, api_chat_folders), which matches what peerFoldersOf expects. It goes through the existing owner-only api/chat proxy prefix.
  • Folder read failures fail closed.
    • If the read fails with nothing cached, the chats render flat under a notice (CrewGroups.tsx:214).
    • If it fails after an earlier success, the cached tree is kept.
    • A disconnected crew's old error is not reported (useInstanceSessions.ts:456).
  • The recorded folder geometry holds. docs/decisions/2026-10-09-folder-glyph-sits-on-its-connector-line.md sets the folder layout. Crew folder headers use the local header's 14px pad, 14px glyph and gap-[5px], and their bodies reuse FolderBody + FOLDER_BODY_CLS with FOLDER_BODY_OPEN_PADDING. I checked the classes, not pixels on a render.
  • The design it implements. It follows design section 1 of docs/request-for-change/rfc-remote-crew-sidebar.md: folders apply within a group. I found no recorded decision it contradicts.
  • Relationship with #18767 (one switch for Chat on a crew):
    • No textual conflict (git merge-tree --write-tree is clean both ways and against main).
    • On the merged tree, the related vitest files pass (5 files, 77 tests) and tsc is clean.
    • This PR's tests seed the old instance-sessions key, which #18767 keeps reading as on.
    • Suggested order: #18767 first, since it makes crew groups appear at all for Chat on a crew users. Neither PR depends on the other at the code level. Re-run CI on whichever lands second.

Non-blocking follow-ups

  • Spec and user docs don't mention crew folders yet.
    • The peer-session row in docs/feature-map/README.md and the sidebar paragraph in docs/system-specs/modules/history.md describe a crew group without its folders.
    • src/kiro_crew/docs/remote-crew.md still lists "Folders and drag" under what a peer row lacks, with no line saying the crew's own folders now show read-only.
    • A sentence in each would keep them in step.
  • No test pins that a crew row never carries a local folder_id. Adding folder_id next to peer_folder_id on peer rows leaves crewSpaces and ChatSidebar.machineGroups green, so the guarantee holds by construction rather than by test. A test asserting that a peer row filed in a crew folder whose id matches a local folder stays out of that local folder would cover it.
  • Polling cost on the crew. Each open hub tab asks every connected crew for its folders once a minute, and that route counts archived sessions on disk on every call. That is fine at today's scale; if it shows up on a busy crew, a lighter folders-only read would help.

Tests and mutations

  • I ran the targeted tests only:
    • vitest: crewSpaces, ChatSidebar.machineGroups and ChatSidebar.ownerComposition, 31/31 passed.
    • pytest: test_remote_crew_peer_slots.py, 45 passed.
  • Mutations (each restored afterwards, worktree clean):
    • Removing folder_id from the allowlist turns red test_only_the_fields_the_sidebar_reads_are_forwarded and test_every_field_the_sidebar_reads_survives.
    • Removing the repeated-id check in peerFoldersOf turns red keeps only well-formed folders from a peer reply.
    • Filing rows under unknown folder ids turns red files a row whose folder is unknown as unfiled and nests each chat under the crew's own folder, unfiled chats last.
    • Dropping the folder-failure branch turns red lists the chats flat when the crew's folder read fails.
    • Keying collapse state by folder id alone turns red collapses one space on its own and remembers it.
    • Also setting a local folder_id on peer rows turns nothing red (see follow-ups).
  • CI at this head: 89 success, 9 skipped, 0 failure, 0 pending. Auto-merge is off and there are no reviews yet.

Not verified

  • I did not run the full frontend or backend suites; CI covers those.
  • I did not measure pixel alignment on a live render. The capture script is in the PR, but I did not run it.
  • I did not check against a real two-machine setup, or a crew on an older build that sends no folder_id. That case follows the flat path in code.

@iamwhatever
iamwhatever merged commit bf1723d into main Oct 10, 2026
190 of 196 checks passed
@iamwhatever
iamwhatever deleted the feat/crew-group-spaces branch October 10, 2026 19:19
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 10, 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.

Sidebar: show the peer's spaces inside each crew group (machine -> space -> chat)

2 participants