Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
e2cbe301 fix(ai-devtools): address PR review feedback (critical + important + types + comments)
Critical
- ToolFixtureForm: remove dead `'{}' ? : '{}'` ternary leftover from refactor
- ChatDevtoolsBridge.executeFixture: warn when execute=true but no client tool
is registered instead of silently substituting the saved output
- stringifyFixtureValue / parseFixtureResultContent: log + report the original
error instead of swallowing JSON.stringify / JSON.parse failures
- devtools-middleware: replace `chunk: any` with a mirrored discriminated
union (DevtoolsKnownChunk) + isKnownChunk type guard, drop the `as` cast
on chunk.error, fall back with the raw chunk payload instead of "Unknown
error" when RUN_ERROR.message is missing
- normalizeRunStatusFromSnapshot: return `null` for unknown statuses and let
the caller skip + warn instead of silently coercing them to `'updated'`
Important
- Remove unreachable `'unmounted'` HookLifecycle variant + dead filters
- Drop unused `runs` prop on GenerationPanel
- removeHookRecord: also clean up TimelineEvents attached to the hook
- IterationTimeline `totalUsage`: compare on `totalTokens` (not
prompt+completion) so providers that include reasoning tokens in
totalTokens don't get their max overwritten by a smaller later reading
- jsonSafeValue / stringifyToolArguments: log + return an explicit
placeholder instead of returning the original on failure
- No-op bridges: add compile-time parity checks (Exclude<keyof, keyof>)
so adding a public method to the real bridge fails the build until the
no-op is updated, instead of becoming a runtime TypeError
- devtools-middleware: wrap every emit with `safeEmit` so a subscriber
throw can't bubble into the host chat engine
- markEventSeen: warn when a dedupe key falls back entirely to literal
sentinels; tools:registered: warn when hookName is missing
- hook-registry tests: cover snapshot run backfill (success/error/idle/
unknown statuses) and lifecycle inference from snapshot state
Type design
- AIDevtoolsGenerationRunStatus union ('idle' | 'generating' | 'success'
| 'error' | 'cancelled') replacing the previous `status: string` and
threaded through GenerationDevtoolsCoreState / SnapshotBase / RunPatch
- Drop redundant `unknown | null` on input / videoStatus fields
- Remove `extends Record<string, unknown>` from public snapshot interfaces;
ClientDevtoolsBridge constraint relaxed to `extends object` and the
wire-envelope widening is pushed to emitSnapshot
- Drop pointless `as Record<string, unknown>` casts at JsonTree call sites
(JsonTree's TData accepts arbitrary value)
Comment hygiene
- Strip file-top docblocks and class-banner JSDoc rewriting the PR
description (devtools-noop, use-real-devtools-bridges, devtools-system-
prompt-mirror.test, several blocks in devtools.ts)
- Remove "for backward compatibility" / "exactly like it did before the
devtools work landed" PR-narrative phrases
- Drop ASCII section-banner separators in devtools.ts, use-styles.ts,
ai-context.tsx
- Compress multi-line JSDoc on short methods to one-liners or remove
where the name was self-describing
- Strip obvious line-narration comments in ai-context.tsx batching helpers e7d71d7a refactor(ai-client): consolidate devtools coupling, add E2E suite
- Extract bridge construction into buildDevtoolsBridgeOptions helpers on
ChatClient, GenerationClient, VideoGenerationClient
- Add ChatDevtoolsAwareEventEmitter that auto-attaches run context and
emits snapshots so clients call this.events.X(...) like normal events
- Ship NoOp bridges by default; tree-shake real bridges into the
@tanstack/ai-client/devtools subpath entry
- Update React, Vue, Solid, Svelte, Preact hooks to pass the real
bridge factory
- Expand E2E suite: registration, chat, structured output, tools,
generation hooks, responsive layout
- Add devtools-name-types tests per framework integration e7d71d7a refactor(ai-client): consolidate devtools coupling, add E2E suite
- Extract bridge construction into buildDevtoolsBridgeOptions helpers on
ChatClient, GenerationClient, VideoGenerationClient
- Add ChatDevtoolsAwareEventEmitter that auto-attaches run context and
emits snapshots so clients call this.events.X(...) like normal events
- Ship NoOp bridges by default; tree-shake real bridges into the
@tanstack/ai-client/devtools subpath entry
- Update React, Vue, Solid, Svelte, Preact hooks to pass the real
bridge factory
- Expand E2E suite: registration, chat, structured output, tools,
generation hooks, responsive layout
- Add devtools-name-types tests per framework integration