Skip to content

Show error + retry when thread detail fails to load (#82) - #104

Merged
currentbits merged 1 commit into
mainfrom
coder/failed-thread-load-dead-ends-on-select-a-868654
Aug 16, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/failed-thread-load-dead-ends-on-select-a-868654

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Why

If threads.get rejects, useCoder set detail to null and ThreadView fell back to the neutral "Select a thread" empty state — no error, no retry. Re-clicking the same thread was a no-op (selection state unchanged, so the load effect never re-ran), leaving the user stuck until they clicked away and back. Reported in #82 during the 2026-08-16 improvement audit.

What changed

  • src/useCoder.ts — the detail-load effect now records the rejection in a new detailError state instead of only nulling detail. A new retryDetail() bumps a detailRetryNonce in the effect's deps, so the fetch re-runs even for the already-selected thread. The error clears on success, on a new selection, and on deselect.
  • src/components/ThreadView.tsx — new optional detailError / onRetryDetail props. When detail is null and detailError is set, the center pane renders "Couldn't load this thread" with the failure message and a Retry button instead of the neutral empty state.
  • src/App.tsx — wires detailError (gated on an active selection) and retryDetail through to ThreadView.

Tests

  • test/threadView.test.tsx — the error state renders the failure message and Retry (and stays neutral without onRetryDetail).

  • test/appWiring.test.tsx — end-to-end through real useCoder against the fake window.coder: a rejecting threads.get surfaces the error state, and Retry re-fires threads.get for the already-selected thread and renders the transcript.

  • Full renderer suite (673 tests) and tsc --noEmit pass.

  • PR created by the Kimi Code agent

threads.get rejecting left detail null, so ThreadView fell back to the
neutral 'Select a thread' empty state with no error and no way forward;
re-clicking the same thread was a no-op because the selection state (and
thus the load effect) never changed.

- useCoder: record the rejection in detailError and add retryDetail(),
  which bumps a nonce in the load effect's deps so the fetch re-runs for
  the already-selected thread.
- ThreadView: render 'Couldn't load this thread' with the failure
  message and a Retry button when detailError is set.
- App: wire detailError/retryDetail through.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit e56e164 into main Aug 16, 2026
1 check passed
@currentbits
currentbits deleted the coder/failed-thread-load-dead-ends-on-select-a-868654 branch October 3, 2026 16:07
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