Show inline edit placeholders while the diff renderer loads
Opening a transcript edit currently shows its filename above a blank body until the lazy diff renderer arrives. This change draws static line placeholders using the existing code line height, preview cap and fade; header controls remain usable.
Leo (2026-10-29):
"I think you guys should just keep going indefinitely. Like just, there's so much random nonsense that you can probably associate every single one of his pointers to one of our situations."
"https://aiforui.dev/learn ... you guys should be taking this course and then reading into how it goes."
Audit
| File:line | Rule | Before | After |
|---|---|---|---|
webviews/src/agent-session/acpmux/conversation/EditDiff.tsx:98 (base) | Course item 9: loading never renders nothing; match the loaded layout | Suspense fallback={null} leaves only the header and optional preview action | A lightweight placeholder body follows known line counts and the existing eight-line preview; known no-line edits retain their existing explanation |
No syntax-renderer dependency is added to the initial bundle. One painted placeholder block per edit avoids creating a DOM element per line. There are no new timers, observers or animations.
Geometry limit: the collapsed preview retains its existing cap. Expanded wrapped text and skipped-line separators receive their exact height only after the renderer loads. The fallback does not duplicate the diff parser or wrapping engine.
Validation
- Local
bun run checkandscripts/web-lint.sh: passed. - Remote deferred-renderer red/green tests and gallery captures: pending.
- Tests cover pending → loaded, expanding a 1,284-line pending edit, and the existing no-line explanation.
- Localization reuses
changes.loadingandchanges.noLineChanges; no new product copy. - Overlap search found the original lazy-loading PR #19974, already merged.
pr-overlapwas run but its API form is unsupported by the publishing broker; symbol search found no competing inline loading fix.
Before / after
Pending gallery capture of agent-pane.inline-diff-loading in both themes. Fixtures contain synthetic code only.
UI review
Verdict: blocked
Blockers
- Before/after capture and rendered inspection are pending.
Should fix
- None identified in source inspection.
Nits
- Expanded diffs with skipped sections or wrapped lines cannot reserve their final measured height before the renderer arrives.
Needs a human / needs a device
- No new empty-state copy. Browser capture pending.
Agent session: agent session
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Shows placeholder lines while the inline diff renderer loads, so opening a transcript edit no longer leaves a blank body under its filename, and keeps the transcript from jumping when a fitting chat overflows.
- Placeholders draw each edit's lines as painted text in the diff's font, gutter, wrapping and scroller, plus a separator before hunks that skip file lines; edits past 400 lines draw the remainder as one block.
- The placeholder and rendered diff share a grid cell until every diff host has its height, so the swap is free of layout shift; a chat that a placeholder makes overflow now opens where the reader is, not at the latest row, and its tool outputs open during the fold hold.
- The existing preview cap, expand control, and empty-edit explanation are unchanged. Adds gallery fixtures, browser and unit tests, and a release note.