Skip to content

feat(glass-office): Models & Providers as the second parity-proven Basement room - #110

Merged
EmergentKnowledgeGroup merged 4 commits into
mainfrom
codex/glass-office-p5-models
Jul 24, 2026
Merged

feat(glass-office): Models & Providers as the second parity-proven Basement room#110
EmergentKnowledgeGroup merged 4 commits into
mainfrom
codex/glass-office-p5-models

Conversation

@EmergentKnowledgeGroup

@EmergentKnowledgeGroup EmergentKnowledgeGroup commented Jul 24, 2026

Copy link
Copy Markdown
Owner

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.

  • New ModelsProvidersSection (src/features/team/): reads listProviderCapabilities, per-provider listProviderModels (reusing its already-supported refresh flag for retry/refresh), Mission Control's authProfiles (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:
    • Per-provider scoped async state. Each provider card owns its discovery status; one failing provider shows its own error + Retry while the rest stay live.
    • Provider-union cards. The card set is the union of capability-described ∪ profile-configured ∪ agent-assigned providers, so a capability-catalog failure degrades to "capability facts unavailable" chips instead of hiding configured or assigned providers.
    • Missing ≠ healthy. max_context_tokens: null renders "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.
    • A read, not a console. No second store, no mutation path, no credentials, no duplicate setup workflow; per-agent profile ordering stays on its existing surfaces.
  • The seam mirrors the Connectors pattern: TeamPage gains typed activeRoomId/authProfiles props (threaded from the existing AppContent wires — App.tsx untouched 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.
  • Register the hidden-by-default models shortcut block; the fail-closed pin fixture moves to the still-blockless reef room (the Window rooms are not on the P5 rehoming list, so it should stay durable).
  • Tests: TeamPage Basement-seam suite (landings, retention across unrelated rerenders, reland only on real room change, pin gating) and Models-surface suite (honest fact presentation, provider-scoped discovery failure with a Retry driven through the real refresh: true seam, capability failure that keeps assigned/configured providers visible). All six existing Dex-hardened Staff parity tests unchanged except the two new required props.
  • e2e p5-models-slice.spec.ts at the feat(glass-office): Connectors as the first parity-proven Basement room #109-hardened bar: requestfailed capture, 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 via PLAYWRIGHT_BROWSERS_PATH=Z:\carsinos-codex-work\playwright-browsers):

  • npm run typecheck — PASS
  • npm 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 PASS
  • python3 scripts/validate_execass_contract.py — PASS; contracts untouched
  • git diff --check — PASS (AppContent.tsx is +2 lines, byte-patched against its mixed-EOL history)
  • Desktop/390 screenshots visually inspected under 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

  • New Features
    • Added a “Models & Providers” room surface showing provider capabilities, auth profiles, discovered models, and assigned agents, including a global refresh.
    • Added a hidden-by-default Office pin shortcut for the Models room and corresponding pinning UI notes.
  • Bug Fixes
    • Improved stable room landing and tab persistence between Staff and Models, including correct basement hide/restore behavior and honest unavailable states.
    • Refined pin controls so rooms that can’t be pinned don’t expose pin buttons.
  • Tests
    • Expanded end-to-end and component test coverage for room switching, pin workflows, persistence, and responsive layout.
  • Documentation
    • Updated the Glass Office Basement/P5 plan guidance.
  • Style
    • Added dedicated styling for the Models & Providers grid/cards.

EmergentKnowledgeGroup and others added 2 commits July 24, 2026 06:21
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>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9a2dcf0e-b3f9-47cb-b143-a6edd54c122e

📥 Commits

Reviewing files that changed from the base of the PR and between 20a8118 and 8867511.

📒 Files selected for processing (1)
  • apps/mission-control/e2e/p5-models-slice.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/mission-control/e2e/p5-models-slice.spec.ts

📝 Walkthrough

Walkthrough

Adds 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.

Changes

Models & Providers room

Layer / File(s) Summary
Stable room routing and landing behavior
apps/mission-control/src/app/AppContent.tsx, apps/mission-control/src/features/team/TeamPage.tsx, apps/mission-control/src/features/team/TeamPage.test.tsx
TeamPage receives activeRoomId and authProfiles, maps room identities to landing sections, preserves internal tab selection across rerenders, and adds the Models & Providers tab.
Provider capability and model surface
apps/mission-control/src/features/team/ModelsProvidersSection.tsx, apps/mission-control/src/features/team/TeamPage.test.tsx, apps/mission-control/src/styles.css
The new surface loads capabilities and per-provider models, displays profiles and agent assignments, scopes failures and retries per provider, and adds responsive provider-card styling.
Models Office shortcut and pin persistence
apps/mission-control/src/features/execassOffice/officeBlocks.ts, apps/mission-control/src/features/execassOffice/pinToOffice.test.ts, apps/mission-control/src/features/execassOffice/PinRoomToOffice.test.tsx
Registers a hidden-by-default models room shortcut and verifies successful models pinning while keeping unsupported rooms non-actionable.
End-to-end parity and implementation records
apps/mission-control/e2e/p5-models-slice.spec.ts, docs/plans/2026-07-23-glass-office-claude-resume.md
Validates room identity, pin refusal and success, live configuration, reload persistence, basement availability, mobile layout, and browser error handling; updates the implementation plan and QA notes.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and validation well, but it omits the template's Scope, Security, Checkpoint SOP, and Visual evidence sections. Add the missing template sections: Scope, Security, Checkpoint SOP, and a dedicated Visual evidence section with screenshots or notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding the Models & Providers Basement room as a parity-proven slice.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/glass-office-p5-models

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between a6fc73b and 21fdbcd.

📒 Files selected for processing (10)
  • apps/mission-control/e2e/p5-models-slice.spec.ts
  • apps/mission-control/src/app/AppContent.tsx
  • apps/mission-control/src/features/execassOffice/PinRoomToOffice.test.tsx
  • apps/mission-control/src/features/execassOffice/officeBlocks.ts
  • apps/mission-control/src/features/execassOffice/pinToOffice.test.ts
  • apps/mission-control/src/features/team/ModelsProvidersSection.tsx
  • apps/mission-control/src/features/team/TeamPage.test.tsx
  • apps/mission-control/src/features/team/TeamPage.tsx
  • apps/mission-control/src/styles.css
  • docs/plans/2026-07-23-glass-office-claude-resume.md

Comment thread apps/mission-control/src/features/team/ModelsProvidersSection.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 21fdbcd and 20a8118.

📒 Files selected for processing (4)
  • apps/mission-control/e2e/p5-models-slice.spec.ts
  • apps/mission-control/src/features/team/ModelsProvidersSection.tsx
  • apps/mission-control/src/features/team/TeamPage.test.tsx
  • apps/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

Comment thread apps/mission-control/src/features/team/TeamPage.test.tsx
@EmergentKnowledgeGroup
EmergentKnowledgeGroup merged commit e455173 into main Jul 24, 2026
5 checks passed
@EmergentKnowledgeGroup
EmergentKnowledgeGroup deleted the codex/glass-office-p5-models branch July 24, 2026 22:10
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.

1 participant