Skip to content

fix(pages): keep the audit score when a figure is cropped - #76

Merged
Rl0007 merged 3 commits into
mainfrom
fix/crop-keeps-audit-score
Oct 6, 2026
Merged

Rl0007 merged 3 commits into
mainfrom
fix/crop-keeps-audit-score

Conversation

@Rl0007

@Rl0007 Rl0007 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
  1. Cropping or replacing an image on a page reset the page's audit score and verdict, so a remediated page went back to showing its old pre-remediation score, even though only an image changed.
  2. A crop now keeps the page's current score and verdict. Text edits still reset them as before.

You can visit an import's Pages tab, click an image, and use "Crop & embed" to see it.

Fixes #46

Before

After

Verification
  • Added test_crop_keeps_the_page_audit_score in wikify/tests/test_figure.py. It fails on main (canonical_composite 0.0 != 0.84) and passes with the fix. The existing test_a_rewrite_drops_the_verdict_it_no_longer_describes still covers the reset on text edits.
  • Full suite on a dev box: 486 run, 475 passed, 11 skipped, 0 failed. Main had 474 passed and 11 skipped; the one extra pass is the new test.
  • End-to-end on the dev box: page 4 was set to escalate 0.84 for test setup, then "Figure 4.1" was cropped in the UI. On main the header went to "— 0.98". With the fix it stays "escalate 0.84" and the markdown points at the new crop file.
  • Code review: approved.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@Rl0007
Rl0007 merged commit 555efdd into main Oct 6, 2026
3 checks passed
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.

Cropping an image resets the page's audit score

1 participant