Skip to content

✨ feat(dashboard): close settings dialog when clicking Save & close with no changes - #12328

Merged
kubestellar-prow[bot] merged 1 commit into
hivecommons:v5from
repires:feat/agent-settings-save-close-no-change
Oct 16, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
hivecommons:v5from
repires:feat/agent-settings-save-close-no-change

Conversation

@repires

@repires repires commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

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

…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>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#12411 🐛 dashboard: Evidence card typography and chart sizing match the rest of the dashboard same files src/pkg/dashboard/static/index.html
#12386 ✨ evidence: panel 5 — claim vs verdict per week same files src/pkg/dashboard/static/index.html
#12388 ✨ dashboard: Evidence panel 4 — boundary enforcement (attempted vs blocked writes per tier; sentinel hits/week) same files src/pkg/dashboard/static/index.html
#12332 ✨ feature: Add cadence templates for quickly setting cadence for all agents (#12300) same files src/pkg/dashboard/static/index.html
#12389 ✨ evidence: panel 6 — work balance (issues opened by kind vs closed) same files src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot 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.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot 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.

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 in src/pkg/dashboard/agent_config_single_save_test.go:31-38; a sibling assertion that the no-changes branch calls closeConfigDialog() would stop this from silently regressing. Non-blocking.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot 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.

Reviewed — no findings from this perspective.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot 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.

Reviewed — no findings from this perspective.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot 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.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Non-blocking test note: nothing in the suite pins the new behaviour, so a later refactor of the Save & close handler could drop the closeConfigDialog() call and merge green — exactly the silent-regression class csp_inline_handlers_test.go exists for (#4680). The repo's convention for static/index.html JS is a source-level guard; this one fits in src/pkg/dashboard/webstatic/static_index_test.go (or alongside the CSP test):

// 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 dashboard/index.html keeps the legacy page honest. Happy to open a follow-up test PR after this merges if you'd rather not widen this one.


🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson

Copy link
Copy Markdown
Member

Reviewed: two-line fix, both copies of index.html, changelog present, CI green.
/lgtm
/approve

@kubestellar-prow kubestellar-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 16, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 4fee248792acff472b2cc9cc123c2d49dec2c1f0

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2026
@kubestellar-prow
kubestellar-prow Bot merged commit 1da89d8 into hivecommons:v5 Oct 16, 2026
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ feature: Agent settings Save & Close button behavior - close on no change

2 participants