Land Epic #63: React SPA: Admin Panel, Settings & Help - #171
Merged
Merged
Conversation
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>
Admin slave management needs React equivalents for the legacy list, detail, create, edit, clone, and delete flows while preserving the existing Rails inventory behavior. Added slave CRUD hooks, reusable form handling for all slave fields including environment variables, React pages for the `/admin/slaves/*` screens, and a route matcher for those pages. The slave API now returns the form-visible base path, default base path, and password field needed by clone/edit flows, with CSRF metadata available for React mutations. Verified the updated API and legacy admin controller behavior with the targeted Rails controller tests. 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>
User settings need the same metadata-driven React path as admin configuration so future options from `user_options.yml` render without page-specific code. Added a `UserSettingsPage` that loads `/api/settings/options`, renders `ConfigOptionForm`, posts updates to `/api/settings`, refetches values after save, and shows the existing success flash text. The `/settings` view now exposes a React mount point while keeping the legacy Rails form as fallback, with focused controller/API tests covering route wiring and persistence. Co-Authored-By: Thomas Kadauke <thomas.kadauke@googlemail.com>
Help topics need to behave like the legacy filesystem-backed Textile pages while being renderable through the React migration path. The viewer now captures wildcard topic paths, falls back `/help_topics` to the `index` topic, handles nested topics such as `plan/chain`, and shows an inline not-found state for missing API results. Added the typed `useHelpTopic` hook and `HelpTopicPage`, plus importmap-compatible runtime wiring so the existing public help routes mount the React Router view without requiring login. Internal `/help_topics/*` links rendered from server HTML are intercepted for client-side navigation, and focused controller tests cover index and nested topic API responses. Co-Authored-By: Thomas Kadauke <thomas.kadauke@googlemail.com>
This was referenced Jun 11, 2026
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.
Atomic Epic landing via Syrus merge-train.
Members: