fix(tui): refresh task output previews - #2357
Conversation
🦋 Changeset detectedLatest commit: ebe87b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d564514c5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a6df5b5f4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56e7a725ea
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Related Issue
Resolves #2341
Problem
The
/tasksPreview Output loaded only when the selection changed. Running process output and background-agent results could therefore remain stale, and an output-loading failure was displayed as if the task had produced no output.What changed
Rshortcut while keeping one request in flight per selection.Test verification (RED → GREEN)
Upstream RED (
origin/mainwith regression tests only):The failures showed the error as
[no output captured], left the selected preview stale after a task event, and did not retry the preview throughR.Patched GREEN:
Additional validation:
Checklist
gen-changesets; added a patch changeset for@moonshot-ai/kimi-code.gen-docs; no documentation update is needed because the existing reference only lists/tasksand does not describe preview refresh behavior.Review feedback verification
The periodic poll now skips output reads for terminal tasks while event-driven final reloads and manual
Rretries remain enabled. A stale-running-poll regression test failed with 3 output reads before the follow-up fix and passes with exactly 2 afterward.The follow-up terminal-event race test failed because the final reload was missing, then a strengthened variant failed because a repeated repaint caused a third read that overwrote the final output. Both now pass with exactly one final automatic reload.
The refreshed-status regression test failed with 2 output reads instead of 1 when only
listBackgroundTasksobserved termination; it now passes and polling stops when either status source is terminal.