Skip to content

feat(settings): clean up Jobs page, drop dead toggle, POC dirty-tracking action bar#429

Open
larsgeorge-db wants to merge 1 commit into
mainfrom
feat-settings-jobs-cleanup-and-dirty-tracking-poc
Open

feat(settings): clean up Jobs page, drop dead toggle, POC dirty-tracking action bar#429
larsgeorge-db wants to merge 1 commit into
mainfrom
feat-settings-jobs-cleanup-and-dirty-tracking-poc

Conversation

@larsgeorge-db
Copy link
Copy Markdown
Collaborator

Summary

Three related Settings UX changes, all frontend-only.

1. General Settings cleanup

  • Removed the Enable Background Jobs toggle from general-settings.tsx. It was a dead control: the backend never read or persisted enable_background_jobs, so flipping it changed nothing other than local React state.
  • Moved the Workspace Deployment Path input from General Settings to the Jobs Configuration page (under Job Cluster ID), where it belongs. The path actually governs workflow installation, so it now lives next to the cluster/workflow controls it pairs with.
  • i18n keys for the path field moved from settings.general.workspaceDeploymentPath.* to settings.jobs.workspaceDeploymentPath.* across all seven shipped locales (en, de, nl, fr, es, it, ja). One new key (requiredHint) added per locale.
  • Added a path-required guard on the Jobs page: per-workflow Enable switches are disabled for currently-off rows when the deployment path is empty (already-on rows stay clickable for recovery), and Save is blocked with a destructive toast when any workflow is enabled but the path is empty. Inline Alert rendered under the path input when empty.

2. POC: dirty-tracking + Save/Cancel action bar on the Jobs page

  • New shared component 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.
  • New shared component UnsavedChangesGuard (src/frontend/src/components/common/unsaved-changes-guard.tsx): installs a beforeunload listener while isDirty is true. Catches reload, tab close, and address-bar nav. Does not block in-app <Link> clicks (see Caveat below).
  • jobs-settings.tsx migrated to use both: a JobsSnapshot (cluster id, deployment path, sorted enabled-job ids) is captured at load time, compared via a stable snapshotKey() to derive isDirty, restored on Cancel, and refreshed after a successful Save. The old Save button in DataTable.toolbarActions is gone.

3. PRD #428 for the broader rollout

Caveats

Backend impact

None. SettingsManager.update_settings already persisted workspace_deployment_path and triggers _reinitialize_workspace_deployer, so the moved input continues to work end-to-end without API changes.

Test plan

  • General Settings: confirm the Background Jobs toggle and Workspace Deployment Path input are gone; remaining sections (Unity Catalog, Audit Log, LLM) save correctly.
  • Jobs Settings:
    • Load page; confirm Job Cluster ID, Workspace Deployment Path, then the workflows table render in that order.
    • Clear the deployment path; confirm per-workflow Enable switches grey out for currently-off rows but stay clickable for currently-on rows; the inline Alert appears under the path input.
    • Enable a workflow with the path empty, click Save; confirm the destructive toast blocks the save.
    • Set a path, save; reload the page; confirm values persisted.
    • Edit any field; confirm the sticky action bar appears with the "unsaved changes" pill, Save, and Cancel.
    • Click Cancel; confirm every edited field reverts to the loaded value and the bar disappears.
    • Edit a field, hit browser reload; confirm the native "unsaved changes" prompt fires.
  • i18n: switch language to each of de/nl/fr/es/it/ja; confirm the Jobs page renders the workspace path label + help in the locale; confirm General Settings no longer references background jobs / deployment path strings.
  • TypeScript: tsc --noEmit clean (verified locally).

Refs #428

…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
@larsgeorge-db larsgeorge-db requested a review from a team as a code owner May 22, 2026 20:54
@larsgeorge-db larsgeorge-db added feat/settings Settings related feature improvement Track improvements to existing features. javascript Pull requests that update javascript code labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat/settings Settings related feature improvement Track improvements to existing features. javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant