Skip to content

perf(component): render initial diff during SSR - #173

Merged
jaysin586 merged 8 commits into
mainfrom
advisor/component-perf-005-ssr-diffs
Jul 19, 2026
Merged

perf(component): render initial diff during SSR#173
jaysin586 merged 8 commits into
mainfrom
advisor/component-perf-005-ssr-diffs

Conversation

@jaysin586

Copy link
Copy Markdown
Contributor

Summary

Render the initial diff in server HTML so useful content is available before
hydration and with JavaScript disabled. Diff computation is now derived and
pure, while onProcessing remains a client-only effect with stable raw-diff
identity across callback-only changes.

Changes

  • ✨ Add SSR-visible derived diff computation without changing public props or callback arguments
  • 🧪 Add a loud 005 diagnostic with no-JavaScript server-markup and hydration coverage
  • ⚡ Preserve the compact default and compact={false} legacy DOM through hydration
  • 🛡️ Record independent guard checkpoints and cap the full 110-test matrix at two workers to protect fixed timing ceilings from browser contention

Verification

  • 005 Chromium gate passed three consecutive 2/2 runs
  • Targeted Chromium passed 17/17
  • Library tests passed 78/78
  • Svelte check reported zero errors and warnings
  • Package build and publint passed
  • Scoped Trunk format/lint passed
  • Full five-project matrix passed 110/110 three consecutive times with two workers: 59.3s, 50.7s, 51.6s

Commits

  • e9a6241 docs(plan): align SSR work with compact default
  • 8b8473a perf(component): render initial diff during SSR
  • 266eb52 docs(plan): record SSR guard blocker
  • 2d47709 docs(plan): stabilize SSR full-matrix gate

Record the merged Plan 004 predecessor state and require Plan 005 to
preserve both the compact default and legacy equal-span hydration path.
Compute the initial display result as derived state so server-rendered HTML
contains useful diff markup while callback notification remains client-only.
Add a loud no-JavaScript diagnostic and focused SSR/hydration coverage.
@jaysin586 jaysin586 added enhancement Apply to new features or improvements to existing features performance Apply to performance improvements or optimizations labels Jul 19, 2026
@jaysin586 jaysin586 self-assigned this Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ebe563ab-9ca2-4dea-a916-afc2172d0074

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch advisor/component-perf-005-ssr-diffs

Comment @coderabbitai help to get the list of available commands.

jaysin586 and others added 4 commits July 19, 2026 13:39
…layer

Fold the compact-equal decision into the displayRenderers.equal resolution
via a wrapper-free text fallback snippet, replacing the template-level
compactEqual gate and its duplicated {#if} branches. Hoist the operation
-> renderer selection to once per segment so the {#each} body renders every
operation uniformly, collapsing the per-operation single-line branches.

Also document why the input-value cache in processingResult is load-bearing:
reactive props re-fire on rerender even when unchanged, so value comparison
keeps diff identity stable when only non-computation props change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jaysin586
jaysin586 merged commit b0a3ce7 into main Jul 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Apply to new features or improvements to existing features performance Apply to performance improvements or optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant