Add standalone chats section to the sidebar#3981
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new user-facing feature (standalone chats section in sidebar) with new UI components, new project creation logic, and cross-cutting filtering throughout mobile and web apps. New capabilities of this scope warrant human review. You can customize Macroscope's approvability policy. Learn more. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04b25e9ad7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
8004340 to
8d7cf85
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8d7cf85806
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const provisionedProject = await waitForProject(projectRef); | ||
| if (provisionedProject === null) { |
There was a problem hiding this comment.
Avoid failing successful chat creation on slow sync
When project.create succeeds but the shell snapshot/stream takes more than waitForProject's 2-second default to publish the new project, this branch reports "Could not create chat" and returns without opening the draft even though the Chats project was created. This is especially likely on slow or reconnecting remote environments; consider proceeding to handleNewThread or otherwise avoiding a short fixed sync timeout after a successful create.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d7a388a. Configure here.
| : threadVisibility.hiddenThreads; | ||
| return { | ||
| hasOverflowingThreads, | ||
| hasOverflowingThreads: threadVisibility.hasHiddenThreads, |
There was a problem hiding this comment.
Spurious Show more control
Low Severity
hasOverflowingThreads now follows getVisibleThreadsForProject().hasHiddenThreads, which stays true whenever the list is longer than the preview limit even after the active thread is pinned into the visible set. When that pin leaves hiddenThreads empty, the sidebar still renders a no-op Show more control—easy to hit in Chats with the default preview count of 6 and 7 threads while viewing the oldest one.
Reviewed by Cursor Bugbot for commit d7a388a. Configure here.


Summary
~/.t3/chatsworkspace and start local Codex chats thereScreenshot
Testing
pnpm exec vp checkpnpm exec vp run typecheckpnpm exec vp test apps/web/src/generalChats.test.tsNote
Add standalone Chats section to the web sidebar separate from Projects
generalChats.tsinclient-runtimewith constants (GENERAL_CHATS_PROJECT_ID,GENERAL_CHATS_PROJECT_TITLE) and helpers (isGeneralChatsProject,excludeGeneralChatsProject,excludeGeneralChatsThreads) used across web and mobile.waitForProjectto entities.ts to poll for project availability after creation, with a 2-second timeout.Macroscope summarized d7a388a.
Note
Medium Risk
Touches sidebar navigation, lazy project provisioning, and new-thread defaults across web and mobile; incorrect filtering or provisioning could hide threads or mis-route drafts, but changes are scoped with tests and duplicate-create handling.
Overview
Adds standalone Chats for ad hoc conversations via a reserved project (
t3code-general-chats,~/.t3/chats), shared through@t3tools/client-runtime/general-chatshelpers that identify and exclude it from regular project/thread lists.On web, the sidebar gets a Chats section above Projects with New chat, which lazily creates that project on the primary environment (with
waitForProjectafter create) and starts a thread with fixed local options—no branch/worktree seeding. The chats project stays out of the Projects list, command palette project actions, and default new-thread project ordering. Chat threads reuse normal sidebar row behavior inmode="chats"(always expanded, no project header, no copy-path, local env for new threads). ChatHeader hides git, scripts, and open-in actions for chats. Archiving a chat still opens a fresh local draft viagetGeneralChatNewThreadOptions.On mobile, the same project is omitted from home groups, archive, repository pickers, new-task flow, and deep-linked draft project selection.
Sidebar thread preview logic is refactored to
getVisibleThreadsForProjectso the active chat stays visible when folded under the preview limit.Reviewed by Cursor Bugbot for commit d7a388a. Bugbot is set up for automated code reviews on this repo. Configure here.