- Queue Type: Filtered Queue (respects current track/category/"not done" filters)
- Settings Priority: Practice Behavior settings
- Storage: localStorage only (no database sync)
- Styling: All queue UI matches site aesthetic (zinc gradients, rounded-3xl, border-zinc-800)
- Settings + queue state contexts are implemented in
/lib/context/SettingsContext.tsxand/lib/context/QueueContext.tsx. - Settings hook + queue hook are implemented in
/lib/hooks/useSettings.tsand/lib/hooks/useQueue.ts. - Queue UI is implemented in
/components/queue/*and wired in/app/layout.tsxand/app/problems/page.tsx. - Queue playback integration is wired in
/app/problems/[id]/page.tsxand/app/problems/[id]/results/page.tsx. - Dashboard settings now read/write via SettingsContext in
/app/dashboard/page.tsx.
- Timer completion sound uses Web Audio API (no
/public/sounds/timer-end.mp3asset required). - "Add to Queue" on problem page shows a small inline notice instead of a toast.
- Queue "Next" control currently uses the same behavior as "Skip Problem" (advance without submitting).
The problems page has a view toggle: List View (default) | Queue View
Empty State:
┌──────────────────────────────────────────────────────────────────────────┐
│ [List View] [Queue View ✓] [Filters...] │
├──────────────────────────────────────────────────────────────────────────┤
│ │
│ Your queue is empty │
│ │
│ [ + Add Problems ] │
│ │
└──────────────────────────────────────────────────────────────────────────┘
With Problems Added:
┌──────────────────────────────────────────────────────────────────────────┐
│ [List View] [Queue View ✓] [Filters...] │
├──────────────────────────────────────────────────────────────────────────┤
│ ⋮⋮ 1. Estimate the number of golf balls... Estimations 5 min │ ← Drag handle
│ ⋮⋮ 2. How many piano tuners in Chicago? Estimations 5 min │
│ ⋮⋮ 3. Tell me about a time you led a team Behaviorals 3 min │
├──────────────────────────────────────────────────────────────────────────┤
│ [ + Add More ] │
├──────────────────────────────────────────────────────────────────────────┤
│ [Clear All] [Shuffle] [▶ Start Queue (3 problems)] │
└──────────────────────────────────────────────────────────────────────────┘
Features:
- Cards styled like problem rows with drag handles (⋮⋮) on left
- Drag to reorder problems
- "Add More" button to add more problems
- Bottom bar with: Clear All, Shuffle, Start Queue
Styling:
- Queue cards:
bg-gradient-to-br from-zinc-900 via-zinc-900 to-zinc-800 rounded-2xl border border-zinc-800 - Drag handle:
text-zinc-600 hover:text-zinc-400 - Bottom action bar: Same zinc gradient, sticky at bottom
- Buttons: Use existing Button component variants (primary for Start, ghost for others)
When user clicks "+ Add Problems" from Queue View, switches to List View with banner:
┌──────────────────────────────────────────────────────────────────────────┐
│ 🔵 Adding to Queue (3 added) [Done ✓] │ ← Top banner
├──────────────────────────────────────────────────────────────────────────┤
│ [List View ✓] [Queue View] [Filters...] │
├──────────────────────────────────────────────────────────────────────────┤
│ [+] 1. Estimate the number of golf balls... Estimations 5 min ✓ │ ← + button, ✓ = added
│ [+] 2. How many piano tuners in Chicago? Estimations 5 min │
│ [+] 3. Tell me about a time you led a team Behaviorals 3 min ✓ │
│ ... │
└──────────────────────────────────────────────────────────────────────────┘
Behavior:
- Top banner shows "Adding to Queue (X added)" with Done button
- Each problem row gets a [+] button on left
- Clicking [+] adds to queue, shows ✓ indicator
- Filters still work to find specific problems
- Click "Done" to return to Queue View
Styling:
- Banner:
bg-blue-500/10 border-b border-blue-500/20with blue accent - [+] button:
text-zinc-500 hover:text-whitecircular icon button - ✓ indicator:
text-green-500checkmark - Done button: Button component ghost variant
On individual problem page, add "Add to Queue" button that:
- Adds current problem to queue
- Shows confirmation toast
- If queue view hasn't been visited, creates new queue with this problem
Flow during queue:
- Problem loads → timer auto-starts (if global setting enabled)
- User types response and submits
- Immediately advances to next problem (skips results page)
- Repeat until queue complete
- Queue Complete screen shows summary with option to review individual results
Auto-advance setting: Optional setting to show results briefly before advancing (configurable delay)
After queue complete: User can go back to review any problem's results individually
When queue is started (playing), overlay appears:
┌─────────────────────────────────────┐
│ ─ Queue: Problem 1 of 3 ⏱ 04:32 │ ← Collapsed bar
└─────────────────────────────────────┘
↓ Click to expand
┌──────────────────────────────────────────────────────────────────────────┐
│ Queue Mode ─ │
├──────────────────────────────────────────────────────────────────────────┤
│ Problem 1 of 3 │
│ ████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 33% │
├──────────────────────────────────────────────────────────────────────────┤
│ ⏱ 04:32 │
├──────────────────────────────────────────────────────────────────────────┤
│ [Skip Problem] [Next →] [Exit Queue] │
└──────────────────────────────────────────────────────────────────────────┘
Position: Fixed bottom center, slides up from bottom edge
Collapsed State: Thin bar showing position + timer, click to expand
Visibility: Shows on all pages while queue active
Styling: Zinc gradient (bg-gradient-to-br from-zinc-900 via-zinc-900 to-zinc-800)
Completion State:
┌──────────────────────────────────────────────────────────────────────────┐
│ Queue Complete! 🎉 │
├──────────────────────────────────────────────────────────────────────────┤
│ 3 problems finished │
│ Total time: 14:23 │
├──────────────────────────────────────────────────────────────────────────┤
│ Completed Problems: │
│ ✓ Estimate golf balls in the US [View Results] │
│ ✓ Piano tuners in Chicago [View Results] │
│ ✓ Tell me about leading a team [View Results] │
├──────────────────────────────────────────────────────────────────────────┤
│ [Back to Problems] │
└──────────────────────────────────────────────────────────────────────────┘
Clicking "View Results" opens that problem's results page.
interface QueueState {
// Queue building state
problemIds: number[]; // Ordered list of problem IDs in queue
isAddingMode: boolean; // True when in "Adding to Queue" mode
// Playback state
isPlaying: boolean; // True when queue is actively running
currentIndex: number; // Current position in queue
collapsed: boolean; // Overlay collapsed or expanded
startTime: number; // When queue was started
completedCount: number; // Problems completed this session
}| Setting | Key | Type | Default |
|---|---|---|---|
| Auto-start Timer | autoStartTimer |
boolean | true |
| Timer Sound | timerSound |
boolean | false |
| Setting | Key | Type | Default |
|---|---|---|---|
| Skip Completed Problems | skipCompleted |
boolean | true |
| Show Results Between Problems | showResultsBetween |
boolean | false |
| Results Display Time | resultsDelay |
number (seconds) | 5 |
interface Settings {
// Global Practice Behavior
autoStartTimer: boolean;
timerSound: boolean;
speechToTextReady: boolean;
showPracticeTips: boolean;
// Queue Settings
skipCompleted: boolean;
showResultsBetween: boolean;
resultsDelay: number;
}- Create
/lib/context/SettingsContext.tsx - Create
/lib/hooks/useSettings.ts - Wrap app in
SettingsProviderin layout - Migrate existing dashboard settings to new system
- Auto-start timer in
/app/problems/[id]/page.tsx - Speech-to-text ready in problem page
- Practice tips display (if UI exists)
- Create
/lib/context/QueueContext.tsx - Create
/lib/hooks/useQueue.ts - Add queue initialization from problems list
- Add "Next Problem" to results page
- Add queue indicator to problem page
- Add audio file for timer completion
- Play sound in timer hook when time expires
- Add new settings toggles
- Group by category
- Match existing toggle styling
| File | Purpose |
|---|---|
/lib/context/SettingsContext.tsx |
Global settings provider |
/lib/hooks/useSettings.ts |
Settings access hook |
/lib/context/QueueContext.tsx |
Queue state provider |
/lib/hooks/useQueue.ts |
Queue logic (add, remove, reorder, play, skip) |
/components/queue/QueueOverlay.tsx |
Floating playback overlay (bottom center) |
/components/queue/QueueView.tsx |
Queue View for problems page |
/components/queue/QueueCard.tsx |
Draggable queue item card |
/components/queue/QueueProgress.tsx |
Progress bar sub-component |
/components/queue/QueueComplete.tsx |
Completion state display |
/components/queue/AddToQueueBanner.tsx |
"Adding to Queue" top banner |
/public/sounds/timer-end.mp3 |
Timer completion sound |
| File | Changes |
|---|---|
/app/layout.tsx |
Wrap with SettingsProvider, QueueProvider, render QueueOverlay |
/app/dashboard/page.tsx |
Expand settings UI, use new hook |
/app/problems/page.tsx |
Add List/Queue view toggle, conditionally render QueueView |
/app/problems/[id]/page.tsx |
Wire auto-start timer, add "Add to Queue" button |
/app/problems/[id]/results/page.tsx |
Queue overlay handles "Next Problem" |
/components/question/ProblemCard.tsx |
Wire timer settings |
/components/problems/ProblemRow.tsx |
Add [+] button when in adding mode |
/components/problems/ProblemFilters.tsx |
Add view toggle (List/Queue) |
/lib/hooks/useTimer.ts |
Add sound on completion, sync with queue |
- Go to problems list → verify List View is default
- Click "Queue View" toggle → see empty queue state
- Click "+ Add Problems" → switches to List View with banner
- Verify banner shows "Adding to Queue (0 added)"
- Click [+] on a problem → adds to queue, shows ✓, banner updates count
- Use filters to find specific problems → filters work normally
- Click "Done" → returns to Queue View showing added problems
- Drag a problem card → reorders the queue
- Click "Shuffle" → randomizes order
- Click "Clear All" → empties queue
- With problems in queue, click "Start Queue"
- Verify first problem loads, overlay slides up from bottom
- Overlay shows "Problem 1 of X" with progress bar and timer
- Click collapse (─) → minimizes to thin bar with position + timer
- Click bar → expands back to full overlay
- Click "Skip Problem" → advances to next without submitting
- Submit response → immediately advances to next problem (skips results)
- Complete all → overlay shows "Queue Complete!" with stats and review links
- Click "View Results" on any problem → opens that problem's results page
- Click "Exit Queue" mid-queue → returns to problems list
- Go to individual problem page
- Click "Add to Queue" button
- Verify toast confirmation
- Go to Queue View → problem is in queue
- Go to dashboard settings section
- Toggle "Auto-start timer" ON → timer starts on problem load
- Toggle "Timer sound" ON → sound plays when timer ends
- Refresh page → settings persist
- Empty queue → "Start Queue" button disabled
- Exit queue → queue state preserved (can resume)
- Queue overlay doesn't block problem content
- Adding duplicate problem → shows already added indicator