Skip to content

fix: default new images to Auto and fix organ selection not being saved - #32

Open
gwado wants to merge 2 commits into
patrickjane:masterfrom
gwado:feat/organ-picker-on-add
Open

fix: default new images to Auto and fix organ selection not being saved#32
gwado wants to merge 2 commits into
patrickjane:masterfrom
gwado:feat/organ-picker-on-add

Conversation

@gwado

@gwado gwado commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The "edit" icon's organ picker (Leaf/Flower/Fruit/Bark/Auto) only updated the delegate's local mainText display, never the actual imageModel entry — so whatever organ the user picked in that dialog never actually reached identifyPlant(), which always read the model's original default value. Fixed by writing through imageModel.setProperty(index, "organ", ...).
  • The organ picker dialog (Dialogs.qml) never visually showed which option was selected (no RadioButton.checked binding), even though it did track a default internally. Added the missing binding so "Auto" now shows as checked when the dialog opens.
  • New images now default to Auto (previously defaulted to Leaf, inconsistently with the picker dialog's own default).

Type of change

Bug fix

Test plan

  • clickable build --arch arm64 builds cleanly; the produced package passes clickable's click-review.
  • Built and installed on a physical Pixel 3a (arm64): added images (default to Auto), used the "edit" icon to change an organ, confirmed the picker shows the current selection checked and that the change is actually reflected in the identification request.

Notes

  • An earlier version of this branch prompted for the organ immediately after adding each image (per a UI/UX report suggestion). Reconsidered after testing: forcing a dialog per photo (chained for multi-image imports) added friction for the common case of trusting Pl@ntNet's automatic organ detection, for a discoverability problem that doesn't need every user to be interrupted. Reverted to a silent Auto default with the existing "edit" icon as the (now actually working) way to override it.
  • No user-facing strings changed.

gwado and others added 2 commits July 16, 2026 19:52
The organ (Leaf, Flower, ...) for each added image was only changeable
through a discreet "edit" icon on its thumbnail, easy to miss - most
users likely never noticed they could/should set it.

The organ picker dialog now opens immediately after each image is
added (sequentially, for multi-image imports), pre-selected on "Auto"
(matching the picker dialog's own existing default). The "edit" icon
on each thumbnail is kept as a secondary way to change it afterwards.

Fixed along the way: the "edit" picker's selection was never written
back to imageModel, only to the delegate's local mainText - so the
picked organ never actually reached identifyPlant(), which always
read the model's original value. Both the new picker-on-add flow and
the edit picker now write through imageModel.setProperty(index,
"organ", ...).

Also: Dialogs.qml's organ RadioButtons never showed the default/current
selection as checked (only tracked internally) - added the missing
`checked` binding so the picker visibly reflects it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reconsidered after review: prompting for the organ right after adding
every single image (and chaining the dialogs for multi-image imports)
is more friction than it's worth for the common case of a user who
just trusts Pl@ntNet's automatic organ detection. The actual problem
worth solving was discoverability of the edit option, not forcing a
choice on every photo.

New images default to Auto silently again; the "edit" icon on each
thumbnail remains the way to change it, with its persistence bug fix
and the picker's visible default-selection fix from the previous
commit both kept.

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

1 participant