Skip to content

fix(chat): clear stale thinking runs reliably - #397

Closed
Niko96-dotcom wants to merge 1 commit into
outsourc-e:mainfrom
Niko96-dotcom:fix/chat-thinking-run-state
Closed

fix(chat): clear stale thinking runs reliably#397
Niko96-dotcom wants to merge 1 commit into
outsourc-e:mainfrom
Niko96-dotcom:fix/chat-thinking-run-state

Conversation

@Niko96-dotcom

Copy link
Copy Markdown
Contributor

Summary

  • Snapshot the chat message list once when a response wait starts, so a completed assistant message can clear the Thinking indicator instead of moving the baseline forward.
  • Treat persisted complete run statuses as terminal in the active-run polling fallback.
  • Serialize persisted run updates per run and write through a temp file + rename to avoid lost updates or malformed JSON from concurrent writes.

Tests

  • pnpm test src/screens/chat/chat-screen-utils.test.ts src/server/run-store.test.ts
  • pnpm build

Note: I also ran the full pnpm test locally; it currently fails in unrelated existing suites on current main (MCP hub search expectations, gateway env resolution, i18n label text, context usage helper export, composer/context copy checks, chat-message-list helpers, and playground localStorage setup). This patch-specific coverage passes.

@outsourc-e

Copy link
Copy Markdown
Owner

Closing as superseded by #432. The validated fix was folded into the consolidated batch branch fix/issue-sweep-batch-20260514 for one review/merge path.

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