Persist user UI settings and wire Settings > Interface #221

Closed
opened 2026-07-09 10:27:21 +02:00 by zemion · 2 comments
Owner

Scope

The Settings area has user-facing Interface and Workspace preferences, but most of them are currently local React state only and reset on reload. Persist them as tenant-scoped user settings and apply them through the WebUI shell.

Current state

  • The database already has a users.settings JSON column in govoplan-access.
  • Profile display names are persisted in account/user columns.
  • Language preference is persisted under users.settings.i18n via PATCH /auth/profile.
  • Interface preferences such as compact tables, inline help hints, reduced motion, and sticky section sidebars are currently only local state in SettingsPage.

Acceptance criteria

  • Add a typed user UI preferences payload to the auth/profile contract.
  • Return the persisted UI preferences in /auth/me and /auth/login responses.
  • Persist updates under a stable users.settings namespace, e.g. ui.
  • Wire Settings > Interface and Settings > Workspace to load/save those values.
  • Apply the saved preferences globally where supported, at minimum compact table density, inline help hints, reduced motion, and sticky section navigation.
  • Add focused backend contract coverage and keep the WebUI build passing.
## Scope The Settings area has user-facing Interface and Workspace preferences, but most of them are currently local React state only and reset on reload. Persist them as tenant-scoped user settings and apply them through the WebUI shell. ## Current state - The database already has a users.settings JSON column in govoplan-access. - Profile display names are persisted in account/user columns. - Language preference is persisted under users.settings.i18n via PATCH /auth/profile. - Interface preferences such as compact tables, inline help hints, reduced motion, and sticky section sidebars are currently only local state in SettingsPage. ## Acceptance criteria - Add a typed user UI preferences payload to the auth/profile contract. - Return the persisted UI preferences in /auth/me and /auth/login responses. - Persist updates under a stable users.settings namespace, e.g. ui. - Wire Settings > Interface and Settings > Workspace to load/save those values. - Apply the saved preferences globally where supported, at minimum compact table density, inline help hints, reduced motion, and sticky section navigation. - Add focused backend contract coverage and keep the WebUI build passing.
zemion added the
area/webui
codex/ready
module/campaign
module/core
labels 2026-07-09 10:39:09 +02:00
Author
Owner

Codex State: linked 2026-07-09

This is the core/settings persistence slice for govoplan-campaign#39 (i18n, theming, and user preferences). The immediate scope is to persist tenant-scoped user UI preferences in the shared auth/profile contract and apply them in the core WebUI shell. Campaign can then consume the resulting preferences instead of owning the persistence surface.

## Codex State: linked 2026-07-09 This is the core/settings persistence slice for govoplan-campaign#39 (i18n, theming, and user preferences). The immediate scope is to persist tenant-scoped user UI preferences in the shared auth/profile contract and apply them in the core WebUI shell. Campaign can then consume the resulting preferences instead of owning the persistence surface.
zemion added the
priority
p1
status
in-progress
type
feature
labels 2026-07-09 10:43:25 +02:00
Author
Owner

Implemented the core WebUI/profile slice for persisted user interface preferences.

Summary:

  • Added shared UserUiPreferences schema and auth profile contract support.
  • /auth/me now returns user UI preferences, and /auth/profile persists language/locale/timezone plus UI preference updates under the existing user settings store.
  • Settings > Interface/Workspace now loads, tracks unsaved changes, saves preferences, and refreshes the auth user state.
  • The core WebUI shell applies theme, compact table, inline help, reduced motion, and sticky-sidebar preferences through document-level hooks.
  • Added translation entries and verified the previously visible raw profile-saved i18n key is translated structurally.

Verification passed:

  • python -m unittest tests.test_api_smoke.ApiSmokeTests.test_language_packages_tenant_enablement_and_user_preference tests.test_api_smoke.ApiSmokeTests.test_profile_refresh_and_system_role_protection_model
  • node webui/scripts/audit-i18n-structural.mjs
  • npm run build
  • npm run test:module-permutations

Closing this core slice. govoplan-campaign#39 remains open for any campaign-specific adoption and polish.

Implemented the core WebUI/profile slice for persisted user interface preferences. Summary: - Added shared UserUiPreferences schema and auth profile contract support. - /auth/me now returns user UI preferences, and /auth/profile persists language/locale/timezone plus UI preference updates under the existing user settings store. - Settings > Interface/Workspace now loads, tracks unsaved changes, saves preferences, and refreshes the auth user state. - The core WebUI shell applies theme, compact table, inline help, reduced motion, and sticky-sidebar preferences through document-level hooks. - Added translation entries and verified the previously visible raw profile-saved i18n key is translated structurally. Verification passed: - python -m unittest tests.test_api_smoke.ApiSmokeTests.test_language_packages_tenant_enablement_and_user_preference tests.test_api_smoke.ApiSmokeTests.test_profile_refresh_and_system_role_protection_model - node webui/scripts/audit-i18n-structural.mjs - npm run build - npm run test:module-permutations Closing this core slice. govoplan-campaign#39 remains open for any campaign-specific adoption and polish.
zemion removed the
status
in-progress
label 2026-07-09 11:00:59 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-core#221
No description provided.