-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Remember web search toggle state #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implements localStorage persistence for the web search toggle following the same pattern as other user preferences (fullscreen mode, selected model). The web search toggle state is now: - Initialized from localStorage on component mount - Persisted to localStorage whenever the state changes - Uses the key "webSearchEnabled" for storage This ensures users don't have to re-enable web search every time they start a new chat session. Fixes #349 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Anthony <AnthonyRonning@users.noreply.github.com>
📝 WalkthroughWalkthroughAdded localStorage persistence to the web search toggle in UnifiedChat.tsx. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (2)
Comment |
Greptile SummaryImplemented localStorage persistence for the web search toggle state. The implementation follows the same pattern as the existing fullscreen mode preference, using lazy initialization with
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Component as UnifiedChat Component
participant State as React State
participant LS as localStorage
Note over Component,LS: Component Mount
Component->>LS: getItem("webSearchEnabled")
LS-->>Component: "true" | "false" | null
Component->>State: Initialize isWebSearchEnabled state
Note over User,LS: User Toggles Web Search
User->>Component: Click web search toggle
Component->>State: setIsWebSearchEnabled(!current)
State-->>Component: State updated
Note over Component,LS: Persist Change
Component->>Component: useEffect triggered
Component->>LS: setItem("webSearchEnabled", value.toString())
LS-->>Component: Stored
Note over Component,LS: Next Session
Component->>LS: getItem("webSearchEnabled")
LS-->>Component: Previous preference restored
Component->>State: Initialize with saved value
|
Greptile's behavior is changing!From now on, if a review finishes with no comments, we will not post an additional "statistics" comment to confirm that our review found nothing to comment on. However, you can confirm that we reviewed your changes in the status check section. This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR". |
Implements localStorage persistence for the web search toggle following the same pattern as other user preferences (fullscreen mode, selected model).
The web search toggle state is now:
This ensures users don't have to re-enable web search every time they start a new chat session.
Fixes #349
Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.