Repository navigation
Reduce reader startup work after merged Lighthouse improvements - #114
Conversation
PR reader API performanceNot measured: public API inputs are unchanged. This PR changes only recognized frontend or browser-test files. Full HTML/CSV reports and logs · attempt 1 |
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Defers authenticated reading tools and invitation artwork until account or dialog activation. Reduces reader startup work by deferring hidden reader tools and invitation artwork until needed, and contains optional reading-tools chunk download failures. Median total transfer size drops 44% on Latest and 43% on article previews; LCP warnings fall from five to three across cold mobile Lighthouse loads. ✅ 1 closed✅ Edge Case: Lazy reading-tools chunk failure can take down the whole shell
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Backend unit coveragePASS · minimum combined coverage 67.60%. Tests: 3508 passed, 0 failed, 0 skipped. Source files: 276.
Unit coverage includes every backend workspace. PostgreSQL/Redis integration tests run separately. Commit: f76300a · HTML, JSON, XML reports and job logs · attempt 1 |
Lighthouse ·
|
| Page | FCP | LCP | CLS | TBT | JS | Total |
|---|---|---|---|---|---|---|
Latest (/latest) |
1.07 s | 2.58 s | 0.001 | 107 ms | 247 KiB | 525 KiB |
Article preview (/articles/…) |
1.06 s | 2.58 s | 0.005 | 116 ms | 251 KiB | 542 KiB |
Topics (/topics) |
1.06 s | 2.37 s | 0.000 | 37 ms | 231 KiB | 361 KiB |
Sources (/sources) |
1.07 s | 2.53 s | 0.000 | 38 ms | 267 KiB | 398 KiB |
Public profile (/users/…) |
1.06 s | 2.23 s | 0.000 | 31 ms | 221 KiB | 327 KiB |
Leaderboard (/leaderboard) |
0.91 s | 1.97 s | 0.000 | 69 ms | 188 KiB | 278 KiB |
Mobile reader · Three cold loads per page · Median timings · Largest transfer size.
Needs attention
| Page | Finding | Measured | Target / limit |
|---|---|---|---|
Latest (/latest) |
2.58 s | 2.50 s | |
Article preview (/articles/…) |
2.58 s | 2.50 s | |
Sources (/sources) |
2.53 s | 2.50 s |
Full reports and logs · f76300a · Attempt 1
|



What changes and why?
Signed-out readers currently download authenticated reading tools, and the closed Dev Card invitation mounts its large SVG and requests artwork images during initial page load. Load Must Reads and the streak panel together after sign-in, and mount the invitation content when its existing dialog opens. Keep the current navigation, 30-second invitation delay, dialog coordination, editing, animation, and dismissal behavior.
Latest and article previews remain the first priorities from the production Faro sample used for the preceding performance work (137 and 121 normalized navigation events respectively over seven days; sampled events, not pageview counts). This follow-up measures against the newly merged master,
8b25ac2f, rather than the earlier feature branches. No API bottleneck was identified that requires a backend change for these improvements.Validation
Hosted Lighthouse comparison: merged master
8b25ac2f(baseline run) → final PRf76300a1(run and reports, automated Lighthouse comment). Three cold mobile loads per page, unchanged fixtures/targets, median timings, largest transfer sizes:Hosted advisory warnings fall from seven to three, and every page passes the 200 ms TBT target. Sampled performance scores rise from 92 → 96 on Latest and 79 → 96 on article previews. Timings vary between runs, particularly the hosted article baseline; the local comparison below shows smaller paint/score improvements and mixed TBT. Transfer savings are consistent in both environments. Latest/article LCP remains 2.58 s and Sources 2.53 s against the 2.5-second target.
Local comparison against the same merged master, before the subsequent error-boundary fix, using the same three-load method:
Startup transfer falls 44% on Latest and 43% on article previews; both shed 437 DOM elements. Advisory LCP warnings fall from five to three. Median TBT remains under 200 ms on all six pages but is mixed: Latest 170 → 161, article 180 → 189, Topics 37 → 52, Sources 40 → 49, profile 40 → 37, leaderboard 109 → 129 ms. Latest, article previews, and Sources still exceed the 2.5-second LCP target. Deferred invitation assets load when the invitation opens.
npm run web:lint: passed.npm run web:test: 1,171 tests passed on the final commit in hosted CI, including deferred content, account switching, and rejected-chunk regressions. Commit hooks also reran web lint, types, and unit tests.npm run extension:checkandnpm run extension:test: passed, 29 tests.npm run ci:browser-measure: passed; no fixture or budget changes.npm run reader:test:parity: web and all five browser suites for each built Chrome/Edge extension passed, covering invitation timing/animation/editing, authenticated reading tools, responsive layouts, and accessibility. Hosted reader parity also passed on the final commit.f76300a1: CI required, CodeQL, SonarQube, hosted reader parity, backend checks, security scans, and ARM64 image checks all passed. No unresolved review conversations; auto-merge remains disabled.Documentation does not need an update: public behavior, configuration, and API contracts remain the same; this description records the performance measurements and remaining gaps.
Ready for review