Skip to content

Conversation

@PSYEONE
Copy link
Contributor

@PSYEONE PSYEONE commented Nov 28, 2025

Summary by cubic

Added toggle controls to hide the Weather and News widgets on the empty chat screen. Changes update instantly and persist per client.

  • New Features
    • Added client-scoped switches: “Show weather widget” and “Show news widget” (default on).
    • EmptyChat reads visibility via getShowWeatherWidget/getShowNewsWidget and renders widgets conditionally.
    • Settings updates emit a client-config-changed event; EmptyChat listens to this and storage events to refresh without reload.

Written for commit 6150784. Summary will update automatically on new commits.

@ItzCrazyKns ItzCrazyKns self-requested a review November 28, 2025 12:33
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 4 files

Prompt for AI agents (all 2 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/components/EmptyChat.tsx">

<violation number="1" location="src/components/EmptyChat.tsx:17">
The weather widget defaults to visible each mount, so users who disabled it still see it briefly and the widget still executes geolocation/API calls. Initialize the state from `getShowWeatherWidget()` instead of hard-coding `true`.</violation>

<violation number="2" location="src/components/EmptyChat.tsx:18">
The news widget also ignores the persisted “showNewsWidget” flag until after the first paint, so hidden widgets flash and still run their side-effects. Initialize `showNews` from `getShowNewsWidget()` (with a window guard) so disabled widgets never mount.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

ItzCrazyKns and others added 3 commits November 28, 2025 18:17
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@ItzCrazyKns ItzCrazyKns merged commit 5901a96 into ItzCrazyKns:master Nov 28, 2025
1 check passed
@ItzCrazyKns
Copy link
Owner

Thanks!!

@PSYEONE
Copy link
Contributor Author

PSYEONE commented Nov 28, 2025

No worries! Just started using this yesterday and had to edit the code to disable news, I am always not a fan of news lol! Thanks for the opportunity to contribute to your project :)

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.

2 participants