Settings: Autosync first, global-scope warning on commit-default overrides - #759
Merged
Conversation
…rides Reorder the Settings page so Autosync precedes Commit and Push. In the 'Edit commit defaults' popup, show an error-palette reminder that these settings are global whenever a workflow override is selected or default metadata is present, and recolor SAVE with a new .danger button variant. The warning is purely advisory — SAVE stays functional.
fiskus
marked this pull request as ready for review
July 10, 2026 13:04
The error color won only by CSS rule order; now a danger button simply is not primary, so no future primary-scoped rule can outrank it.
Member
Author
|
@greptileai Please re-review and update the confidence score — the primary/danger class stacking is resolved: danger now replaces primary at the class level in IconButton. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small QuiltSync Settings changes, designed from operator review of the enforcement-era settings UX:
This deliberately adds no validation machinery: with commit-time enforcement, per-field live validation, and resolution diagnostics all merged, a misconfigured global override now fails loudly and attributably at use time — this slice makes the global scope visible at configuration time. The semantically-complete alternative (per-bucket overrides with a selector) stays deferred until someone actually needs per-bucket divergence.
Implementation notes
dangervariant for the form buttons (none existed) — CSS mirrors the existingprimary/warningvariant structure.Testing
4 new native UI tests for the warning trigger; full gate green (fmt, clippy native + wasm with denied warnings, workspace tests, 53 UI tests). Visual behavior (warning placement, red SAVE, section order) verified by the operator in the running app.
Versions
quilt-sync
0.18.3-alpha9; quilt-rs untouched.Greptile Summary
This PR makes two UX improvements to the QuiltSync Settings page: Autosync is reordered to appear before Commit and Push, and the "Edit commit defaults" popup gains a reactive red warning banner — plus a red Save button — whenever a workflow override or non-empty default metadata is configured, flagging that these settings apply globally across all buckets.
settings.rs): a one-line swap putsAutosyncSectionbeforePublishSection.publish.rs): a pureshow_global_scope_warninghelper (override selected OR metadata non-whitespace) drives aSignal::derive-based reactive signal; the warning<p role="alert">and the Save button'sdangerprop both derive from this signal. Four native unit tests cover all four branches of the trigger logic.dangerbutton variant (icon.rs,form_primary.rs,button.css): newMaybeProp<bool>prop onIconButtonandFormPrimary; inIconButtontheprimaryclass is now gated on!danger, so the two variants are mutually exclusive at the class level. The CSS danger rules mirror the existingprimary/warningstructure with correct disabled-hover and icon-invert coverage. The previous review's stacking concern is fully resolved.Confidence Score: 5/5
Safe to merge — changes are purely additive UI logic with no mutations to data paths or business logic.
The warning trigger is a pure function covered by four tests. The
dangerclass now structurally replacesprimaryrather than depending on CSS cascade order, resolving the one concern raised in the prior round. The CSS danger variant faithfully mirrors the existingprimary/warningpattern including the disabled-hover and icon-invert rules. The section reorder is a one-line swap with no logic involved. No data flows, persistence, or side effects are altered.No files require special attention.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User opens Edit commit defaults popup] --> B{Current state:\noverride selected OR\nmetadata non-empty?} B -- Yes --> C[show_warning = true] B -- No --> D[show_warning = false] C --> E[Render global-scope-warning paragraph\nrole=alert] C --> F[Save button renders with .danger class\nerror red background] D --> G[No warning paragraph] D --> H[Save button renders with .primary class\nnormal blue background] E --> I{User changes radio / metadata} G --> I I --> B F --> J[User clicks Save] H --> J J --> K[Saves regardless — warning is visual only]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[User opens Edit commit defaults popup] --> B{Current state:\noverride selected OR\nmetadata non-empty?} B -- Yes --> C[show_warning = true] B -- No --> D[show_warning = false] C --> E[Render global-scope-warning paragraph\nrole=alert] C --> F[Save button renders with .danger class\nerror red background] D --> G[No warning paragraph] D --> H[Save button renders with .primary class\nnormal blue background] E --> I{User changes radio / metadata} G --> I I --> B F --> J[User clicks Save] H --> J J --> K[Saves regardless — warning is visual only]Reviews (2): Last reviewed commit: "Make danger replace primary at the class..." | Re-trigger Greptile