Skip to content

Show direct articles sooner and shrink browser icons - #75

Merged
abhi1693 merged 4 commits into
masterfrom
fix/article-first-rendering
Oct 4, 2026
Merged

abhi1693 merged 4 commits into
masterfrom
fix/article-first-rendering

Conversation

@abhi1693

@abhi1693 abhi1693 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What changes and why?

Direct article URLs awaited the complete background feed and its filter options before returning the preview. The favicon also pointed to the original 1,254 × 1,254 logo, so opening a page could transfer 347,552 bytes for a browser icon.

The requested article now renders as soon as its own data is ready, with the background feed in a separate Suspense boundary. The reader shell shows a loading placeholder underneath the preview until the feed arrives. Closing the preview works while the feed is still pending, and a failed feed does not remove the article. The loaded background feed and existing preview navigation remain available once ready.

Web/admin metadata uses precomputed 32-pixel favicons and 180-pixel Apple touch icons. Chrome and Edge package a 128-pixel icon/reader mark and the same 32-pixel favicon. The original logo remains available for artwork. The asset generator uses the existing pinned Sharp dependency and reproduces the committed variants byte for byte.

Asset Before After
Web/admin favicon 347,552 bytes 1,481 bytes (99.6% smaller)
Apple touch icon 347,552 bytes 7,182 bytes
Extension packaged icon/reader mark 347,552 bytes 4,781 bytes

A read-only request to the running production web application confirmed that its current favicon is still 347,552 bytes / 1,254 × 1,254. These changes are pending release.

Validation

Updated against master after #74. All checks pass on commit 19e737e53d835566a14f8da58be58ab9fae1f1cd: CI run, CI required, all CodeQL analyses, SonarQube and SonarCloud Code Analysis. Auto-merge remains disabled.

The first updated-head scan exposed 0% new-code coverage, with no open Sonar code issues. Browser-only test support now lives in the existing browser-test directory. Twelve additional regressions exercise actual React server streaming with pending/failed background feeds, unavailable articles and SEO, web/admin icon metadata, byte-identical Sharp asset generation, and real Chrome/Edge packaging. The generator and extension builder expose callable functions while their CLI commands retain their behavior. Sonar thresholds and application-source exclusions are unchanged. The final quality gate passes with 80.0% new-code coverage, zero new duplication and no new issues; the article page has 100% measured line and branch coverage.

CI also exposed a missing generator module in the web Docker type-check context. The builder now copies it. The exact AMD64 Docker builder passed production compilation and TypeScript locally; hosted ARM64 image checks passed.

  • Backend: 2,620 unit tests and 1,132 PostgreSQL/Redis integration tests passed, with no skips.
  • Web: 801 unit tests, production build, formatting, ESLint and TypeScript passed. Admin: 648 unit tests, production build, lint/types and browser journeys passed.
  • Web and built Chrome/Edge browser suites passed the direct-article pending/failed-feed, dismissal, metadata and compact-icon checks, plus navigation, reader layout, pagination, authentication and account actions. Both extension CLI builds and all 29 extension unit tests passed.
  • Asset regeneration is byte-identical. Local targeted tests, commit hooks and git diff --check passed. The API performance comparison passed; it does not establish a production speed improvement.
  • Reader parity initially encountered an unchanged touch-helper race while the latest-feed DOM was settling (Element is not attached to the DOM). One rerun of that job passed on the identical commit. A lasting fixture fix will be isolated in a separate PR before continuing the merge queue.
  • GitHub's separate managed AI scan could not complete because its monthly quota is exhausted (HTTP 402). Standard repository CodeQL checks passed.

Local screenshots captured the article while feed responses were still blocked: reports/article-first-web-slow-feed.png and reports/article-first-web-failed-feed.png. Native GitHub attachment upload is unavailable in this environment; screenshots remain untracked and are not hosted through repository files.

Rollout notes

No API, configuration, database or dependency change is required. The background feed still loads to preserve reader context and article navigation; Suspense removes it from the article's rendering path. Feed query volume is unchanged. Previous/next controls become available after that feed's sequence loads.

Favicon imports produce new hashed static URLs, allowing browsers to fetch the smaller assets on release. Chrome/Edge store publication and production deployment are pending the normal release process. Linux AMD64 behavior was checked locally; hosted ARM64 image checks, CI required and CodeQL passed before merge.

Ready for review

  • The description explains the change and the validation results, including gaps.
  • Relevant documentation and regression tests are updated.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

PR reader API performance

Result: INCONCLUSIVE

3 inconclusive · 5 within threshold. Zero request failures across all six runs.

Base f29a3cb259c405b4ef764d0946452c936c42dff3 → PR 19e737e53d835566a14f8da58be58ab9fae1f1cd

Three independent runs per revision, each on a fresh GitHub-hosted ARM64 runner. 16 users, 60 seconds/run, 1,000 synthetic articles, cache off, five PgBouncer slots.

Latency comparison

All latency values are in milliseconds; lower is better. Values are medians of three runs.

Route Base p95 PR p95 Change Result
All requests 82 90 +8 (+9.8%) Within threshold
Latest feed 100 120 +20 (+20.0%) Within threshold
Feed pagination 82 100 +18 (+22.0%) Within threshold
Article detail 55 72 +17 (+30.9%) Within threshold
Source feed 91 80 -11 (-12.1%) Within threshold
Topic feed 77 62 -15 (-19.5%) Inconclusive
Feed filters 66 75 +9 (+13.6%) Inconclusive
Sources 36 37 +1 (+2.8%) Within threshold
Topics 38 32 -6 (-15.8%) Inconclusive
Additional latency and throughput metrics

Each cell shows base → PR. Latencies are in milliseconds.

Endpoint p50 p99 Requests/s
Aggregated 26 → 26 120 → 130 30.81 → 30.37
/v1/feed [latest] 38 → 43 150 → 160 8.73 → 9.01
/v1/feed [page] 23 → 25 110 → 120 3.75 → 3.93
/v1/articles/[id] 14 → 17 83 → 98 6.05 → 5.94
/v1/feed [source] 26 → 26 130 → 100 2.09 → 1.80
/v1/feed [topic] 26 → 26 100 → 120 1.93 → 1.74
/v1/feed/options 20 → 21 86 → 98 2.75 → 2.63
/v1/sources 10 → 11 53 → 55 2.75 → 2.63
/v1/topics 11 → 12 61 → 85 2.75 → 2.63
Individual runs
Run Requests Failures Exit code
Base 1 1750 0 0
Base 2 1727 0 0
Base 3 1700 0 0
PR 1 1710 0 0
PR 2 1680 0 0
PR 3 1710 0 0
How to interpret this report

Regressed / Improved: a p95 regression needs >20% and >20 ms increase in the medians and at least two head samples versus the base median. Improvements use the inverse threshold. Within threshold means the change did not meet both thresholds.

Inconclusive: a within-revision p95 range >35% of its median and >20 ms is too noisy for a confident latency verdict.

Inconclusive latency comparisons are non-blocking: the check passes without claiming an improvement. Confirmed regressions and test/report errors fail the PR gate. Throughput is descriptive: paced users do not measure maximum capacity. This uncached public API test does not establish production health, browser performance or worker capacity. Separate runners can differ in hardware or host load; repetitions and noise checks reduce but cannot eliminate that uncertainty.

Full HTML/CSV reports and logs · attempt 1

@gitar-bot

gitar-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Direct-article streaming and compact icon delivery change bounded web and extension behavior.

Renders direct articles before the background feed and reduces favicon sizes by 99.6%, with the article now showing as soon as its data is ready in a separate Suspense boundary. Feed loading, preview dismissal, and feed failures are properly isolated. Web/admin favicons shrink from 347,552 bytes to 1,481 bytes, Apple touch icons to 7,182 bytes, and extension icons to 4,781 bytes. All new regression tests pass, asset generation produces byte-identical PNGs, and no issues were found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@abhi1693
abhi1693 merged commit a85828d into master Oct 4, 2026
97 of 99 checks passed
@abhi1693
abhi1693 deleted the fix/article-first-rendering branch October 4, 2026 13:17
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