Skip to content

feat: edit UI configuration from the admin page - #574

Merged
JeromeBu merged 3 commits into
mainfrom
admin-ui-config-in-db
Aug 24, 2026
Merged

feat: edit UI configuration from the admin page#574
JeromeBu merged 3 commits into
mainfrom
admin-ui-config-in-db

Conversation

@JeromeBu

@JeromeBu JeromeBu commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • persist UI configuration as a singleton JSONB document in PostgreSQL and keep the existing admin editor
  • provide a lightweight live JSON syntax highlight in the editor without adding a client dependency
  • import a mounted legacy ui-config.json exactly once from the config_ui migration, or use an embedded standard configuration for new installations
  • validate migration input against the frozen historical schema and fail explicitly on unreadable, malformed, or incompatible files
  • require a valid singleton row at startup and update it without implicit recreation
  • bootstrap the first Catalogi administrator only when the OIDC email matches CATALOGI_INITIAL_ADMIN_EMAIL and no administrator exists, including concurrent callbacks and case-insensitive lookup
  • document fresh installation and upgrade workflows for Docker Compose and Helm
  • allow the one-shot Helm compatibility mount to be disabled independently while retaining translation customization

Validation

  • 27 targeted migration, UI configuration, deployment example, and authentication tests pass
  • 132 API tests pass and 4 are skipped when the two live GitHub-dependent test files are excluded
  • API/web/e2e typechecks, formatting, and web lint pass
  • API and web production builds pass
  • Helm renders successfully with the compatibility import enabled, disabled while translations remain enabled, all customization disabled, and with every checked-in example values file
  • the two live GitHub-dependent test files could not be validated locally because GitHub returned HTTP 403/rate-limit responses; they remain covered by CI

Deployment notes

For an existing deployment, keep the legacy ui-config.json mount for the first startup on this version, verify the imported value, then remove the mount. For Helm, set customization.legacyUiConfigImportEnabled to false after the successful import. PostgreSQL is the only source of truth afterwards.

For a new deployment, configure OIDC and set CATALOGI_INITIAL_ADMIN_EMAIL to the intended first administrator. After that address has signed in successfully, the variable can be removed. Catalogi creates no local password or admin/admin account.

Deliberate scope

This PR does not add administrator role management in the UI. It keeps last-write-wins behavior for concurrent UI configuration edits and does not add configuration history.

@JeromeBu
JeromeBu force-pushed the admin-ui-config-in-db branch 3 times, most recently from de9719c to d865625 Compare August 21, 2026 17:01
JeromeBu and others added 2 commits August 21, 2026 20:29
Move the UI configuration out of the static ui-config.json import into a
config_ui singleton table, read per-request so it can be edited at runtime.
Reads fall back to the bundled default (overridable by ConfigMap) until an
admin saves, keeping the file live during migration. Adds an admin-only
updateUiConfig mutation; the editing form will come in a later change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JeromeBu
JeromeBu force-pushed the admin-ui-config-in-db branch from d865625 to 53fe748 Compare August 21, 2026 18:29
@JeromeBu
JeromeBu force-pushed the admin-ui-config-in-db branch from 53fe748 to 80a30c2 Compare August 21, 2026 20:24
@JeromeBu
JeromeBu marked this pull request as ready for review August 24, 2026 13:44
@JeromeBu
JeromeBu merged commit fdf128c into main Aug 24, 2026
8 checks passed
@JeromeBu
JeromeBu deleted the admin-ui-config-in-db branch August 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant