Skip to content

Error setting metadata of image - #17

Closed
phillip-hopper wants to merge 1 commit into
BloomBooks:masterfrom
phillip-hopper:BL-553
Closed

Error setting metadata of image#17
phillip-hopper wants to merge 1 commit into
BloomBooks:masterfrom
phillip-hopper:BL-553

Conversation

@phillip-hopper

Copy link
Copy Markdown
Contributor

Do not crash if inserting an image in a format that does not
support metadata. The first part of this fix is in libpalaso.

Do not crash if inserting an image in a format that does not
support metadata. The first part of this fix is in libpalaso.
@phillip-hopper

Copy link
Copy Markdown
Contributor Author

This is no longer needed. All changes are in libpalaso.

@phillip-hopper
phillip-hopper deleted the BL-553 branch March 30, 2015 19:30
hatton added a commit that referenced this pull request Jun 26, 2026
#7949)

Code changes responding to the PR review:

- Team Collections (review #1/#3/#4/#13): BloomBridge's mutating external
  endpoints (add/update/process-book) now fail fast on a Team Collection rather
  than silently corrupting a shared collection (they don't honor checkout, the
  TeamCollection.status file, or TC renames). Adds
  CollectionModel.IsEditableCollectionATeamCollection and
  ExternalApi.RefuseIfTeamCollection, and documents the non-TC assumption on
  CollectionModel.AddBookFromFolder.

- Off-screen JS bridge cleanup (#6/#7/#8) in BookProcessor: the capture trigger
  is now fire-and-forget (its result was discarded), the redundant
  Application.DoEvents() in the poll loop is removed (the sync call already pumps
  the loop), and WaitForJavascriptResult documents why the off-screen processor
  keeps the poll-a-window-global approach rather than the live editor's async
  API callback.

- Async page-readiness (#10/#11/#15): SetImageDisplaySizeIfCalledFor now
  registers a requestPageContent delay around its asynchronous image-info fetch
  and resize, so captureContentForExternalProcessing waits for image sizing to
  finish before capturing. Corrects the editablePage.ts comments that wrongly
  called the load-time fix-ups "synchronous", and clarifies the natural-size
  fallback in autoFitImageOverTextSplits.

- autoFit overlays (#14): fitOneImageOverTextSplit now also skips pages whose top
  pane has non-text overlays (canvas elements other than the background image),
  not just text overlays.

- Smaller comment fixes: clarify the "already in the collection" guard in
  AddBookFromFolder (#2); document that the process-book overlay message is
  intentionally not localized (#12); note that priorForeground is captured once
  on purpose (#5); move the JSON-vs-delimiter note next to the code it describes
  (#16); raise the ExternalBusyOverlay z-index (#17).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JohnThomson added a commit that referenced this pull request Jul 13, 2026
…ckout display (bugs #17, #18)

Bug #18: after a teammate renamed a book (rename carried by check-in), the
receiving side grew TWO local folders with one instance id. Base
NewBookRenamedFrom's heuristic -- "a local folder with repo status can't be the
rename source" -- assumes name-keyed status and is inverted under identity-first
resolution: the old-name folder resolving by id to the renamed row is exactly
what marks it as the rename source. Detection therefore always failed, the
renamed book was auto-downloaded as NEW next to the old folder, and later syncs
refreshed the old folder's content through its identity binding.

NewBookRenamedFrom is now protected internal virtual (base body unchanged, so
FolderTeamCollection behavior is byte-identical) and CloudTeamCollection
overrides it with an exact instance-id comparison. The two auto-download sweeps
(QueueMissingRepoBooksForBackgroundDownload, and a re-check in
DownloadMissingBookInBackground after the repo-presence check) now skip repo
books that are renames of existing local books; both paths are only reachable
for backends with CanAutoApplyRemoteChanges (cloud). The actual folder rename
still happens in the existing sync rename-from-remote pass, which is already
identity-driven and needs no change.

Bug #17: new/local-only books in a cloud TC displayed "checked out to" Bloom's
REGISTRATION identity (e.g. John1) rather than the signed-in account, because
the base status JSON stamps `who`/whoFirstName/whoSurname/currentUserName from
TeamCollectionManager.CurrentUser for purely-local checkouts.
AddCloudBookStatusFields now rewrites `who` to the account email (clearing the
registration name parts) when it equals the base registration currentUser, and
carries the account identity in currentUserName; a real repo lock's `who` (a
member email) is untouched.

Filter incl. all folder-TC suites: 458/458 (5 new tests).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JohnThomson added a commit that referenced this pull request Jul 14, 2026
…ly books (bug #17 round 2)

The first fix rewrote 'who', but 'who' already carried the account identity
(CurrentUserForStatus resolves to CloudTeamCollection.CurrentUserIdentity). The
actual 'checked out to John1' came from whoFirstName/whoSurname, which the base
stamps from the REGISTRATION name for new/local-only books and which the UI
prefers over 'who'. AddCloudBookStatusFields now clears them when
isNewLocalBook, so the display falls back to the account email. New test not
yet executed: John's live instances hold output\Debug; the change mirrors the
already-tested rewrite path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JohnThomson added a commit that referenced this pull request Jul 14, 2026
…atar

A brand-new local book's checkout avatar showed a single letter and the raw
email (A / alice@dev.local), while a real checkout by the same user showed
initials and the display name (AA / Alice Admin). The bug #17 fix had cleared
whoFirstName/whoSurname for new local books (they were carrying the registration
name), so the avatar fell back to the email in `who`.

Resolve and cache the signed-in account's admin-editable display name
(tc.members.display_name) as CloudTeamCollection.CurrentUserDisplayName, and
stamp it into a new local book's whoFirstName/currentUserName so its avatar
matches a real checkout. When the display name can't be resolved (signed out or
none set), the fields stay null and the display falls back to the email exactly
as before. The name is fetched once per session and cached; a mid-session admin
change is only reflected for new local books after a restart (real-checkout
avatars already refresh from the server).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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