Skip to content

[codex] fix capture library refresh - #17

Merged
JS-banana merged 1 commit into
mainfrom
codex/fix-capture-library-refresh
May 14, 2026
Merged

JS-banana merged 1 commit into
mainfrom
codex/fix-capture-library-refresh

Conversation

@JS-banana

Copy link
Copy Markdown
Owner

Summary

  • update request-side capture persistence so successful local inserts advance lastCaptureAt and trigger the existing library refresh path
  • classify Qianwen's observed api/v2/chat and api/v1/session/msg/list traffic as capture traffic
  • parse Qianwen v2 request messages that carry content without an explicit role
  • add regression coverage for request-side capture refresh and Qianwen route/parser behavior

Root Cause

The library page refreshes sessions after runtimeStatus.lastCaptureAt changes. Request-side user-turn persistence could write a local session, then only record an attempt without advancing lastCaptureAt, so the renderer did not automatically reload listSessions().

Qianwen also had live traffic previously recorded as discovery traffic for its current chat/history endpoints, leaving the app more dependent on DOM auto-cache fallback than the network capture path.

Validation

  • pnpm --dir apps/desktop test -- --run tests/request-ingestion-service.test.ts
  • ../../apps/desktop/node_modules/.bin/vitest run tests/network.test.ts tests/parser.test.ts tests/adapter-contract.test.ts from packages/provider-qianwen
  • pnpm --dir apps/desktop build

@JS-banana
JS-banana marked this pull request as ready for review May 14, 2026 06:22
@JS-banana
JS-banana merged commit 1530ad8 into main May 14, 2026
2 checks passed
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