Review: Bug: Camera photo on property comments crashes the app

review-1899-2026-07-25 Review

review needs-refinement

Verdict: NEEDS_REFINEMENT

Board item #1899 — ldraney/landscaping-assistant#302. The issue body contains factually incorrect investigation notes that contradict the actual codebase. Photo support on property comments is fully implemented and wired up behind the photo_uploads feature flag (seeded enabled). The scope needs to be corrected before an agent can work on this.

Template Completeness

  • [x] Type — Bug
  • [ ] Lineage — MISSING (required by template-issue-bug)
  • [x] Repo — ldraney/landscaping-assistant
  • [x] What Broke — present (titled "What happened")
  • [x] Repro Steps — present (titled "Steps to reproduce")
  • [x] Expected Behavior — present (titled "Expected behavior")
  • [ ] Environment — MISSING (no cluster/namespace, iOS version, crash report references, service version)
  • [x] Acceptance Criteria — present but assumptions are wrong (see below)
  • [x] Related — present

Traceability

  • [x] story:comments label — present on board item
  • [ ] story note MISSING — [SCOPE] "comments" is not listed in the project-landscaping-assistant user-stories section. The existing stories are: address-lookup, property-crud, service-tracking, special-notes, work-queue, weekly-tracking, schedule-upload, auth, multi-tenancy, custom-domain, app-store-submission, ci-performance. Create user story entry "comments" on project-landscaping-assistant user-stories section.
  • [x] arch:rails-app label — Rails App (Shared Pattern)
  • [x] arch note verified — arch-rails-app note exists and is active in pal-e-docs
  • [x] Forgejo issue — ldraney/landscaping-assistant#302, state: open

File Targets

  • [x] app/views/property_comments/_form.html.erb — verified EXISTS. However, issue claims "no file input or camera capture element." This is WRONG. Line 5-11: file input <input type="file" name="property_comment[photos][]" multiple accept="image/*"> exists, gated by feature_enabled?(:photo_uploads).
  • [x] app/controllers/property_comments_controller.rb — verified EXISTS. Issue claims "no photo handling exists." This is WRONG. Line 17: @comment.photos.attach(comment_params[:photos]) handles photo attachment, gated by the same flag.
  • [x] app/models/property_comment.rb — verified EXISTS. Issue claims "no attachment support." This is WRONG. Line 12: has_many_attached :photos. Model also has validation for content types (PNG, JPEG, WebP, HEIC/HEIF), max file size (20MB), and max 5 photos per comment.
  • [ ] "iOS project files (turbo-ios config)" — ISSUE: Not in this repo. The iOS app lives in a separate repo: ldraney/landscaping-assistant-ios (per docs/ios-pipeline.md). This file target cannot be verified in the specified repo.

Repo Placement

Partial mismatch. The Forgejo issue is filed on ldraney/landscaping-assistant (Rails), and the ### Repo header says the same. However, the crash occurs in the iOS app (turbo-ios webview), and the root cause likely involves the iOS project at ldraney/landscaping-assistant-ios. If the fix requires iOS-side changes (e.g., NSCameraUsageDescription in Info.plist, or webview file input handling), a separate issue on ldraney/landscaping-assistant-ios may be needed. The issue should clarify whether the crash stack trace points to Rails (server-side error) or iOS (native crash).

Dependencies

Related board items on board-landscaping-assistant:
  • #1900 — backlog, type:feature, story:comments (no title set — possibly related photo comments feature)
  • #1901 — backlog, type:feature, story:comments (no title set — possibly related)
  • #1405 — backlog, "Property comments: timestamped discussion for all roles" (parent feature)
  • #1338 — backlog, "Per-property photos, project tracking, and photo optimization"
No blocking dependencies in in_progress. Items #1900 and #1901 have no titles, suggesting incomplete scoping of the comments story.

Acceptance Criteria

The acceptance criteria are based on incorrect assumptions about the codebase:
  • "If photo comments aren't supported yet, camera option should not appear" — Photo comments ARE supported. The photo_uploads flag is seeded enabled: true and the full implementation exists (model, controller, view). This criterion should be rewritten.
  • "If photo comments are supported, photo uploads save and display correctly" — Valid but broad. Should be scoped to the specific crash scenario (camera capture in turbo-ios webview vs. photo library selection).
  • "App does not crash when interacting with comments on property details" — Valid but needs crash report context. Is this an iOS native crash (SIGABRT from missing camera permission) or a Rails 500?
An agent could not verify these criteria without knowing the root cause. The crash reports mentioned in the issue body are not attached or referenced.

Blast Radius

The same accept="image/*" pattern on a file input exists in app/views/weeks/index.html.erb:33 (schedule upload). If the crash is caused by how turbo-ios handles <input type="file" accept="image/*"> (triggering native camera picker without proper permission), the schedule upload feature may have the same crash. The schedule upload uses a Stimulus controller (data-action="change->upload#submit") which may or may not change the interaction.

Decomposition Assessment

3 file targets in this repo, 1 potential cross-repo target (iOS), 3 acceptance criteria. Single-repo fix could fit in one agent pass (<5 min). However, if the fix requires iOS-side changes, it becomes a cross-repo issue needing decomposition or a second issue on landscaping-assistant-ios. No decomposition needed at this time — fix the scope first, then reassess.

Recommendations

  • [BODY] Rewrite Investigation Notes section: remove incorrect claims that photo support doesn't exist. Document the actual state: has_many_attached :photos on model, file input gated by photo_uploads flag (enabled), controller handles attachment. Refocus investigation on why the camera interaction crashes (iOS permission? ActiveStorage config? MinIO connectivity?).
  • [BODY] Add Lineage section (required by bug template).
  • [BODY] Add Environment section: include iOS version, turbo-ios version, cluster/namespace, and attach or reference the two crash reports mentioned in the body.
  • [BODY] Fix file target: replace "iOS project files (turbo-ios config)" with the actual repo path ldraney/landscaping-assistant-ios and specify which files to check (e.g., Info.plist for NSCameraUsageDescription).
  • [BODY] Rewrite Acceptance Criteria to reflect the actual codebase state. Focus on: (1) camera-triggered photo upload completes without crash, (2) photo library selection works, (3) schedule upload (weeks/index) does not exhibit the same crash.
  • [SCOPE] Create user story entry "comments" on project-landscaping-assistant user-stories section. Suggested summary: "Per-property timestamped comments with optional photo attachments for all roles."
  • [BODY] Note blast radius: same accept="image/*" pattern in schedule upload (app/views/weeks/index.html.erb:33) may have identical crash behavior.