Skip to content

fix(flow-chat): dismiss stale ACP sessions on archive - #3807

Open
Raing5Days wants to merge 1 commit into
GCWing:mainfrom
Raing5Days:fix/issue-3788-acp-archive
Open

Raing5Days wants to merge 1 commit into
GCWing:mainfrom
Raing5Days:fix/issue-3788-acp-archive

Conversation

@Raing5Days

Copy link
Copy Markdown
Contributor

Summary

A failed ACP startup can delete its provisional session after a catalog read has already displayed it. Archiving that stale entry then fails because its metadata is gone. After an archive failure, confirm that an untouched, empty ACP catalog projection is absent on its owning host before removing the projection. Preserve sessions with history, uncertain reads, concurrent changes, or device switches.

Fixes #3788

Type and Areas

Type: bug fix

Areas: Web UI session lifecycle

Motivation / Impact

A stale ACP session from a startup timeout can be removed through the existing archive action without restarting. The provisional entry can still appear briefly while startup is in progress.

Verification

  • node scripts/run-vitest.mjs run --maxWorkers=50% src/flow_chat/services/flow-chat-manager/SessionModule.test.ts --silent (from src/web-ui): 94 passed. Covers local and simulated peer projections, missing and existing records, offline reads, concurrent updates, and surface changes.
  • pnpm run type-check:web: passed after copying generated API types from the matching main checkout into this worktree.
  • git diff --check: passed.
  • pnpm run check:web: failed in the unrelated MiniApp generated-artifact checks for chat-style-classes.js and theme.css in this Windows checkout.

Reviewer Notes

No native UI interaction or live remote workspace, Remote Control, Peer Device, or Detached Dispatch scenario was exercised.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

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.

[Bug]: 不能archive 错误使用的acp

1 participant