Merged
Conversation
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
Two related fixes for
rendering-strategy, prompted by Archbee scoring as having a third of its pages "use client-side rendering" when in fact every sampled page was fully server-rendered — they were just brief.1. Split
spa-shell-html-invalidinto two distinct diagnosticsThe diagnostic previously fired whenever the warn-or-fail proportion exceeded 25%, but its message claimed pages used client-side rendering. That was correct for actual shells but wrong for sparse-but-rendered pages, which is the larger bucket in practice.
spa-shell-html-invalidnow fires only on actual SPA shells (spaShells / total > 0.25) and keeps its strong "client-side rendering invalidates the HTML path" message.sparse-content-htmlfires on sparse pages (sparseContent / total > 0.25), suppressed when the shell diagnostic already fired. Its message and resolution direct readers to spot-check rather than assume a renderer bug.2. Loosen the heuristic so legitimately short doc pages pass
detect-renderingpreviously requiredvisibleTextLength >= 1500(after chrome stripping) as the wall-of-text fallback. Archbee's short integration explainers (Loom, Figma, Branches & Reviews) sat at 589–1485 chars of real prose and got flagged as sparse. Real shells, by contrast, post-strip to ~0 chars — the gap is much wider than 1500 implied.Added a new clause to the
hasContentdisjunction:A heading plus 500+ characters of post-chrome-strip body is well above any actual shell and well below what's needed to admit one. Two new tests cover both sides: a div-soup short page (passes) and an
<h1>Loading…</h1>shell with empty body (still fails).Impact
Archbee re-scored: serverRendered 36→68, sparseContent 32→0, page-size 89→100, overall 78→80 (B).
Doc updates
The split and the proportion math touched several docs. Updated:
Score-cap labels changed from "75%+/50%+ SPA shells" to proportion-based language reflecting the actual formula: (serverRendered + sparseContent × 0.5) / total. SPEC.md needed no changes — it already specifies the three result levels accurately.
Test plan