diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 6e55f94f..b722c1ce 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -700,7 +700,33 @@ "Bash(terraform force-unlock:*)", "Bash(kubectl:*)", "Bash(terraform validate:*)", - "Bash(terraform fmt:*)" + "Bash(terraform fmt:*)", + "Bash(ab:*)", + "Bash(for i in {1..5})", + "Bash(do curl -s -o /dev/null -w \"%{time_total}s\\\\n\" https://abaci.one/api/health)", + "Bash(do curl -s -o /dev/null -w \"%{time_total}s\\\\n\" https://abaci.one/)", + "Bash(for:*)", + "Bash(do curl -s -o /dev/null -w \"DNS: %{time_namelookup}s | App: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/)", + "Bash(do curl -s -o /dev/null -w \"App: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/)", + "Bash(do curl -s -o /dev/null -w \"App: %{time_starttransfer}s\\\\n\" https://abaci.one/api/health)", + "Bash(do curl -s -o /dev/null -w \"App: %{time_starttransfer}s\\\\n\" https://abaci.one/)", + "Bash(do curl -s -o /dev/null -w \"%{time_starttransfer}s\\\\n\" https://abaci.one/api/health)", + "Bash(do curl -s -o /dev/null -w \"%{time_starttransfer}s\\\\n\" https://abaci.one/)", + "Skill(porkbun-dns)", + "Bash(export KUBECONFIG=/Users/antialias/.kube/k3s-config:*)", + "Bash(do curl -s -o /dev/null -w \"DNS: %{time_namelookup}s | Connect: %{time_connect}s | TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/)", + "Bash(__NEW_LINE_4217313881615341__ echo \"Testing with HTTP/1.1...\")", + "Bash(__NEW_LINE_4217313881615341__ sleep 2)", + "Bash(__NEW_LINE_4217313881615341__ echo \"Testing Expert with HTTP/1.1...\")", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/api/health)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/games)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/flashcards)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/create/worksheets)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/dashboard)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/tutorials)", + "Bash(do curl -s -o /dev/null -w \"TTFB: %{time_starttransfer}s | Total: %{time_total}s\\\\n\" https://abaci.one/favicon.ico)", + "Bash(ping:*)" ], "deny": [], "ask": [] diff --git a/.gitignore b/.gitignore index f40f8f18..1bfc24f5 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ storybook-static apps/web/data/sqlite.db.backup.* # Vision training data data/vision-training/ +infra/terraform/tfplan diff --git a/apps/web/.claude/settings.local.json b/apps/web/.claude/settings.local.json index 3695a19e..42541cba 100644 --- a/apps/web/.claude/settings.local.json +++ b/apps/web/.claude/settings.local.json @@ -105,7 +105,21 @@ "Bash(tr:*)", "mcp__chrome-devtools__close_page", "mcp__chrome-devtools__press_key", - "Bash(git reset:*)" + "Bash(git reset:*)", + "Bash(npm run typecheck:*)", + "Bash(npm run tsc:*)", + "Bash(npx eslint:*)", + "Bash(npx prettier:*)", + "Bash(awk:*)", + "Bash(mcp__sqlite__read_query:*)", + "WebFetch(domain:github.com)", + "WebFetch(domain:mermaid.ai)", + "mcp__chrome-devtools__hover", + "mcp__chrome-devtools__list_network_requests", + "mcp__chrome-devtools__get_network_request", + "Bash(npm run db:push:*)", + "Bash(kubectl get:*)", + "Bash(kubectl logs:*)" ], "deny": [], "ask": [] diff --git a/apps/web/src/app/create/worksheets/page.tsx b/apps/web/src/app/create/worksheets/page.tsx index 1c8b03fa..925766c2 100644 --- a/apps/web/src/app/create/worksheets/page.tsx +++ b/apps/web/src/app/create/worksheets/page.tsx @@ -81,7 +81,12 @@ async function loadWorksheetSettings(): Promise< } export default async function AdditionWorksheetPage() { + const pageStart = Date.now() + + console.log('[SSR] Starting worksheet page render...') + const settingsStart = Date.now() const initialSettings = await loadWorksheetSettings() + console.log(`[SSR] loadWorksheetSettings: ${Date.now() - settingsStart}ms`) // Calculate derived state needed for preview // Use defaults for required fields (loadWorksheetSettings should always provide these, but TypeScript needs guarantees) @@ -105,7 +110,10 @@ export default async function AdditionWorksheetPage() { const INITIAL_PAGES = 3 const pagesToGenerate = Math.min(INITIAL_PAGES, pages) console.log(`[SSR] Generating initial ${pagesToGenerate} pages on server (total: ${pages})...`) + const previewStart = Date.now() const previewResult = await generateWorksheetPreview(fullConfig, 0, pagesToGenerate - 1) + console.log(`[SSR] generateWorksheetPreview: ${Date.now() - previewStart}ms`) + console.log(`[SSR] Total page render: ${Date.now() - pageStart}ms`) console.log('[SSR] Preview generation complete:', previewResult.success ? 'success' : 'failed') // Pass settings and preview to client, wrapped in error boundary