Skip to content

fix(render): name the background blurs an export leaves out - #258

Merged
runkids merged 2 commits into
mainfrom
fix/report-dropped-background-blur
Nov 12, 2026
Merged

runkids merged 2 commits into
mainfrom
fix/report-dropped-background-blur

Conversation

@runkids

@runkids runkids commented Nov 12, 2026

Copy link
Copy Markdown
Owner

Problem

A background blur past the per-export limit (64 blurs or 32 MiB of expanded backdrop, src/render.rs) is skipped so a crafted file cannot exhaust the renderer. Nothing recorded which blur was skipped: _figlens.renderDiagnostics puts the same static approximate note on every blurred node, so export and bundle warnings could not say which blur, if any, was missing from the image.

Change

  • The render records the nodes whose background blur the limit left out. Svg::document_reporting and Prepared::export_svg_reporting return them; Svg::document and Prepared::export_svg_in are unchanged wrappers.

  • export (SVG and raster), bundle (vector, composite and reference renders, each node once) and compare-image add a warning per node:

    Render skipped at node 1:66 (effects): Background blur was not drawn: the export had reached its limit of 64 background blurs or 32 MiB of backdrop
    
  • At most 20 nodes are named; one more line counts the rest. Export warnings are stored in the visual index's render evidence (256 KiB cap), so an unbounded list would have turned a skipped blur into a failed index unit.

  • The MCP export warnings description, the bundle context.md note on render warnings and wiki/render.md describe the new line.

Output for exports under the limit is unchanged.

Interfaces

  • CLI and MCP: export, export --batch, bundle and compare-image share these report paths, so the warning appears in both. No new flag or parameter.
  • Pi, OpenCode, OMP: they receive the same warning strings through MCP/CLI and do not parse them; no adapter change.
  • Herdr: reads export output but not its warnings; no change.
  • --help, READMEs, site, skill: none describe warnings at this level; no change.

Checks

  • docker compose run --rm dev sh -c 'cargo fmt --check && cargo clippy --all-targets -- -D warnings': clean
  • docker compose run --rm dev cargo test: all pass (838 lib tests)
  • npm test: 234 pass
  • python3 scripts/ai-context.py check: ok
  • New tests: an export of 65 blurred layers names the 65th; the render returns the ids past the cap in drawing order; the warning list dedupes and counts past 20.
  • figlens-code-review passes run on the diff; verified findings fixed (warning cap, compare-image, MCP description, context.md text, two simplifications).

Not run: the corpus check (under-limit output is unchanged by construction, not measured) and a compare-image test for the new line.

Limits

  • The blur cut budget (MAX_CUTS) is still not reported: it is an approximation with no single node to name.
  • nodes and inspect do not render, so they cannot report a dropped blur.
  • The live preview's reference image and verify do not surface this warning.
  • wiki/render-diagnostics.md does not mention the new line: the bundle topic has 13 bytes left under its cap. The rule is in wiki/render.md.

A background blur past the per-export limit (64 blurs or 32 MiB of
backdrop) was dropped without a trace: every blurred node carries the
same static approximate diagnostic, so warnings could not tell which
blur, if any, was missing from the image.

The render now returns the nodes it left out, and export, bundle and
compare-image warnings name them. At most 20 nodes are named and the
rest counted, so a crafted file cannot grow a report without bound.
@runkids

runkids commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T03:34:27.442540Z 4199cb6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 68afa95c1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@runkids
runkids marked this pull request as ready for review November 12, 2026 03:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68afa95c1a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/export.rs Resolved
…READMEs and skill

The warning is only produced by a render, so nodes and inspect cannot
show it. Help, every README locale and the served Known gaps section
now say where it appears and that 20 nodes are named before a count.
@runkids

runkids commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 4199cb657f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@runkids
runkids merged commit fbc2281 into main Nov 12, 2026
17 checks passed
@runkids
runkids deleted the fix/report-dropped-background-blur branch November 12, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant