feat(settings): clean up Jobs page, drop dead toggle, POC dirty-tracking action bar#429
Open
larsgeorge-db wants to merge 1 commit into
Open
feat(settings): clean up Jobs page, drop dead toggle, POC dirty-tracking action bar#429larsgeorge-db wants to merge 1 commit into
larsgeorge-db wants to merge 1 commit into
Conversation
…ing action bar Two related Settings UX changes plus the follow-up PRD: 1. General settings: drop the "Enable Background Jobs" toggle, which was a dead control (never read or persisted on the backend), and move the "Workspace Deployment Path" input to the Jobs Configuration page so it sits next to the job-cluster and workflow toggles it actually governs. Per-workflow Enable switches are disabled (and Save is blocked with a toast) when the deployment path is empty, since workflow installation requires it. i18n keys for the path field move from settings.general.* to settings.jobs.* across all seven shipped locales and a new requiredHint string is added. 2. Jobs page: introduce a per-form dirty-tracking POC. A snapshot of the last-loaded/saved cluster id, deployment path, and enabled-job set drives an isDirty derivation; Cancel reverts every edit to the snapshot; Save resets the snapshot on success. Two small shared primitives back the POC: a SettingsActionBar component (sticky bar that renders only when dirty) and an UnsavedChangesGuard component that installs a beforeunload listener while dirty. 3. PRD #428 captures the broader plan to roll the dirty-tracking convention out across all six form-style settings sub-views (general, ui-customization, git, delivery, jobs, search-config) with a static bottom-left Save/Cancel block instead of the current sticky right-aligned POC variant. List/CRUD settings pages and the BrowserRouter -> Data Router migration needed for in-app navigation blocking are explicitly out of scope of that PRD. No backend changes. No new i18n keys outside the moved path block; the shared action bar reuses existing common.actions.* and common.confirmations.unsavedChanges keys. Refs #428
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
Three related Settings UX changes, all frontend-only.
1. General Settings cleanup
general-settings.tsx. It was a dead control: the backend never read or persistedenable_background_jobs, so flipping it changed nothing other than local React state.settings.general.workspaceDeploymentPath.*tosettings.jobs.workspaceDeploymentPath.*across all seven shipped locales (en,de,nl,fr,es,it,ja). One new key (requiredHint) added per locale.Alertrendered under the path input when empty.2. POC: dirty-tracking + Save/Cancel action bar on the Jobs page
SettingsActionBar(src/frontend/src/components/settings/settings-action-bar.tsx): sticky bottom bar that renders only when the page is dirty. Save (primary, spinner while saving) + Cancel (outline, calls a caller-supplied revert) + an "unsaved changes" status pill.UnsavedChangesGuard(src/frontend/src/components/common/unsaved-changes-guard.tsx): installs abeforeunloadlistener whileisDirtyis true. Catches reload, tab close, and address-bar nav. Does not block in-app<Link>clicks (see Caveat below).jobs-settings.tsxmigrated to use both: aJobsSnapshot(cluster id, deployment path, sorted enabled-job ids) is captured at load time, compared via a stablesnapshotKey()to deriveisDirty, restored on Cancel, and refreshed after a successful Save. The oldSavebutton inDataTable.toolbarActionsis gone.3. PRD #428 for the broader rollout
docs/prds/prd-settings-form-save-cancel.md, filed as issue PRD: Consistent Save / Cancel and dirty-tracking across Settings form sub-views #428. Captures the plan to roll the dirty-tracking convention out across all six form-style settings sub-views (general,ui-customization,git,delivery,jobs,search-config-editor) with a static bottom-left Save/Cancel block — replacing this POC's sticky right-aligned bar, per the agreed convention.BrowserRouter→ Data Router migration needed for in-app navigation blocking viauseBlocker.Caveats
BrowserRouter(declarative), anduseBlockerrequirescreateBrowserRouter+RouterProvider. The visible action bar plusbeforeunloadis judged sufficient for now; full in-app blocking is tracked in PRD: Consistent Save / Cancel and dirty-tracking across Settings form sub-views #428's out-of-scope section.Backend impact
None.
SettingsManager.update_settingsalready persistedworkspace_deployment_pathand triggers_reinitialize_workspace_deployer, so the moved input continues to work end-to-end without API changes.Test plan
Alertappears under the path input.tsc --noEmitclean (verified locally).Refs #428