Skip to content

feat(flow-chat): expose retry attempt diagnostics - #1709

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev
Jul 23, 2026
Merged

feat(flow-chat): expose retry attempt diagnostics#1709
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Capture retry diagnostics for transient provider failures, empty effective output, and invalid tool arguments.
  • Preserve original provider errors, raw tool JSON, and parser or validation errors through the event and session-history contracts.
  • Show historical retry attempts in Flow Chat with an on-demand, copyable diagnostic disclosure.
  • Immediately supersede abandoned attempts in the live UI so active tool cards are cancelled while the round continues retrying.

Type and Areas

Type: Feature

Areas: Rust core, agent stream, event contracts, session persistence, web UI, i18n

Motivation / Impact

Users can inspect the original provider error and malformed tool-call payload when an automatic retry occurs, without changing the default retry behavior. Diagnostics remain collapsed until explicitly opened.

Verification

  • Passed: pnpm run fmt:rs
  • Passed: pnpm --dir src/web-ui run test:run src/flow_chat/store/FlowChatStore.test.ts (57 tests)
  • Passed: pnpm run type-check:web
  • Passed: cargo test -p bitfun-events (16 tests)
  • Passed: git diff HEAD~1..HEAD --check
  • Not completed: cargo check -p bitfun-core exceeded the local 60-second command limit twice while checking bitfun-core; no compiler errors were emitted.

Reviewer Notes

  • ModelRoundAttemptSuperseded is a high-priority realtime event; receipt updates UI state but does not force an immediate persistence write.
  • The session field is optional/defaulted, so existing stored sessions restore without migration.
  • Raw diagnostics can be long; the UI keeps them behind a warning-icon disclosure and supports copying individual values.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, including the incomplete core check.
  • User-facing strings and locales are updated for en-US, zh-CN, and zh-TW.

- Preserve original provider/transport errors, raw tool arguments, and JSON parser errors for retried attempts
- Project diagnostics through events, session persistence, and history restoration
- Add on-demand, copyable diagnostic details for collapsed historical attempts
- Cover diagnostic merging, ordering, restoration, and event serialization
@wsp1911
wsp1911 merged commit 61e807d into GCWing:main Jul 23, 2026
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