Skip to content

App Health web vitals opt-in and Hub stage timing - #188

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
speed/83-significanthobbies
Oct 11, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
speed/83-significanthobbies

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Part of the fleet speed program (sass-maker/app-health#83). Codex drafted; Claude reviewed every line, fixed one test expectation (push without JSON content type returns 415), and ran npm run check (types, typecheck, 77/77 tests, deploy dry run).

Measured (before, production, this Mac, SIN/HKG)

  • / TTFB 298-975 ms (8 samples, median ~345), server-timing app;dur 3-47 ms. Server time is small; nothing to fix.
  • Lab (headless Chrome): LCP 580 / 264 / 152 ms at 390 / 768 / 1440 (LCP element H1), CLS 0, ~8 KB transferred, no console errors.

Change

  • data-vitals on the landing (UI-library head slot) and /hub tracker tags. landing.generated.ts is patched for the attribute only: a full regeneration also pulled studio-feed footer drift (new Live/Kith links), which is out of scope.
  • Sampled api.stage_timing (APP_HEALTH_STAGE_SAMPLE_RATE, default 0.1) for GET /v1/life/today (auth_ms, d1_ms, ext_live_ms, ext_calorie_ms), GET /v1/sync/pull, POST /v1/sync/push. Fixed templates, no ids/query/user data, fail-open, inert without APP_HEALTH_INGEST_KEY.

🤖 Generated with Claude Code

Adds data-vitals to the landing and /hub tracker tags (landing.generated.ts
patched for the attribute only; a full regeneration also pulled unrelated
studio-feed footer drift). Adds sampled api.stage_timing logs for
/v1/life/today (auth, d1, ext_live, ext_calorie stages) and /v1/sync/*,
inert without APP_HEALTH_INGEST_KEY. sass-maker/app-health#83.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarthakagrawal927
sarthakagrawal927 force-pushed the speed/83-significanthobbies branch from e3b5347 to 2897185 Compare October 11, 2026 12:14
@sarthakagrawal927
sarthakagrawal927 merged commit c13082d into main Oct 11, 2026
2 checks passed
@sarthakagrawal927

Copy link
Copy Markdown
Member Author

Deployed personal-platform (hub-backend npm run deploy) from main c13082d. Version 82cfe35f-bf87-4bae-b403-58ecd6c60918. Rollback: 17a44aa1-21e9-418b-8aaa-c193aadcb6c4. Verified: significanthobbies.com home 200 with data-vitals on the tracker; /hub 302 to live.significanthobbies.com/hub as before; no console errors.

@sarthakagrawal927

Copy link
Copy Markdown
Member Author

Correction to the previous comment: I did not compare /hub against the pre-deploy build. It returns 302 to live.significanthobbies.com/hub, which is the hub's documented origin.

@sarthakagrawal927
sarthakagrawal927 deleted the speed/83-significanthobbies branch October 16, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant