Skip to content

[codex] Add Claude provider support and isolate chat sessions#85

Merged
jamesrochabrun merged 7 commits into
mainfrom
claude-support
Jun 19, 2026
Merged

[codex] Add Claude provider support and isolate chat sessions#85
jamesrochabrun merged 7 commits into
mainfrom
claude-support

Conversation

@jamesrochabrun

Copy link
Copy Markdown
Owner

Summary

This PR makes the embedded chat provider-aware and adds Claude support alongside the existing Codex flow. It keeps the Codex UI presentation patterns while adding Claude configuration, model selection, provider persistence, and runtime handling.

It also fixes the session-conflict regression found during testing: each chat session now retains its own ChatViewModel and dependency context, and the SwiftUI chat surface is keyed by the selected view model so switching sessions does not reuse stale @State. Background Claude or Codex turns no longer steal visible session state when their runtime reports session changes.

The earlier design-system asset bundling experiment is reverted in this branch, so the net PR excludes that behavior.

What changed

  • Added provider-agnostic chat runtime plumbing with Codex and Claude provider support.
  • Added Claude runtime options, model catalog, model picker/config UI, and provider-aware settings persistence.
  • Persisted session provider metadata and usage defaults safely for older stored sessions.
  • Disallowed Claude askuserquestion tool usage because the embedded UI does not support that interaction.
  • Removed duplicated visible thinking labels for Claude messages.
  • Added session-owned chat contexts in ChatService so sessions do not conflict when switching, creating new sessions, or returning to a running Claude session.
  • Keyed ChatScreen by the active ChatViewModel identity so SwiftUI swaps to the selected session model.
  • Added regression tests/source tests for provider persistence, Claude options/model behavior, hidden tool handling, message rendering, and session isolation.

Validation

  • swift test --package-path Packages/EaselClaudeCodeUI passed: 140 tests.
  • swiftc -parse passed for the edited EaselChat Swift files.
  • git diff --check passed.
  • swift test --package-path Packages/EaselChat --filter ChatServiceTests is currently blocked before reaching these tests by the existing external CodeEditSymbols checkout error: type 'Bundle' has no member 'module'.

Replace the long vertical scroll on the design system page with a
scrollable tab carousel so colors, typography, spacing, components,
etc. each get a focused view instead of being stacked end to end.

- DesignSystemReferenceView: dynamic tab list (only sections with
  content), sticky horizontal pill carousel with a sliding selection
  highlight (matchedGeometryEffect), count badges, cross-fade between
  panels, and accessibility traits. Sections are derived from the
  catalog and selection resets when the catalog changes.
- DesignSystemBrowserView: give reference catalogs a fixed header with
  the carousel pinned below (no nested scroll); other states keep the
  existing scroll layout.
- EaselDesignSystemCatalogHTMLRenderer: mirror the same hierarchy in the
  canvas web preview with an accessible role=tablist carousel, keeping
  the required element IDs and catalog-loading flow intact.
@jamesrochabrun jamesrochabrun marked this pull request as ready for review June 19, 2026 06:08
@jamesrochabrun jamesrochabrun merged commit 39bac75 into main Jun 19, 2026
1 check passed
@jamesrochabrun jamesrochabrun deleted the claude-support branch June 19, 2026 06:37
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