Skip to content

Activity & notifications on the top bar's bell; import warnings in a report instead of a screen-filling toast - #2008

Closed
mattsivak wants to merge 3 commits into
storytold:mainfrom
mattsivak:worktree-notifications-pill
Closed

mattsivak wants to merge 3 commits into
storytold:mainfrom
mattsivak:worktree-notifications-pill

Conversation

@mattsivak

Copy link
Copy Markdown
Contributor

Why

Two overlays sat on top of the app while they were up, with no way to move them aside:

  • The activity stack floated in the top-left corner over the folder list and took the clicks meant for it.
  • Import warnings went into the toast, one line per file. A Lightroom raw import listed every photo's "XMP adjustments were not imported for …: CameraProfileDigest, LensProfileDigest, …", which covered the whole canvas for 8 s and then disappeared for good. Most of those fields were Lightroom's own bookkeeping, not edits LightCraft failed to apply.

What changes

Fewer false warnings (crates/engine/src/crs.rs). These fields no longer count as unimported adjustments:

  • CompatibleVersion, CameraProfileDigest, LensProfileDigest
  • the lens profile's name, file, setup and IsEmbedded flag (only LensProfileEnable carries over)
  • CropConstrainToUnitSquare
  • LensProfileDistortionScale / LensProfileVignettingScale when they are at their default of 100

Look and unknown fields are still reported.

Running tasks and notifications live on the bell (panels/activity.rs, notifications.rs):

  • The bell sits at the left of the top bar, after back/forward, where the activity stack was. Nothing floats over the photos or the sidebar while a task runs.
  • While tasks run, a ring around the bell shows their progress; a segment sweeps while the amount of work isn't known.
  • Where the bar has room, the task's name and count appear beside the bell ("Exporting · 9 of 25").
  • Clicking the bell (or view.activity {open?}) opens a popover: a row per task with its bar, detail and ✕, then the recent notifications. Esc or a click elsewhere closes it.
  • LightcraftApp::notify and toast_error keep each message in the bell's Recent list (newest 30). A dot marks unread ones, in the caution colour if one is a warning.
  • In-window menus (Windows, Linux, web): when the bell would squeeze a menu title out, the search field moves right into the room the right-hand icons leave.

Toasts stay small (panels/mod.rs):

  • A toast wraps to at most 4 lines.
  • A long result goes in a Report behind a Show Details link on the toast and in the bell's list. It opens as Dialog::Report: a summary, collapsible groups with each folder shown once and its file names wrapped, and Copy to Clipboard.
  • Hovering a toast keeps it from fading.

Import warnings (import.rs):

  • The toast is one line: "Imported 1112 photos · Lightroom settings not applied: 48".
  • The report groups photos by what wasn't applied ("Not imported: Look", "Profile not applied…", "Upright Auto will be recalculated").

For agents:

  • ui.inspect adds activityOpen, notifications ({id, text, warning, details}) and unread.
  • Widget ids: icon:bell, activity:ring, activity:label, activity:popover, activity:row:<id>, activity:cancel:<id>, toast:details, notification:details:<id>.
  • activity:more is gone; the popover scrolls instead.

Docs: docs/background-tasks.md (new Notifications section), docs/control-protocol.md, the import/export/Lightroom-catalog user guides, the LR-BEHAV-BG-TASKS tracker row, and What's New.

Testing

  • cargo xtask ci: all 8 steps pass (fmt, clippy, heif, test, parity, layers, assets, wasm).
  • New tests:
    • crs::tests::lightroom_profile_bookkeeping_is_not_reported
    • notifications::tests::*
    • in tests_activity: a_running_task_shows_on_the_bell_not_over_the_library, the_popover_closes_on_escape_and_on_a_click_elsewhere, a_report_is_behind_the_toasts_details_link_and_in_the_bell, a_long_toast_is_cut_to_a_few_lines, import_warnings_are_grouped_by_what_was_not_applied
  • Existing stack tests now open the popover.
  • Tried in the desktop app on a ~10k-photo library (macOS); also checked with headless screenshots of the bell, the popover and the report.

Notes

mattsivak and others added 3 commits October 15, 2026 15:47
…eported as unimported XMP

CompatibleVersion, the profile digests, the lens profile's identity and its
default-strength scales, and CropConstrainToUnitSquare don't change the
rendering; a Lightroom raw sidecar listed all of them for every photo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…essages; import warnings go in a report

The activity stack floated over the folder list and a long toast (an import
listing every photo's unimported XMP fields) covered the photos. Now:
- the top bar's bell shows a progress ring (and the task's name where there is
  room); its popover (view.activity) has the task rows with ✕ and the recent
  notifications, a dot marks unread ones
- toasts are capped at four lines; a long result goes in a Report dialog
  (grouped, Copy to Clipboard) behind a Show Details link
- import warnings: one line in the toast, grouped by setting in the report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…here the activity stack was

The bell, its progress ring and the running task's name now follow back /
forward, and the popover opens from there over the sidebar. With in-window
menus (Windows, Linux, web) the search field moves right, into the room the
right-hand icons leave, rather than squeezing a menu title out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nledford

Copy link
Copy Markdown
Contributor

Hi @mattsivak, this overlaps a lot with my #1642 (opened Oct 13, off main). It also moves the activity stack onto the top bar's bell, with a progress ring, a line beside the bell ("Exporting · 40 %"), and a list that opens from the bell. It even uses the same automation ids: activity:ring, activityOpen, and activity:more removed. Three more PRs build on it: #1649 (finished tasks stay in the list), #1711 (each finished task says how it ended), and #1933 / #1943 (tasks queue instead of refusing). #1936 (toasts stack) changes the same toast code as your Show Details and hover-to-keep changes.

Yours has a lot that mine doesn't:

  • fewer false import warnings in crs.rs;
  • import warnings grouped by what wasn't applied;
  • the Report dialog behind Show Details;
  • the notifications list with its unread dot;
  • the search field moving over for in-window menus.

So maintainers don't review the bell twice, could those parts land on their own? The crs.rs fix could go off main by itself, and the notifications and Report on top of whichever bell lands. If you'd rather keep the bell in yours, say so and I'll rebase my PRs onto it. Either way, #1642 notes that moving the bell needs a maintainer's decision, since it departs from where Lightroom Classic puts it.

@AlexChambers AlexChambers 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.

I'm a fellow contributor, not a maintainer. I'm using Codex to help review PRs and checking potential findings with focused tests where possible.

Reviewed pinned head e53f70608362b3617a514f2c0e8e452c258ea39a.

[P2] Keep the popover position bounds ordered on narrow viewports

When the content width is below 336 interface points, this clamp has a minimum of screen.left() + 8 and a maximum smaller than that minimum, so f32::clamp panics whenever the activity popover is open. For example, a 320-point web viewport produces bounds 8 and 0. The browser canvas fills the viewport with no minimum width, so opening Activity at that width, or resizing an open popover down to it, reaches this frame-rendering panic. An exact-expression probe also panics at widths 335 and 300. Bound the popover width and position to the available content rectangle, keeping the clamp minimum at most its maximum.

Changed line.

popover-bounds-probe.rs compiles the original positioning expression using a coordinate-only Rect stand-in. rustc 1.99.0: widths 900 and 336 succeed; 335, 320 and 300 panic. apps/lightcraft-web/index.html:5,12-13 gives a full-width canvas without a minimum. No browser, integrated egui frame or native platform execution.

@mattsivak

Copy link
Copy Markdown
Contributor Author

Thanks, @nledford. Agreed: the bell stays in #1642. I split the rest out:

#2259 changes the same toast code as #1936 (the 4-line cap, Show Details, hover-to-keep), so whichever lands second needs a small merge. I'll close this one as superseded.

@mattsivak

Copy link
Copy Markdown
Contributor Author

Thanks, @AlexChambers. That clamp went away with the split: the popover in #2259 is #1642's egui::Popup, which egui keeps on screen without a clamp. Testing it at narrow widths found that a notification's text could still push the list past a 300 pt window. It's now laid out at the list's width. the_list_opens_inside_a_narrow_window_without_panicking opens it with a task and a notification at 300, 320, 335, 336 and 900 pt and checks it stays inside the window; it failed before the fix.

@mattsivak

Copy link
Copy Markdown
Contributor Author

Superseded by #2257 and #2259 (with #1642 for the bell).

@mattsivak mattsivak closed this Oct 18, 2026
aiongg pushed a commit to aiongg/lightcraft that referenced this pull request Oct 22, 2026
…ted as unimported XMP

CompatibleVersion, the profile digests, the lens profile's identity and its
default-strength scales, and CropConstrainToUnitSquare don't change the
rendering; a Lightroom raw sidecar listed all of them for every photo.
Look and unknown fields are still reported.

Split out of storytold#2008.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattsivak added a commit to mattsivak/lightcraft that referenced this pull request Oct 26, 2026
…ngs in a report instead of a screen-filling toast

On top of storytold#1642's bell. The list under it keeps the recent notifications below
the tasks (errors from toast_error and LightcraftApp::notify; newest 30) with a
dot on the bell for unread ones (caution colour for a warning) and Clear.
A long result goes in a Report (Dialog::Report: summary, groups with each
folder once, Copy to Clipboard) behind Show Details on the toast and on the
entry. Toasts wrap to four lines and stay while hovered. Import warnings are one
line in the toast, grouped by what wasn't applied in the report. With
in-window menus the search field moves right instead of squeezing out a menu
title. ui.inspect adds notifications and unread.

The list's notification text is laid out at the list's width: handed to a
label in a row it grew the list past a 300 pt window. Regression test at
300/320/335/336/900 pt (the review of storytold#2008 found its own popover's clamp
panicked below 336 pt; storytold#1642's egui popup has no such clamp).

Split out of storytold#2008.

Co-Authored-By: Claude Opus 5.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.

3 participants