Fleet Studio #1525 (B1, read-only): peer sessions appear in the titlebar dropdown - #1536
Merged
jeonghun-jj-lee merged 1 commit intoSep 24, 2026
Conversation
…ebar dropdown The titlebar Sessions dropdown (SessionChatsDropdown) built its list purely from local project stores + the local archived list — it never fetched /amicode/fleet/sessions and never read amicode_owner, so a peer's session could not appear there by construction. (The machine-filter helpers existed only in session-chats-dropdown.test.ts, wired to nothing.) B1 is the READ-ONLY half of #1525: peer sessions APPEAR in the dropdown, badged with the owner machine name, searchable, de-duped against local. Owner-routed open + remote control (prompt/archive/delete + the evaluateRemoteWriteGate confirm) are B2 and deliberately absent. - New pure module session-fleet-peers.ts: peerSessionsFromProjection (tolerant — 404/error/malformed → [], keeps only is_local:false entries), mergePeerSessions (dedupe, local wins, sort by last activity), deriveSessionBadge, isRemotePeerSession. Unit-tested (9 cases, bun:test). - SessionChatsDropdown: fetch /amicode/fleet/sessions while the flyout is open (tolerant createResource), merge peers into the active list, render the owner badge (monitor icon, matching the provenance header), and: * guard openSession — a remote row does NOT do a broken local navigate; it surfaces "lives on <machine>" (owner-routed open is B2). * hide the local archive action on remote rows (B2). Degrades cleanly: no projection route (404) / no fleet → the dropdown is the local list exactly as before. Depends functionally on #1524 (the route must mount to have data), but is safe to merge independently. Gates: session-component unit tests 62/62; new module 9/9; overlay typecheck clean across all 7 packages (app/ui/session-ui/core/schema/sdk/llm). The 12 full-app-suite failures are pre-existing happydom-environment flakes in unrelated modules (observe-element-offset, prompt-input editor, session relay routes, icon theme bridge, postAmicode bridge) — none import this subtree. AC1/AC2/AC3 (appear/degrade/search) covered; AC4 (owner-routed open) + AC5 (control + confirm gate) + AC6 (retire the orphaned test helpers) are B2.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
jeonghun-jj-lee
marked this pull request as ready for review
September 24, 2026 13:31
jeonghun-jj-lee
deleted the
opencode/fleet-studio-1525-b1-dropdown-merge
branch
September 24, 2026 13:32
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1525 (B1 — read-only half). Base:
feature/free-tier-fleet. Depends functionally on #1524 (PR #1535).What & why
The titlebar Sessions dropdown never showed peer sessions because
SessionChatsDropdown(session-header.tsx) builds its list purely from local project stores + the local archived list — it never fetched/amicode/fleet/sessionsand never readamicode_owner. (The machine-filter helpers lived only insession-chats-dropdown.test.ts, wired to nothing.)B1 makes peer sessions appear — badged, searchable, de-duped — with no destructive control. Owner-routed open and remote prompt/archive/delete (+ the
evaluateRemoteWriteGateconfirm) are B2, left in #1525 for design sign-off.Change
session-fleet-peers.ts(unit-tested, 9 cases):peerSessionsFromProjection— tolerant reader (404/error/malformed →[]), keeps onlyis_local:falseentries, coerces to the SDKSessionshape + owner overlay.mergePeerSessions— dedupe by id (local wins), sort by last activity.deriveSessionBadge/isRemotePeerSession.SessionChatsDropdown: fetch/amicode/fleet/sessionswhile the flyout is open (tolerantcreateResource), merge peers into the active list, render the owner badge (monitoricon, matching the provenance header), andopenSession— a remote row does not do a broken local navigate; it surfaces "lives on<machine>".Safety / degradation
Gates
session-header.tsximports the changed subtree.ACs (of #1525)