v1.9.4 · Released · March 29, 2026
Per-User Feature Gating & Admin User Detail Page
Per-user feature gating with admin controls, sidebar filtering, route guards, system settings management, and a redesigned standalone admin user detail page replacing the drawer.
Per-User Feature Gating
- Feature Resolution: Three-layer resolution system — user override > global default > disabled. Ready for plan-based defaults when subscriptions are added.
- Admin User Features: Toggle individual features per user from the User Detail page. Custom/Default badges show which features have overrides vs global defaults.
- Reset to Default: Admin can reset any per-user override to fall back to the global default with one click.
- Sidebar Gating: Sidebar navigation items are hidden for disabled features. No grayed-out items — clean removal.
- Route Guards: Direct URL access to disabled feature routes redirects to dashboard via reusable requireFeature() utility.
- Zod Validation: All feature gating mutations validate flagKey against known FEATURE_KEYS to prevent orphaned records.
Admin User Detail Page
- Standalone Page: User detail moved from a sheet/drawer to a full page at /admin/users/[id] with proper URL-based navigation.
- Header Card: User avatar, name, email, role/currency/status badges, enable/disable and export buttons, stat strip (joined, last login, accounts, total balance).
- Accounts Card: Table view of all user accounts with types and balances.
- Feature Access Card: Per-user feature toggles with Custom/Default badges, reset buttons, and per-row loading state.
- Notification Preferences Card: On/Off badge display for each preference.
- Activity Timeline Card: Chronological timeline with colored icons, connector lines, and formatted timestamps.
- Danger Zone Card: Red-tinted section for disable/enable user actions.
- Breadcrumb Navigation: Back link to /admin/users with user name context.
Admin System Settings
- System Settings Page: Admin-configurable key/value settings on the System tab with inline editing, Enter-to-save, and toast feedback.
- SystemSetting Model: New database model for storing system defaults (e.g., invoice_due_days).
- Feature Flag Override Counts: Global feature flags table now shows how many users have per-user overrides for each flag.
Schema & Infrastructure
- UserFeature Model: Per-user feature flag overrides with composite unique constraint on (userId, flagKey) and cascade delete.
- SystemSetting Model: Key/value store for admin-configurable system defaults.
- FEATURE_FLAGS Cache Tag: Targeted cache invalidation for feature flag mutations.
- Bulk PDF Export Flag: New feature key for future premium PDF export gating (UI-level only, no route/sidebar gating).