Skip to content

fix(tracey): migrate to the assistant-ui 0.15 aui state API - #521

Merged
JabbaKadabra merged 1 commit into
masterfrom
claude/ci-pipeline-fixes-kls4hn
Aug 6, 2026
Merged

fix(tracey): migrate to the assistant-ui 0.15 aui state API#521
JabbaKadabra merged 1 commit into
masterfrom
claude/ci-pipeline-fixes-kls4hn

Conversation

@JabbaKadabra

Copy link
Copy Markdown
Collaborator

Why

CI on master is red since the npm-minor-patch group bump (#515), and E2E is red for the same reason. @assistant-ui/react went 0.14.28 -> 0.15.1, which removed the per-scope context hooks:

src/features/tracey/components/TraceyComposer.tsx(2,79): error TS2305: Module '"@assistant-ui/react"' has no exported member 'useThread'.

tsc -b fails, so the CI frontend job fails and the E2E frontend Docker stage fails to build (target frontend-free: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 2). No other job on master is failing — backend, CodeQL and the earlier E2E runs were green.

What changed

0.15 replaces useThread / useComposer / useComposerRuntime / useMessage with the unified assistant client — useAuiState(selector) for state and useAui() for the bound scope clients. The selector state shapes (ThreadState, ComposerState, MessageState) are unchanged, so every call site maps 1:1 onto the matching scope of AssistantState:

before after
useThread(t => t.isRunning) useAuiState(s => s.thread.isRunning)
useComposer(c => c.text) useAuiState(s => s.composer.text)
useComposerRuntime() useAui().composer
useMessage(m => …) useAuiState(({ message: m }) => …)

Six call sites: TraceyComposer, TraceyChatPanel, ToolChips, FollowUpSuggestions, MessageStatusBar, AwaitActionsToolUI. No behavior change — same selectors, same setText / send calls. frontend/docs/TRACEY.md updated where it quoted the old hook.

Verification

  • npm run build (tsc -b && vite build) — green, the failing job's exact command
  • npm test -- src/features/tracey — 25 files / 295 tests passed
  • npm run lint — 0 errors (one pre-existing warning in useTraceVirtualizer.ts, unrelated)

E2E is left to CI, since it only needed the frontend image to build.

No changelog entry: this restores the build after a dependency bump and changes nothing user-facing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BKaLraZrphUMWRwFQGWWzD


Generated by Claude Code

The `@assistant-ui/react` 0.14 -> 0.15 bump (npm-minor-patch group) removed the
per-scope context hooks (`useThread`, `useComposer`, `useComposerRuntime`,
`useMessage`) in favour of the unified assistant client: `useAuiState(selector)`
for state and `useAui()` for the bound scope clients. The Tracey components still
imported the removed hooks, so `tsc -b` failed and broke both the CI frontend job
and the E2E image build.

Rewrite the six call sites against the new API — the selector state shapes
(`ThreadState`, `ComposerState`, `MessageState`) are unchanged, so each hook maps
1:1 onto the matching scope of `AssistantState`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BKaLraZrphUMWRwFQGWWzD
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