Skip to content

fix(web): sidebar session reveal + stop doubled streaming text - #129

Merged
cnjack merged 2 commits into
mainfrom
fix/web-sidebar-session-and-ws-double-stream
Jul 9, 2026
Merged

fix(web): sidebar session reveal + stop doubled streaming text#129
cnjack merged 2 commits into
mainfrom
fix/web-sidebar-session-and-ws-double-stream

Conversation

@cnjack

@cnjack cnjack commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Sidebar: after the first user message, optimistically insert the session into the left list with a real title (backend only indexes on first RecordUser); empty Welcome sessions stay out of the list; never show a raw UUID as the title; light enter animation for new rows.
  • Streaming: fix WSClient.disconnect() so intentional close does not schedule auto-reconnect. React StrictMode remount left a ghost WebSocket that also received agent_text, doubling every delta (你好你好 / HiHi / How How).
  • Refresh tasks/sessions on agent_done so title / running / updated_at stay in sync.

Test plan

  • Open Welcome / New chat — no phantom UUID row in the sidebar
  • Send first message — session appears immediately with message-based title and enter animation
  • Streaming assistant reply is not doubled (especially in make run / Vite dev with StrictMode)
  • After a turn finishes, sidebar title and running state match the server
  • Hard refresh still lists prior sessions correctly

Reveal a task in the left sidebar as soon as the first user message is
sent (backend only indexes after RecordUser), with a real title instead of
a UUID fragment. Fix WSClient so disconnect() does not auto-reconnect under
React StrictMode, which left a ghost socket that doubled every agent_text
delta.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@cnjack, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6875d13b-87bb-40fa-af1d-46ca1eec4b2e

📥 Commits

Reviewing files that changed from the base of the PR and between 09517d3 and 5813ffe.

📒 Files selected for processing (10)
  • web/src/app/store.ts
  • web/src/app/wsBridge.ts
  • web/src/components/CommandPalette.tsx
  • web/src/components/Sidebar.tsx
  • web/src/i18n/locales/en.ts
  • web/src/i18n/locales/ja.ts
  • web/src/i18n/locales/ko.ts
  • web/src/i18n/locales/zh-Hans.ts
  • web/src/i18n/locales/zh-Hant.ts
  • web/src/lib/ws.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/web-sidebar-session-and-ws-double-stream

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Call the sidebar helper with dispatch/getState directly so AppDispatch
no longer conflicts with RTK's loosely typed ThunkDispatch in CI.
@cnjack
cnjack merged commit 3daff2a into main Jul 9, 2026
3 checks passed
@cnjack
cnjack deleted the fix/web-sidebar-session-and-ws-double-stream branch July 9, 2026 17:48
cnjack added a commit that referenced this pull request Jul 12, 2026
…uble-stream

fix(web): sidebar session reveal + stop doubled streaming text
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