perf(component): render initial diff during SSR - #173
Merged
Conversation
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.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…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>
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
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
onProcessingremains a client-only effect with stable raw-diffidentity across callback-only changes.
Changes
compact={false}legacy DOM through hydrationVerification
Commits
e9a6241docs(plan): align SSR work with compact default8b8473aperf(component): render initial diff during SSR266eb52docs(plan): record SSR guard blocker2d47709docs(plan): stabilize SSR full-matrix gate