Skip to content

feat(web): move Cascade Defaults to Global section in sidebar#783

Merged
aaight merged 1 commit intodevfrom
feature/move-cascade-defaults-to-global
Mar 13, 2026
Merged

feat(web): move Cascade Defaults to Global section in sidebar#783
aaight merged 1 commit intodevfrom
feature/move-cascade-defaults-to-global

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented Mar 13, 2026

Summary

Move "Cascade Defaults" from Settings > General to the Global section of the dashboard sidebar, improving information architecture for platform-level configuration.

Changes

  • New route: Created /web/src/routes/global/defaults.tsx — New page component for Global Defaults
  • Route registration: Updated route-tree.ts to register the new route
  • Sidebar navigation: Added "Cascade Defaults" entry to the Global nav section (superadmin-only visibility)
  • Cleanup: Removed the Cascade Defaults section from Settings > General — now only contains Organization form

Architecture

The new Global Defaults page follows the existing global page pattern:

  • Simple functional component wrapping the existing <DefaultsForm />
  • Descriptive heading and subheading
  • No new API endpoints or business logic — reuses existing tRPC endpoints
  • Superadmin-only visibility (inherited from Global sidebar section wrapper)

Testing

  • ✅ Type checking passes (zero TypeScript errors)
  • ✅ All 4615 tests pass
  • ✅ Linting passes (zero issues)
  • ✅ Manual verification: New route file created, imports correct, route tree updated, sidebar navigation updated, cleanup completed

Notes

  • No backend/tRPC changes required — this is pure frontend routing reorganization
  • Users with superadmin role will see "Cascade Defaults" in the Global section of the sidebar
  • Non-superadmin users who previously had access to defaults through Settings > General will now only see Organization settings there

https://trello.com/c/69b445174218dab444da6b14

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — Clean routing reorganization that follows existing global page patterns exactly.

The new defaults.tsx mirrors the structure of other global routes (self-contained component, createRoute with rootRoute, named export). The DefaultsForm is fully self-contained (fetches its own data via tRPC), so it works identically in the new location. Cleanup of Settings > General is complete with no stale imports or references. All CI checks pass.

One minor note (not blocking): The tRPC defaults router uses protectedProcedure (any authenticated user), not superAdminProcedure. Previously, admin/member users could access Cascade Defaults via Settings > General. Now the sidebar entry is only visible to superadmin users, but any authenticated user who navigates directly to /global/defaults can still view and modify defaults. This is consistent with how all other global routes work (no route-level guards, relying on sidebar visibility + backend auth), but the PR description's note about non-superadmin access is worth clarifying — they lose discoverability, not access.

@aaight aaight merged commit 0ff3309 into dev Mar 13, 2026
6 checks passed
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.

2 participants