Skip to content

feat(server): scope a shell subscription to one founder inbox - #168

Open
nullStack65 wants to merge 1 commit into
cursor/founder-inbox-tags-2efafrom
feat/clo-1059-server-inbox-scope
Open

nullStack65 wants to merge 1 commit into
cursor/founder-inbox-tags-2efafrom
feat/clo-1059-server-inbox-scope

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

What Changed

A client can now scope the orchestration shell to one founder. The HTTP shell snapshot (GET /api/orchestration/shell?inbox=jeff) and the live shell subscription (subscribeShell({ inbox })) both return only the threads that founder would see in the desktop sidebar: threads they own, needs-human threads addressed to them, and threads they started. Bot work stays hidden.

A thread that moves out of scope is sent as a removal, so a client that already holds it drops it. A removal for a thread the client never received is a no-op.

Clients that pass no inbox are unchanged and still receive every thread. The desktop and web shell snapshot call passes an empty payload, so it stays unscoped.

Why

Founder-inbox filtering lived entirely in the desktop sidebar, so a vanilla mobile client connecting to the server received all 200+ background and agent threads. The visibility rule already existed; this applies it on the server for a session that asks for it.

The scope is a request parameter rather than a property of the pairing token. Auth scopes are capability grants (orchestration:read and the rest) and carry no founder identity, so binding an inbox to the token would need a new scope design. The parameter is the fallback the request allowed.

Depends on the founder-inbox tags pull request (t3code #57), which adds the owner, threadType, and startedBy fields this filters on. Tracked by the server-side inbox scoping issue (CLO-1059).

UI Changes

None.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Provenance

Model: grok/grok-4.7
Task: implementation

🤖 Generated with Claude Code

A vanilla mobile client passes an inbox and receives only that founder's
threads, in the HTTP shell snapshot and on the live shell stream. A thread
that moves out of scope is removed rather than left on screen. Desktop and
web clients pass nothing and still receive every thread.

The scope is a parameter, not a property of the pairing token: auth scopes
are capability grants and carry no founder identity.

Model: grok/grok-4.7
Task: implementation
Agent: CTO standing thread
Co-Authored-By: Claude Code <noreply@anthropic.com>
@nullStack65

Copy link
Copy Markdown
Owner Author

Frozen 2026-11-22 CEO portfolio audit — cash-path priority; can reopen at the Dec 18 runway check.

@nullStack65 nullStack65 reopened this Nov 22, 2026
@nullStack65

Copy link
Copy Markdown
Owner Author

CHECKPOINT

Initial independent bot review of the original code (one full pass; no prior substantive bot review in review/inline/conversation history).

Reviewed head: 669a4f1
Pinned base and merge base: 09002cc (cursor/founder-inbox-tags-2efa).
Scope: shared visibility predicate extraction; HTTP shell query; snapshot, replay and live WS filtering; no-inbox compatibility and out-of-scope removals. Reviewed contracts, callers and existing visibility tests. No blocking code finding. Request inbox is a display filter, not an identity-based authorization boundary, consistent with the PR requirement.

CI remains blocked at this head: run 44999980932, failed Check job 137139168728 (five unused exports outside this diff), Test job 137139168785 (four desktop Electron mock imports), Test Server 3 job 137139168670 (migration026 and deploy-relay-workflow assertions), Release Smoke job 137139168763 (lockfile-only command). No unrelated repair, check weakening, CI cancellation or watch. Focused local validation is still running and will be reported separately.

Publication inspection at pinned base: relay and fork release require manual dispatch; stable release requires tags, nightly uses default branch scheduling; mobile production push is restricted to main; this PR targets cursor/founder-inbox-tags-2efa. No direct publish-on-merge trigger found for this target. No merge while CI is red.

{
  "reviewed_head": "669a4f1737b82beea9a3a3f9cea561b751941d06",
  "reviewer": "codex/gpt-6.1-sol (independent of original author; T3 Ready-PR lane)",
  "findings": []
}

@nullStack65

Copy link
Copy Markdown
Owner Author

RESULT

Task blocked on CI; PR remains open and unmerged. Original and final head are both669a4f1737b82beea9a3a3f9cea561b751941d06; pinned base/merge-base09002cc3469e41aa5f3a0692f2b75c3b60b1d75a. One independent original-code pass complete; canonical review_gate check reads #168 (comment) and reports findings[] / route merge (review gate only, not CI permission). Verified Node24.22.3: vp test run packages/client-runtime/src/state/threadInbox.test.ts apps/server/src/server.test.ts -t "threadVisibleInInbox|inboxOwnerNames|scopes a shell subscription to one founder inbox" =>5 passed,198 intentionally excluded; format all9 changed files pass; focused lint exit0 warnings only; git diff --check pass. CI44999980932 remains terminal red: Check137139168728, Test137139168785, Test Server3 137139168670, Release Smoke137139168763. No pending runs observed at intake. These failures are outside the inbox-scope diff; no unrelated changes, check weakening or rerun requested. No direct publication on merge to the pinned founder-inbox branch found. No merge SHA, no installation/live-client acceptance; parent owns shared-base CI disposition. No code commits/pushes for this PR; no children, CI cancellations, watches or spend.

This branch has not been deployed

No deployments
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.

2 participants