appShellPersist.test.tsxMerge origin/staging into fix/dm-container-kind
Both branches built org-shared MCP connections independently, so the merge
picks ONE mechanism and layers the other work on top of it.
KEPT (staging) `metadata.scope` / `organizationId` + callability.ts as the
single visibility rule for every MCP surface. It resolves
name collisions deterministically, narrows in SQL and
enforces in JS, and it is what the discovery-based OAuth
callback and the credential vault already write.
DROPPED (ours) `metadata.orgShared` and the peer-scan in
visible-connections.ts. That module survives as the
agent-facing ADAPTER over findMcpConnections — `ownedByMe`
and the explicit-grant name set — so nothing re-implements
a cross-tenant WHERE.
KEPT (ours) `toolPolicy` (the per-tool ceiling) and `requiresAgentGrant`
(which of a person's agents reach a connection). Staging has
no equivalent; they are a different axis from scope, and the
types now say so.
Settings loses mcp-integration-card.tsx to staging's Systems and credentials
section, and the tool-permissions checklist is ported onto system-row.tsx so
the ceiling is still editable. The agent's own picker keeps its shape and now
reads staging's KNOWN_MCP_PROVIDERS, resolving a provider id through discovery
at click time instead of from a second hard-coded catalogue. `probeMcpServer`
became discovery, so the pre-save tools/list probe is `probeMcpServerTools`.
Also reconciled outside MCP: the Slack Connect webhook scoping (staging's, which
handles externally shared channels) keeping this branch's stronger workspace
resolver; the agent-archive and subagent-write metadata stamps, chained rather
than chosen between; buildAgentDocs' generic folder model with this branch's
`listed` on top; and the conferencing-aware event popover with the extracted
RSVP hook.
Fixes carried by the merge: coach-meeting and coach-weekly had no folder and
would have landed in Active; a duplicate source_workspace_id column; a duplicate
import; the dead org-admin catalogue bypass.
Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 30, 2026, 4:15 PMcalendarCanvasKeepsChat.test.tsxfeat(calendar): ⇧Q is the calendar page, and escape gets you out of it
The canvas answered ⇧Q with a calendar-shaped panel: the chat column kept
the ROUTE's surface, so /home squeezed its hero into a sidebar beside the
grid, and the overlay laid its own bg-raised sheet under a page that paints
its own. Now the calendar surface follows the GRID, not the URL — the column
beside it holds the calendar rail and widens back into a chat on the first
keystroke — and the canvas mounts the /calendar frame verbatim, with the X
its own toolbar already carries. Escape closes any canvas, standing down
when a dialog or popover on top of it owns the key.
Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 31, 2026, 12:26 AMglobalCanvasEscape.test.tsxfeat(calendar): ⇧Q is the calendar page, and escape gets you out of it
The canvas answered ⇧Q with a calendar-shaped panel: the chat column kept
the ROUTE's surface, so /home squeezed its hero into a sidebar beside the
grid, and the overlay laid its own bg-raised sheet under a page that paints
its own. Now the calendar surface follows the GRID, not the URL — the column
beside it holds the calendar rail and widens back into a chat on the first
keystroke — and the canvas mounts the /calendar frame verbatim, with the X
its own toolbar already carries. Escape closes any canvas, standing down
when a dialog or popover on top of it owns the key.
Co-Authored-By: Claude Opus 5 (1M context) <<email>>Aug 31, 2026, 12:26 AMpersistentShell.test.tsxrefactor: persistent root shell (design: url-driven-layout phase 1)
Hoist AppShell to the root layout via a new PersistentShell gate so the
1188-line, 45-hook chat mounts once instead of remounting on every top-level
route switch. shellRoutes.ts (isShellRoute/SHELL_ROUTE_SEGMENTS, derived from
routes.ts) lets full-width routes (settings, developer, agenda, …) opt out.
Stripped the <AppShell> wrapper from all 13 per-route layouts.
Tests: persistentShell.test.tsx (mount-counter persistence) + shellRoutes.test.ts
(pure truth table) — 38 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <<email>>Jul 13, 2026, 12:24 PM