Skip to content

Show the image picker instantly, with no backdrop - #14709

Merged
dhh merged 1 commit into
quattrofrom
image-picker-instant-appearance
Oct 9, 2026
Merged

dhh merged 1 commit into
quattrofrom
image-picker-instant-appearance

Conversation

@dhh

@dhh dhh commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

The background/theme image picker now appears instantly, in one complete frame, directly over the desktop:

  • Remove every transition in the carousel: the card and thumbnail fades and the x/y/width/height slide.
  • Hold the reveal until every visible preview has decoded and the card has pre-rendered for two presented frames at opacity 0, so nothing flashes in piece by piece. If a preview stalls (slow disk, huge original), the picker reveals anyway after 400 ms instead of holding an invisible keyboard grab.
  • Accept only Escape before the picker is visible, so a blind filter or Return cannot strand or apply an unseen selection.
  • Drop the fullscreen scrim wash, and the now-dead image-picker.scrim theme tokens with it.

Testing

  • test/shell.d/image-picker-test.sh passes, including new guards that run the reveal logic itself against mocked delegates (settled, unsettled, no cards, stalled-preview fallback, closed).
  • color-reference-test, theme-templates-test, and overlay-window-test pass.
  • Verified in the running shell with 60 fps recordings of cold and warm opens: a frame-by-frame scan shows the picker moving from absent to its final frame in a single step with no partial frames, and screenshots confirm the desktop behind it is undimmed.
  • Reviewed with Claude before opening; its actionable findings (stalled-preview fallback, pre-reveal key handling, dead scrim tokens, behavioral test coverage) are addressed in this change.

Remove the carousel's fade and geometry transitions, hold the reveal until every visible preview has decoded and two frames have pre-rendered (falling back to revealing anyway after 400ms), and drop the fullscreen scrim and its theme tokens so the picker sits directly on the desktop. Only Escape is accepted before the picker is visible.
@dhh
dhh merged commit fcf9eeb into quattro Oct 9, 2026
1 check passed
@dhh
dhh deleted the image-picker-instant-appearance branch October 9, 2026 10:22
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium impact] Changes image picker display behavior and timing.

The PR appears safe to merge, with a non-blocking issue in the wait for completed preview frames.

Findings

  1. P2 Frames count before previews finish ▶

Summary

The picker drops its backdrop and all fade and movement transitions.

  • Waits for visible previews before revealing, with a 400 ms fallback.
  • Blocks filtering and selection before reveal.
  • Removes unused backdrop theme values and adds reveal tests.
  • The frame counter needs to start after previews settle, rather than when the picker opens.

Acknowledged intentions: dhh explicitly requests instant movement and the 400 ms fallback even when previews remain unfinished.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open picker] --> B[Keep card transparent]
  B --> C[Count first two frames]
  B --> D[Decode visible previews]
  C --> E{Previews settled and count at least two?}
  D --> E
  E -->|Yes, checked again next tick| F[Reveal card]
  B --> G[400 ms fallback]
  G --> F
  B --> H[Escape cancels]
Loading

Reviews (1) · Last reviewed commit: "Show the image picker instantly, with no..." · Reviewed by Greptile

Comment on lines +525 to +529
FrameAnimation {
running: root.opened && !root.layoutSettled && root.renderedFrames < 2
onTriggered: {
root.renderedFrames += 1
root.maybeReveal()

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.

P2 Frames count before previews finish

renderedFrames starts when the picker opens and stops at two, even while previews are decoding. If decoding takes more than two frames but less than 400 ms, the last previewSettled change can reveal the card on the next tick without the promised two frames with completed previews. A new request while the picker stays open also keeps the old count.

Start counting after all previews settle, and reset the count for each new request or readiness change. Add a test where decoding finishes after the initial two frames.

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