perf(forge-shell): Lighthouse 68→76 + CI workflow + flag flip#25
Merged
Conversation
- Vendor alpine.min.js under web/vendor/alpine/ to eliminate CDN cold-start - Add scripts/build-runtime-bundle.mjs producing web/dist/js/runtime-bundle.min.js - npm run build now chains tsc + bundle step - Track the prebuilt runtime bundle (rebuild on container boot adds ~3s startup) - .gitignore: re-include web/dist/js/runtime-bundle.min.js via parent-dir negation Part of perf/forge-shell sprint, Lighthouse desktop perf 68-69 -> 76 (+8).
#library, #export, #providers, #guide pages now lazy-mount via Alpine's <template x-if> instead of always-rendered x-show. Reduces initial DOM tree size; pages only mount when active. Net Lighthouse impact (M1): perf 68-69 -> 77, FCP 1849ms.
Forge UI redesign has shipped end-to-end across the sprint. Per CLAUDE.md §8, flag and its dead-branch checks queue for removal next sprint. - isForgeUiEnabled() returns true by default (was false) - Resolution order unchanged: window global > localStorage > default - Tests in feature-flags.test.ts updated for new default; 10/10 pass
- lighthouse-budget.json: FCP 2000 / LCP 2800 / TBT 200 / CLS 0.1 / SI 2200 / TTI 3000; script 200KB, stylesheet 80KB, total 600KB; third-party count 10 - .github/workflows/lighthouse.yml: continue-on-error: true, runs on PR touching web/**, app.py, requirements.txt, package.json, the workflow, or the budget file. Builds runtime bundle, starts backend with dummy OPENAI key, polls /api/health, runs Lighthouse on pipeline/library/reader with --preset=desktop --budget-path, emits scores to $GITHUB_STEP_SUMMARY, uploads lh-reports/ artifact (14-day retention). Warn-only by design: the sprint target (perf >=85) is not yet hit (currently 76). CI signals regressions without blocking merges.
7 tasks
HieuNTg
added a commit
that referenced
this pull request
Jun 22, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sprint
perf/forge-shell— lift Lighthouse desktop perf on #pipeline / #library / #reader.Outcome: 68-69 → 76 perf (+8). Gap to ≥85 documented and deferred (next-sprint scope).
Shipped
web/vendor/alpine/alpine.min.js, eliminate CDN cold-startscripts/build-runtime-bundle.mjs→web/dist/js/runtime-bundle.min.js;npm run buildchains tsc + bundle#library,#export,#providers,#guide) convertedx-show→<template x-if>STORYFORGE_FORGE_UIdefault →true; tests updated (10/10 pass); flag + dead-branch checks queued for removal next sprint per CLAUDE.md §8lighthouse-budget.json+.github/workflows/lighthouse.yml(warn-only,continue-on-error: true, PR + workflow_dispatch, 3 routes, $GITHUB_STEP_SUMMARY, 14-day artifact retention)Reverted
StaticFilesdoes not runGZipMiddleware(confirmed viaInvoke-WebRequestheaders showing emptyContent-Encodingand rawContent-Length: 17157). Extraction added a render-blocking un-gzipped request, regressing FCP 1849 → 2217. Re-inlined in B1.Deferred to next sprint
Gap to ≥85 is dominated by:
font-display: swap+ WOFF2 subsetEither is its own diff worth of risk. Out of sprint scope.
Test plan
npx vitest run web/js/__tests__/feature-flags.test.ts→ 10/10 passnpm run build(tsc + bundle) → succeeds/api/healthpoll smoke (CI workflow shape)plans/reports/lh-p3prime-b1/lighthouse.ymlrun on this PR will populate $GITHUB_STEP_SUMMARY (warn-only)deferCLAUDE.md compliance
plans/reports/)