Improve theme settings and integrate desktop chat history toggle#725
Conversation
… replace theme toggle with mobile chat history toggle button Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (8)
WalkthroughTheme selection was added to Settings with Light, Dark, and Earth options. The desktop header now shows History instead of ModeToggle, mobile controls remove ModeToggle, and Playwright coverage was updated for theme selection, optional prompts, and the History button. ChangesTheme Selection and Header Controls
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
ngoiyaeric seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Blocking finding:
components/settings/components/settings.tsx:76-87declarestheme,setTheme,mounted, andsetMountedtwice in the same component scope. TypeScript treats those as duplicate block-scoped declarations, so the app cannot compile (consistent with the failed Vercel deployment). Keep oneuseTheme/mount-effect block; the duplicated Theme tab at249-323should also be collapsed to a single panel so the UI is not rendered twice once compilation is restored.
… replace theme toggle with mobile chat history toggle button Co-authored-by: ngoiyaeric <115367894+ngoiyaeric@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@tests/header.spec.ts`:
- Around line 6-9: Extract the duplicated optional “Later” prompt dismissal into
a shared helper such as dismissOptionalLaterPrompt in tests/utils.ts, preserving
the existing locator, timeout, and swallowed-error behavior. Replace the inline
try/catch blocks in the beforeEach hooks of header.spec.ts and
responsive.spec.ts with calls to this helper.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 96ffb0c9-eec8-4b81-a20a-c1136292d50f
📒 Files selected for processing (5)
components/header.tsxcomponents/mobile-icons-bar.tsxcomponents/settings/components/settings.tsxtests/header.spec.tstests/responsive.spec.ts
💤 Files with no reviewable changes (1)
- components/mobile-icons-bar.tsx
📜 Review details
🔇 Additional comments (6)
tests/responsive.spec.ts (2)
8-10: The duplicatedtext=Laterdismissal pattern across thesebeforeEachhooks is already flagged intests/header.spec.ts. Consider extracting to a shared helper as proposed there.Also applies to: 50-52, 105-107, 207-209, 244-246
24-24: LGTM!components/settings/components/settings.tsx (2)
76-81: LGTM!Also applies to: 164-164, 176-181, 242-279
10-10:Earthis a valid lucide-react export TheEarthimport exists inlucide-react@0.507.0, so this warning can be dismissed.> Likely an incorrect or invalid review comment.components/header.tsx (1)
5-5: LGTM!Also applies to: 84-84
tests/header.spec.ts (1)
11-22: LGTM!
| try { | ||
| await page.locator('text=Later').click({ timeout: 3000 }); | ||
| } catch (e) {} | ||
| }); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Extract the Later dismissal into a shared test helper.
The same try/catch block to dismiss the optional text=Later prompt is duplicated across 6 beforeEach hooks (1 in this file, 5 in tests/responsive.spec.ts). Extract it into a shared helper to reduce duplication and make future changes easier.
♻️ Proposed helper extraction
Create a shared helper, e.g. in tests/utils.ts:
export async function dismissOptionalLaterPrompt(page: import('`@playwright/test`').Page) {
try {
await page.locator('text=Later').click({ timeout: 3000 });
} catch {}
}Then use it in each beforeEach:
test.beforeEach(async ({ page }) => {
await page.goto('/');
- try {
- await page.locator('text=Later').click({ timeout: 3000 });
- } catch (e) {}
+ await dismissOptionalLaterPrompt(page);
});🤖 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 `@tests/header.spec.ts` around lines 6 - 9, Extract the duplicated optional
“Later” prompt dismissal into a shared helper such as dismissOptionalLaterPrompt
in tests/utils.ts, preserving the existing locator, timeout, and swallowed-error
behavior. Replace the inline try/catch blocks in the beforeEach hooks of
header.spec.ts and responsive.spec.ts with calls to this helper.
…equal icon spacing, fix resolution search - Enable profile toggle on mobile (removed disabled prop, added onClick to open settings) - Move theme selector icons above settings tabs instead of separate Theme tab - Make mobile icons bar icons equally spaced using flex-1 wrappers - Fix resolution search button disabled logic to support Google Maps (check mapProvider) - Update tests to reflect new behavior
This PR moves the theme change settings into the Settings interface as a dedicated "Theme Selection" tab, displaying the options (Light, Dark, Earth) with beautiful centered icons and labels, matching the user requested UI. It removes the System theme option. Additionally, it replaces the theme toggle button in the desktop header with the chat history toggle button from the mobile UI, and removes the old theme toggle button from the mobile icons bar.
PR created automatically by Jules for task 7420141682816426953 started by @ngoiyaeric
Summary by CodeRabbit
New Features
Updates