Transform shared worksheet experience from simple info page to full read-only studio: **Shared Worksheet Viewer (/worksheets/shared/[id])** - Show full worksheet studio UI in read-only mode - Display live preview with actual worksheet rendering - Blue banner indicates "Shared Worksheet (Read-Only)" - Config sidebar shows all settings but disabled for interaction - Clear "Edit This Worksheet" button with overwrite warning modal **Edit Modal** - Warns that editing will overwrite current worksheet settings - Provides tips (download current worksheet first, or use different browser) - Two-step confirmation prevents accidental data loss - Saves shared config to user's session before navigating to editor **Read-Only Mode Infrastructure** - WorksheetConfigContext: Added isReadOnly prop - ConfigSidebar: Shows "👁️ Read-Only" badge, disables inputs with pointer-events - PreviewCenter: Hides Download/Share/Upload buttons when read-only - StudentNameInput: Added readOnly prop with disabled styling **Mastery Mode Field Persistence** - extractConfigFields: Now includes currentStepId, currentAdditionSkillId, currentSubtractionSkillId - Fixes issue where mastery mode worksheets couldn't be shared properly - Future shares will include all required mastery mode fields **Error Handling** - Created /api/worksheets/preview route for server-side preview generation - generatePreview: Returns detailed error messages instead of fallbacks - Shared viewer: Shows prominent error card with diagnostic details - Error format: "Missing skill IDs - addition: none, subtraction: none. This config may have been shared before mastery mode fields were added." **Architecture Changes** - Shared page now calls API for preview (avoids importing Node.js child_process in client) - Clear separation between client components and server-side generation - Proper error propagation from preview generation to UI 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .claude | ||
| .storybook | ||
| __tests__ | ||
| content/blog | ||
| data | ||
| docs | ||
| drizzle | ||
| e2e | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore.test | ||
| .gitignore | ||
| CARD_SORTING_PORT_PLAN.md | ||
| COMPLEMENT_RACE_PORT_PLAN.md | ||
| DEVELOPMENT_STANDARDS.md | ||
| LINTING.md | ||
| README.md | ||
| biome.jsonc | ||
| drizzle.config.ts | ||
| eslint.config.js | ||
| next-env.d.ts | ||
| next.config.js | ||
| package.json | ||
| panda.config.ts | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| server.js | ||
| svg-processing-test.js | ||
| test-arcade-api.sh | ||
| test-flashcards-final.pdf | ||
| test-flashcards.pdf | ||
| test-simplified.pdf | ||
| test_fullscreen_persistence.html | ||
| test_panda_simple.html | ||
| tsconfig.json | ||
| tsconfig.server.json | ||
| vitest.config.ts | ||