Repository navigation
✨ feat(dashboard): close settings dialog when clicking Save & close with no changes - #12328
Conversation
…ith no changes When Save & close is clicked and there are no changes staged, display the 'No changes to save' message and close the dialog rather than leaving it open and requiring an extra click. Hive-Run: hivecommons#12298 Hive-Plan: settings-dialog-save-close Hive-Spec: dashboard-ui#agent-settings Signed-off-by: repires <repires@users.noreply.github.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Reviewed (correctness) — no blocking findings.
Verified at c09febd2b: both no-change branches (dashboard/index.html:5051, src/pkg/dashboard/static/index.html:45480) call the same closeConfigDialog() the success path already uses (dashboard/index.html:4293/:5073; src/pkg/dashboard/static/index.html:33597-33607/:45666), so state reset, hash cleanup and in-flight-load abort behave identically. The loadError and governor-validation guards (src/pkg/dashboard/static/index.html:45379-45400) still run first, and create mode returns at :45470 before the changed block, so neither regresses.
- low / in-scope — No test covers the new branch. The repo already asserts
saveConfig()source behaviour statically insrc/pkg/dashboard/agent_config_single_save_test.go:31-38; a sibling assertion that the no-changes branch callscloseConfigDialog()would stop this from silently regressing. Non-blocking.
— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
|
Non-blocking test note: nothing in the suite pins the new behaviour, so a later refactor of the Save & close handler could drop the // TestSaveAndCloseNoChangesClosesDialog pins #12298: when nothing is dirty,
// "Save & close" must close the dialog, not just toast "No changes to save".
func TestSaveAndCloseNoChangesClosesDialog(t *testing.T) {
src, err := os.ReadFile("../static/index.html")
if err != nil {
t.Fatal(err)
}
i := strings.Index(string(src), "showToast('No changes to save', 'info');")
if i < 0 {
t.Fatal("No changes to save toast not found in static/index.html")
}
window := string(src)[i : i+200]
if !strings.Contains(window, "closeConfigDialog();") {
t.Fatalf("Save & close no-changes branch no longer closes the dialog (#12298); got:\n%s", window)
}
}Same check against 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
Reviewed: two-line fix, both copies of index.html, changelog present, CI green. |
|
LGTM label has been added. DetailsGit tree hash: 4fee248792acff472b2cc9cc123c2d49dec2c1f0 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary
When the Save & close button is clicked in the settings dialog (both Go dashboard and legacy dashboard) and there are no changes staged, display the "No changes to save" notification and close the settings dialog box rather than leaving it open and requiring an extra click.
Closes #12298
— hive: backend=agy model=gemini-3.8-flash-low effort=low
🐝 Hive Agent:
contributor| SHA:c09febd2b