Repository navigation
A picture still being written draws nothing, not an <img> with no source - #205
Open
Jing-yilin wants to merge 1 commit into
Open
Jing-yilin wants to merge 1 commit into
Jing-yilin wants to merge 1 commit into
Conversation
remend 1.4 (#204) rewrites a half-written image to `` where 1.3 dropped it. DOMPurify strips that source, so the chat showed a broken picture until the closing bracket arrived. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
| // A picture a delta cut open comes out of remend under a source only Streamdown draws, which | ||
| // DOMPurify drops, leaving an `<img>` with none. Nothing is drawn until the rest arrives. | ||
| renderer: { | ||
| image: ({ href }) => (href === INCOMPLETE_IMAGE_PLACEHOLDER ? "" : false), |
There was a problem hiding this comment.
🔍 Streaming image change lacks release note
The renderer changes what users see, but ## Unreleased has no entry. Contributing rules require one for user-visible changes; the author says no released install had the regression.
Was this helpful? React with 👍 or 👎 to provide feedback.
Deploying super-prototyping with
|
| Latest commit: |
9fb3038
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a0ebce16.super-prototyping.pages.dev |
| Branch Preview URL: | https://fix-incomplete-image-placeho.super-prototyping.pages.dev |
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.
What this changes
Fixes a regression from #204, raised in its review and reproduced here.
While an agent's reply is streaming, a Markdown image that is not finished yet (
 showed in the chat as a broken picture until its closing bracket arrived., a source only Streamdown draws.renderMarkdowngoes through marked and DOMPurify, which strips that source and leaves<img alt="shot">.canvas/src/markdown.tsreturns nothing for an image whose source is remend'sINCOMPLETE_IMAGE_PLACEHOLDER, and falls through to the default for every other image. That is what 1.3.1 showed.images: falseoption does not help: the output is the same<img>with no source.Tested: a new case in
markdown.test.tsfails onmain(expected '<p>see <img alt="shot"></p>' not to contain '<img') and passes here, and a finished image still renders with itssrc.tsc -b, oxlint andbun run test(236 passed, 1 skipped) are clean, andvite buildpasses. I did not run the fullbun run buildlocally; CI's Canvas job does.Checklist
ref-*.html,assets/refs/or other third-party captures are in this PR.README.mdand no folder has its own.gitignore. (n/a)mainafter v1.7.0, so no install ever showed the broken picture.canvas/changed:bun testandbun run buildpass incanvas/. Tests pass locally; the build passes in CI's Canvas job.🤖 Generated with Claude Code