Skip to content

spec(AST-135): React Native: Photos - #12572

Draft
imdreamrunner wants to merge 15 commits into
mainfrom
spec/ast-135-react-native-photos-documents
Draft

imdreamrunner wants to merge 15 commits into
mainfrom
spec/ast-135-react-native-photos-documents

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #12563 (spec:AST-112 as amended there: named features, native views internal behind components), #12594 (spec:AST-140, platform code rules), #12553 (spec:AST-130, which also owns the file cache) and #12565 (spec:AST-132). Not stacked. Merges after #12563 (AST-112) and #12594 (AST-140), and after #12553 and #12565, whose records it cites.

Exact decision needed

The target contract of the React Native platform's photo library pieces, the core package's opt-in photos capability because FileInput's photo picker uses them (in an app without the opt-in, FileInput's photo source is the system photo picker, which works without a permission): the photo library module AstryxPhotoLibrary and the photo thumbnail view AstryxPhotoThumbnailView, internal behind FileInput's photo picker, as the record spec:AST-135 (docs/specs/AST-135-react-native-photos-documents/spec.md) states them. It covers photo access and its limited state for FileInput's photo picker and for apps that list, count and export the library, paging, the asset count (countAssets), export (upright JPEG with location and other EXIF metadata stripped, MP4 video with a poster on both platforms, iCloud download with progress, cancel and per-asset failure), natively decoded thumbnails, results, fallbacks, accessibility, and named features.

This revision

  • "Revision 1" is replaced by named features: the contracts grow by named features, which the platform info module reports.
  • countAssets({mediaTypes}) → number joins AstryxPhotoLibrary as the named feature countAssets (FR2, FR4, FR10, DEC-3): the same fetch as listAssets; under limited access it counts only the photos the app can see; a binary without it lets the app show "N of M+".
  • The photo thumbnail native view is internal implementation behind FileInput's photo picker; the ./photos entry exports AstryxPhotoLibrary.
  • The record states current behaviour in positive terms. Requirements that read as bans now describe what each module does; constraints the platform relies on (no third-party native dependency, prompts only on request, metadata stripped from JPEG exports) stay, stated as behaviour with their reason.
  • Non-goals keeps only the system-spec template's two standing bullets (equivalent internal implementations stay valid; internal mechanisms belong in architecture or implementation).
  • Decisions state the chosen direction and its reason; the one-line rejected alternatives are gone.
  • Versioning reads "contracts grow by named features" (spec:AST-140/FR5).

Existing authority searched

  • spec:AST-112 (React Native foundation, as amended by spec(AST-112): React Native commands are one astryx rn group; package shape (Expo wrapper, default linking, named features) #12563): FR1 (photos among the core package's opt-in capabilities), FR3 (opt-in capabilities), FR4 (host declarations), FR5 (the ./photos entry; native views internal behind components), FR7 (capability shape; prompts come from the app's request), DEC-14 (named features), DEC-16 (native code an app would get from a library ships with Astryx), FR15 (evidence).
  • spec:AST-140 (React Native platform code, open as a draft): FR3 (result vocabulary), FR5 (contracts grow by named features). This record cites them for those shared rules.
  • spec:AST-130 (system modules, draft): FR8 (AstryxPlatformInfo), FR9 (AstryxPermissions), FR12 (the core file picker), and FR14 (the file cache that exports write into). Referenced, not respecified.
  • spec:AST-132 (media and camera, draft): playback and the camera view. Referenced, not respecified.
  • docs/specs/ searched for AstryxPhotoLibrary, PhotoThumbnail, photo library, countAssets: no other record owns these contracts.
  • Open pull requests searched for photos, photo library, FileInput, and React Native platform: none overlaps beyond the drafts above; FileInput's photo picker has its own component record.

Decision

The record's requirements FR1 to FR10 and DEC-1 to DEC-3:

  • AstryxPhotoLibrary and AstryxPhotoThumbnailView ship in the core package as its opt-in photos capability, because FileInput's photo picker uses them (DEC-1); the photo permission, purpose string and photo frameworks come with the opt-in. Apps reach AstryxPhotoLibrary through the ./photos entry; the thumbnail view is internal behind FileInput's photo picker.
  • No third-party native dependency; apps may use third-party libraries beside these components without conflict.
  • Photo access is read and asked for explicitly, with full, limited, denied, restricted, undetermined, and canAsk; system UI comes from requestAccess and the limited-selection picker alone.
  • The library is read newest first a page at a time with an opaque cursor. countAssets({mediaTypes}) answers the number of assets listAssets pages through, from the same fetch; under limited access it counts only the photos and videos the app can see, and in a binary without the feature the app shows an open-ended total such as "N of M+" (DEC-3).
  • Export writes each asset to a file in the app's file cache, which lasts until the system reclaims it; each asset succeeds or fails on its own, and a cancelled export resolves ok with the files written and lists the rest as cancelled.
  • Thumbnails decode natively at the cell's size, reuse a picture while it stays in memory, and keep pictures native.
  • Every call returns a value; an absent view falls back visibly.
  • Public platform API.
  • Contracts grow by named features; AstryxPhotoLibrary.countAssets is the group's named feature.

Who uses it

Native piece Kind Astryx components that use it What a person sees
AstryxPhotoLibrary native module (Turbo Native Module) FileInput (its photo picker); apps through the ./photos entry's AstryxPhotoLibrary (DEC-1) A grid of the photos and videos they allowed in FileInput's photo picker, a system prompt only when the app asks, and a way to change the selection
AstryxPhotoThumbnailView native component (Fabric Native Component) FileInput's photo picker, its public face (the picker's thumbnails) Thumbnails that fill in quickly as they scroll a grid, iCloud photos included

Ecosystem survey (research behind "Why this exists")

Piece What the ecosystem already does well Why Astryx owns it
AstryxPhotoLibrary @react-native-camera-roll/camera-roll pages through photos and videos, saves to the library, and handles iOS limited access. expo-media-library adds albums, asset details, and change listeners. Both ship native code. An app that shows the library inside its own screens needs a native module; the alternatives are libraries with native code of their own. The gaps are specific: closed access states with limited, restricted, and canAsk; the limited-selection picker; export to files where one asset's failure never fails the rest, with progress, cancel, and iCloud download; results with closed reasons, never a throw; no third-party native dependency. Choosing a few photos needs none of this: the core file picker presents the system's photo picker with no permission (spec:AST-130/FR12).
AstryxPhotoThumbnailView On Android, React Native's Image draws a MediaStore content URI with no extra native code. On iOS a PhotoKit asset has no URL Image can load; the camera-roll library's ph:// loader or expo-image adds one, with native code. iOS has no path without native code, so the view stays. It decodes each asset natively at the cell's size, off the main thread, without a second decode while the picture stays in memory, cancels when a cell leaves the screen, and sends no picture through JavaScript. It takes the library module's ids on both platforms, shows iCloud photos once they arrive, and never prompts.

Rejected alternatives

None recorded. Each decision states its chosen direction and its reason.

Claim scope and non-goals

The record governs AstryxPhotoLibrary, AstryxPhotoThumbnailView, and the library's internal PhotoThumbnail. FileInput's photo picker keeps its own component record. The system pickers, permissions other than photo access, playback, and the camera are specified in their own records. Non-goals: the template's two standing bullets only.

Evidence and implementation relationship

The implementation lives in the core package's platform layer. No public evidence links. One gap is recorded: PhotoThumbnail lacks the image role (FR8).

Writing rubric results

  • R1 narration: none; every requirement states what the platform does in the present tense.
  • R2 research in the record: none; the ecosystem survey is in this description (above), and "Why this exists" keeps one conclusion per piece.
  • R3 evidence naming a change: none; verification cells name the evidence layer (Simulator, emulator, device, hosted iOS tests, JVM tests, ./testing doubles).
  • R4 rejected alternatives over one line or outside a decision: none; DEC-1 to DEC-3 state their direction and reason only.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none; OQ1 lists no options.
  • R7 project status (build status or work order): none; the one platform mismatch is stated as an FR8 gap line.

Scope

Components: AstryxPhotoLibrary, AstryxPhotoThumbnailView, PhotoThumbnail (internal), FileInput's photo picker

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and attached files contain no internal company context.

Validation

  • node scripts/check-knowledge.mjs: "Knowledge templates and records are aligned.", exit 0.
  • Prettier --check: all matched files use Prettier code style.
  • Leak scan of the diff and this description: no hard hits (the only #NNNNN matches are the dependency pull requests named above).
  • pnpm specs:for is not runnable in this checkout (no install); skipped.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 18, 2026 8:42pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 18, 2026, 8:50 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and five record fixes are needed after it.

No current spec decides its FR1–FR15 or DEC-1–DEC-4 (the photos and pdf capabilities, image markup in the iOS core, and the change to spec:AST-112 FR1), so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do if they are an engineering owner.

Blocking findings (to fix once the spec decision is made):

  • FR6, FR7, FR9 and FR14 prescribe internal mechanisms (a process-wide cache keyed by asset and size, a shared render pool and page cache, the page-picture file-name inputs and its temporary-file-then-move write, and named platform classes), which architecture:knowledge-contracts INV18 forbids unless a caller depends on them, so keep the observable guarantees and drop the mechanisms.
  • The "Why this exists" table surveys eleven third-party libraries, which INV10 says belongs in an artifact linked from the pull request with only its conclusion kept in DEC-1, although the rubric results report R2 and R4 as clean.
  • The record says it changes spec:AST-112 FR1 in two places but leaves AST-112 unedited, so AST-112 FR1 and FR5 still omit photos, ./photos and image markup and should be amended here.
  • The references to spec:AST-130 and spec:AST-132, and the AstryxPlatformInfo contract features, hasContractFeature and Stage version floor that FR12 and FR15 build on, resolve to no record on main, so merge this after #12553 and #12565 or stack it on them.
  • FR1 cites FR8 for the page pictures' file-timestamp declaration, but page pictures are FR9.

Four non-blocking points (the initialPage and initialPageIndex names, which object answers supports('markup'), Astryx Stage divergences without gap lines, and two boolean names) are in the review.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • File docs/specs/AST-135-react-native-photos-documents/spec.md (the only changed file): the five blocking findings above.
  • Claim: the record states the contracts of the five pieces (photo access and its limited state, paging, export, thumbnails, PDF view and find, page pictures, markup, results, fallbacks, previewed projects, accessibility, revision-1 baseline): verified in FR1–FR15.
  • Claim: playback, the camera and the system pickers are scope notes owned by other records: verified as scope notes; those records exist only as open drafts.
  • Claim: the foundation record's FR1, FR3, FR4, FR6, FR7, FR8, FR11, FR12 and FR15 say what the description attributes to them: verified against that record, which is a draft.
  • Claim: no other record owns these contracts: verified; no record or source file names them.
  • Claim: no open pull request overlaps beyond the two sibling drafts' scope notes: partly checked; a body search finds the names only here and in two sibling drafts, whose bodies were not read.
  • Claim: the decision bullets (opt-in capabilities, explicit access, paging and export, native thumbnails, PDF view, find and page pictures, previewed projects, results and fallbacks, public platform API, revision-1 baseline): verified against FR1–FR15.
  • Claim: two rejected alternatives, one line each, inside DEC-1 and DEC-4: false; the survey table also rejects alternatives outside any decision.
  • Claim: rubric items R1, R3, R5, R6 and R7 find nothing: verified. Claim: R2 finds no research: false (the survey table).
  • Claim: the implementation lives in the React Native package's platform layer: not verifiable; no such package exists in the repository.
  • Claim: four gaps are recorded: verified (FR7, FR8, FR9 and FR13 gap lines).
  • Claim: specification records only: verified. Claim: the record states observable behaviour, preserves equivalent implementations, and names a caller for each named mechanism: false for FR6, FR7, FR9 and FR14.
  • Claim: verification names evidence layers, not CI topology: verified.
  • Claim: no internal company context: verified.
  • Claim: the knowledge check passes with no warning for this record, Prettier passes, and the whitespace check is clean: verified.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and three record fixes are needed after it.

No current spec decides its FR1–FR15 or DEC-1–DEC-4 (the photos and pdf capabilities, image markup in the iOS core, and the photo library, thumbnail, PDF view, page picture and markup contracts), so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner.

Blocking findings (to fix once the spec decision is made):

  • The description's decision bullet still says thumbnails decode "through one shared cache", and its survey still promises a shared render pool and per-request file names, but FR6, FR7 and FR9 now state only guarantees, so update the description to match the record.
  • The record cites spec:AST-112 FR8 ("no revision counter") and DEC-14, spec:AST-130 and spec:AST-132, none of which main has yet, so merge it only after #12563, #12553 and #12565, or declare the four as one stack.
  • Miss: DEC-3 says the file picker copies chosen photos into the project's own files, but spec:AST-130 FR13 returns Android's content:// URIs as they are, so say the project reads them as picker results (FR11).

Seven non-blocking points (the file-timestamp wording in FR1, the Android thumbnail floor, renderPage defaults, the foundation record's naming conventions, two citations to the amendment, FR12's unknown feature state, and the foundation record's group table) are in the review.

Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-135-react-native-photos-documents/spec.md (the only changed file): the three blocking findings above.
  • Claim: the record states the contracts of the five pieces (photo access and its limited state, paging, export, thumbnails, PDF view and find, page pictures, markup, results, fallbacks, previewed projects, accessibility, revision-1 baseline): verified in FR1–FR15.
  • Claim: playback, the camera and the system pickers are scope notes owned by other records: verified as scope notes; those records are open drafts.
  • Claim: the record depends on the foundation amendment, the system modules draft and the media and camera draft, in a stated merge order: verified that the amendment holds the photos capability, the app-level modules, the photos entry, named features and the Stage version floor; the order is stated but not enforced (blocking finding).
  • Claim: the foundation record's requirements and decision cited in the description say what it attributes to them: verified against the amendment, not against main.
  • Claim: the system modules draft's platform info, permissions and file picker requirements are referenced, not respecified: verified; DEC-3 misstates the file picker (blocking finding).
  • Claim: no other record owns these contracts, and no open pull request overlaps beyond the two drafts' scope notes: verified by a record search and a pull request search.
  • Claim: the decision bullets match the record: verified, except the thumbnail bullet's shared cache (false; blocking finding).
  • Claim: two rejected alternatives, one line each, inside DEC-1 and DEC-4: verified.
  • Claim: the implementation lives in the package's platform layer: not verifiable; no such package is in the repository.
  • Claim: six gaps are recorded: verified (FR5, FR7, FR8, FR9, FR10 and FR13 gap lines).
  • Claim: writing rubric results (no narration, survey moved out, evidence by layer, no change references, open questions unanswered, no project status): verified.
  • Claim: specification records only, observable behaviour, the one named mechanism explained, verification by evidence layer, and no internal company context: verified.
  • Claim: the knowledge check is aligned with no warning for this record, Prettier passes, and the whitespace check is clean: verified.

Automated review (maintainer link)

…esizeMode, renderPage defaults, unknown feature rows

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and one record fix is needed after it.

No current spec decides its FR1–FR15 or DEC-1–DEC-4 (the photos and pdf capabilities, image markup in the iOS core, and the photo library, thumbnail, PDF view, page picture and markup contracts), so an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner. The earlier description and DEC-3 fixes hold at this head.

Blocking finding (to fix once the spec decision is made):

  • The record cites spec:AST-112 FR8 ("no revision counter") and DEC-14, spec:AST-130 and spec:AST-132, none of which main has, and the description's "one stack" is not a stack (no Stack: line in any of the four descriptions, and this branch contains none of #12563, #12553 or #12565), so rebase onto them with a shared Stack: line or merge only after they land.

Four non-blocking points (no stated answer for a missing maxPixels, FR15's Stage refusal wording against the FR9 gap, the foundation amendment's naming conventions, and DEC-1's citation) are in the review.

Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-135-react-native-photos-documents/spec.md (the only changed file): the blocking finding above.
  • Claim: the record states the contracts of the five pieces (photo access and its limited state, paging, export, thumbnails, PDF view and find, page pictures, markup, results, fallbacks, previewed projects, accessibility, revision-1 baseline): verified in FR1–FR15.
  • Claim: playback, the camera view and the system pickers are scope notes owned by other records: verified as scope notes; those records are open drafts.
  • Claim: the record depends on the foundation amendment, the system modules draft and the media and camera draft, in a stated merge order: verified that the amendment holds the photos capability, the app-level modules, the photos entry, named features and the Stage version floor; the order is stated but not enforced.
  • Claim: the four records form one stack that merges after the other three: false; no description carries a stack line and this branch contains none of the other three (blocking finding).
  • Claim: the foundation requirements and decision the description cites say what it attributes to them: verified against the amendment, not against main.
  • Claim: the system modules draft's platform info, permissions and file picker requirements are referenced, not respecified: verified (FR12, the scope notes, DEC-3, OQ4).
  • Claim: the media and camera draft's decision keeps such pieces in the platform and its scope notes name them: verified.
  • Claim: no other record owns these contracts, and no open pull request overlaps beyond the two drafts' scope notes: verified by a search of the records on main and of open pull requests.
  • Claim: the decision bullets match the record: verified against FR1, FR3–FR9, FR11, FR12, FR14 and FR15.
  • Claim: the table of native pieces and who uses them matches the record's: verified.
  • Claim: the survey's reasons for owning each piece: verified against FR3–FR11, except that a sign-out clears the file cache, which the files module's record owns and this review did not check.
  • Claim: two rejected alternatives, one line each, inside DEC-1 and DEC-4: verified.
  • Claim: the claim scope and non-goals: verified against the record's non-goals.
  • Claim: the implementation lives in the package's platform layer: not verifiable; no such package is in the repository.
  • Claim: six gaps are recorded: verified (the FR5, FR7, FR8, FR9, FR10 and FR13 gap lines).
  • Claim: writing rubric results (no narration, survey moved out, evidence by layer, no change references, open questions unanswered, no project status): verified.
  • Claim: specification records only, observable behaviour, the one named mechanism explained, verification by evidence layer, and no internal company context: verified; FR14 names the PencilKit exception and why.
  • Claim: the knowledge check is aligned with no warning for this record, Prettier passes, and the whitespace check is clean: verified.
  • Claim: the leak scan of the diff and description has no hits: verified.

Automated review (maintainer link)

@imdreamrunner imdreamrunner changed the title spec(AST-135): React Native platform: Photos and documents (draft) spec(AST-135): React Native: Photos (draft) Nov 18, 2026

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the draft record spec:AST-135, and four record fixes are needed after it.

No current spec decides its FR1–FR10, DEC-1 or DEC-2: above all, whether the photo library and thumbnail view belong in the core package with no opt-in, which puts the photo-library usage string and Android's photo permissions into every app, and whether photo access stays apart from AstryxPermissions (OQ1). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner.

Blocking findings (to fix once the spec decision is made):

  • FR5 tells callers to delete exported files with the file cache's remove(name) and clear (spec:AST-130/FR14), but that record says deleting files in the cache location is outside the core package, so exports have no agreed removal path.
  • FR5's format: 'original' promises the stored bytes with their metadata, but Android 10 and later strip location unless the app holds ACCESS_MEDIA_LOCATION, which FR1 does not declare, so declare it and say which call asks for it, or state that Android originals carry no location.
  • The record cites spec:AST-140, spec:AST-130, spec:AST-132, spec:AST-139, spec:AST-141 and spec:AST-112 FR20, DEC-14 and DEC-16, none of which is on main, while the stated merge order names only #12563 and #12594, so list all six dependencies and merge after them, or stack on them.
  • Current-state impact says the record amends spec:AST-112/FR1, "which lists photos among the opt-in capabilities", and details FR5's ./photos entry, but neither main nor #12563 says either, so drop the amendment sentence and add ./photos to AST-112 FR5's core entries in #12563.

Four non-blocking points (the cancelled-export result shape, unstated answers for out-of-range options, the allowsNetwork name, and canPresentLimitedPicker() missing from FR2) are in the review.

Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-135-react-native-photos-documents/spec.md (the only changed file): the four blocking findings above.
  • Claim: the record states the target contract of the photo library module and the thumbnail view (access and its limited state, paging, export, thumbnails, results, fallbacks, accessibility, revision-1 baseline): verified in FR1–FR10.
  • Claim: export writes upright JPEGs with no location or other metadata, MP4 video with a poster on both platforms, and downloads iCloud originals with progress, cancel and per-asset failure: verified in FR5; the cancelled result's shape and Android originals are findings.
  • Claim: the two pieces are core with no opt-in because FileInput's photo picker uses them: not established by any current record; that consumer exists only in the draft FileInput React Native record; this is the owner decision.
  • Claim: the foundation record's FR1 lists photos among the opt-in capabilities, which this record amends: false (blocking finding).
  • Claim: the foundation amendment's host declarations, entries, capability shape, named features, ship-what-Astryx-uses rule and evidence rule say what the description attributes to them: verified against the amendment, not against main; its entries hold no photos entry (blocking finding).
  • Claim: the platform-code draft holds the result vocabulary and additive evolution: verified against that draft.
  • Claim: the system-modules draft's platform info, permissions, file picker and file cache are referenced, not respecified: verified, but its file cache rules out the removal the export relies on (blocking finding).
  • Claim: the media and camera draft owns playback and the camera view: verified as scope notes.
  • Claim: Astryx Stage and Preview are separate records and this record states no Stage or Preview behaviour: verified (Non-goals only).
  • Claim: no other record owns these contracts: verified by a search of the records on main.
  • Claim: no open pull request overlaps beyond the named drafts, and FileInput's photo picker has its own component record: verified; that record is an open draft.
  • Claim: the record depends on the named drafts and merges after two of them: the stated order omits four of the six records it cites (blocking finding).
  • Claim: no third-party native dependency, and apps may use third-party libraries beside these components: verified (FR9, Why this exists).
  • Claim: photo access has the full, limited, denied, restricted and undetermined states with canAsk, and only the access request and the selection picker show system UI: verified in FR3.
  • Claim: thumbnails decode natively at the cell's size, with no second decode while in memory and no picture crossing to JavaScript: verified in FR6.
  • Claim: results never throw and an absent view falls back visibly: verified in FR7.
  • Claim: public platform API only, with no exception: verified in FR9.
  • Claim: every contract is at revision 1 and later behaviour is a named feature: verified in FR10.
  • Claim: the two rejected alternatives sit inside DEC-1 and DEC-2, one line each: verified.
  • Claim: the implementation lives in the platform layer with one recorded accessibility gap: the gap line is present; no React Native package exists in this repository to check it against.
  • Claim: writing rubric results and the scope sweep (no narration, research, pull request references, ruled questions with options or project status; numbering FR1–FR10, DEC-1, DEC-2, OQ1): verified.
  • Claim: the knowledge check reports the records aligned: verified, with no line for this record.
  • Claim: the formatting check passes: verified.
  • Claim: the leak scan of the diff and the description has no hard hits: verified.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the draft record spec:AST-135; no blocking record defect remains at this head.

No current spec decides its FR1–FR10, DEC-1 or DEC-2: chiefly, the photo library and thumbnail view as an opt-in photos capability of the React Native package, and whether photo access stays apart from AstryxPermissions (OQ1). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner.

The four earlier blocking points are fixed, and only non-blocking points remain: the draft FileInput React Native record writes a photo's stored bytes without location or EXIF data, which neither FR5 format provides; a thumbnail's error when photos is not opted in, answers for out-of-range options, the allowsNetwork name, canPresentLimitedPicker() in FR2, and DEC-1's "never shows the library" wording are unstated or loose.

Claims and files checked

Review mode: full; reason: spec-record

  • File docs/specs/AST-135-react-native-photos-documents/spec.md (the only changed file): no blocking finding; the non-blocking points above.
  • Claim: the record depends on the foundation amendment, the platform-code, system-modules, media and camera, Stage and Preview drafts, is not stacked, and merges after all six: verified; each draft holds the claims this record cites.
  • Claim: the photo pieces are the package's opt-in photos capability because FileInput's photo picker uses them, and without the opt-in FileInput uses the system photo picker with no permission: verified in FR1 and DEC-1; that FileInput behaviour is defined only in the draft FileInput React Native record.
  • Claim: the record covers access and its limited state, paging, export (upright JPEG without location or EXIF, MP4 with a poster on both platforms, iCloud download with progress, cancel and per-asset failure), thumbnails, results, fallbacks, accessibility and the revision-1 baseline: verified in FR3–FR10.
  • Claim: Stage and Preview are separate products that conform to these contracts: verified (Non-goals only).
  • Claim: the foundation amendment's capability list, opt-in, host declarations, ./photos entry, capability shape, named features, package-coverage rule and evidence rule say what the description attributes to them: verified against the amendment, not against main.
  • Claim: the platform-code draft holds the result vocabulary and additive evolution: verified.
  • Claim: the system-modules draft's platform info, permissions, file picker and file cache are referenced, not respecified: verified; its cache is one the system may reclaim, as FR5 now says.
  • Claim: the media and camera draft owns playback and the camera view: verified (scope notes).
  • Claim: no other record owns these contracts: verified by a search of the records on main.
  • Claim: no open pull request overlaps beyond the named drafts, and FileInput's photo picker has its own component record: verified; that record is an open draft.
  • Claim: an app that never opts in declares no photo permission or purpose string, and capabilities no Astryx component uses stay outside the package: verified in FR1 and "Why this exists".
  • Claim: no third-party native dependency, and apps may use third-party libraries beside these components: verified ("Why this exists", DEC-1).
  • Claim: photo access has the full, limited, denied, restricted and undetermined states with canAsk, and only the access request and the selection picker show system UI: verified in FR3.
  • Claim: the library is read newest first with an opaque cursor; exports go to the app's file cache and last until the system reclaims it; one failure never fails the rest; a cancelled export resolves ok with the written files and lists the rest as cancelled: verified in FR4 and FR5.
  • Claim: thumbnails decode natively at the cell's size, with no second decode while in memory and no picture crossing to JavaScript: verified in FR6.
  • Claim: results never throw and an absent view falls back: verified in FR7; the default fallback draws nothing and the failure is reported through onError.
  • Claim: public platform API only, with no exception: verified in FR9.
  • Claim: every contract is at revision 1 and later behaviour is a named feature: verified in FR10.
  • Claim: the who-uses-it table, the two one-line rejected alternatives inside DEC-1 and DEC-2, and the claim scope and non-goals: verified.
  • Claim: the implementation lives in the package's platform layer, with one recorded accessibility gap: the gap line is present; no React Native package exists in this repository to check it against.
  • Claim: writing rubric results and the scope sweep (no narration, research, change references, ruled questions with options or project status; numbering FR1–FR10, DEC-1, DEC-2, OQ1): verified.
  • Claim: the knowledge check reports the records aligned with no warning for this record: verified.
  • Claim: the formatting check passes: verified.
  • Claim: the leak scan of the diff and the description has no hard hits: verified.

Automated review (maintainer link)

`isPhotoThumbnailAvailable()` answer false and calls answer `no-module`.
A binary without a method answers `unsupported`.
- `PhotoThumbnail` where the view is absent draws `fallback` (nothing by
default) and reports `onError` with `no-native-view` once per mount.

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.

Non-blocking: with photos not opted in, calls answer not-linked (:217-219), but this line covers only an absent view, so a PhotoThumbnail in an app that did not opt in has no stated onError reason. spec:AST-132 FR13 has CameraView report not-linked once per mount, naming the opt-in; say which one the thumbnail reports.

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and one record fix is needed after it.

No current spec decides its FR1–FR10 or DEC-1–DEC-3: the opt-in photos capability, photo access with its own states beside AstryxPermissions, paging and countAssets, export, thumbnails and named features. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Blocking:

  • The record promises apps their own photo grid through ./photos (lines 51-52 and 63), but with the thumbnail view now internal (lines 94-95 and DEC-1) such an app has no way to draw an asset on iOS, so either give ./photos a component that draws an asset id or narrow that promise to listing, counting and exporting.

The change-listener bullet at line 153 has merged into the countAssets bullet, and the smaller notes are inline.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: the record depends on the foundation amendment, the platform-code, system-modules and media/camera drafts, and merges after them: verified.
  • Claim: photos is an opt-in capability, and without it FileInput uses the system photo picker with no permission: verified (lines 81-85).
  • Claim: revision 1 is replaced by named features, and countAssets is the one named feature with an open-ended fallback: verified (lines 148-153, 226-233, DEC-3).
  • Claim: the thumbnail view is internal and ./photos exports only AstryxPhotoLibrary: verified (lines 94-95).
  • Claim: requirements are restated as behaviour, Non-goals reads "None.", and no rejected alternatives remain: verified.
  • Claim: the existing authority cited from the drafts: verified, except that the amended foundation FR1 names no capability (its FR20 names photos): imprecise.
  • Claim: no other record or open pull request owns these contracts: verified.
  • Claim: the decision list, the ownership table and the claim scope match the record: verified.
  • Claim: the implementation lives in the package's platform layer: not verifiable in this repository.
  • Claim: one accessibility gap (FR8) is recorded: verified (lines 242-243).
  • Claim: writing rubric R1–R7 results: verified.
  • Claim: the knowledge check and Prettier pass, and the leak scan is clean: verified at this head.
  • Claim: the ecosystem survey of third-party libraries: not checked, since it describes other projects.
  • File: docs/specs/AST-135-react-native-photos-documents/spec.md: one blocking finding and non-blocking notes.

Automated review (maintainer link)

across all its pages, from the same fetch. Under `limited` access it
counts only the photos and videos the app can see. In a binary without
the feature it answers `unsupported`, and the app shows an open-ended
total such as "N of M+". - `addChangeListener(listener)` reports `{reason}`: `library` when the

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.

Non-blocking: the addChangeListener bullet has merged into the countAssets bullet ("N of M+". - addChangeListener(...)), so it renders as part of the same paragraph. Start - addChangeListener(listener) … on its own line.

Comment on lines +136 to +137
`mediaTypes` is `image`, `video`, or both (the default). Every page size
and every library size is read.

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.

Non-blocking: "Every page size and every library size is read" states no guarantee, while the FR4 verification row still fails "a page size is refused". Say "Any page size from 1 and any library size is accepted."

Comment on lines +257 to +258
- This record details `spec:AST-112`: its FR1 (`photos` among the core
package's opt-in capabilities), FR3 (`photos` stays opt-in), FR4 (the host

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.

Non-blocking: the amended AST-112 FR1 names no capability; its FR20 ("as camera and photos do") and FR7's group table name photos. Cite those for "photos among the core package's opt-in capabilities".

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and one record fix is needed after it.

No current spec decides its FR1–FR10 or DEC-1–DEC-3: the opt-in photos capability, photo access with its own states beside AstryxPermissions, paging and countAssets, export, thumbnails and named features. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Blocking:

  • The record promises app developers thumbnails and their own photo grid (lines 27-29, 51-52 and 63), but with the thumbnail view internal (lines 101-102 and DEC-1) such an app has no way to draw an asset on iOS, so either give ./photos a component that draws an asset id or narrow that promise to listing, counting and exporting.

The new Non-goals bullets match the system-spec template, the change-listener bullet at line 160 is still merged into the countAssets bullet, and the smaller notes are inline.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: the record depends on the foundation amendment, the platform-code, system-modules and media/camera drafts, is not stacked, and merges after them: verified.
  • Claim: photos is an opt-in capability, and without it FileInput uses the system photo picker with no permission: verified (lines 88-92).
  • Claim: revision 1 is replaced by named features, and countAssets is the one named feature with an open-ended fallback: verified (lines 155-160, 233-240, DEC-3).
  • Claim: the thumbnail view is internal and ./photos exports AstryxPhotoLibrary: verified (lines 101-102).
  • Claim: requirements read as behaviour, and the kept constraints (no third-party native dependency, prompts only on request, metadata stripped from JPEG exports) stay: verified (lines 47-49, 135-137, 175-176).
  • Claim: Non-goals keeps only the template's two standing bullets: verified (lines 77-84).
  • Claim: decisions state direction and reason, with no rejected alternatives, and versioning reads "contracts grow by named features": verified (lines 233-234, DEC-1 to DEC-3).
  • Claim: the existing authority cited from the drafts: verified, except that the amended foundation FR1 names no capability (its FR20 and FR7 table name photos): imprecise.
  • Claim: no other record or open pull request owns these contracts: verified.
  • Claim: the decision summary (access states, paging, export, thumbnails, results, public platform API): verified, except "an absent view falls back visibly", where the default fallback draws nothing (lines 225-226): imprecise.
  • Claim: the ownership table and the claim scope match the record: verified.
  • Claim: the implementation lives in the package's platform layer: not verifiable in this repository.
  • Claim: one accessibility gap (FR8) is recorded: verified (lines 249-250).
  • Claim: writing rubric R1–R7 results: verified.
  • Claim: the knowledge check and Prettier pass, and the leak scan is clean: verified at this head.
  • Claim: the ecosystem survey of third-party libraries: not checked, since it describes other projects.
  • File: docs/specs/AST-135-react-native-photos-documents/spec.md: one blocking finding and non-blocking notes.

Automated review (maintainer link)

Comment on lines +180 to +181
image stays HEIC. On Android 10 and later the system strips an
`original`'s location, because the package declares the media read

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.

Miss (non-blocking): FR1 has the generated native project carry the media read permissions (lines 94-100), and the foundation amendment's FR3 says "The package's manifests declare no permission." Say "because the generated project declares the media read permissions without ACCESS_MEDIA_LOCATION".

@astracat-bot astracat-bot Bot left a comment

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.

Approval waits on an engineering owner's decision on the new draft record spec:AST-135, and one description fix is needed after it.

No current spec decides its FR1–FR10 or DEC-1–DEC-3: the opt-in photos capability, photo access with its own states beside AstryxPermissions (OQ1), paging and countAssets, export, thumbnails and named features. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Blocking:

  • The description's "Who uses it" table still says a person sees "The app's own grid of the photos and videos they allowed", while the record now confines that grid to FileInput's photo picker (line 65), so copy the record's row into the description.

Narrowing the app use to listing, counting and exporting resolves the earlier thumbnail gap, and the smaller notes, including format: 'jpeg' also deciding the video format, are inline.

Claims and files checked

Review mode: full; reason: spec-record

  • Claim: the record depends on the foundation amendment and the platform-code, system-modules and media/camera drafts, is not stacked, and merges after them: verified (no stack line; the record cites those drafts).
  • Claim: photos is an opt-in capability, and without it FileInput uses the system photo picker with no permission: verified (lines 90-94).
  • Claim: apps list, count and export through AstryxPhotoLibrary, and the thumbnail view is internal behind FileInput's photo picker: verified (lines 25-31, 53-56, 103-104).
  • Claim: revision 1 is replaced by named features, and countAssets is the one named feature, counting the listing's own fetch, with an open-ended fallback: verified (lines 157-162, 235-242, DEC-3).
  • Claim: export writes upright JPEGs with location and EXIF stripped and MP4 videos with posters, downloads iCloud originals with progress, and fails per asset, with cancel resolving the written files: verified (lines 175-197).
  • Claim: requirements read as behaviour, and the kept constraints (no third-party native dependency, prompts only on request, metadata stripped from JPEG exports) stay: verified (lines 49-51, 137-139, 177-178).
  • Claim: Non-goals keeps only the template's two standing bullets: verified (lines 79-86).
  • Claim: decisions state direction and reason with no rejected alternatives, and versioning reads "contracts grow by named features": verified (line 235, DEC-1 to DEC-3).
  • Claim: the existing authority cited from the drafts: verified, except that the amended foundation FR1 names no capability (its FR3, FR20 and group table name photos): imprecise.
  • Claim: no other record or open pull request owns these contracts: verified.
  • Claim: the decision summary (access states, paging, export, thumbnails, results, public platform API): verified, except "an absent view falls back visibly", where the default fallback draws nothing (lines 227-228): imprecise.
  • Claim: the "Who uses it" table matches the record: false for the photo library row (the record's line 65 confines the grid to FileInput's picker).
  • Claim: the claim scope paragraph and the recorded accessibility gap (FR8): verified (lines 251-252).
  • Claim: the implementation lives in the package's platform layer: not verifiable in this repository.
  • Claim: writing rubric R1–R7 results: verified.
  • Claim: the knowledge check and Prettier pass, and the leak scan is clean: verified at this head.
  • Claim: the ecosystem survey of third-party libraries: not checked, since it describes other projects.
  • File: docs/specs/AST-135-react-native-photos-documents/spec.md: no blocking finding in the record; non-blocking notes on the jpeg format for video, the merged change-listener bullet, page-size wording, the named-feature baseline, the foundation FR1 citation, the permission wording and option ranges.

Automated review (maintainer link)

`name`, `mimeType`, `mediaType`, pixel `width` and `height`, `size` in
bytes, and the asset's `creationDate` and `duration` as `listAssets`
answers them.
- `format: 'jpeg'` (the default) writes an image as an upright JPEG

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.

Miss (non-blocking): the default format: 'jpeg' also writes a video as an MP4 with a poster (lines 178-180), so the value does not tell a caller what a video becomes. Name the value for both media, or say that format chooses between a converted export (JPEG images, MP4 videos) and original.

@imdreamrunner imdreamrunner changed the title spec(AST-135): React Native: Photos (draft) spec(AST-135): React Native: Photos Nov 19, 2026

This branch was successfully deployed

1 active deployment
Preview — e331448b Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant