feat(ui): Create content pattern components - DataTable, FilterBar, EmptyState, LoadingState
- Add LoadingState with table, card, list, and text skeleton patterns - Add EmptyState with customizable icon, title, description, and action slot - Add FilterBar with search input, clear button, and custom filter slot - Add DataTable with TanStack Table integration, sorting, and row click - Create barrel export index.ts for common components - Install tanstack-table-8-svelte-5 for Svelte 5 compatibility - Sync auth spec with authenticated user redirect requirements - Archive p03-dashboard-enhancement Refs: openspec/changes/p04-content-patterns Closes: p04-content-patterns
This commit is contained in:
@@ -85,6 +85,23 @@ The system SHALL include user information in JWT token claims.
|
||||
- exp (expiration timestamp, 60 minutes from iat)
|
||||
- jti (unique token ID)
|
||||
|
||||
### Requirement: Authenticated user redirect
|
||||
The system SHALL redirect authenticated users away from login page to dashboard.
|
||||
|
||||
#### Scenario: Authenticated user accesses login page
|
||||
- **GIVEN** a user has valid access token in localStorage
|
||||
- **WHEN** the user navigates to /login
|
||||
- **THEN** the system detects the valid token
|
||||
- **AND** redirects the user to /dashboard
|
||||
- **AND** does not display the login form
|
||||
|
||||
#### Scenario: Auth state persists after page refresh
|
||||
- **GIVEN** a user is logged in with valid tokens
|
||||
- **WHEN** the user refreshes the page
|
||||
- **THEN** the system reads tokens from localStorage
|
||||
- **AND** restores authentication state
|
||||
- **AND** displays the authenticated content (not blank page)
|
||||
|
||||
### Requirement: Refresh token storage
|
||||
The system SHALL store refresh tokens in Redis with TTL.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user