feat(glass-office): Models & Providers as the second parity-proven Basement room - #110
Conversation
Build the Basement Models & Providers room as a bounded first-class presentation over existing authoritative facts, plus the typed room seam so the two rooms sharing the team route stay honest: Trenches Staff Directory lands on Agents and Basement Models & Providers lands on the new Models surface. - New ModelsProvidersSection reads provider capabilities (listProviderCapabilities), per-provider model discovery (listProviderModels, reusing its supported refresh flag), read-only configured auth profiles from Mission Control state, and current persistent-agent assignments. Every async state is scoped per provider, so one discovery failure never masquerades as a global empty catalog; the card union covers assigned and configured providers so a capability failure hides nothing; missing facts render as unavailable or unknown — never as healthy. No second store, no mutation path, no credentials or secret material, and no financial machinery: technical quota facts do not exist in the contract, so they are omitted entirely. Per-agent profile ordering stays on its existing surfaces; this room is a read. - TeamPage gains the typed activeRoomId/authProfiles seam: a render-time adjustment keyed to an actual room-id change forces the landing section, internal section clicks never move the lamp, unrelated rerenders never reset the selection, and the Models room swaps the Staff header for its own. Each room offers only its own registry-backed pin — no cross-room pin label. - Register the hidden-by-default models room-shortcut block; the fail-closed no-block pin fixture moves to the still-blockless reef room. - TeamPage suites gain Basement seam tests plus Models surface tests: honest capability/profile/model/assignment facts, a provider-scoped discovery failure with a retry driven through the real refresh seam, and an explicit capability-failure state that keeps assigned and configured providers visible. - New p5-models-slice e2e at the hardened bar: pageerror, console, response>=400, and requestfailed capture; exact one-lamp identity for both team-route rooms; landing surfaces via lamps and via the Office shortcut; byte-for-byte config immutability on full-canvas refusal and byte-identical repeat pin; live mounted-Office hide/show sync; exact post-reload destination; floor disabled/restored door truth without a clearing click; MP and SD mark visibility with viewport rect geometry; per-tab inner-rect containment inside the section tab container; and no horizontal overflow at 390px. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a Models & Providers room to TeamPage with provider discovery, stable room routing, Office pinning, persisted configuration behavior, responsive coverage, and updated tests and implementation documentation. ChangesModels & Providers room
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/mission-control/src/features/team/ModelsProvidersSection.tsx`:
- Around line 118-126: Update the provider union construction in the providers
useMemo to add the trimmed agent.model_provider value rather than the raw
string. Keep the existing trim guard and ensure the key matches the trimmed
values used by agentsByProvider, profilesByProvider, and capabilityByProvider.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b2458f20-b358-4463-9503-663a36100783
📒 Files selected for processing (10)
apps/mission-control/e2e/p5-models-slice.spec.tsapps/mission-control/src/app/AppContent.tsxapps/mission-control/src/features/execassOffice/PinRoomToOffice.test.tsxapps/mission-control/src/features/execassOffice/officeBlocks.tsapps/mission-control/src/features/execassOffice/pinToOffice.test.tsapps/mission-control/src/features/team/ModelsProvidersSection.tsxapps/mission-control/src/features/team/TeamPage.test.tsxapps/mission-control/src/features/team/TeamPage.tsxapps/mission-control/src/styles.cssdocs/plans/2026-07-23-glass-office-claude-resume.md
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/mission-control/src/features/team/TeamPage.test.tsx`:
- Around line 647-689: Update the staleRequest resolver setup in the test to use
a definite-assignment, non-null resolver handle instead of a nullable variable.
Replace the optional invocation in the resolveStale block with a direct call
while preserving the existing stale response payload and request timing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 03ceeb77-49fd-493d-9730-3988d8d8259b
📒 Files selected for processing (4)
apps/mission-control/e2e/p5-models-slice.spec.tsapps/mission-control/src/features/team/ModelsProvidersSection.tsxapps/mission-control/src/features/team/TeamPage.test.tsxapps/mission-control/src/styles.css
🚧 Files skipped from review as they are similar to previous changes (3)
- apps/mission-control/src/styles.css
- apps/mission-control/src/features/team/ModelsProvidersSection.tsx
- apps/mission-control/e2e/p5-models-slice.spec.ts
Summary
The second P5 slice, and the first that is a build rather than a rehome: there was no Models tab to relabel, so the Basement Models & Providers room gets a bounded first-class presentation over existing authoritative facts, together with the typed room seam for the second shared route — Trenches · Staff Directory lands on Agents, Basement · Models & Providers lands on the new Models surface, and neither room ever misrepresents the other.
ModelsProvidersSection(src/features/team/): readslistProviderCapabilities, per-providerlistProviderModels(reusing its already-supportedrefreshflag for retry/refresh), Mission Control'sauthProfiles(read-only: identity, enabled, auth mode, risk level, kill-switch scope, base URL — no secret material), and current persistent-agent assignments. Design decisions worth reviewing:max_context_tokens: nullrenders "Context window: unknown"; no profiles renders an explicit empty line; capability failure renders an explicit error notice. Technical quota facts don't exist in the contract, so nothing budget-shaped exists in this room — no money, spend, pricing, or billing anywhere.TeamPagegains typedactiveRoomId/authProfilesprops (threaded from the existingAppContentwires —App.tsxuntouched this time), a render-time adjustment keyed to an actual room-id change, a new always-visible "Models & Providers" section tab, a Models-flavored header replacing "Meet Your Agents" under the models identity, and room-gated pins so no cross-room pin label ever renders.modelsshortcut block; the fail-closed pin fixture moves to the still-blocklessreefroom (the Window rooms are not on the P5 rehoming list, so it should stay durable).refresh: trueseam, capability failure that keeps assigned/configured providers visible). All six existing Dex-hardened Staff parity tests unchanged except the two new required props.p5-models-slice.spec.tsat the feat(glass-office): Connectors as the first parity-proven Basement room #109-hardened bar:requestfailedcapture, exact one-lamp identity for both rooms, landings via lamps and via the Office shortcut, byte-for-byte config immutability on refusal and byte-identical repeat pin, live mounted-Office sync, exact post-reload destination, floor disabled/restored door truth without a clearing click, MP + SD mark viewport-rect geometry, per-tab inner-rect containment inside the section-tab container (the feat(glass-office): Connectors as the first parity-proven Basement room #109 lesson, asserted from day one), and no horizontal overflow at 390px.Validation
From
apps/mission-control/(Playwright viaPLAYWRIGHT_BROWSERS_PATH=Z:\carsinos-codex-work\playwright-browsers):npm run typecheck— PASSnpm run lint— PASS (the set-state-in-effect rule shaped the section's data flow: loading states are initial/default state, synchronous marks live only in event handlers)npm run test:unit -- --run— 457/457 PASS (TeamPage seam 2/2, Models surface 3/3, all Dex-hardened Staff anchors green)npm run build— PASS (pre-existing chunk-size warning only)npx playwright test e2e/p5-models-slice.spec.ts e2e/p4-staff-slice.spec.ts e2e/p5-connectors-slice.spec.ts— PASS (Staff and corrected Connectors anchors re-proven on this head, unweakened)npm run test:e2e:core— 38/38 PASSpython3 scripts/validate_execass_contract.py— PASS; contracts untouchedgit diff --check— PASS (AppContent.tsxis +2 lines, byte-patched against its mixed-EOL history)runtime/qa/p5-models-slice/— six of them, counted: full-canvas refusal, pinned desktop with the Models surface, Office shortcut naming The Basement, disabled door beside the live Staff door, restored door with no stale label, and 390px with MP active, SD visible, wrapped tabs contained, and no overflow🤖 Generated with Claude Code
Summary by CodeRabbit