Skip to content

fix: excavate modules in canvas fallback - #181

Open
nrps9909 wants to merge 1 commit into
react-component:masterfrom
nrps9909:codex/excavate-canvas-fallback
Open

nrps9909 wants to merge 1 commit into
react-component:masterfrom
nrps9909:codex/excavate-canvas-fallback

Conversation

@nrps9909

Copy link
Copy Markdown

Summary

  • render cellsToDraw in the Canvas fallback used when Path2D is unavailable
  • preserve imageSettings.excavate behavior for older or limited browser environments
  • add focused fallback coverage proving modules are not painted beneath an excavated image

Root cause

The Path2D branch generated its path from cellsToDraw, but the fillRect fallback iterated the original cells. An embedded transparent or semi-transparent image could therefore reveal dark QR modules underneath it whenever Path2D was unavailable.

Verification

  • exact base: 7de25725d918f352d116abba5ebdece32b79e676
  • regression before the fix: the focused fallback test expected only the background fill after a full-matrix excavation, but observed 335 fillRect calls
  • npm test -- tests/fallback.test.tsx --runInBand — 1/1 passed after the fix
  • npm test -- --runInBand — 2 suites, 9 tests passed
  • npm run tsc — passed
  • npm run lint — passed
  • npm run compile — ESM, CJS, declarations, and Less build passed
  • Prettier check and git diff --check — passed

AI assistance disclosure: Codex was used to trace the divergent Canvas rendering branches, construct the exact-base regression, implement the one-line fix, and draft this report. I verified the failure count and all listed checks locally.

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@nrps9909 is attempting to deploy a commit to the afc163's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c44e1c8a-0ec7-4847-9baa-47a2fc712518


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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