Skip to content

fix(web-ui): stabilize turn list jumps#1291

Closed
snvtac wants to merge 1 commit into
GCWing:mainfrom
snvtac:snvtac/1281-turn-list-jump
Closed

fix(web-ui): stabilize turn list jumps#1291
snvtac wants to merge 1 commit into
GCWing:mainfrom
snvtac:snvtac/1281-turn-list-jump

Conversation

@snvtac

@snvtac snvtac commented Jun 23, 2026

Copy link
Copy Markdown

Summary

Stabilize Flow Chat turn-list navigation when the virtual message list is not ready to accept a requested turn jump immediately.

Fixes #1281

Type and Areas

Type:

bug fix / UI/UX

Areas:

web UI / Flow Chat

Motivation / Impact

Clicking a non-current item in the Flow Chat header turn list could close the list even when VirtualMessageList.pinTurnToTop returned false, leaving the chat view at the old position with no visible recovery.

This change keeps non-current turn-list selections open until the jump is accepted by the virtual list, then lets the existing currentTurn effect close the list after header navigation state advances. Failed jumps are retained as a bounded deferred request and retried on animation frames / virtual-item changes. Selecting the already-current turn still closes the list immediately.

Verification

  • git diff --check --no-index src/web-ui/src/flow_chat/components/modern/__remote__/FlowChatHeader.main.tsx src/web-ui/src/flow_chat/components/modern/FlowChatHeader.tsx — passed, no output
  • git diff --check --no-index src/web-ui/src/flow_chat/components/modern/__remote__/ModernFlowChatContainer.main.tsx src/web-ui/src/flow_chat/components/modern/ModernFlowChatContainer.tsx — passed, no output
  • pnpm dlx esbuild src/web-ui/src/flow_chat/components/modern/FlowChatHeader.tsx --loader:.tsx=tsx --format=esm --outfile=/tmp/bitfun-flowchat-header-check.js — passed
  • pnpm dlx esbuild src/web-ui/src/flow_chat/components/modern/ModernFlowChatContainer.tsx --loader:.tsx=tsx --format=esm --outfile=/tmp/bitfun-modern-flowchat-container-check.js — passed

Not run:

  • pnpm run type-check:web
  • focused app/manual verification

Reason: full repository clone and tarball download stalled in this environment, so only the relevant source files were fetched through the GitHub API for a focused patch.

Reviewer Notes

  • PR targets main, as requested by CONTRIBUTING.md.
  • Scope is intentionally limited to the header turn-list click path and container jump retry path. The optional TurnHistoryPanel.tsx follow-up mentioned in the issue is not included.
  • AI-assisted change; testing level is lightweight static/syntax verification only because the full repository workspace was not available locally.

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.

@snvtac

snvtac commented Jun 23, 2026

Copy link
Copy Markdown
Author

Superseded by #1294, which keeps the same issue scope but includes regression coverage and full Web UI type-check validation.

@snvtac snvtac closed this Jun 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.

[Bug]: 轮次列表点击后关闭但不会跳转到对应轮次

1 participant