feat(layout): add config-only mode for non-technical admin UIs#75
Merged
Conversation
Adds a new LAYOUT_MODE=config-only that lands directly on the config editor for a pre-selected tenant, with no sidebar navigation and no superadmin role option. Intended for demo admin panels that should feel like a product settings page rather than a developer tool. - ConfigOnlyLayout: header-only shell (logo, app name, debug bar, dark mode toggle) with no sidebar - Auth: defaults to admin role in config-only mode; caps any stored superadmin session to admin on load - AuthBar: filters superadmin from the role dropdown in config-only mode - App routing: config-only mode gets its own route tree to avoid conflicting with the full Layout's /tenants/:id routes Closes #11 Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Adds unit tests for the new config-only branches in loadAuth (superadmin cap, default role fallback) and a render test for ConfigOnlyLayout (header identity, no sidebar nav) to satisfy the Codecov patch threshold. Co-Authored-By: Claude <noreply@anthropic.com>
Covers the new config-only routing branch and the re-indented standard Layout routes in App.tsx, bringing App.tsx branch coverage to 100% and pushing patch coverage above the Codecov 80% threshold. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Summary
LAYOUT_MODE=config-onlyfor non-technical admin UIs that should feel like a product settings page — the landing page is the config editor for a pre-selected tenant, with no schema or tenant navigation.adminrole and filtering superadmin out of the debug role selector in this mode.ConfigOnlyLayout(header-only, no sidebar) with its own route tree to avoid path conflicts with the full-featuredLayout.Test plan
LAYOUT_MODE=config-only TENANT_ID=<uuid>— landing page redirects to/tenants/<uuid>(no sidebar, header shows logo + app name + dark mode toggle)adminanduser(nosuperadmin)superadminsession in localStorage is capped toadminon loadLAYOUT_MODE=full— all existing routes and sidebar unaffectedLAYOUT_MODE=embed— embed layout unaffectednpx vitest run)Closes #11