Skip to content

Allow receipted caption changes - #189

Merged
hiciefte merged 1 commit into
bisq-network:mainfrom
hiciefte:ci/figure-captions
Nov 11, 2026
Merged

hiciefte merged 1 commit into
bisq-network:mainfrom
hiciefte:ci/figure-captions

Conversation

@hiciefte

Copy link
Copy Markdown
Collaborator

A figure's caption can now be reworded when the receipt lists the figure in changed_figure_captions, the same way alt text works with changed_image_alt_text.

Why: since #188, figures are compared as a whole, so a reworded caption failed even with a receipt. That blocks #146 (Reputation) and #147 (Reputation2), whose only finding is a reworded caption.

Still locked, listed or not: the figure's ID and structure, the link that opens it, its images (everything but the alt text under changed_image_alt_text), and the caption element itself. Inside a listed caption, the rules for article text apply: only the inline markup a wording edit may use, and invisible characters only when listed. An unlisted caption change fails, and so does listing a caption that did not change.

Awaiting a receipt: a caption change counts as awaiting, and the receipts summary names the figure. The drafted receipts and scripts/record-accepted-edit.mjs fill in the new field.

Tests (in scripts/accepted-edits.test.mjs):

  • a listed caption change passes;
  • an unlisted one fails;
  • a listed figure whose image, link or caption element also changed still fails;
  • a caption change that adds a forbidden element or an invisible character fails;
  • awaiting mode names the figure, and the drafted receipt passes.

npm test (166 tests) and the strict npm run build pass. With #146's and #147's edits converted to Markdown, each is awaiting a receipt, and only its own figure is named: source-image-4 and source-image-1, for alt text and caption.

A figure was compared as a whole, so a reworded caption failed even with
a receipt. That blocks wording proposals whose only finding is a caption.
A caption's content may now change when the receipt lists the figure in
changed_figure_captions, the same way alt text works. Inside the caption
the rules for article text apply: only the markup an edit may use, and
invisible characters only as listed.

The figure's ID and structure, the link that opens it, its images and
the caption element stay locked, listed or not. An unlisted caption
change fails, and listing an unchanged caption fails. Without a receipt
a caption change awaits one that names the figure, and the drafted
receipts and record-accepted-edit.mjs fill the field.
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4c216b7 and e92103b.

Files selected for processing: 5

  • CONTRIBUTING.md
  • scripts/accepted-edits.test.mjs
  • scripts/check-source-fidelity.mjs
  • scripts/lib/accepted-edits.mjs
  • scripts/record-accepted-edit.mjs

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

@hiciefte
hiciefte merged commit 5f6a5c2 into bisq-network:main Nov 11, 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.

1 participant