Skip to content

LR-BEHAV-EMPTY-STATES: the first edit on a sample gets a payoff (stacked on #1824) - #1825

Closed
nledford wants to merge 8 commits into
storytold:mainfrom
nledford:first-edit-payoff
Closed

nledford wants to merge 8 commits into
storytold:mainfrom
nledford:first-edit-payoff

Conversation

@nledford

@nledford nledford commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1824. The one new commit is "LR-BEHAV-EMPTY-STATES: the first edit on a sample gets a payoff". This is the second of four PRs from a fourth review of onboarding.

Rebased onto main after integration batch 40 (0da998f24, 2026-10-15). No conflicts. Adds Czech, Italian, Georgian and Polish for its strings. Gates on the stack's tip (#1827): cargo fmt --all --check; cargo clippy --workspace --all-targets -- -D warnings (with -A clippy::chunks_exact_to_as_chunks); cargo xtask parity, layers, assets; cargo nextest run -p lightcraft-catalog -p lightcraft-engine -p lightcraft-ui-egui -p lightcraft-cli -p lightcraft: 2617 run, all pass (16 that timed out on the busy machine passed when run again with fewer threads). cargo check --workspace --all-targets on every branch of the stack. Not rerun: cargo xtask wasm, the screenshots (nothing on screen changed in the rebase).

Why

The first edit is when someone decides whether to stay, and it ended in silence:

  • The banner invited "Drag any slider", then dropped back to its generic text once something changed.
  • Two of the welcome's five samples arrived already edited. The aurora came at Exposure +0.35, and the lagoon in black and white though its thumbnail showed it in colour. So the photo someone clicked wasn't the one they saw, and "the original never changes" was confusing.

Change

  • The banner walks the first edit through (samples::Tour). It follows the sample that is open:
    1. Unedited: "Drag any slider: the original never changes. Press Y to compare before and after." (unchanged).
    2. Edited: "That's your first edit. Press Y to see it beside the original." Without a key bound, it names View → Compare Before and After.
    3. While a Before / After layout shows it: "The original beside your edit: the file itself never changes."
    4. Compared once and back: the usual "These are sample photos…", from then on.
  • What counts as an edit: the open sample's settings differ from a new photo's. A rating or a keyword isn't one. Another unedited sample, or an undo back to the start, is invited again. Show Original alone isn't a comparison.
  • The welcome's samples arrive unedited. An aurora and a beach of the same kinds replace the edited two. An engine test keeps every welcome scene off the pre-edited list, and the grid keeps its edited photos for variety.
  • The new lines are translated into the thirteen catalogs.

BEFORE and AFTER: the banner after a first edit, and while comparing
Top, BEFORE (#1824): after a first change, the banner says the generic line. Middle, AFTER: it says so and how to compare. Bottom, AFTER: while comparing.

How it was checked

Merging

🤖 Generated with Claude Code

nledford and others added 8 commits October 15, 2026 08:48
… on request

A new library made by the desktop app filled itself with the 24 procedural demo photos, their
albums and keywords, dressed as the person's own (realistic EXIF, "My Photos"), with nothing
saying what they were and no way to take them out together.

- A new desktop library starts empty. Its first screen (storytold#1761's empty state) is "Welcome to
  LightCraft" while the library has never held a photo, and offers Import Photos…, Import
  Lightroom Catalog… and Try Sample Photos. `--memory` keeps the demo photos (`--no-demo` for
  none); `lightcraft-cli --demo` and the web build are unchanged. A temporary session after a
  library error isn't welcomed.
- `library.addSamples` (Help ▸ Add Sample Photos) adds the demo photos and albums as one undo
  step; refused while samples are in the library (Recently Deleted too), where the welcome no
  longer offers them.
- `library.removeSamples` (Help ▸ Remove Sample Photos) removes every sample photo, the albums
  only they filled and the folders left holding none, as one undo step. An album that also holds
  a photo of the person's own stays, with that photo, and a cover that was a sample becomes its
  first photo left; a removed album being shown gives way to All Photos.
- The catalog counts its sample photos as photos are added, removed or re-sourced (recounted by
  `repair` on load), so `Session::has_samples` costs no scan of a large library.
- A banner under the top bar while a library holds samples: "These are sample photos…" with
  Import Photos… / Remove Sample Photos / Hide, or once photos of the person's own are in, Remove
  Sample Photos / Keep Them. Its buttons are laid out from the right, so a long translation
  shortens the message instead of pushing them out of a narrow window. Closing it is remembered
  (`samplesBannerHidden`); samples that newly appear bring it back. Not shown for an in-memory
  demo session. Removing says how many went and that Undo brings them back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n Recently Deleted

With every sample photo in Recently Deleted the grid said "Your library is empty", while the
banner above it still said "These are sample photos…" with a second Import Photos… button.

- The catalog also counts the sample photos that are in the library (not in Recently Deleted),
  kept by one rule for every op that changes a photo: its state before and after.
- The banner shows only while one is. The samples in Recently Deleted can still be removed with
  Help ▸ Remove Sample Photos, or restored, which brings the banner back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to open

The empty library's welcome shared the screen with an empty Tools panel whose own message was as
loud as the welcome's title, a tool rail and a bottom bar of stars, flags and Copy Edit Settings
with nothing to act on; and the samples, the best moment of the first minute, were its third,
grey button.

- While the welcome is shown, the Tools panel steps aside, remembered (in ui.json too, so
  quitting while empty doesn't lose it), and comes back once photos arrive: as it was, or as the
  Edit panel for an editing tool (Crop, Masking…) whose photo is gone. A panel the person opens or
  closes meanwhile is their choice. Browsing a Local folder or Recently Deleted brings it back,
  as those photos can be edited.
- The bottom bar's rating, flags and Copy Edit Settings wait for a photo to use them on.
- The right panel's empty-library message is one dim line (`empty_note`): one headline.
- Under the welcome's buttons, a row of five sample photos (3 to 5 as the column allows, drawn
  on a worker thread, placeholders until they arrive): a click adds the samples and opens that
  one in Detail, where the Edit panel is back. Each is a named, focusable button. Where the row
  has no room (a narrow or short view) and in the web build, Try Sample Photos is a button as
  before; a temporary session offers neither. The thumbnails go the frame after the welcome
  isn't drawn, so their worker stops and the headless `settle` isn't kept waiting; a row out of
  room for a moment keeps them.
- `empty_state` takes room below the hint, counted when the block is centred.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The empty library's welcome was painted text: a screen reader heard "Import Photos…, button" and
nothing of the welcome around it. Nothing put the keyboard anywhere, and the light themes' dim
text (the welcome's message and hint, panel notes, counts) read at 3.5–4.4:1, under WCAG AA.

- Screen readers hear the welcome: its title as a heading, the message, the hint, the sample
  row's caption, and the right panel's note (`readable`: a hover-only node over painted text,
  read by its value as egui's labels are; the heading by its name).
- A new library's welcome puts the keyboard on Import Photos… once a session; the welcome's
  buttons show an accent ring where the keyboard is. A focused plain button (the welcome's,
  its sample thumbnails) keeps only Enter, Space, Tab, Esc and the arrows, as dock chrome does:
  every other key still reaches shortcuts (Cmd/Ctrl+Shift+I among them), it isn't a text field
  for Esc or for macOS's menu bar accelerators. (Esc on the focused welcome also runs View ▸ Back,
  as it does with nothing focused.)
- `text_dim` reaches 4.5:1 on chrome, canvas and grid in every theme: Charcoal and Midnight
  #949494, Silver #585858, Paper #6b6b6b.
- The hint says a folder can be looked through without importing it, under Local in the
  sidebar, while Local is in sight (desktop).
- The welcome is centred in the space below the grid's header (it overlapped it in a short
  window), and whether the sample row has room is measured from the message, not guessed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…which invites a first edit

A design critique of the first run found the two ways into the samples ending apart: a welcome
thumbnail opened that sample in Detail, while Try Sample Photos (the welcome's narrow and web
button), Help ▸ Add Sample Photos and agents left a sparse grid of one photo per date. And once a
sample was open, nothing said what to do: the banner still said "Import your own whenever you're
ready", pointing away from the editor.

- Samples coming into the empty library's welcome, however they are asked for (every path runs
  through `run_typed`), land on the first of the welcome's samples in Detail with the Edit panel
  (`land_on_samples`); a thumbnail then opens the one clicked. A library with photos of its own,
  or a Local folder or Recently Deleted on screen, stays as it is.
- There, until the first change since they came (the session's commit count), the banner says
  "Drag any slider: the original never changes. Press Y to compare before and after." with the
  key Compare Before and After is bound to now (`samples::message`). Switching libraries ends it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… are the button component

- The empty library's welcome: Import Photos… is a Primary button, the others Secondary, measured
  by the component (`empty_button`, for drawing and for the height that decides whether the
  sample row fits); the button height is the component's medium one. The first-run keyboard
  focus and the plain-button keys stay; the focus ring is the component's.
- The samples banner: Import Photos… a small Primary, Remove Sample Photos a small Secondary,
  Hide / Keep Them a small Ghost (it was a frameless egui button that read as a label).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
While the welcome is what the view shows (`empty_library::in_view`: the empty library in a grid,
or in Detail with nothing open, and no filter), the window steps back: the grid's "0 photos" and
the bottom bar (view modes and thumbnail size, with nothing to look at) aren't drawn, and the
sidebar's empty Albums, By Date, Folders and Keywords sections fold into one quiet line
("Albums, dates, folders and keywords appear here as photos arrive"). Local stays.

The empty state's title is in the brightest text, above the window's own headings, and its words
wrap at 540 points at most, as narrow as they go without another line, so the message reads as
two even lines rather than one run across a wide window (every empty state, and its measured
height, alike).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After landing on a sample, the banner walks the first edit through (`samples::Tour`):
- invited: "Drag any slider: the original never changes. Press Y to compare before and after."
- after the first change: "That's your first edit. Press Y to see it beside the original."
  (without a key bound: View → Compare Before and After)
- while comparing: "The original beside your edit: the file itself never changes."
- once compared and back: the usual "These are sample photos…", from then on.
The stage follows the sample open: it is edited when its settings differ from a new photo's
(a rating or keyword is no edit; another sample, or an undo back to the start, is invited again),
and only a Before / After layout counts as comparing (Show Original alone shows nothing beside
the edit). Comparing before any change keeps the invitation.

The welcome's five samples are ones that arrive unedited (the aurora came at Exposure +0.35 and
the lagoon in black and white, unlike their thumbnails): an aurora and a beach of the same kinds
take their place, and an engine test keeps every welcome scene off the pre-edited list.

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

Copy link
Copy Markdown
Contributor Author

Folded into #1781, which now holds this PR's commits together with the rest of its chain, rebased onto current main (0da998f2). The description there covers every step, links back here, and has fresh screenshots. This PR's description and discussion stay here for reference.

@nledford nledford closed this Oct 15, 2026
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