Skip to content

[Feat] Chat : Resumable streaming across in-app navigation + optional message timestamps#1601

Merged
MODSetter merged 17 commits into
MODSetter:devfrom
CREDO23:feat/resumable-streaming-and-timestamps
Jul 13, 2026
Merged

[Feat] Chat : Resumable streaming across in-app navigation + optional message timestamps#1601
MODSetter merged 17 commits into
MODSetter:devfrom
CREDO23:feat/resumable-streaming-and-timestamps

Conversation

@CREDO23

@CREDO23 CREDO23 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Resumable streaming: moves the chat stream engine out of the (unmounting) chat page into a module-level store + a persistent runner in the workspace shell, so an in-flight turn keeps streaming across in-app navigation and reattaches live on return. Single active stream, keyed by threadId. Scope: in-app (client-side) navigation only — full page reload, tab close, and cross-device are out of scope. Frontend-only, no backend changes.
  • Message timestamps: opt-in per-message timestamps under user & assistant messages, off by default (localStorage), toggled from a new User Settings → Appearance tab. Surfaces timestamp data that already existed end-to-end.

High-level PR Summary

This PR introduces resumable streaming across in-app navigation and optional message timestamps to the chat interface. The streaming refactor moves the chat stream engine from the chat page into a module-level store (chatStreamStore) with a persistent runner in the workspace shell, allowing in-flight chat turns to continue streaming when users navigate between workspace routes and seamlessly reattach when they return. This is scoped to client-side navigation only (excludes full page reloads, tab closes, and cross-device scenarios). The message timestamps feature adds an opt-in per-message timestamp display (off by default, controlled via localStorage) through a new User Settings → Appearance tab, surfacing timestamp data that already existed end-to-end. Both features are frontend-only with no backend changes.

⏱️ Estimated Review Time: 1-3 hours

💡 Review Order Suggestion
Order File Path
1 surfsense_web/lib/chat/stream-engine/store.ts
2 surfsense_web/lib/chat/stream-engine/helpers.ts
3 surfsense_web/lib/chat/stream-engine/use-chat-stream.ts
4 surfsense_web/components/chat/active-chat-stream-runner.tsx
5 surfsense_web/lib/chat/stream-engine/engine.ts
6 surfsense_web/app/dashboard/[workspace_id]/new-chat/[[...chat_id]]/page.tsx
7 surfsense_web/components/layout/providers/LayoutDataProvider.tsx
8 surfsense_web/atoms/chat/show-timestamps.atom.ts
9 surfsense_web/lib/format-date.ts
10 surfsense_web/components/assistant-ui/message-timestamp.tsx
11 surfsense_web/components/assistant-ui/user-message.tsx
12 surfsense_web/components/assistant-ui/assistant-message.tsx
13 surfsense_web/app/dashboard/[workspace_id]/user-settings/components/AppearanceContent.tsx
14 surfsense_web/app/dashboard/[workspace_id]/user-settings/layout-shell.tsx
15 surfsense_web/app/dashboard/[workspace_id]/user-settings/appearance/page.tsx

Need help? Join our Discord

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f98a29c7-c7b4-421a-9fbf-9ecfd606c95b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@CREDO23 CREDO23 requested a review from MODSetter July 13, 2026 21:30
@MODSetter MODSetter merged commit 9e72be1 into MODSetter:dev Jul 13, 2026
4 of 8 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.

2 participants