Skip to content

feat(web): add /new composer thread command#902

Open
binbandit wants to merge 1 commit intopingdotgg:mainfrom
binbandit:t3code/feat-new-thread-slash-command
Open

feat(web): add /new composer thread command#902
binbandit wants to merge 1 commit intopingdotgg:mainfrom
binbandit:t3code/feat-new-thread-slash-command

Conversation

@binbandit
Copy link
Contributor

@binbandit binbandit commented Mar 11, 2026

Summary

  • add /new as a composer slash command and suggestion to start a fresh thread in the current project
  • share project draft-thread routing between the sidebar and chat composer so new-thread entry points stay consistent
  • add parser, helper, and browser coverage for the new thread flow

Testing

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run --cwd apps/web test src/composer-logic.test.ts src/lib/projectDraftThreads.test.ts
  • bun run --cwd apps/web test:browser src/components/ChatView.browser.tsx

UI

Screenshot 2026-03-11 at 9 16 55 pm

Note

Add /new slash command to the composer to open a project draft thread

  • Adds /new to the composer's slash command menu and standalone submission handling in ChatView.tsx; selecting or submitting the command navigates to a new or existing project draft thread.
  • Extracts shared draft-thread selection logic into openOrReuseProjectDraftThread in projectDraftThreads.ts, which prefers a stored draft, falls back to reusing the current thread if it belongs to the project, or creates a new thread with default runtime and interaction modes.
  • Refactors Sidebar.tsx handleNewThread to delegate to the same shared utility, removing duplicated inline logic.
  • Extends ComposerSlashCommand type and parseStandaloneComposerSlashCommand in composer-logic.ts to recognise 'new' as a valid command.

Macroscope summarized 24f75f2.

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8f86ced0-bda4-42ce-8b68-255e76b69914

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
  • Post copyable unit tests in a comment

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 and usage tips.

@github-actions github-actions bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant