Skip to content

fix: clamp theme automation interval input#336

Merged
SamXop123 merged 2 commits into
SamXop123:mainfrom
mayurigade-hub:fix/theme-automation-interval-clamp
Jul 7, 2026
Merged

fix: clamp theme automation interval input#336
SamXop123 merged 2 commits into
SamXop123:mainfrom
mayurigade-hub:fix/theme-automation-interval-clamp

Conversation

@mayurigade-hub

Copy link
Copy Markdown
Contributor

Related Issue

Closes #323


Description

Fixed an issue where the Theme Automation interval input could display values outside the allowed range even though the backend automatically sanitized them.

Previously, if a user entered a value such as 999, the backend correctly clamped it to 120, but the input field continued to display 999. This caused the UI to become inconsistent with the actual saved configuration.

This fix clamps the interval value between 1 and 120 in settings.js and immediately updates the input field with the sanitized value before saving.


Changes Made

  • Added client-side validation for the Theme Automation interval input.
  • Clamped the parsed interval value to the valid range (1–120).
  • Updated the input field to display the clamped value before saving.
  • Ensured the UI always matches the value stored by the backend.

Steps to Test

  1. Open Settings.
  2. Enable Theme Automation.
  3. Enter 999 in Check Interval (Minutes).
  4. Click outside the input or trigger a save.
  5. Verify the input automatically changes to 120.
  6. Enter 0 and verify it changes to 1.
  7. Enter a valid value such as 30 and verify it remains unchanged.
  8. Confirm the saved setting matches the displayed value.

Expected Result

  • The interval value is always clamped between 1 and 120.
  • The input field displays the sanitized value immediately.
  • The UI and saved configuration remain consistent.
  • Valid values are saved without modification.

Files Changed

  • settings.js

Type of Change

☑️ Bug fix

☐ New feature

☐ Breaking change

☐ Documentation update

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

@mayurigade-hub is attempting to deploy a commit to the Dot_NotSam's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 557afd0b-6d9c-40e7-b63b-0f5ae2a4dece

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

github.rest.pulls.createComment does not exist in the Octokit API.
Pull request comments must be posted via github.rest.issues.createComment
with issue_number, since GitHub treats PRs as issues for commenting.
@mayurigade-hub

Copy link
Copy Markdown
Contributor Author

Hello @SamXop123
Please review this PR.
Thank you!

@SamXop123 SamXop123 merged commit e6c94e7 into SamXop123:main Jul 7, 2026
4 of 5 checks passed
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🎉 Congratulations @mayurigade-hub! 🎉

Your pull request has been successfully merged into Paraline! Thank you so much for your valuable contribution and effort. Every single improvement helps make Paraline a better desktop experience for everyone! 🙌

🚀 What's Next?

  • Keep the momentum going! Feel free to browse through our open Issues and grab another one that interests you!
  • Support the Project: If you enjoyed contributing to Paraline, please take a second to star our repository! It helps increase the project's visibility and supports our community. ⭐

💬 Stay Connected:
Have any questions, want feedback, or just want to discuss further contributions? Feel free to reach out directly to the maintainer on Discord: dot_notsam!

Thank you again, and keep up the amazing work! 💻✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Theme Automation Interval Input Does Not Clamp UI Value After Invalid Entry

2 participants