Skip to content

Quiet the Update Book progress dialog: bar and explanation only (BL-16893) - #8375

Open
JohnThomson wants to merge 1 commit into
Version6.5from
BL-16893-quiet-image-progress
Open

JohnThomson wants to merge 1 commit into
Version6.5from
BL-16893-quiet-image-progress

Conversation

@JohnThomson

@JohnThomson JohnThomson commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Problem

"Update Book" (Collections tab), and since BL-16852 the automatic page update that runs before the AI image editor opens or after a page-size change, show a progress dialog that fills with a running log: a line per stage ("Updating collection settings...", "Gathering Data...", "Updating pages...") and two lines per image ("Reading metadata from X", "Writing metadata to HTML for X"), plus "Preparing image: X" for every oversized picture. A 40-image book scrolls through some 80 lines that only repeat what the percent bar already shows, and bury the one sentence that explains why the dialog appeared.

Cause

Those lines are IProgress.WriteStatus calls dating from 2012. They were harmless while every caller showed status in a single overwriting WinForms label. BL-16870 (2026-09-14) moved Update Book onto the React progress dialog through WebProgressAdapter, whose WriteStatus appends a permanent line, and BL-16852 made the same pass run automatically.

What the PR does

  • Adds QuietStatusProgress, an IProgress wrapper that drops status lines and forwards everything else: messages, warnings, errors and the percent.
  • BookProcessor.ProcessBook, which both dialogs run, wraps the progress it is given in it for the whole run. Update Book now shows just its title and the moving bar; the automatic update shows its one explanatory sentence and the bar. Any warning or error still appears.
  • Book hands the two per-image passes (mirroring image metadata into the HTML, shrinking oversized images) the same wrapper, so the other callers of bringing a book up to date (importing a .bloomSource, Update All Books) keep their stage lines but lose the line per image.
  • The Copyright and License dialog's "add this information to all images" is untouched: it runs a WinForms dialog with one overwriting status line, where naming each file as it goes is useful.
  • Tests cover the wrapper, the quiet bring-up-to-date path, and the still-verbose whole-book metadata path. A stale comment about who passes a real progress to the image-shrink migration is corrected.

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16893

🤖 Generated with Claude Code

Devin review


This change is Reviewable

@JohnThomson

Copy link
Copy Markdown
Contributor Author

[Claude Fable 5.1] Consulted Devin on 2026-09-18 up to commit 919c326 (one review round, on the first push).

Devin raised no bugs and no flags on this PR, and no Informational items. Its overview describes the change the same way the PR description does. CI (pr-automation) passed; no other review bot posted.

…6893)

Update Book, and since BL-16852 the automatic page update that runs before the
AI image editor opens or after a page-size change, filled the React progress
dialog with a running log: a line per stage ("Updating pages...") and two lines
per image ("Reading metadata from X", "Writing metadata to HTML for X"), plus
"Preparing image: X" for every oversized picture. Those are IProgress.WriteStatus
calls that were harmless in an overwriting WinForms label; WebProgressAdapter
appends each one as a permanent line.

- Add QuietStatusProgress, an IProgress wrapper that drops WriteStatus and
  forwards messages, warnings, errors and the percent.
- BookProcessor.ProcessBook wraps the progress it is given for the whole run,
  so Update Book shows only its title and the bar, and the automatic update
  only its explanatory sentence and the bar. A caller's own NullProgress
  (including stateful subclasses) is passed through unchanged.
- Book.NoStatusProgress hands the two per-image passes (mirroring image
  metadata into the HTML, shrinking oversized images) the same wrapper, so
  other callers (Update All Books, .bloomSource import) keep their stage lines
  but lose the line per image.
- The Copyright and License dialog's "add this to all images" is untouched; its
  WinForms status label still names each file.
- Tests: QuietStatusProgressTests, BookImageProgressTests (quiet
  bring-up-to-date path, still-verbose whole-book metadata path), and a
  RecordingProgress test helper. A stale comment in BookStorage about who
  passes a real progress to the image-shrink migration is corrected.

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16893

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@JohnThomson
JohnThomson force-pushed the BL-16893-quiet-image-progress branch from f9e1f91 to 3e5c416 Compare September 18, 2026 20:56
@JohnThomson
JohnThomson marked this pull request as ready for review September 18, 2026 20:56
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