Skip to content

feat(mobile): photos attached to features, through the camera on the platform trait (#1902) - #2025

Merged
giswqs merged 52 commits into
mainfrom
feat/mobile-photos
Nov 14, 2026
Merged

giswqs merged 52 commits into
mainfrom
feat/mobile-photos

Conversation

@giswqs

@giswqs giswqs commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Phase 3 of #1902: photos attached to features, which also completes phase 1's platform trait with the camera. Stacked on #2024.

  • Platform: Platform::take_photo() asks the device's camera; Event::Photo { name, path } (photo line) follows, or Cancelled. The front end asks through Services::take_photo, and the shell puts each photo taken in RustGisApp::photos for the interface. The web app leaves it unset.
  • Android: the activity sends ACTION_IMAGE_CAPTURE to the device's camera app with a content address offered by the new PhotoProvider (not exported; the camera app gets leave to write that one address), so the photo lands in the app's photos folder, files/photos/photo-YYYYMMDD-HHMMSS.jpg, and RustGIS needs no camera permission. A photo is reported only when the camera says it took one and wrote it; an empty file left by a cancelled camera is removed. The manifest names the provider and asks to see camera apps (<queries>, Android 11 and later).
  • Touch interface (new crates/ui-touch/src/photos.rs): Take Photo over the Capture sheet's fields; each photo shows as a chip, which a tap takes off. The next feature added names its photos in the layer's photos field, a text field photos (or photo) listing paths separated by ; (as a report's attachments field does). A layer without one gets a photos field when its first photo is attached, and the sheet says so; the form doesn't offer that field for typing. In Edit mode, Add Photo attaches a photo to the picked feature after the ones it has, as one edit that undoes.

Not in this pull request

  • Thumbnails of the photos in the sheet, and showing a feature's photos (its popup).
  • Removing a photo's file when its chip is taken off, or when the feature is deleted.
  • Taking a photo in the browser.
  • Carrying the photos with the project to the desktop (the next pull requests: packaging for the field, and bringing edits back).

Testing

  • cargo test -p rustgis-engine --lib platform: a photo line read, and one without a path refused.
  • cargo test -p rustgis-ui-touch (25 tests): photo paths join once each; a photo arriving while the sheet is up waits for the next feature; adding it makes the layer's photos field, names the photo and says so; in Edit mode a photo arriving goes to the picked feature after the first, and Undo takes it off again.
  • Workspace clippy (-D warnings, which caught the web app's Services), cargo xtask layers, the wasm build and Android clippy pass. The full test suite was not run locally.
  • On the Android 15 emulator (x86_64), with its camera app (Camera2, virtual scene): Take Photo opened the camera, the shutter and the check mark brought the app back with a photo-20261114-020043.jpg chip, and Add Point added Well B with "Added a photos field to Wells"; in Edit mode on the plot, Add Photo, shutter and check attached a photo ("Attached 1 photo(s) to the feature", with the Plots photos field made).
  • Not tested: a real phone's camera app (some write their own copy and return a thumbnail only), a photo cancelled after the shutter, rotation while the camera is up.

Related issue

Part of #1902.

Summary by CodeRabbit

  • New Features
    • Android users can capture photos and attach them to new or existing features. Photo paths are stored in a text field, with support for adding multiple photos and avoiding duplicates.
    • Captured photos can be reviewed and removed before adding a feature.
  • Documentation
    • Updated the mobile app guide with camera support and photo attachment instructions.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

The PR adds Android camera capture and photo-event handling, then carries captured paths into the touch interface. The interface can queue photos for a new feature or attach them to a picked feature using a text field.

Changes: Mobile photo capture and attachment

Layer / File(s) Summary
Photo event and app state
crates/engine/src/platform.rs, crates/ui-egui/src/lib.rs
The platform recognizes photo events and defines a camera method. Shared UI state adds an optional camera callback and a photo-path list.
Android camera capture
apps/rustgis-mobile/AndroidManifest.xml, apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java, apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java, apps/rustgis-mobile/README.md
Android declares camera visibility and a URI-granting photo provider. MainActivity launches the camera, handles its result, and emits a photo event.
Platform photo wiring
apps/rustgis-mobile/src/lib.rs, apps/rustgis-mobile/src/phone.rs, apps/rustgis-web/src/web.rs
The Android app connects the camera callback and adds received photo paths to app state. Browser services leave the callback unavailable.
Touch photo queue and feature attachment
crates/ui-touch/src/lib.rs, crates/ui-touch/src/photos.rs, apps/rustgis-mobile/README.md
The touch interface queues and displays photos, appends paths to new features, or attaches them to picked features. Field handling and tests cover deduplication, invalid field types, and failed feature creation.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant TouchUI
  participant Phone
  participant MainActivity
  participant AndroidCamera
  participant PhotoProvider
  participant RustGIS
  TouchUI->>Phone: Request photo
  Phone->>MainActivity: Call takePhoto
  MainActivity->>AndroidCamera: Launch with output URI
  AndroidCamera->>PhotoProvider: Write JPEG
  MainActivity-->>RustGIS: Emit photo event with path
  RustGIS-->>TouchUI: Add path to app photo state
Loading
Merge Risk: Low · up to 3b2f4

If attaching a photo to a selected feature fails, the photo disappears from the screen and cannot be retried; only a notice with its file path remains. This is limited to the failure path and easy to fix, so the change is otherwise mergeable.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit taps the camera light,
Then saves a photo path just right.
New features wait with chips in view,
Picked features take a picture too.
Semicolons mark the trail,
Undo brings the old value back without fail.

@giswqs

giswqs commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

On the Android 15 emulator (x86_64), with its own camera app (Camera2, showing the emulator's virtual scene).

  1. Take Photo opens the device's camera app.
  2. Back from it: the photo taken shows as a chip in the Capture sheet, ready for the next feature.
  3. Add Point: the Wells layer gets a photos field, said, and the point names the photo.
  4. Edit mode on the plot: Add Photo attaches a photo to it after the ones it has.

The camera app opened by Take Photo The photo taken as a chip in the Capture sheet A point added with its photo, and the photos field made A photo attached to the plot in Edit mode

Comment thread crates/ui-touch/src/lib.rs Resolved
Comment thread crates/ui-touch/src/photos.rs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Code review

Bugs

  • Medium confidence: Capture hides every text field named photo or photos, not just the one this PR creates. An existing Photo column loses its input in Capture. If that field is NOT NULL under a rule, every add is refused, because the "Fill in" check runs before the photos value is inserted. (crates/ui-touch/src/lib.rs:968)
  • High confidence: A layer with a non-text field named photos makes ensure_field call edit.addField, which refuses the name. The feature isn't added, the only notice doesn't mention photos, and in Edit mode the photos are dropped with the file left orphaned. (crates/ui-touch/src/photos.rs:16)
  • Medium confidence, device-dependent: Android can kill the background process while the camera is in front. The photo field is then lost, the camera's file is kept, and the user is told the camera "wrote none", which is false. (apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java:493)

Security

  • None found. The PhotoProvider is not exported, accepts only plain names inside the photos folder, and rejects names starting with .. Grants are limited to the one address.

Performance

  • None found.

Quality

  • Low: attach says "one edit, which undoes", but adding the field is a separate step that Undo doesn't reverse. The README repeats the claim. (crates/ui-touch/src/photos.rs:53)
  • Nit, left for the release quality pass: the Event::parse doc comment in crates/engine/src/platform.rs runs past 100 columns. The PR doesn't say cargo fmt --check was run. I could not run it here.

AGENTS.md

  • Nothing violated. No unwrap/expect in non-test code, notices go through Session::notify, user-visible strings use tl!/i18n::fmt, the README is updated, and no new assets or dependencies were added.
  • Confirmed by reading: Dataset::value returns Null for an out-of-range row, so attach cannot panic.
  • Not verified: I did not run the test suite or the Android build.

No earlier review threads existed, so none were left alone as already raised.

Inline comments posted: 3 (ui-touch/src/lib.rs:968, ui-touch/src/photos.rs:16, MainActivity.java:493).

Change size

Compared with feat/mobile-background-track (merge base a979649 to PR head baa22f5).

Measure Value
Files changed 11 (2 added, 9 modified, 0 removed, 0 renamed)
Size before 655.0 KB
Size after 657.0 KB
Total size change +18.1 KB
Path Before After Change
crates/ui-touch/src/lib.rs 87.0 KB 92.4 KB +5.5 KB
crates/ui-touch/src/photos.rs 0 B 3.7 KB +3.7 KB
apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java 0 B 2.8 KB +2.8 KB
apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java 23.8 KB 26.4 KB +2.6 KB
crates/engine/src/platform.rs 8.3 KB 9.1 KB +0.8 KB
apps/rustgis-mobile/README.md 12.0 KB 12.7 KB +0.7 KB
apps/rustgis-mobile/AndroidManifest.xml 2.4 KB 2.9 KB +0.5 KB
crates/ui-egui/src/lib.rs 421.8 KB 422.2 KB +0.4 KB
apps/rustgis-mobile/src/lib.rs 27.3 KB 27.5 KB +0.2 KB
apps/rustgis-mobile/src/phone.rs 5.9 KB 6.1 KB +0.2 KB
apps/rustgis-web/src/web.rs 66.6 KB 66.7 KB +0.1 KB

Comment thread crates/ui-touch/src/photos.rs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Code review

Bugs

  • MainActivity.java:73: restoring the camera's photo after process death lets its result arrive in a fresh instance with asked at 0, so answered() drives it to -1 and busy() can read false while a later picker is open. Predates this PR for pickers, but this restore path makes it reachable by design. Inline comment with a fix. Confidence: medium.
  • photos.rs:52: joined() rewrites the whole field, not just the appended photos. It trims, drops empty pieces and dedupes the typed text, so Front; back becomes Front;back with no notice. Inline comment. Confidence: low-medium.

Security

  • None found. The provider is exported="false", the file name is limited to [A-Za-z0-9_.-] with no leading dot, and write access is granted only on the one address via ClipData.

Performance

  • None found.

Quality

  • The field stores absolute internal paths (…/files/photos/…). They don't resolve after a reinstall or on the desktop. The README defers carrying photos to the desktop, so this is a known gap rather than a defect. Confidence: low.
  • Nits, left for the release quality pass: platform.rs Event::parse doc lines run past 100 characters, Event::Photo.name is read only by tests, and MainActivity.takePhoto has an overlong SimpleDateFormat line.

AGENTS.md

  • Notices, tl!/i18n::fmt, the layering and the wasm stubs (take_photo: None) follow the rules. Long-running work isn't an issue: the camera runs in the activity, not in a Rust loop.
  • Already raised and resolved, so not re-raised: the non-text photos field (photos.rs:17), the unsaved photo state (MainActivity.java:512), and the hidden photos field (ui-touch/src/lib.rs:968). Three earlier concerns left alone, all answered by commit 60db964.

Not verified: I didn't build or run the tests. The no-Bash setup limited checks to reading the staged diff and source files.

Change size

Compared with feat/mobile-background-track (merge base 8caa67e to PR head 60db964).

Measure Value
Files changed 11 (2 added, 9 modified, 0 removed, 0 renamed)
Size before 659.9 KB
Size after 681.3 KB
Total size change +21.4 KB
Path Before After Change
crates/ui-touch/src/lib.rs 90.4 KB 97.9 KB +7.5 KB
crates/ui-touch/src/photos.rs 0 B 4.4 KB +4.4 KB
apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java 24.3 KB 27.7 KB +3.4 KB
apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java 0 B 2.8 KB +2.8 KB
apps/rustgis-mobile/README.md 12.0 KB 12.9 KB +1.0 KB
crates/engine/src/platform.rs 8.3 KB 9.1 KB +0.8 KB
apps/rustgis-mobile/AndroidManifest.xml 2.4 KB 2.9 KB +0.5 KB
crates/ui-egui/src/lib.rs 421.7 KB 422.1 KB +0.4 KB
apps/rustgis-mobile/src/lib.rs 28.1 KB 28.3 KB +0.2 KB
apps/rustgis-mobile/src/phone.rs 6.1 KB 6.3 KB +0.2 KB
apps/rustgis-web/src/web.rs 66.6 KB 66.7 KB +0.1 KB

# Conflicts:
#	apps/rustgis-mobile/README.md
#	crates/ui-touch/src/lib.rs
- A track that can't be added (editing or the layer refused it) is kept being recorded and said, so Stop tries again instead of losing its positions; the desktop interface isn't switched to while it is kept; tested.
- Positions dropped past FIXES_KEPT are counted and said when a track or an average missed them; tested.
- The More sheet is sized for the track's row while a track is recorded with positioning off.
- Typing in a sheet the keyboard leaves short (a phone held sideways), the rows above the capture fields step aside until the keyboard goes, so the field stays in sight.
- TrackService's refusal reaches the activity at once: it stops keeping positions out of sight then, and stops asking for them if already out of sight, not at the next frame.
- The README says Android ending the activity ends a track too.
- Adding a feature with photos names the field they went in, the layer's own maybe; attaching names it too; tested.
- A camera that wrote a photo and then said it was cancelled keeps the photo, unattached, and that is said, instead of the photo being deleted.
# Conflicts:
#	apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java
#	crates/ui-egui/src/lib.rs
#	crates/ui-touch/src/lib.rs
Comment thread crates/ui-touch/src/photos.rs Resolved
Comment thread crates/ui-touch/src/photos.rs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I reviewed the full diff against the base branch, the staged AGENTS.md, and the surrounding source. I could only read files, not build or run tests. I did not repeat the eight earlier threads, which are all resolved and whose fixes are in the diff. I checked each fix against the code: held text kept as typed, the camera result counted as awaited on restore, the photo kept in onSaveInstanceState, a camera's photo kept when it reports cancelled, chips visible in Edit mode, the layer's own photos field kept in the form, and a non-text field named by the notice.

Bugs

  • crates/ui-touch/src/photos.rs:38: when a layer has a non-text photos field, the add is refused, but the notice says "The photos weren't kept with the feature", which implies the feature was added. The point is not inserted and the form keeps its values. Confidence about 70%. Suggested wording is in the inline comment.

Security

  • None found. The PhotoProvider name check blocks path traversal, the provider is not exported, and the write grant covers one URI.

Performance

  • None found. The work is small and runs on the UI thread, and nothing grows with input.

Quality

  • crates/ui-touch/src/photos.rs:92: the "Attached N photo(s)" count uses the requested count, not the number joined actually adds. The same applies to the count in add_feature. Confidence about 45%.
  • Nits, left for the release quality pass: the Event::parse doc comment in crates/engine/src/platform.rs runs past 120 characters. The Java failed texts are English-only, as the existing failed lines are.

AGENTS.md

  • Nothing else found. New Rust strings use tl! or i18n::fmt. There are no new commands, so the cancel and hostile-params lists don't change. The new Platform method has one implementor, and every Services literal uses ..Default or sets the new field (the web app does).

Not verified

  • The Java side (the activity's restore path, PhotoProvider) has no tests in CI. I could only check it by reading.

Change size

Compared with the base branch: the whole PR against feat/mobile-background-track (merge base 7ca873d to PR head 80c2876).

Measure Value
Files changed 11 (2 added, 9 modified, 0 removed, 0 renamed)
Size before 675.5 KB
Size after 698.8 KB
Total size change +23.3 KB
Path Before After Change
crates/ui-touch/src/lib.rs 102.5 KB 110.9 KB +8.4 KB
crates/ui-touch/src/photos.rs 0 B 5.1 KB +5.1 KB
apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java 26.0 KB 29.8 KB +3.9 KB
apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java 0 B 2.8 KB +2.8 KB
apps/rustgis-mobile/README.md 12.7 KB 13.6 KB +1.0 KB
crates/engine/src/platform.rs 8.3 KB 9.1 KB +0.8 KB
apps/rustgis-mobile/AndroidManifest.xml 2.4 KB 2.9 KB +0.5 KB
crates/ui-egui/src/lib.rs 423.6 KB 424.0 KB +0.4 KB
apps/rustgis-mobile/src/lib.rs 27.4 KB 27.6 KB +0.2 KB
apps/rustgis-mobile/src/phone.rs 6.1 KB 6.3 KB +0.2 KB
apps/rustgis-web/src/web.rs 66.6 KB 66.7 KB +0.1 KB

- A track with breaks where the device's position was off is stored in parts, one for each run, not joined across the gap; the overlay breaks there too, and the parts and any position alone between breaks are said; tested.
- A position older than the last kept is left out and counted, so the line doesn't double back; tested.
- The track overlay starts a new run where consecutive positions are across the antimeridian.
- `finish` says in its doc comment why it runs on the window's thread.
- The kept-track test checks that the reason the layer refused it is said before that it is kept.
- A track whose positions are each alone between breaks says that is why it wasn't added, and how many positions were left out, instead of "fewer than two positions"; tested.
…d-track

# Conflicts:
#	apps/rustgis-mobile/README.md
#	crates/ui-egui/src/lib.rs
#	crates/ui-touch/src/lib.rs
- FIXES_KEPT is now 200,000, as many positions as the activity keeps out of sight (MOST_EVENTS), so a two-day batch handed over on coming back goes whole into the track, as the README says.
# Conflicts:
#	apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java
Comment thread crates/ui-touch/src/lib.rs Resolved
Comment thread crates/ui-touch/src/photos.rs Resolved
@github-actions

Copy link
Copy Markdown
Contributor

Code review

I checked the diff against the base, the Rust touch UI and engine call sites, and the Android Java lifecycle. The prior threads cover most of the design, and I didn't re-raise them. Two new inline comments are posted (below). The rest of the new code looks correct: the Platform trait change compiles through every construction site, asked is balanced on the photo path, the provider only serves a plain file name in the photos folder, and Form::for_layer keeps pending photos as the doc says.

Bugs

  • A refused add can leave a new photos field on the layer, because ensure_field runs edit.addField before edit.addFeature (crates/ui-touch/src/lib.rs:716). Also, editing is enabled before that. Confidence ~55%. Inline comment posted.

Security

  • None found. The provider is not exported, grants are per URI, and file names are restricted to [A-Za-z0-9_.-]+ without a leading dot.

Performance

  • None found. The work per photo is a few small operations.

Quality

  • A held value ending in ; gets an empty entry when a photo is appended (crates/ui-touch/src/photos.rs:62), with a one-line suggestion. Confidence ~40%. Inline comment posted.
  • Photos that arrive while the Capture sheet is closed wait in app.photos and are assigned on the next Capture frame. Confidence ~30%. Not posted, because it's a minor UX edge.
  • Platform doc comment in crates/engine/src/platform.rs has a line well over 100 columns. Left for the release quality pass.

AGENTS.md

  • The PR adds visible UI (the Take Photo row, photo chips, the Add Photo button) but has no screenshots in the body. AGENTS.md asks for "after" screenshots of new UI. Confidence ~85%.
  • New user-visible strings in MainActivity.java (for example "A photo is already being taken…" and "This device has no camera app") are not translatable. This matches the existing picker messages. Confidence ~40%. Not posted as inline.

Already raised (not repeated)

  • 9 earlier threads. Still open: the misleading "photos weren't kept" notice, and the "Attached N photo(s)" count overstating when a photo is already listed. Earlier threads marked resolved or outdated were checked against the current code and are fixed.

Change size

Compared with feat/mobile-background-track (merge base 4e2f81a to PR head c9de0d6).

Measure Value
Files changed 11 (2 added, 9 modified, 0 removed, 0 renamed)
Size before 679.0 KB
Size after 702.4 KB
Total size change +23.3 KB
Path Before After Change
crates/ui-touch/src/lib.rs 105.8 KB 114.2 KB +8.4 KB
crates/ui-touch/src/photos.rs 0 B 5.1 KB +5.1 KB
apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java 26.1 KB 29.9 KB +3.9 KB
apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java 0 B 2.8 KB +2.8 KB
apps/rustgis-mobile/README.md 12.7 KB 13.6 KB +1.0 KB
crates/engine/src/platform.rs 8.3 KB 9.1 KB +0.8 KB
apps/rustgis-mobile/AndroidManifest.xml 2.4 KB 2.9 KB +0.5 KB
crates/ui-egui/src/lib.rs 423.8 KB 424.2 KB +0.4 KB
apps/rustgis-mobile/src/lib.rs 27.4 KB 27.6 KB +0.2 KB
apps/rustgis-mobile/src/phone.rs 6.1 KB 6.3 KB +0.2 KB
apps/rustgis-web/src/web.rs 66.6 KB 66.7 KB +0.1 KB

I did not run the build or the tests; I reviewed by reading the code.

Base automatically changed from feat/mobile-background-track to main November 14, 2026 16:30
# Conflicts:
#	apps/rustgis-mobile/AndroidManifest.xml
#	apps/rustgis-mobile/README.md
#	apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java
#	apps/rustgis-mobile/src/phone.rs
#	crates/engine/src/platform.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-touch/src/lib.rs
- A photos field of that name that isn't text says nothing was added or attached, instead of reading as if the feature went in without its photos.
- Only the photos a field doesn't list already are counted in the notices, and attaching none new makes no edit; tested.
- A photos field made for a feature that is then refused is taken away again, and said, so a refused add leaves the layer's design as it was; tested.
- A held list ending in `;` gets no empty entry before the new photo; tested.
@giswqs

giswqs commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai approve

if (file == null && result == RESULT_OK) {
add("failed\tThe camera app took a photo, but RustGIS lost track of it: look in its photos folder.");
} else {
add(result == RESULT_OK ? "failed\tThe camera app said it took a photo, but wrote none." : "cancelled");

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.

Misleading notice when the camera wrote its own copy (confidence ~45%). This branch runs when RESULT_OK comes back with no file or an empty one. The message says the camera "said it took a photo, but wrote none". Some camera apps ignore EXTRA_OUTPUT, save to their own gallery, and return only a thumbnail. The photo then exists, but RustGIS reports that none was written and never says where to look. The PR's own testing notes flag this case as untested.

Suggested direction: when RESULT_OK arrives without our file, check whether the result carries a thumbnail in data and say that the camera may have kept the photo in its own gallery, so it can be found and attached by hand. The current wording is only accurate when the camera really wrote nothing.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Bugs

  • Misleading "wrote none" notice when a camera keeps its own copy (MainActivity.java:570, ~45%). A camera that ignores EXTRA_OUTPUT and returns only a thumbnail gets "said it took a photo, but wrote none", which is false, and the user isn't told where the photo went. Posted inline.
  • Edit-mode attach leaves the new field behind on failure (low, ~25%). photos::attach creates the photos field in its own edit, then edit.setValue can fail and return false. add_feature deletes a field it created when the add is refused; attach has no matching cleanup. The user is told the field was added, so this isn't silent.

Security

  • None found. PhotoProvider restricts names to [A-Za-z0-9_.-]+ with no leading dot, is not exported, and grants only the one URI. Event parsing rejects a photo line with no path.

Performance

  • None found. joined is quadratic only in the number of photos, which is small.

Quality

  • Count wording when every photo is already listed (~30%). Attaching a path that the field already lists gives "Its 0 photo(s) are named in its photos field." The message is accurate but awkward.
  • Nits, left for the release quality pass (): the Event::parse doc line in platform.rs runs past 100 columns; Event::parse accepts an empty photo name; the comment in capture about Edit-mode photos is long.

AGENTS.md

  • No screenshots for a visible UI change (~80%). The PR adds Take Photo, photo chips and Add Photo to the touch sheet. AGENTS.md asks for after-screenshots of new UI in the PR. The PR body has no image and no link to assets.rustgis.app. The emulator run is described in text only.

Already raised, left alone: 12 review threads are on the PR, all resolved and none outdated, and each is addressed in the current code: the non-text photos field, joined rewriting held text, the asked underflow, the hidden chips in Edit mode, cancelled-but-written photos, the hidden photo field, the refused-add field, the trailing ;, the wrong notice text, the count, and the restored photo. I did not re-raise any of them.

Checks I ran by reading the code: run_by_user routes failures through command_failed, so the deleteField cleanup in add_feature is not silent. row is a dataset row index, matching edit.vertex. Null renders as <Null>, which the attach filter depends on. Java's asked accounting balances across the restore path. I did not build or run the tests, and the Java side has no CI coverage.

Change size

Compared with base: the whole PR against main (merge base 4a53308 to PR head 3b2f498).

Measure Value
Files changed 11 (added 2, modified 9, removed 0, renamed 0)
Size before 679.0 KB
Size after 708.0 KB
Total size change +25.9 KB

Largest changes:

Path Before After Change
crates/ui-touch/src/lib.rs 105.8 KB 116.0 KB +10.1 KB
crates/ui-touch/src/photos.rs 0 B 5.9 KB +5.9 KB
apps/rustgis-mobile/java/org/rustgis/mobile/MainActivity.java 26.1 KB 29.9 KB +3.9 KB
apps/rustgis-mobile/java/org/rustgis/mobile/PhotoProvider.java 0 B 2.8 KB +2.8 KB
apps/rustgis-mobile/README.md 12.7 KB 13.6 KB +979 B
crates/engine/src/platform.rs 8.3 KB 9.1 KB +843 B
apps/rustgis-mobile/AndroidManifest.xml 2.4 KB 2.9 KB +545 B
crates/ui-egui/src/lib.rs 423.7 KB 424.1 KB +421 B
apps/rustgis-mobile/src/lib.rs 27.4 KB 27.6 KB +192 B
apps/rustgis-mobile/src/phone.rs 6.1 KB 6.3 KB +172 B
apps/rustgis-web/src/web.rs 66.6 KB 66.7 KB +106 B

@giswqs
giswqs merged commit 9386619 into main Nov 14, 2026
19 of 21 checks passed
@giswqs
giswqs deleted the feat/mobile-photos branch November 14, 2026 16:42
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor
Action performed

Comments resolved and changes approved.

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