Skip to content

fix: persist selected thinking mode in chat composer#618

Open
CoderLuii wants to merge 2 commits intositeboon:mainfrom
CoderLuii:fix/persist-thinking-mode
Open

fix: persist selected thinking mode in chat composer#618
CoderLuii wants to merge 2 commits intositeboon:mainfrom
CoderLuii:fix/persist-thinking-mode

Conversation

@CoderLuii
Copy link
Copy Markdown

@CoderLuii CoderLuii commented Apr 4, 2026

Summary

  • initialize the chat composer thinking mode from local storage
  • persist the selected mode and stop resetting it after each send

Testing

  • validated in HolyClaude integration flow while reproducing the thinking-mode selection reset in the main chat UI

Summary by CodeRabbit

  • New Features
    • Thinking mode preference persistence: Your selected thinking mode is now automatically saved and will be restored across sessions. This enhancement eliminates the need to reconfigure your setting each time you return to the application, providing a more seamless and personalized experience that maintains your preferred configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7a795ca2-51d6-4c17-bde0-041643ebd611

📥 Commits

Reviewing files that changed from the base of the PR and between 388134c and 707de6d.

📒 Files selected for processing (1)
  • src/components/chat/hooks/useChatComposerState.ts

📝 Walkthrough

Walkthrough

The useChatComposerState hook now persists the "thinking mode" setting to browser localStorage. The initial state is restored from localStorage on mount, and changes to thinking mode are automatically saved back to storage, enabling persistence across sessions.

Changes

Cohort / File(s) Summary
Thinking Mode Persistence
src/components/chat/hooks/useChatComposerState.ts
Added localStorage integration for thinking mode: introduced storage key constant, getter function to initialize state from localStorage, and useEffect to sync state changes back to storage. Removed forced reset of thinking mode on message submission.

Poem

🐰 A rabbit's rejoicing:

The thinking mode remembers now,
Through localStorage's sacred vow,
No more lost when pages refresh,
Persistence made our states mesh! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: persist selected thinking mode in chat composer' directly matches the main objective of the changeset: persisting the thinking mode selection rather than resetting it after each send.

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

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

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