Repository navigation
fix(web): inline HTML renders match the thread background - #320
Merged
Merged
Conversation
Renders took --background from the theme palette's canvas, but app CSS repaints some surfaces past it (dark threads use #181818 over a #0a0a0a canvas), so pages sat in a visibly darker box. The frame now reads the --background of the surface hosting it, corrects its URL before the page loads, and sends the new surface on theme changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Inline HTML renders (#278) sat in a visibly darker box in dark threads. The frame passed the page the theme palette's canvas as
--background(#0a0a0ain standard dark), butindex.cssrepaints the content frame to#181818in dark mode, sohtml{background:var(--background)}never matched the thread around it.HtmlRenderDocumentnow reads the computed--backgroundof the surface hosting the iframe and uses that in place of the palette value:getComputedStyleis unavailable or empty, the palette value stands, so server rendering is unchanged.Desktop gets this via the web frame. iOS is untouched: it injects
.systemBackgroundand its web view is transparent. I didn't verify iOS on a device.Testing: added a
HtmlRenderDocumenttest for the corrected first src and a later theme change.HtmlRenderDocumentandHtmlRenderFrametests pass (11/11), and lint, format and theapps/webtypecheck are clean.Screenshots: before: the render showed
#0a0a0ainside the#181818thread (reported from the Nightly with #278). After: not captured yet. This needs one pass in a real client on a build with this change.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.