Skip to content

Let listing photos be picked several at a time - #118

Open
AndrewG828 wants to merge 1 commit into
user/andrewgao/feature/UI-UX-Lucid-Refactor-07-explore-tabfrom
user/andrewgao/feature/UI-UX-Lucid-Refactor-08-multi-image-picker
Open

Let listing photos be picked several at a time#118
AndrewG828 wants to merge 1 commit into
user/andrewgao/feature/UI-UX-Lucid-Refactor-07-explore-tabfrom
user/andrewgao/feature/UI-UX-Lucid-Refactor-08-multi-image-picker

Conversation

@AndrewG828

@AndrewG828 AndrewG828 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Stacked PR 8 of 15. Based on #117 — merge in order.
#111#112#113#114#115#116#117#118#119#120#121#122#123#124#125

NewListingViewModel tracked a single PhotosPickerItem, so adding nine photos
meant nine trips through the picker. It now holds a selection array and loads
the batch in one pass, trimmed to whatever slots are left.

Two bugs fall out of the rewrite:

  • The picker enforced a limit of 7 images while PaginatedImageView advertised
    9, so the last two picks were silently dropped. Both now read
    NewListingViewModel.maxImages, and the system picker is given
    maxSelectionCount: remainingImageSlots so it stops you at the limit instead
    of discarding the overflow afterwards.
  • The old loader appended from a DispatchQueue.main.async block inside an
    already-@MainActor view model, which reordered appends against the
    selectedItem = nil reset.

removeImage(at:) is added here for the Sell form, which lets you delete a
photo from the carousel.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017R8mua9xepzF3mnRETtd6W

`NewListingViewModel` tracked a single `PhotosPickerItem`, so adding nine photos
meant nine trips through the picker. It now holds a selection array and loads
the batch in one pass, trimmed to whatever slots are left.

Two bugs fall out of the rewrite:

- The picker enforced a limit of 7 images while `PaginatedImageView` advertised
  9, so the last two picks were silently dropped. Both now read
  `NewListingViewModel.maxImages`, and the system picker is given
  `maxSelectionCount: remainingImageSlots` so it stops you at the limit instead
  of discarding the overflow afterwards.
- The old loader appended from a `DispatchQueue.main.async` block inside an
  already-`@MainActor` view model, which reordered appends against the
  `selectedItem = nil` reset.

`removeImage(at:)` is added here for the Sell form, which lets you delete a
photo from the carousel.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017R8mua9xepzF3mnRETtd6W
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 5b0126d4-0f1c-4a10-8596-b93e48acc06f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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