Skip to content

feat(frontend): add unlimited updates toggle to group policy form - #1589

Draft
nurbu wants to merge 1 commit into
flatcar:mainfrom
nurbu:fix-issue-265-unlimited-updates
Draft

feat(frontend): add unlimited updates toggle to group policy form#1589
nurbu wants to merge 1 commit into
flatcar:mainfrom
nurbu:fix-issue-265-unlimited-updates

Conversation

@nurbu

@nurbu nurbu commented Aug 15, 2026

Copy link
Copy Markdown

Adds an 'Unlimited updates' switch to the group edit dialog's Policy tab, so unlimited updates no longer require knowing to type 999999 into the max-updates field manually. The number field disables itself when the switch is on.

Fixes #265

Adds a switch to the group edit dialog so admins can mark a group as unlimited without needing to know the 999999 sentinel value.

Fixes flatcar#265
Copilot AI lite review requested due to automatic review settings August 15, 2026 03:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds an “Unlimited updates” toggle to the Group Edit dialog’s Policy tab so users can enable the backend’s “no rate limiting” mode without manually entering a sentinel max-updates value.

Changes:

  • Added an i18n string for the new “Unlimited updates” switch label.
  • Exported the existing “unlimited updates” threshold constant so it can be reused by the edit dialog.
  • Added the toggle + conditional disabling/validation for maxUpdates, and mapped the toggle to policy_max_updates_per_period on submit.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
frontend/src/i18n/locales/en/groups.json Adds a translation key for the new toggle label.
frontend/src/components/Groups/GroupItem.tsx Exports the existing backend threshold constant for reuse.
frontend/src/components/Groups/GroupEditDialog/GroupPolicyForm.tsx Adds the “Unlimited updates” switch and disables the max-updates field when enabled (also raises min to 1).
frontend/src/components/Groups/GroupEditDialog/GroupEditDialog.tsx Wires the toggle into initial values, validation, and submit payload mapping.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

"safe_mode_lower": "Safe mode",
"status_breakdown": "Status Breakdown",
"track_identifier": "Track (identifier for clients, filled with the group ID if omitted)",
"unlimited_updates_lower": "Unlimited updates",
Comment on lines +72 to +73
policy_max_updates_per_period: values.updatesUnlimited
? Max_UPDATES_PER_TIME_PERIOD : parseInt(values.maxUpdates),
Comment on lines +193 to +197
maxUpdates: Yup.number(). when('updatesUnlimited', {
is: true,
then: schema => schema.notRequired(),
otherwise: () => positiveNum(),
}),
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.

Improve the updates policy text

2 participants