Skip to content

fix(web): surface session list load failures#1641

Merged
wbxl2000 merged 2 commits into
mainfrom
codex/fix-kimi-web-session-load-errors
Jul 15, 2026
Merged

fix(web): surface session list load failures#1641
wbxl2000 merged 2 commits into
mainfrom
codex/fix-kimi-web-session-load-errors

Conversation

@wbxl2000

@wbxl2000 wbxl2000 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

None. This is a focused fix for a reproducible session-list loading failure.

Problem

Kimi Web converted both the no-workspace session fallback failure and per-workspace initial-page failures into successful empty results. Users could therefore see an empty session list with no error, and a refresh could discard sessions that were already loaded from a workspace whose request failed.

What changed

  • Aggregate workspace session requests with partial-success semantics: fresh results replace successful workspaces, while failed workspaces keep their cached sessions and pagination state.
  • Report one representative failure through the existing operation warning flow, including when all workspace requests or the global fallback fail.
  • Preserve pages already fetched when automatic workspace pagination or the no-workspace global fallback fails on a later page, while leaving the list incomplete and naturally retryable.
  • Retry an incomplete automatic workspace continuation by atomically refreshing the already-cached range, so moved or renamed rows update and missing rows are removed without discarding history.
  • Keep retries natural for both initial loading and later pagination, including duplicate workspace records that share a root and sessions with stale workspace ids.
  • Add regression coverage for global failure visibility, partial and total failure, continuation failures, retry recovery, and pagination recovery.
  • Add a patch changeset for the bundled Web fix. No user documentation update is needed because commands, configuration, and usage are unchanged.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: edfdc2b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

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

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex review

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@edfdc2b
npx https://pkg.pr.new/@moonshot-ai/kimi-code@edfdc2b

commit: edfdc2b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68afe97e63

ℹ️ 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".

Comment thread apps/kimi-web/src/composables/client/useWorkspaceState.ts Outdated
@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61bbb47cae

ℹ️ 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".

Comment thread apps/kimi-web/src/composables/client/useWorkspaceState.ts
@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 15053502bc

ℹ️ 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".

@wbxl2000

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15053502bc

ℹ️ 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".

Comment on lines +563 to +565
for (const session of rawState.sessions) {
if (loadedIds.has(session.id)) continue;
merged.push(session);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep loaded ranges authoritative in partial merges

When a later /sessions page fails, this loop appends every cached session that was not returned by the successful prefix. The first page is already authoritative for the newest range it covers; if a cached session in that range was deleted, archived, or became empty on the server, it is absent from sessions but gets added back here, so the no-workspace fallback or loadAllSessions can keep showing stale rows until a full drain eventually succeeds. Only cached rows older than the oldest successfully fetched row should be retained as unreached.

Useful? React with 👍 / 👎.

@wbxl2000 wbxl2000 force-pushed the codex/fix-kimi-web-session-load-errors branch 3 times, most recently from 83c2739 to edfdc2b Compare July 15, 2026 05:54
@wbxl2000 wbxl2000 merged commit b6ae0a1 into main Jul 15, 2026
14 checks passed
@wbxl2000 wbxl2000 deleted the codex/fix-kimi-web-session-load-errors branch July 15, 2026 05:58
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