Skip to content

Add metadata-driven admin configuration form - #149

Closed
tkadauke-syrus[bot] wants to merge 3 commits into
syrus/direct-872from
syrus/direct-874
Closed

tkadauke-syrus[bot] wants to merge 3 commits into
syrus/direct-872from
syrus/direct-874

Conversation

@tkadauke-syrus

@tkadauke-syrus tkadauke-syrus Bot commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Enable the admin configuration screen to be driven by the existing options metadata so React can render the same system settings without hard-coding the option list.

Added a reusable ConfigOptionForm component, admin configuration fetch/update hooks, and an AdminConfigPage that posts updates, shows the success flash, and refetches saved values. The Rails admin configuration route now exposes a React mount point while preserving the legacy fallback form, and the layout emits CSRF meta tags for JSON updates.

Triggered by @tkadauke


Authored by Codex (trigger=initial). Review carefully.
This PR was implemented by Syrus across 6 Runs at a total cost of $0.00.

tkadauke-syrus Bot and others added 2 commits June 11, 2026 09:32
Expose the admin/settings/help data needed by the React migration without requiring screen-scraping of the legacy HTML controllers.

Adds JSON controllers and routes for admin slave CRUD, admin configuration metadata/update, per-user settings metadata/update, and help topic rendering with internal Textile link rewriting. Includes functional coverage for the new API response shapes, authorization paths, persistence behavior, and missing help topics.

Co-Authored-By: Thomas Kadauke <thomas.kadauke@googlemail.com>
The test suite failure came from new API configuration tests expecting legacy controller redirect helpers for unauthenticated and unauthorized requests.

Updated those assertions to match the JSON API behavior implemented by `Api::BaseController`: unauthenticated requests return `401` with `Not authenticated`, and permission failures return `403` with `Access denied`. Verified the focused API tests, Vite test build, Zeitwerk check, and full Rails test suite locally.

Co-Authored-By: Thomas Kadauke <thomas.kadauke@googlemail.com>
Enable the admin configuration screen to be driven by the existing options metadata so React can render the same system settings without hard-coding the option list.

Added a reusable `ConfigOptionForm` component, admin configuration fetch/update hooks, and an `AdminConfigPage` that posts updates, shows the success flash, and refetches saved values. The Rails admin configuration route now exposes a React mount point while preserving the legacy fallback form, and the layout emits CSRF meta tags for JSON updates.

Co-Authored-By: Thomas Kadauke <thomas.kadauke@googlemail.com>
@tkadauke-syrus

Copy link
Copy Markdown
Contributor Author

Landed via Epic merge-train (integration PR #171). Job #874.

@tkadauke-syrus tkadauke-syrus Bot closed this Jun 11, 2026
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.

0 participants