Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 21x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 17x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 17x 1x 1x 1x 1x 1x 1x 1x 10x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 13x 1x 1x 1x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x | /**
* Query key factories for React Query
*
* These are used for both server-side prefetching and client-side queries.
* Kept in a separate file (not 'use client') so they can be imported by server components.
*/
// Player query keys
export const playerKeys = {
all: ['players'] as const,
lists: () => [...playerKeys.all, 'list'] as const,
list: () => [...playerKeys.lists()] as const,
listWithSkillData: () => [...playerKeys.all, 'listWithSkillData'] as const,
detail: (id: string) => [...playerKeys.all, 'detail', id] as const,
enrolledClassrooms: (playerId: string) =>
[...playerKeys.all, playerId, 'enrolled-classrooms'] as const,
presence: (playerId: string) => [...playerKeys.all, playerId, 'presence'] as const,
observationStats: (playerId: string) =>
[...playerKeys.all, playerId, 'observation-stats'] as const,
}
// Curriculum query keys
export const curriculumKeys = {
all: ['curriculum'] as const,
detail: (playerId: string) => [...curriculumKeys.all, playerId] as const,
}
// Session plan query keys
export const sessionPlanKeys = {
all: ['sessionPlans'] as const,
lists: () => [...sessionPlanKeys.all, 'list'] as const,
list: (playerId: string) => [...sessionPlanKeys.lists(), playerId] as const,
active: (playerId: string) => [...sessionPlanKeys.all, 'active', playerId] as const,
detail: (planId: string) => [...sessionPlanKeys.all, 'detail', planId] as const,
}
// Session history query keys (for paginated history)
export const sessionHistoryKeys = {
all: ['sessionHistory'] as const,
list: (playerId: string) => [...sessionHistoryKeys.all, playerId] as const,
}
// Classroom query keys
export const classroomKeys = {
all: ['classrooms'] as const,
mine: () => [...classroomKeys.all, 'mine'] as const,
byCode: (code: string) => [...classroomKeys.all, 'byCode', code] as const,
detail: (id: string) => [...classroomKeys.all, 'detail', id] as const,
enrollments: (id: string) => [...classroomKeys.all, 'enrollments', id] as const,
presence: (id: string) => [...classroomKeys.all, 'presence', id] as const,
activeSessions: (id: string) => [...classroomKeys.all, 'activeSessions', id] as const,
pendingParentApprovals: () => [...classroomKeys.all, 'pendingParentApprovals'] as const,
pendingRequests: (id: string) => [...classroomKeys.detail(id), 'pending-requests'] as const,
awaitingParentApproval: (id: string) =>
[...classroomKeys.detail(id), 'awaiting-parent-approval'] as const,
}
// Entry prompt query keys
export const entryPromptKeys = {
all: ['entry-prompts'] as const,
pending: () => [...entryPromptKeys.all, 'pending'] as const,
}
// Game results query keys (for scoreboard and history)
export const gameResultsKeys = {
all: ['game-results'] as const,
playerHistory: (playerId: string) => [...gameResultsKeys.all, 'player', playerId] as const,
classroomLeaderboard: (classroomId: string, gameName?: string) =>
[...gameResultsKeys.all, 'leaderboard', 'classroom', classroomId, gameName] as const,
}
// Skill metrics query keys (for scoreboard)
export const skillMetricsKeys = {
all: ['skill-metrics'] as const,
player: (playerId: string) => [...skillMetricsKeys.all, 'player', playerId] as const,
classroomLeaderboard: (classroomId: string) =>
[...skillMetricsKeys.all, 'leaderboard', 'classroom', classroomId] as const,
}
// Workshop session query keys
export const workshopSessionKeys = {
all: ['workshop-sessions'] as const,
list: () => [...workshopSessionKeys.all, 'list'] as const,
detail: (sessionId: string) => [...workshopSessionKeys.all, 'detail', sessionId] as const,
}
// Flowchart version history query keys (for workshop sessions)
export const versionHistoryKeys = {
all: ['flowchart-version-history'] as const,
session: (sessionId: string) => [...versionHistoryKeys.all, sessionId] as const,
}
// Session preferences query keys (per-student StartPracticeModal settings)
export const sessionPreferencesKeys = {
all: ['session-preferences'] as const,
detail: (playerId: string) => [...sessionPreferencesKeys.all, playerId] as const,
}
// Collected clips query keys (admin audio TTS generation)
export const collectedClipKeys = {
all: ['collected-clips'] as const,
list: (voice?: string) => [...collectedClipKeys.all, 'list', voice ?? ''] as const,
}
// Practice config query keys (admin term count scaling)
export const practiceConfigKeys = {
all: ['practice-config'] as const,
config: () => [...practiceConfigKeys.all, 'config'] as const,
}
// Euclid progress query keys (tech tree completion tracking)
export const euclidKeys = {
all: ['euclid'] as const,
progress: (playerId: string) => [...euclidKeys.all, 'progress', playerId] as const,
creations: (tab: string, playerId?: string | null) =>
[...euclidKeys.all, 'creations', tab, playerId ?? 'none'] as const,
}
// Teacher flowchart query keys
export const flowchartKeys = {
all: ['teacher-flowcharts'] as const,
mine: () => [...flowchartKeys.all, 'mine'] as const,
}
// Admin pricing query keys (Stripe price management)
export const pricingKeys = {
all: ['admin-pricing'] as const,
config: () => [...pricingKeys.all, 'config'] as const,
}
// Household query keys (household membership + management)
export const householdKeys = {
all: ['households'] as const,
list: () => [...householdKeys.all, 'list'] as const,
detail: (id: string) => [...householdKeys.all, id] as const,
}
// Billing/tier query keys (subscription tier + limits)
export const billingKeys = {
all: ['billing'] as const,
tier: () => [...billingKeys.all, 'tier'] as const,
prices: () => [...billingKeys.all, 'prices'] as const,
effectiveTier: (playerId: string) => [...billingKeys.all, 'effective-tier', playerId] as const,
coverage: () => [...billingKeys.all, 'coverage'] as const,
}
// Admin subscription management query keys
export const adminSubscriptionKeys = {
all: ['admin-subscriptions'] as const,
search: (email: string) => [...adminSubscriptionKeys.all, 'search', email] as const,
}
// Debug / seed students query keys
export const debugKeys = {
all: ['debug'] as const,
seedProfiles: () => [...debugKeys.all, 'seed-profiles'] as const,
seedEmbeddingStatus: () => [...debugKeys.all, 'seed-embedding-status'] as const,
seededStudents: () => [...debugKeys.all, 'seeded-students'] as const,
seedSearch: (query: string) => [...debugKeys.all, 'seed-search', query] as const,
buildInfo: () => [...debugKeys.all, 'build-info'] as const,
cleanupPreview: () => [...debugKeys.all, 'cleanup-preview'] as const,
}
// Feature flag query keys (admin + client feature gating)
export const featureFlagKeys = {
all: ['feature-flags'] as const,
list: () => [...featureFlagKeys.all, 'list'] as const,
detail: (key: string) => [...featureFlagKeys.all, 'detail', key] as const,
}
// User notification preference query keys
export const notificationPreferenceKeys = {
all: ['notification-preferences'] as const,
settings: () => [...notificationPreferenceKeys.all, 'settings'] as const,
}
// Notification subscription query keys
export const notificationSubscriptionKeys = {
all: ['notification-subscriptions'] as const,
mine: () => [...notificationSubscriptionKeys.all, 'mine'] as const,
list: (playerId: string) => [...notificationSubscriptionKeys.all, 'list', playerId] as const,
detail: (id: string) => [...notificationSubscriptionKeys.all, 'detail', id] as const,
}
// Session song query keys (AI-generated celebration songs)
export const sessionSongKeys = {
all: ['sessionSongs'] as const,
forPlan: (planId: string) => [...sessionSongKeys.all, 'plan', planId] as const,
/** Per-song word-alignment JSON (keyed on the alignment URL since it's content-addressable). */
alignment: (alignmentPath: string) =>
[...sessionSongKeys.all, 'alignment', alignmentPath] as const,
}
// Page spots query keys (admin content spot management)
export const pageSpotKeys = {
all: ['page-spots'] as const,
status: () => [...pageSpotKeys.all, 'status'] as const,
html: (pageId: string, spotId: string) => [...pageSpotKeys.all, 'html', pageId, spotId] as const,
}
// Session song query keys
export const songKeys = {
all: ['songs'] as const,
player: (playerId: string) => [...songKeys.all, 'player', playerId] as const,
}
// Song share link query keys (permanent, revocable public links to a song)
export const songShareKeys = {
all: ['songShares'] as const,
forSong: (songId: string) => [...songShareKeys.all, 'song', songId] as const,
}
// Number line postcard query keys
export const postcardKeys = {
all: ['postcards'] as const,
list: (playerId?: string) => [...postcardKeys.all, 'list', playerId ?? 'all'] as const,
detail: (id: string) => [...postcardKeys.all, 'detail', id] as const,
unreadCount: (playerId?: string) => [...postcardKeys.all, 'unread', playerId ?? 'all'] as const,
}
// Attachment query keys (for practice photos and worksheet parsing)
export const attachmentKeys = {
// All attachments for a player
all: (playerId: string) => ['attachments', playerId] as const,
// Attachments for a specific session
session: (playerId: string, sessionId: string) =>
[...attachmentKeys.all(playerId), 'session', sessionId] as const,
// Single attachment detail (includes parsing data)
detail: (playerId: string, attachmentId: string) =>
[...attachmentKeys.all(playerId), attachmentId] as const,
// Parsing-specific data for an attachment
parsing: (playerId: string, attachmentId: string) =>
[...attachmentKeys.detail(playerId, attachmentId), 'parsing'] as const,
// Review progress for an attachment (resumable review state)
reviewProgress: (playerId: string, attachmentId: string) =>
[...attachmentKeys.detail(playerId, attachmentId), 'review-progress'] as const,
}
|