Skip to content

Add chat mode controls and thread search UI to repoless chat shell - #155

Merged
EricTsai83 merged 2 commits into
mainfrom
feature/chat-mode-controls
Jun 23, 2026
Merged

Add chat mode controls and thread search UI to repoless chat shell#155
EricTsai83 merged 2 commits into
mainfrom
feature/chat-mode-controls

Conversation

@EricTsai83

@EricTsai83 EricTsai83 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Integrated ChatModeControls into RepolessChatShell so navigation controls render for discuss mode when visibility rules allow.
  • Added thread-search visibility state and mounted ThreadSearchDialog with mode={chatMode}, repositoryId={null}, and current thread selection via urlThreadId.
  • Wired onSearchThreads to open the dialog and onNewThread to reuse the existing thread-creation flow.
  • Reused existing handleSelectThread path so thread selection from search continues through the normal navigation flow.

Testing

  • Not run (no tests/lint/typecheck executed in this pass).

Summary by CodeRabbit

Release Notes

  • New Features
    • Added a new thread search dialog accessible in the sidebar, allowing users to search and navigate through chat threads more efficiently.
    • Introduced chat mode navigation controls in the sidebar for improved access to different chat modes and better chat organization.

- Display chat mode controls in discuss shell when visibility hook allows it
- Add thread search dialog state wiring for opening/selecting threads
- Trigger new-thread flow from control actions without changing thread behavior
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
systify Ready Ready Preview, Comment Jun 23, 2026 4:22pm

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@EricTsai83, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4bc264b9-c634-42ba-ad97-18fb965d3bf1

📥 Commits

Reviewing files that changed from the base of the PR and between 7607f64 and f005712.

📒 Files selected for processing (1)
  • src/components/repoless-chat-shell.tsx
📝 Walkthrough

Walkthrough

repoless-chat-shell.tsx gains two new imports (ChatModeControls, ThreadSearchDialog), a local isThreadSearchOpen state, and a shouldShowChatNavigationControls flag from useShouldShowChatModeControls(). When that flag is true, ChatModeControls and ThreadSearchDialog are conditionally rendered inside the sidebar inset with thread-selection and dialog-open wiring.

Changes

Chat Navigation Controls Integration

Layer / File(s) Summary
Imports, state, and gate hook
src/components/repoless-chat-shell.tsx
Adds ChatModeControls and ThreadSearchDialog to imports, declares isThreadSearchOpen state, and derives shouldShowChatNavigationControls from useShouldShowChatModeControls().
Conditional render of controls and dialog
src/components/repoless-chat-shell.tsx
Conditionally renders ChatModeControls (wiring its search action to open the dialog) and ThreadSearchDialog (configured with open, onOpenChange, mode, selectedThreadId, and onSelectThread) inside the sidebar inset.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • EricTsai83/systify#136: Directly modifies the same repoless-chat-shell.tsx file with overlapping changes to ChatModeControls, ThreadSearchDialog, isThreadSearchOpen state, and thread-selection handler wiring.

Poem

🐰 A bunny hopped into the shell one day,
And found new controls along the way.
A search dialog here, a mode flag there,
Threads now findable with flair to spare!
"shouldShow?" asked the hook with a wink —
The rabbit just smiled and added the link. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and clearly describes the main change: adding chat mode controls and thread search UI to the repoless chat shell component, which matches the file modifications and PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/chat-mode-controls

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/components/repoless-chat-shell.tsx (1)

239-246: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Avoid always mounting ThreadSearchDialog to prevent background thread-list queries.

Because this dialog is rendered unconditionally, listRepolessThreads can subscribe/fetch even when closed. Conditionally mount it when isThreadSearchOpen is true.

♻️ Proposed change
-        <ThreadSearchDialog
-          open={isThreadSearchOpen}
-          onOpenChange={setIsThreadSearchOpen}
-          repositoryId={null}
-          mode={chatMode}
-          selectedThreadId={urlThreadId}
-          onSelectThread={handleSelectThread}
-        />
+        {isThreadSearchOpen ? (
+          <ThreadSearchDialog
+            open={isThreadSearchOpen}
+            onOpenChange={setIsThreadSearchOpen}
+            repositoryId={null}
+            mode={chatMode}
+            selectedThreadId={urlThreadId}
+            onSelectThread={handleSelectThread}
+          />
+        ) : null}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/repoless-chat-shell.tsx` around lines 239 - 246, The
ThreadSearchDialog component is being mounted unconditionally, which causes
unnecessary background queries like listRepolessThreads to execute even when the
dialog is closed. Wrap the ThreadSearchDialog component in a conditional render
that only mounts it when isThreadSearchOpen is true, using standard React
conditional rendering with the && operator or a ternary statement.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/components/repoless-chat-shell.tsx`:
- Around line 239-246: The ThreadSearchDialog component is being mounted
unconditionally, which causes unnecessary background queries like
listRepolessThreads to execute even when the dialog is closed. Wrap the
ThreadSearchDialog component in a conditional render that only mounts it when
isThreadSearchOpen is true, using standard React conditional rendering with the
&& operator or a ternary statement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9c32337-e531-4134-9fbd-d85a10f6ab60

📥 Commits

Reviewing files that changed from the base of the PR and between 69d801b and 7607f64.

📒 Files selected for processing (1)
  • src/components/repoless-chat-shell.tsx

- Mount `ThreadSearchDialog` only when `isThreadSearchOpen` is true
- Avoid unnecessary rendering/effects when the thread search modal is closed
@EricTsai83
EricTsai83 merged commit 2c47b8b into main Jun 23, 2026
4 checks passed
@EricTsai83
EricTsai83 deleted the feature/chat-mode-controls branch June 23, 2026 16:24
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