feat: AI Triage page, fix Inbox Agent, cache fix, Vapron-only docs #4042
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/89
Summary
This PR rolls up four independent pieces of work from the current session:
1. Fix stale-page caching (broke platform after deploys)
Root cause: No
Cache-Controlheaders meant browsers cached HTML pages indefinitely. After a deploy the new chunk hashes conflicted with cached old HTML → blank page.ipconfig/flushdnsonly clears DNS, not HTTP cache.next.config.ts:Cache-Control: no-storefor all HTML/API routes;immutablelong-cache only for/_next/static/*(content-hashed chunks)/api/versionroute: updated from Vercel env vars toNEXT_PUBLIC_COMMIT_SHA/NEXT_PUBLIC_BRANCH(Vapron-native)box-deploy.sh: injects those env vars at build time2. AI Triage page (brand-new, wires fully-built backend)
The
/v1/ai/categorize/*backend (24K+ lines) had zero UI — totally invisible to users. Now wired:(dashboard)/ai-triageshowing category distribution (Work/Personal/Newsletter/etc.) with coloured progress bars and confidence scores3. Fix Inbox Agent broken endpoint
The agent dashboard was calling
GET /v1/agent/statuswhich didn't exist — backend only had/config. The page would fail to load agent stats on every visit.GET /v1/agent/statusendpoint that merges config + today's run aggregates (processedToday,timeSavedMinutes) — exactly whatAgentStatusinterface expects4. Vapron-only docs sweep (19 infra docs total)
Craig: "update all docs — we strictly Vapron only." Removed all references to Vercel, Fly.io, and Cloudflare Pages as deployment targets across 19 docs files. Key changes:
fly-mta-deploy.md: replaced 280-line Fly.io runbook with short redirect tomta-box-setup.mdguides/deployment.md: complete rewrite for systemd/box deploymentTest plan
mail.alecrae.comafter a deploy — page should always be fresh (no blank page from stale cache)/api/version— should return{ commit, branch, builtAt, ok: true }/ai-triageon a Personal+ account — category distribution chart loads; Smart Rules tab works/agenton a Pro account — stats panel loads without error (was crashing on/status404)🤖 Generated with Claude Code
https://claude.ai/code/session_01GYakKc6rtYKmTgknsK1AiY
Generated by Claude Code