Skip to content

Mobile: smart capture (M18) - #69

Merged
westernCasa merged 1 commit into
mainfrom
mobile/smart-capture
Nov 8, 2026
Merged

westernCasa merged 1 commit into
mainfrom
mobile/smart-capture

Conversation

@westernCasa

Copy link
Copy Markdown
Owner

M18 smart capture on the phone. Only mobile/ changes.

What it does

  • Capture in the browser's bottom bar saves the current page into the trail being recorded:
    • address and title
    • DOI or PMID, if the page has one. It checks citation metadata first, then the address, doi.org links and the page text.
    • the time with the time zone
    • the selected text, or the last text you selected on that page
    • a thumbnail
  • It becomes a capture card linked "captured from" the page's card, the same as desktop captureCard. The page becomes a card too, since a capture counts as engagement (B104).
  • The screen doesn't change. A note says where the capture went ("Captured to Sourdough · with the selected text · DOI found") and offers Undo. Undo also removes the page card if the capture created it and no other capture uses it.
  • Sign-in, account and payment pages are refused.
  • The card preview shows the thumbnail, the capture line with the time zone, and Open DOI / PubMed buttons.
  • In a shared .trail.md, the capture keeps its quote and the line "Captured from nature.com · phone 14:02 GMT-5 · DOI 10.1038/…". Thumbnails stay on the phone.
  • To fit five buttons on a phone screen, the bottom bar now reads Suggest, Capture, Mosaic, Trail and ⚙︎.

New module: react-native-view-shot 6.1.1 (the SDK 58 version, included in Expo Go).

Not in this PR (needs a development build or more work)

  • Capturing from the system share sheet, or from a long-press menu on selected text.
  • Voice notes on captures.
  • Thumbnail files are not yet deleted when a trail is deleted.

Checks

  • npm test in mobile/: 11 passed (6 trail and 5 capture tests). They cover DOI cleaning (URL-encoded, trailing punctuation, brackets), metadata order, PMIDs, refused pages, cards and links, Undo, and the shared-file round trip.
  • bundle:check: iOS and Android bundles build.
  • expo-doctor (offline): 18/20. The 2 failures need the network, as before.
  • Not yet tried on a phone.

Generated by Claude Code

Capture in the browser's bottom bar saves the page into the trail being
recorded: address, title, DOI or PMID (citation meta, address, doi.org
links, page text), time with time zone, the selected text and a JPEG
thumbnail (react-native-view-shot, in Expo Go). It becomes a capture card
linked "captured from" the page card, as desktop's captureCard does; the
page becomes a card (B104: capture is an engagement signal). A note with
Undo shows; no screen change. Sign-in and payment pages are refused.

Card preview shows the thumbnail, the capture line with time zone, and
Open DOI / PubMed. The shared file carries the quote and the "Captured
from ... · DOI ..." line through fromText; thumbnails stay on the phone.

Bottom bar: "Suggestions" shortened to "Suggest" and Settings to a gear so
five buttons fit on a phone. Only mobile/ changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X9wDmS5VvrWmyHhcWA9MoL
@westernCasa
westernCasa merged commit d4a3fcb into main Nov 8, 2026
3 checks passed
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.

2 participants