Repository navigation
Receive a wanted title with a clear action, then open its new copy - #49
Conversation
On a wanted title the trailing "Ricevuto" (Received) read as a status, so a title still wanted with no copies looked already received, and one tap added a copy with no question. The button now says "Ricevi" (Receive) and asks before adding the copy. Receiving a wanted title or an offer creates a copy that still needs its code and place. The app now opens the record, scrolls to the copies and opens that copy's editor straight away, through an optional copy argument on the book editor route.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
There was a problem hiding this comment.
ℹ️ No critical issues — two rough edges in the new jump-to-copy flow, inline.
Reviewed changes
Reviewed the single commit that turns the wanted-title button into a confirmed action and routes every receipt to the new copy's editor.
- Confirm before receiving a wanted title — the row button now reads as an action (
staff_wanted_mark_receivedrelabelled in all four locales), andaskReceiveWanted/receiveWantedgo through aConfirmDialog. openCopyhand-off — a successful wanted or offer receipt setsDesiderataUiState.openCopy, which the screen consumes and passes to the newonOpenCopycallback.- Optional
copyroute argument —STAFF_BOOK_EDITgains?copy={copyId}(default 0); existingstaffBookEdit(id)callers still resolve to the same destination. - Auto-open in
StaffCopiesSection— once the copy shows up instate.copies, the section scrolls into view and callsstartEdit.StaffBookEditViewModel.openCopyIdis cleared on first use, so recompositions and rotations don't reopen it. - Device tests — cancel sends nothing, confirm sends one request, and all three receipt paths land on
copy-save.
claude-opus-5-5 | 𝕏
…record id out A receipt response without book_id, or a received offer whose book has id 0, fell back to staffBookEdit(0, copy), which opens the new-book form. Both now fall back to the title being received. With labels but no per-copy area the section still scrolls into view, but the copy editor stays closed.
There was a problem hiding this comment.
✅ No new issues found. Both rough edges from the last review are closed.
Reviewed changes
Reviewed the single follow-up commit, which hardens the jump-to-copy flow.
- Wanted receipt falls back to the received title — a
bookIdof0inWantedReceiveResultnow resolves tobook.id, so a response withoutbook_idcan no longer open the new-book form. - Offer receipt ignores
0ids —receivedCopytakesreceivedBookand thenbookonly when the id is above0. This matchesOfferSheet. - Copy editor gated on
areas.copies— the auto-open still consumesopenCopyIdand scrolls to the section, but it opensCopyEditorSheetonly when per-copy management is on.staffAreasis seeded eagerly from current values, so this check sees the right flag on first composition.
claude-opus-5-5 | 𝕏

Two changes to the donation offers in the admin area.
The wanted-title button is an action, not a status. In "Titoli cercati" each row had a trailing text button labelled "Ricevuto" (Received). It read as the title's state, so a book still wanted with 0 copies looked already received. One tap also added a copy straight away. The button now says "Ricevi" / "Receive" / "Empfangen" / "Recevoir", and it asks for confirmation before adding the copy.
After a receipt the new copy opens on the record. Receiving a wanted title or an offer creates a copy that still needs its inventory code and place. The app now opens the book record, scrolls to the copies and opens that copy's editor. The book editor route takes an optional
copyargument for this.Tests: DesiderataStaffFlowTest covers the confirm dialog (cancel sends nothing, confirm sends one request) and the jump to the new copy's editor for a wanted title, an offer for a wanted title and an offer received into a picked record. Full suites on the emulator: 93 instrumented and 389 unit tests pass.