Skip to content

fix: raise Lighthouse scores to 100 on the landing page - #336

Merged
MrYuion merged 1 commit into
developfrom
fix/lighthouse-score
Nov 5, 2026
Merged

MrYuion merged 1 commit into
developfrom
fix/lighthouse-score

Conversation

@MrYuion

@MrYuion MrYuion commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

On mobile, the landing page scored 75 in Lighthouse Performance and 82 in SEO. It loaded about 1 MB before the first content showed, including a 422 KB icon font. Mobile LCP was 8 s on simulated slow 4G.

All four categories (Performance, Accessibility, Best Practices, SEO) now score 100 on mobile and desktop, in 3 of 3 runs each.

Before (mobile / desktop) After
Performance 75 / 94 100 / 100
SEO 82 / 82 100 / 100
Mobile LCP 8.0 s 0.6 s
Bytes loaded 987 KB 479 KB

What changed

  • Icon font subset. The app loads a 13.5 KB subset with the 130 icons in the source. IconComponent sets [data-full] on an icon outside the subset (for example, one from server settings), which loads the full font, so that icon still shows. After you add icons, run bun config/icon-subset.ts (needs fontTools).
  • Fira Code. Swapped firacode (103 KB per weight) for @fontsource-variable/fira-code (one 36 KB Latin file for all weights).
  • Less JS on the landing page. Modals load when they open. The desktop sidebar loads only at the lg breakpoint, with a placeholder of the same size so nothing shifts. The item details and tabs, and the settings editor, load only when shown. A local moveItemInArray replaces a CDK import that pulled a 56 KB drag-drop chunk onto every page. The systems route lazy JS drops from 217 KB to 155 KB gzipped.
  • Splash screen. index.html shows a static splash until the app loads, so users no longer see a blank page before Angular boots. Lighthouse also uses its title as the largest contentful paint, and this gives most of the mobile gain. The list itself still takes about 2.6 s on simulated mobile. Comments in index.html and app.ts explain the rules that keep this working, and there is a note in AGENTS.md.
  • SEO and agents. Added a meta description, robots.txt and llms.txt. Lighthouse fetches the last two from the domain root, so they only count when Backoffice is hosted at the root.

Not in this PR

  • Item pages such as #/systems/<id>/about improve from 72/88 to 99/94. The remaining gap is a layout shift from the Monaco settings editor's first render, which existed before this change.
  • Agentic Browsing scores 100 only if the host returns 404 for /.well-known/ard.json. With an index.html fallback, it scores 75. No ARD manifest is added, because Backoffice has no agent resources to list.

Testing

  • bunx nx test backoffice: 993 passed, including a new test for the icon font fallback
  • bun run lint: passes
  • Mock e2e (chromium and mobile-chrome projects): 161 of 161 passed
  • Lighthouse 13.6 on a production build in mock mode (/?mock=true)

Reviewed with sol-loop: 1 round with gpt-6.1-sol on xhigh. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

- Subset the Material Symbols font (422 KB to 13.5 KB). IconComponent
  falls back to the full font for icons that are not in the subset.
- Swap firacode for @fontsource-variable/fira-code (36 KB Latin file).
- Load modals on demand and defer the desktop sidebar, item details
  and settings editor, so the landing page loads less JS.
- Show a static splash from index.html until the app loads.
- Add a meta description, robots.txt and llms.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
backoffice Ready Ready Preview Nov 5, 2026 5:46am UTC

@MrYuion
MrYuion merged commit bb627b0 into develop Nov 5, 2026
6 of 7 checks passed
@MrYuion
MrYuion deleted the fix/lighthouse-score branch November 5, 2026 06:42

This branch was successfully deployed

1 active deployment
Preview — 7c7133a6 Deployed Nov 5, 2026 by vercel[bot]
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