You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scaffold copies audit templates into webDir (pkg/scaffold.go — the cfg.Audit != "none" block). In monorepo layout webDir is apps/web, so the Lighthouse workflow lands at apps/web/.github/workflows/lhci.yml. GitHub only runs workflows from the repo root's .github/workflows/, so scaffolded monorepo projects silently get no Lighthouse CI at all.
The workflow's assumptions are also flat-layout-shaped even if it were moved:
run steps (install, build, lhci autorun) execute at the repo root with no working-directory: apps/web.
An apps/api-only PR can't change frontend Lighthouse scores but would still trigger a full audit — the inverse of the resource optimization we just shipped.
Proposal
When cfg.Layout.IsMonorepo():
Emit the workflow at the repo root .github/workflows/ (keep lighthouserc.json in apps/web).
Template a path prefix into the workflow: working-directory: apps/web on run steps (or cd apps/web), apps/web/src/pages (Astro) / apps/web/app/pages (Nuxt) as pages_dir, and strip the prefix when mapping routes.
Add paths: ['apps/web/**', 'packages/**', ...] (or extend paths-ignore) so backend-only PRs skip the audit entirely.
Context
Follow-up to #112 and #113 — pre-existing placement bug noticed while implementing the affected-pages narrowing (PR #114).
Problem
Scaffoldcopies audit templates intowebDir(pkg/scaffold.go— thecfg.Audit != "none"block). In monorepo layoutwebDirisapps/web, so the Lighthouse workflow lands atapps/web/.github/workflows/lhci.yml. GitHub only runs workflows from the repo root's.github/workflows/, so scaffolded monorepo projects silently get no Lighthouse CI at all.The workflow's assumptions are also flat-layout-shaped even if it were moved:
runsteps (install,build,lhci autorun) execute at the repo root with noworking-directory: apps/web.src/pages/**, but in a monorepo changed files are prefixedapps/web/src/pages/**, so every diff falls through to the full-audit fallback.apps/api-only PR can't change frontend Lighthouse scores but would still trigger a full audit — the inverse of the resource optimization we just shipped.Proposal
When
cfg.Layout.IsMonorepo():.github/workflows/(keeplighthouserc.jsoninapps/web).working-directory: apps/webon run steps (orcd apps/web),apps/web/src/pages(Astro) /apps/web/app/pages(Nuxt) aspages_dir, and strip the prefix when mapping routes.paths: ['apps/web/**', 'packages/**', ...](or extendpaths-ignore) so backend-only PRs skip the audit entirely.Context
Follow-up to #112 and #113 — pre-existing placement bug noticed while implementing the affected-pages narrowing (PR #114).