Skip to content

Refresh exhibit labels and contents after review edits - #1114

Draft
nonprofittechy wants to merge 2 commits into
mainfrom
fix/exhibit-review-refresh
Draft

nonprofittechy wants to merge 2 commits into
mainfrom
fix/exhibit-review-refresh

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

Reviewing an ALExhibitDocument can reorder, rename, or delete exhibits after its PDF, cover pages, and table of contents have been generated. A later as_pdf() then reuses stale cover labels or the old table of contents: for example, deleting Exhibit A can leave B/C covers beside an A/B contents page.

Refresh the list labels and page offsets, the contents attachment, each cover attachment, and the rendered exhibit PDF before assembling a refreshed document. The list resolves all cover dependencies before PDF work, so docassemble's lazy attachment gathering does not interrupt a partial render. refresh=False continues to use cached exhibit PDFs.

Validation: 15 focused exhibit unit tests passed. On localhost docassemble 1.10.10 and 1.9.13 (with a targeted backport of this change), real browser runs uploaded 0, 1, and 3 synthetic PDF exhibits, then reordered, renamed, and deleted one. Final, preview, bundle, and captured email attachment PDFs all had exact membership, contents references, cover labels, and page prefixes; impounded content was absent from ordinary outputs. Email transport was intercepted in the fixture.

nonprofittechy and others added 2 commits September 26, 2026 18:01
… rebuilds

ALExhibitList.as_pdf(refresh=True) now recalculates auto labels and page
offsets before rebuilding covers, so direct list-level calls don't render
stale labels after a reorder or delete. The list passes
refresh_cover_page=False to each exhibit since it already refreshed every
cover in its preflight pass. Also move the __main__ guard back to the end
of the test module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nonprofittechy
nonprofittechy requested a lite review from Copilot September 27, 2026 16:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants