Files
daniel 41cbbea00c perf(dashboard): reducir payload del home 87% y restaurar caching en Cloudflare
- Split components.json: índice sin content (1.9 MB / 249 KB br vs 15.6 MB / 4.15 MB br).
  Generador produce component-content/{type}/{slug}.json por componente y auto-copia
  a dashboard/public/. Página de detalle carga contenido on-demand via fetchComponentContent().
- Restaurar cabeceras de caché y seguridad perdidas en la migración Vercel→Cloudflare:
  _headers con Cache-Control max-age=86400 para JSONs, immutable para _astro/*,
  y HSTS, X-Frame-Options, Referrer-Policy, Permissions-Policy en todas las rutas.
- Eliminar dashboard/vercel.json (config muerta desde migración a Cloudflare Pages).
- Diferir hidratación: ClerkIsland y AuthButton client:load → client:idle;
  SaveToCollectionButton → client:visible.
- Eliminar gpt-tokenizer del bundle del navegador: reemplazado por estimación chars/4.
- Actualizar .claude/rules/dashboard.md para reflejar hosting en Cloudflare Pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 16:58:13 -04:00

1 line
1.5 KiB
JSON

{"content": "{\n \"description\": \"Intelligent git commit creation with automatic message generation and validation. Creates meaningful commits based on file changes.\",\n \"hooks\": {\n \"PostToolUse\": [\n {\n \"matcher\": \"Edit\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"if git rev-parse --git-dir >/dev/null 2>&1 && [[ -n \\\"$CLAUDE_TOOL_FILE_PATH\\\" ]]; then git add \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null; CHANGED_LINES=$(git diff --cached --numstat \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null | awk '{print $1+$2}'); if [[ $CHANGED_LINES -gt 0 ]]; then FILENAME=$(basename \\\"$CLAUDE_TOOL_FILE_PATH\\\"); if [[ $CHANGED_LINES -lt 10 ]]; then SIZE=\\\"minor\\\"; elif [[ $CHANGED_LINES -lt 50 ]]; then SIZE=\\\"moderate\\\"; else SIZE=\\\"major\\\"; fi; MSG=\\\"Update $FILENAME: $SIZE changes ($CHANGED_LINES lines)\\\"; git commit -m \\\"$MSG\\\" \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; fi; fi\"\n }\n ]\n },\n {\n \"matcher\": \"Write\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"if git rev-parse --git-dir >/dev/null 2>&1 && [[ -n \\\"$CLAUDE_TOOL_FILE_PATH\\\" ]]; then git add \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null; FILENAME=$(basename \\\"$CLAUDE_TOOL_FILE_PATH\\\"); git commit -m \\\"Add new file: $FILENAME\\\" \\\"$CLAUDE_TOOL_FILE_PATH\\\" 2>/dev/null || true; fi\"\n }\n ]\n }\n ]\n }\n}"}