Repository navigation
spec(FileInput): React Native record with the photo library source - #12597
imdreamrunner wants to merge 18 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput, whose DEC-1 and requirements (FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) no current record states. 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. Whatever the decision, the record needs these fixes:
- FR1 re-lists core's props, validation rules and states, which
architecture:knowledge-contractsDEC-13 leaves to the core record, and its line "a multiple field adds picks up tomaxFiles" contradicts coreFileInput, which replaces a multiple field's files on each pick (packages/core/src/FileInput/FileInput.tsx:620-650), so cut FR1 to the React Native differences and either state FR5's append behavior as an explicit React Native difference or align it with core. - Several basis cells cite clauses that do not state their rows' rules, and the record should not land before the two drafts it cites, so:
component:FileInputFR1–FR6 cover theme targets, the upload icon and dropzone status placement, not props, validation or a value shape; FR8 cites AST-130 FR13, which is the storage module in the open draft (#12553), where the file picker is FR12 and the cache is FR14; FR8 and FR12 cite an AST-135 DEC-3 that the open draft (#12572) does not have; FR11 routes the camera through the file picker that the AST-130 draft keeps camera-free; and #12553 and #12572 should be declared as this pull request's base.
Smaller points: the no-window failure reason has no requirement that says when it fires, and the privacy review trigger is not one the routing helper accepts.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the core FileInput record owns the props, validation rules, statuses and dropzone placement. False: it owns theme targets, the upload icon and dropzone status placement only.
- Claim: the new record restates none of core's rules. False: FR1 restates the prop list, validation rules and states.
- Claim: core's props, meanings, defaults, rules and states are unchanged on React Native. False for multiple fields: FR5 appends where core replaces.
- Claim: each basis cell names a record and a clause. True as written, but FR8 and FR12 name clauses that do not hold those rules.
- Claim: no other record owns React Native file or photo picking. Verified on main; the open file-picker and photos drafts are cited.
- Claim: the record has one rejected alternative, inside DEC-1, no pull request references, and OQ1 unanswered. Verified.
- Claim: the record states no project status. One line ("already holds" in Why this exists) states build status (note).
- Claim: the knowledge check reports the records aligned. Verified at this head.
- Claim: Prettier is clean. Verified on the seven changed files.
- Claim: the four tooling test files pass (364 tests). Verified; the new React Native cases pass.
- Claim: the new cases fail with
react-nativeremoved from the language list. Not checked. docs/specs/components/FileInput/FileInput.react-native.spec.md: FR1 restatement and multi-pick rule; basis citations (both required fixes);no-window,privacytrigger, the two meanings of "core" and "already holds" (notes).docs/architecture/knowledge-contracts.md: clear..github/scripts/knowledge-paths.cjs: clear..github/scripts/knowledge-paths.test.mjs: clear..github/scripts/change-scope.test.mjs: clear.scripts/check-knowledge.test.mjs: clear.scripts/specs-for-file.test.mjs: clear.
…and cites the drafts' clauses
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput: its DEC-1 and requirements (FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2), including the photos capability that decides between the Astryx grid and the system photo picker, are not stated by any current record. 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.
Whatever the decision, these fixes are needed:
- Miss: FR9 promises upright files with no location or EXIF on its stored-bytes path, but the AST-135 export it cites writes stored bytes with their metadata, so state what that path keeps or name the step that rewrites it.
- Miss: on the system-picker path, which every app without
photostakes, no cited piece supplies FR2'swidth,height,creationDate,durationorposterUri, FR9's rewrite, the duration FR8 needs to reject a long video, or FR13's poster, so scope those promises to the grid or cite the step that provides them. - The "multiple, reopened" representative state says the limit counts the field's other files, which contradicts FR5's limit of
maxFilesgrid selections now that a confirm replaces the field's files. - FR11 tells a denied camera from a restricted one, but AST-130 FR9 and AST-132 FR9 report an iOS denied and restricted camera as one state, so no cited piece can tell them apart.
- FR8 says every Android device gets the system Photo Picker, while its cited AST-130 FR12 falls back to the document picker on devices without it, which FR8 never covers.
- FR12 cites AST-135 FR3 for reads that "stay inside the app", but FR3 says only that reads never prompt, so mark FR12 as this record's own rule.
- Miss: FR2 says a multiple field's value is a list, but core's value can be
null(FileInput.tsxpassesnullafter a pick with no valid file and on clear), so say "a list, ornull". - The description lists a previewed project as a system-picker case, says videos are always written as MP4, gives every photo an
assetId, says the record restates none of core's contract, and reports that every basis cell names a record and clause, none of which the record supports.
The knowledge-tooling changes and the knowledge-contracts sentence are fine and ride the same approval, and the earlier findings on FR1, the AST-130 and AST-135 citations and the camera's owner are fixed.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- Stacked on the knowledge-tooling pull request and merges after it: verified: its only commit is this branch's first commit; it is open
- Cites three open drafts by clause and merges after them: verified: the three drafts are open; nothing enforces the merge order
- The core record owns theme targets, the upload icon and dropzone placement; props and rules live in core's docs and source: verified: core record FR1-FR6; FileInput.tsx
- The record restates none of core's contract: false: FR2 restates the value shape and omits null (record :120)
- A pick replaces a field's files, as on web: verified: FR5 (:123); FileInput.tsx:620-650
- value and onChange keep core's shapes: false: FR2 calls a multiple field's value a list; core also passes null (FileInput.tsx:643-646)
- The file record's fields; photos and videos also get assetId and media fields: false in part: FR2 gives assetId only to grid picks, and no cited piece supplies media fields on the system-picker path
- Two optional props, maxDuration and onPickFailure: verified: Public concepts, FR11
- accept decides the sources; images or videos add the photo library: verified: FR3 (:121)
- The grid covers order, reselection, the limit, limited access, first-use prompts and windowed native thumbnails: verified: FR4-FR7, PR1-PR2
- The system picker is used without photo-library access, in a previewed project, or without the native pieces: false for the previewed project: FR8 (:126) has no such case
- Written files are upright with no location or EXIF; a video is written as MP4: false: FR9 (:127) writes stored bytes unless accept allows image/jpeg or video/mp4, and its cited export keeps metadata there
- iCloud downloads show progress, can be cancelled and report failures: verified: FR10
- Files come through the document picker; the camera is a capture screen that asks on first use: verified: FR11 (:129)
- Only picked items reach the app; FileInput never deletes written files: verified: FR12, FR14
- Accessibility covers labels, the selection count, remove actions, Reduce Motion and right-to-left: verified: AR1-AR6
- The rejected alternative is one line in DEC-1; non-goals as listed; OQ1 stays open; no implementation: verified: DEC-1, ownership boundary, OQ1, diff
- Rubric R3: each basis cell names a record and a clause: false: FR1, FR5 and FR13 cite core's source and docs
- Rubric R1, R2, R4-R7: verified against the record
- Specification records only: verified for this pull request's own commits; the diff also carries the stacked tooling commit
- No internal context in public text: verified: no matches in added lines, commit messages, title, body or branch
- check-knowledge aligned, Prettier clean, git diff --check clean: verified: rerun at this head
Files:
docs/specs/components/FileInput/FileInput.react-native.spec.md: findings 1-5; owner decision pendingdocs/architecture/knowledge-contracts.md: clear; rides the same approval.github/scripts/knowledge-paths.cjs: clear.github/scripts/knowledge-paths.test.mjs: clear; 63 tests pass.github/scripts/change-scope.test.mjs: clear; 119 tests passscripts/check-knowledge.test.mjs: clear; 152 tests passscripts/specs-for-file.test.mjs: clear; 30 tests pass
…ra access is one state
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput and the knowledge-contracts sentence that limits platform record languages to swift and react-native: no current record states the record's DEC-1 and requirements (FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2), including the photos gate between the Astryx grid and the system photo picker and FileInput's own write step on every photo path. 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.
Whatever the decision, these fixes are needed:
- Miss: the record draws a custom photo grid on iOS and Android without citing
spec:AST-082FR11, which has a native component use the platform's own picker when it meets the contract, so say in DEC-1 or FR8 which part of the contract the system photo picker cannot meet, or make the system picker the default. - Miss: FR7 and the
deniedstate callonPickFailurefor denied access, while FR11 calls it only for a pick that ends without files and never for a cancel, so say when it fires in the denied sheet and whether closing that sheet counts as cancelling. - Miss: FR2 promises a size in bytes, but the
spec:AST-130FR12 document picker it relies on answers-1when the provider does not say and core'smaxSizerule rejects only sizes above the limit, so have FileInput measure the cached copy or say how an unknown size meetsmaxSize. - Miss: FR10 says the system photo picker shows its own download progress in its sheet, but its basis
spec:AST-130FR12 says the iOS picker closes before it loads the files, so state that the field's loading state covers the download there and whether it shows progress or offers Cancel. - Miss: the Contract at a glance gives
assetIdto every photo and video and promises upright videos (the description repeats the upright claim and its R3 line omits FR2 and FR3, which cite core's props), while FR2 givesassetIdonly to grid picks and FR9 states orientation only for images, so align them.
The earlier findings on FR1, FR2's null, FR5's state row, FR8's document picker, FR9's write step, FR11's camera state and the FR12, AST-130 and AST-135 citations are fixed, and the knowledge-tooling changes are fine and ride the same approval.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- Stacked on the knowledge-tooling pull request and merges after it: verified: its only commit is this branch's first commit; it is open
- Cites three open drafts by clause and merges after them: verified: the three drafts are open; nothing enforces the merge order
- The core record owns theme targets, the upload icon and dropzone placement; props and rules live in core's docs and source: verified: core record FR1–FR6;
FileInput.tsx - The record keeps core's contract and restates only the value shape: verified: FR1 and FR2
- The Swift Button record is the model for a platform record: verified: it sits beside the core Button record
- No other record owns React Native file or photo picking: verified for ownership; the current native-first rule still governs the grid (fix 1)
- A pick replaces a field's files, as on web, and
valueandonChangekeep core's shapes: verified: FR5, FR2;FileInput.tsxvalue type and pick handling - The file record's fields, with
assetIdfor grid picks: verified in FR2; the at-a-glance row says otherwise (fix 5) - Two optional props,
maxDurationandonPickFailure: verified: Public concepts, FR11 acceptdecides the sources; images or videos add the photo library: verified: FR3- The grid covers order, reselection, the limit, limited access, first-use prompts, the denied and restricted states and windowed native thumbnails: verified: FR4–FR7, PR1–PR2
- The system photo picker is used without the
photosopt-in, without the photo pieces and from the limited and denied states, with Android's document-picker fallback: verified: FR8 - FileInput's write step makes every photo and video upright and without location or EXIF on every path: false in part: FR9 states orientation only for images (fix 5); the format and metadata rules are verified in FR9
- iCloud downloads show progress, can be cancelled and report failures: verified for the grid; on the system picker FR10's progress conflicts with its basis and there is no Cancel (fix 4)
- Files come through the document picker; the camera is a capture screen that asks on first use: verified: FR11
- Only picked items reach the app; FileInput never deletes written files: verified: FR12, FR14
- Accessibility covers labels, the selection count, remove actions, Reduce Motion and right-to-left: verified: AR1–AR6
- The rejected alternative is one line in DEC-1; the non-goals; OQ1 stays open; no implementation: verified: DEC-1, ownership boundary, OQ1, diff
- Rubric R3: basis cells name a record and clause except FR1, FR5, FR13, FR9 and FR12: false: FR2 and FR3 also cite core's props (fix 5)
- Rubric R1, R2 and R4–R7: verified against the record
- Specification records only: verified for this pull request's own commits; the diff also carries the stacked tooling commit
- No internal context in public text: verified: no matches in added lines, commit messages, title, body or branch
- Knowledge check aligned, Prettier clean, whitespace check clean: verified: rerun at this head
Files:
docs/specs/components/FileInput/FileInput.react-native.spec.md: fixes 1–5; owner decision pendingdocs/architecture/knowledge-contracts.md: clear; rides the same approval.github/scripts/knowledge-paths.cjs: clear.github/scripts/knowledge-paths.test.mjs: clear.github/scripts/change-scope.test.mjs: clearscripts/check-knowledge.test.mjs: clearscripts/specs-for-file.test.mjs: clear
…e; failure, size and download fixes
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput and the knowledge-contracts sentence that limits platform record languages to swift and react-native: no current record states the record's decisions and requirements (DEC-1, DEC-2, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2), including DEC-2's reading of spec:AST-082 FR11, which justifies the Astryx photo grid by needs this record adds itself. 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.
Whatever the decision, these fixes are needed:
- DEC-2 says the system photo picker is the source "wherever it meets this contract" in apps without
photos, without the photo pieces and in the limited and denied states, yet its next sentence, FR8 and FR10 say that in exactly those states it has nomaxDurationfilter, no preselection on either platform and no download progress or Cancel, so restate it as the picker serving where the grid cannot run, under that reduced contract and including the restricted state. - Miss: the
iCloud downloadrepresentative state requires progress and a Cancel that keeps nothing on every path while FR10 gives the system photo picker neither, so name the row for the grid, add a system-picker row, and narrow the description's matching claim.
The earlier findings on spec:AST-082 FR11, onPickFailure in the denied state, unknown sizes against maxSize, FR10's iOS picker progress and the Contract at a glance are fixed, and the knowledge-tooling changes are fine and ride the same approval.
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- Stacked on the knowledge-tooling pull request and merges after it: verified: its only commit is this branch's first commit; it is open
- Cites three open drafts by clause and merges after them: verified: the three drafts are open; nothing enforces the merge order
- The core record owns theme targets, the upload icon and dropzone placement; props and rules live in core's docs and source: verified: core record FR1–FR6;
FileInput.tsx - The Swift Button record is the model for a platform record: verified: it sits beside the core Button record
- The Stage and Preview records are open drafts: verified: both are open draft pull requests
- No other record owns React Native file or photo picking: verified in the searched paths and the component records
- Web parity: core's props, meanings, defaults, rules and states hold, a pick replaces a field's files, and
valueandonChangekeep core's shapes: verified: FR1, FR2, FR5;FileInput.tsxvalue type and pick handling (FR9's unknown-size rule is a stated React Native difference) - The file record's fields, with
assetIdfor grid picks: verified: FR2 and the Contract at a glance - Two optional props,
maxDurationandonPickFailure: verified: Public concepts, FR11 acceptdecides the sources; images or videos add the photo library: verified: FR3- The grid covers order, preselection on reopen, the limit, limited access with Manage, first-use prompts, the denied and restricted states and windowed native thumbnails: verified: FR4–FR7, PR1–PR2
- The system photo picker serves apps without
photos, without the photo pieces and from the limited and denied states, with Android's document-picker fallback, per the platform-control rule: verified: FR8 and DEC-2; DEC-2's wording of where the picker meets the contract is the first fix - The write step removes location and EXIF from every photo and video and writes images upright on every path, as JPEG and MP4 when allowed, else the stored format: verified: FR9
- iCloud downloads show progress, can be cancelled and report failures: false in part: progress and Cancel are the grid's only (FR10; the second fix)
- Files come through the document picker; the camera is a capture screen that asks on first use: verified: FR11
- Only picked items reach the app; FileInput never deletes written files: verified: FR12, FR14
- Accessibility covers labels, the selection count, remove actions, Reduce Motion and right-to-left: verified: AR1–AR6
- The rejected alternative is one line in DEC-1; the non-goals; OQ1 stays open; no implementation: verified: DEC-1, ownership boundary, OQ1, diff
- Rubric R1–R7, with R3 now listing FR2 and FR3 and R4 noting DEC-2 has no Rejected line: verified against the record
- Specification records only: verified for this pull request's own commits; the diff also carries the stacked tooling commit
- No internal context in public text: verified: no matches in added lines, commit messages, title, body or branch
- Knowledge check aligned, Prettier clean, whitespace check clean: verified: rerun at this head
Files:
docs/specs/components/FileInput/FileInput.react-native.spec.md: two fixes; owner decision pendingdocs/architecture/knowledge-contracts.md: clear; rides the same approval.github/scripts/knowledge-paths.cjs: clear.github/scripts/knowledge-paths.test.mjs: clear.github/scripts/change-scope.test.mjs: clearscripts/check-knowledge.test.mjs: clearscripts/specs-for-file.test.mjs: clear
…ownload states split
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput and on the knowledge-contracts sentence that limits platform record languages to swift and react-native. No current record states DEC-1, DEC-2, FR1–FR14, PR1–PR3, AR1–AR7 or ORD1–ORD2, so an engineering owner records the decision by commenting /approve-spec with the full head SHA; the author may do so as an engineering owner. The decision includes how DEC-2 reads spec:AST-082 FR11, under which a native component uses the platform's own control when one satisfies its contract, and the name onPickFailure.
One fix is needed whatever the decision:
- DEC-2 (
docs/specs/components/FileInput/FileInput.react-native.spec.md:260-263) says the platform photo picker cannot preselect or report download progress, but iOS 15's picker does both (preselectedAssetIdentifiers, and theProgressits item provider returns for an iCloud item), so say which platform lacks each need and whether the limit is the platform's orspec:AST-130FR12'spick().
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request and merges after it: verified (its commit is this branch's first commit).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5; core FileInput's pick handler).
- Claim: the file record's fields and the two added props: verified (FR2, Public concepts).
- Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system photo picker cannot meet: false for iOS 15 on preselection and progress (the fix above).
- Claim: the system picker serves the fallback states, and Android without the Photo Picker gets the document picker: verified (FR8).
- Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, representative states).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: the DEC-2 fix; held for the owner decision. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput and on the knowledge-contracts sentence that limits platform record languages to swift and react-native. No current record states DEC-1, DEC-2, FR1–FR14, PR1–PR3, AR1–AR7 or ORD1–ORD2, so an engineering owner records the decision by commenting /approve-spec with the full head SHA; the author may do so as an engineering owner. The decision includes how DEC-2 reads spec:AST-082 FR11, now that most of the grid's stated reasons are limits of spec:AST-130 FR12's pick() rather than of the platform pickers, and the name onPickFailure.
The iOS correction from the last review is in; one fix is needed whatever the decision:
- DEC-2 (
docs/specs/components/FileInput/FileInput.react-native.spec.md:264-268) says the Android Photo Picker cannot preselect and does not filter videos by duration, but Android documents both (MediaStore.EXTRA_PICKER_PRE_SELECTION_URIS, added in API 36, andPhotoPickerSelectionParams.Builder.setMaxVideoDuration), so name the Android versions that lack each and say that elsewherepick()is the limit, as the iOS lines now do.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its commit is this branch's first commit).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5; core FileInput's pick handler).
- Claim: the file record's fields and the two added props: verified (FR2, Public concepts).
- Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system pickers fall short on, with neither platform filtering videos by duration and Android's picker unable to preselect: false for Android (the fix above); the iOS statements are verified.
- Claim: the two iOS shortfalls are recorded as FR5 and FR10 gaps: verified (DEC-2's gap lines).
- Claim: the system picker serves the fallback states, and Android without the Photo Picker gets the document picker: verified (FR8).
- Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, representative states).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: basis cells name a record and a clause except the rows listed in the rubric: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: the DEC-2 Android fix; held for the owner decision. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1, DEC-2, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles DEC-2's last sentence, which records the system-picker path as a shortfall against the current spec:AST-082 FR11 and which approving the draft does not amend: keep it as a recorded gap, add preselection, duration and progress options to pick() in the spec:AST-130 draft, or amend FR11; the onPickFailure name is part of the same decision.
The Android correction from the last review is in and no record fix is required; three optional wording fixes are marked inline (DEC-2's limited state, FR8's picked order, and the verification map's "stored bytes" state).
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its commit is this branch's first commit, and the tooling files match it).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified (it sits beside the core Button record).
- Claim: no other record in the searched paths owns React Native file or photo picking: verified (the drafts own the pieces; this record owns the field).
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5; core FileInput's pick handler).
- Claim: the file record's fields and the two added props: verified (FR2, Public concepts).
- Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system-picker path lacks (no iOS duration filter, no Android preselection before API level 36, and otherwise
pick()), named as shortfalls againstspec:AST-082FR11: verified against DEC-2 and the platforms' documented options; the FR11 shortfall waits on the owner decision. - Claim: the system picker serves the fallback states, and Android without the Photo Picker gets the document picker: verified (FR8).
- Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, representative states).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: the rejected alternative is one line in DEC-1, and the non-goals and OQ1 are recorded: verified.
- Claim: no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows listed in the rubric, and the record has no pull request references: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; three optional wording notes. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's React Native-only maxDuration meets FR3's single-platform test, given that FR8 already checks a video's length after the write, as web could; the onPickFailure name is part of the same decision.
One record fix is needed whatever the decision:
- FR11 calls
onPickFailurefor every pick that ends without files, but the new DEC-3 says rejections by the core component's rules reach only the error status, so narrow FR11's trigger to a source that returns no files (as the Public concepts row reads) or state DEC-3's exception in FR11.
Two optional notes are marked inline: DEC-3's "the photo pickers apply" against DEC-2 and FR8, and FR8's picked order, still open from the last review.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its commit is this branch's first commit, and the tooling files match its head).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text; the AST-130 draft moved, but not in the clauses this record cites.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the Stage and app-preview records named as non-goals are open drafts: verified.
- Claim: no other record in the searched paths owns React Native file or photo picking: verified.
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5; core FileInput's pick handler).
- Claim: the file record's fields: verified (FR2, Public concepts).
- Claim: the two React Native-only props, because core has neither, its limits are
maxSizeandmaxFiles, and it reports rejections only through its error status: verified against core FileInput's props and pick handler (DEC-3); FR11 states a broaderonPickFailuretrigger (the fix above). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system-picker path lacks, with the
pick()limits named as shortfalls againstspec:AST-082FR11: verified against DEC-2; the shortfall waits on the owner decision. - Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, and Android without the Photo Picker gets the document picker: verified (FR6–FR8). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: the rejected alternative is one line in DEC-1, and the non-goals and the open question are recorded: verified.
- Claim: no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, and the record has no pull request references: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; one required fix (FR11 against DEC-3) and two optional notes. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether maxDuration stays React Native-only under FR3, which asks a single-platform prop to state its reason (DEC-3's rewording no longer says why web cannot have it); the onPickFailure name is part of the same decision. The onPickFailure trigger and DEC-3's wording from the last review are fixed.
One record fix is needed whatever the decision:
- FR8 now gives the system-picker path the order
pick()returns, but ORD2 and the Review checks row still require the person's order for every pick, so scope the order in ORD2 and the summary rows to the grid (and list the order among whatpick()does not pass in DEC-2), or add ordered results topick()in the AST-130 draft and keep the person's order in FR8.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its commit is this branch's first commit, and the tooling files match its head).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text, unchanged since the last review.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the Stage and app-preview records named as non-goals are open drafts: verified.
- Claim: no other record in the searched paths owns React Native file or photo picking: verified.
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5; core FileInput's pick handler).
- Claim: the file record's fields: verified (FR2, Public concepts).
- Claim: two React Native-only props, because core has neither, its limits are
maxSizeandmaxFiles, and it reports rejections only through its error status: verified against core FileInput's props and pick handler (DEC-3); FR11 now matches. - Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11 now fires only when a source returns no files, the photo source opens without access, or an item fails to download). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system-picker path lacks, with the
pick()limits named as shortfalls againstspec:AST-082FR11: verified against DEC-2; the shortfall waits on the owner decision. - Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, and Android without the Photo Picker gets the document picker: verified (FR6–FR8). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: the rejected alternative is one line in DEC-1, and the non-goals and the open question are recorded: verified.
- Claim: no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, and the record has no pull request references: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; one required fix (FR8 order against ORD2 and the Review checks row). - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11, now four items with the selection order (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's reason, that the web's file input cannot read a video's length before a pick, keeps maxDuration React Native-only under FR3 when FR8 itself rejects a longer video after the write; the onPickFailure name is part of the same decision. The order contradiction between FR8 and ORD2 from the last review is fixed.
One fix is needed whatever the decision:
- The description's system-picker bullet says the grid exists for "three needs" but lists four, and DEC-2 says four places, so change it to "four needs".
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its commit is this branch's first commit, and the tooling files match its head).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's current text.
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified (it exists beside the core Button record).
- Claim: the Stage and app-preview records named as non-goals are open drafts: verified.
- Claim: no other record in the searched paths owns React Native file or photo picking: verified.
- Claim: web parity, with a pick replacing the field's files: verified (FR1, FR5, FR8; core FileInput's pick handler).
- Claim: the file record's fields: verified (FR2, Public concepts).
- Claim: two React Native-only props, because core has neither, its limits are
maxSizeandmaxFiles, and it reports rejections only through its error status: verified against core FileInput's props and pick handler (DEC-3). - Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for three needs the system-picker path falls short on: false; the bullet lists four (duration filter, preselection, download progress with Cancel, selection order), as DEC-2 does.
- Claim: the
pick()limits are named as shortfalls against the native-first rule: verified against DEC-2; the shortfall waits on the owner decision. - Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, and Android without the Photo Picker gets the document picker: verified (FR6–FR8, DEC-2). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: the rejected alternative is one line in DEC-1, and the non-goals and the open question are recorded: verified.
- Claim: no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, and the record has no pull request references: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; the order rows now agree with FR8. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's reason, that the web's file input cannot read a video's length before a pick, keeps maxDuration React Native-only under FR3 when FR8 itself rejects a longer video after the write; the onPickFailure name is part of the same decision.
One fix is needed whatever the decision:
- FR3 no longer says "it takes no drops", so under FR1, which keeps core's behavior wherever this record is silent, a React Native dropzone now inherits core's drag-and-drop with no source,
urior write step for a dropped item; state positively what the dropzone does with a drop, or define drops.
Two smaller notes: FR1 could cite spec:AST-082 FR3 so it does not read as keeping core's four web styling props, and the AST-130 draft's newest FR14 no longer says deleting cached files is outside the core package, which this record's FR14 attributes to it.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its head is this branch's first commit, and the tooling files match it).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's newest text, apart from the FR14 cache-deletion sentence that draft has since dropped (non-blocking note).
- Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the Stage and app-preview records named as non-goals are open drafts: verified.
- Claim: no other record owns React Native file or photo picking: verified.
- Claim: web parity, with a pick replacing the field's files: verified against core's pick handler (FR1, FR5, FR8); the dropzone's drop behavior is no longer stated (the fix above).
- Claim: the file record's fields: verified (FR2).
- Claim: two React Native-only props, because core has neither and reports rejections only through its error status: verified against core's props and pick handler (DEC-3).
- Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for four needs the system-picker path falls short on, named as shortfalls against the native-first rule: verified against DEC-2; the shortfall waits on the owner decision.
- Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, with the document picker on Android without the Photo Picker: verified (FR6–FR8, DEC-2). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: no rejected alternatives remain, and the non-goals and the open question are recorded: verified (no Rejected line; OQ1 open).
- Claim: no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, with no pull request references or project status beyond template fields: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; FR3's dropzone needs the fix above. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's reason, that the web's file input cannot read a video's length before a pick, keeps maxDuration React Native-only under FR3 when FR8 itself rejects a longer video after the write; the onPickFailure name is part of the same decision.
One fix is still needed whatever the decision:
- FR3 still does not say what a React Native dropzone does with a drop, so under FR1, which keeps core's behavior wherever this record is silent, a React Native dropzone inherits core's drag-and-drop with no source,
urior write step for a dropped item; state positively what the dropzone does with a drop, or define drops.
Two smaller notes stand: FR1 could cite spec:AST-082 FR3 so it does not read as keeping core's four web styling props, and FR14 still attributes "Deleting them is outside the core package" to the AST-130 draft's FR14, which no longer says so, now that the Ownership boundary has dropped the same sentence.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its head is this branch's first commit, and the tooling files match it).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's newest text, apart from the FR14 cache-deletion sentence that draft no longer carries (non-blocking note).
- Claim: the record is the platform record beside the core record, with its id and
platform_of: verified (frontmatter; the knowledge check accepts it). - Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the input-fields family owns the labelled field and its status: verified.
- Claim: no other record owns React Native file or photo picking: verified.
- Claim: web parity, with a pick replacing the field's files: verified against core's pick handler (FR1, FR5, FR8); the dropzone's drop behavior is not stated (the fix above).
- Claim: the file record's fields: verified (FR2).
- Claim: two React Native-only props, because core has neither and reports rejections only through its error status: verified against core's props and pick handler (DEC-3).
- Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for four needs the system-picker path falls short on, named as shortfalls against the native-first rule: verified against DEC-2; the shortfall waits on the owner decision.
- Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, with the document picker on Android without the Photo Picker: verified (FR6–FR8, DEC-2). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: verified (FR9). - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: no rejected alternatives remain, and the open question is recorded: verified (no Rejected line; OQ1 open).
- Claim: the record covers React Native's FileInput only, and no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, with no pull request references or project status beyond template fields: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; FR3's dropzone needs the fix above. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA on this pull request, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's reason, that the web's file input cannot read a video's length before a pick, keeps maxDuration React Native-only under FR3 when FR8 itself rejects a longer video after the write; the onPickFailure name is part of the same decision.
One fix is needed whatever the decision:
- Miss: FR9 writes an image as JPEG only when
acceptallowsimage/jpeg(and a video as MP4 only when it allowsvideo/mp4) and otherwise in its stored format, so a field withaccept="image/png"offers the photo library and camera under FR3 and then rejects every HEIC or camera pick under core'sacceptrule; write each item in a typeacceptallows, or offer only what the write step can turn into one.
This revision resolves the earlier dropzone, FR1 styling and FR14 basis notes.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its head is this branch's first commit, and the tooling files match it).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's newest text.
- Claim: the record is the platform record beside the core record, with its id and
platform_of: verified (frontmatter; the knowledge check accepts it). - Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the input-fields family owns the labelled field and its status: verified.
- Claim: no other record owns React Native file or photo picking: verified (the React Native foundation record is a draft and names capabilities only).
- Claim: web parity, with a pick replacing the field's files: verified against core's pick handler (FR1, FR5, FR8).
- Claim: the file record's fields: verified (FR2).
- Claim: two React Native-only props, because core has neither and reports rejections only through its error status: verified against core's props and pick handler (DEC-3).
- Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11). - Claim:
acceptdecides the sources: verified (FR3); see the fix above for image types other than JPEG. - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for four needs the system-picker path falls short on, named as shortfalls against the native-first rule: verified against DEC-2; the shortfall waits on the owner decision.
- Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, with the document picker on Android without the Photo Picker: verified (FR6–FR8, DEC-2). - Claim: written photos and videos lose location and EXIF, images are upright, JPEG and MP4 when
acceptallows, else the stored format: true to FR9; that rule is the fix above. - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: no rejected alternatives remain, and the open question is recorded: verified (no Rejected line; OQ1 open).
- Claim: the record covers React Native's FileInput only, and no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, with no pull request references or project status beyond template fields: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; FR9 needs the fix above. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the new draft record component:react-native/FileInput (DEC-1–DEC-3, FR1–FR14, PR1–PR3, AR1–AR7, ORD1–ORD2) and on the knowledge-contracts sentence that limits platform record languages to swift and react-native; an engineering owner records it by commenting /approve-spec with the full head SHA on this pull request, and the author may do so as one.
That decision also settles two points against the current spec:AST-082: DEC-2's recorded shortfall against FR11 (keep it as a recorded gap, add the options to pick() in the AST-130 draft, or amend FR11), and whether DEC-3's reason, that the web's file input cannot read a video's length before a pick, keeps maxDuration React Native-only under FR3 when FR8 itself rejects a longer video after the write; the onPickFailure name is part of the same decision.
One fix is needed whatever the decision:
- The description's "Written files" bullet still says a photo keeps its stored format when
acceptdoes not allow JPEG, while FR9 now writes the stored format only whenacceptallows it, else the first other image typeacceptnames that the platform encodes, and rejects an item with no such type; update the bullet to match FR9.
This revision resolves the earlier FR9 finding (a field with accept="image/png" now receives PNG files), and three non-blocking notes cover whether onPickFailure fires for an item FR9 rejects, accept values such as video/webm that FR9 can never write, and the verification map.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: builds on the knowledge-tooling pull request #12592 and merges after it: verified (its head is this branch's first commit, and the later commits change only the record).
- Claim: cites three open React Native drafts by clause and merges after them: verified against each draft's newest text.
- Claim: the record is the platform record beside the core record, with its id and
platform_of: verified (frontmatter; the knowledge check accepts it). - Claim: the core FileInput record owns only theme targets, the upload icon and dropzone status placement: verified (its FR1–FR6).
- Claim: the Swift Button record is the model for a platform record's shape: verified.
- Claim: the input-fields family owns the labelled field and its status: verified.
- Claim: no other record owns React Native file or photo picking: verified (no current record names a photo library or photo picker).
- Claim: web parity, with a pick replacing the field's files: verified against core's pick handler (FR1, FR5, FR8).
- Claim: the file record's fields: verified (FR2).
- Claim: two React Native-only props, because core has neither and reports rejections only through its error status: verified against core's props and pick handler (DEC-3).
- Claim:
onPickFailurecovers failures with no web counterpart: verified (FR11). - Claim:
acceptdecides the sources: verified (FR3). - Claim: the grid's order, preselection, limit, limited access, access prompts and windowed thumbnails: verified (FR4–FR7, PR1, PR2).
- Claim: the grid exists for four needs the system-picker path falls short on, named as shortfalls against the native-first rule: verified against DEC-2; the shortfall waits on the owner decision.
- Claim: the system picker serves apps without
photosor the photo pieces and is reached from the limited, denied and restricted states, with the document picker on Android without the Photo Picker: verified (FR6–FR8, DEC-2). - Claim: written photos and videos lose location and EXIF, and images are upright, on every path: verified (FR9).
- Claim: JPEG and MP4 when
acceptallows them, else the stored format: false at this head (FR9 adds another image type and a rejection); see the fix above. - Claim: iCloud progress and Cancel come from the grid only, and failures are reported on both paths: verified (FR10, FR11).
- Claim: other sources, privacy and accessibility: verified (FR11–FR14, AR1–AR7).
- Claim: no rejected alternatives remain, and the open question is recorded: verified (no Rejected line; OQ1 open).
- Claim: the record covers React Native's FileInput only, and no implementation is in this pull request: verified (no package file changes).
- Claim: basis cells name a record and a clause except the rows the rubric lists, with no pull request references or project status beyond template fields: verified.
- Claim: specification records only: true of this pull request's own commits; the diff also carries the stacked tooling commit.
- Claim: the knowledge check is aligned, Prettier is clean and the whitespace check is clean: verified at this head.
- File
docs/specs/components/FileInput/FileInput.react-native.spec.md: held for the owner decision; non-blocking notes on FR3, FR9 and the verification map. - File
docs/architecture/knowledge-contracts.md: held with the record; otherwise clear. - File
.github/scripts/knowledge-paths.cjs: clear. - File
.github/scripts/knowledge-paths.test.mjs: clear. - File
.github/scripts/change-scope.test.mjs: clear. - File
scripts/check-knowledge.test.mjs: clear. - File
scripts/specs-for-file.test.mjs: clear.
| | FR6 | With `limited` access (iOS limited access; Android 14 and later, user-selected access), the grid MUST list only the photos the app can see and show a notice above them with a Manage action. Manage offers Select More Photos, which presents the system's limited-selection picker where the device offers it (iOS 15 and later, Android 14 and later) and updates the grid when it closes, else the system photo picker for this pick (FR8); and Open Settings. The grid never triggers the system's own limited-access alert. | `spec:AST-135` FR3 | settled | | ||
| | FR7 | Photo access MUST be asked for on first use: opening the photo source with `undetermined` access shows the system prompt, and the grid opens with the answer. Nothing prompts before the person opens the photo source. With `denied` access, the sheet shows that photo access is off, Open Settings, and Choose Photos, which presents the system photo picker (FR8). With `restricted` access it shows the notice and Choose Photos only, since the person cannot change it. When this sheet opens, `onPickFailure` receives `{source: 'photos', reason}` with `denied` or `restricted` once; a pick through Choose Photos then proceeds as FR8 states, and closing the sheet is a cancel. | `spec:AST-135` FR3 | settled | | ||
| | FR8 | The photo source MUST use the system photo picker, with no permission and no prompt, when the app does not opt in to the `photos` capability, an opt-in capability of the core package (only an app that opts in declares photo-library access: iOS `NSPhotoLibraryUsageDescription`, Android the media read permissions), when the photo library piece is absent, and from FR6 and FR7. It is iOS's system photo picker; on Android it is the system Photo Picker, which older Android versions receive through system updates, and on a device without it the document picker filtered to the media `accept` allows (`spec:AST-130` FR12). It presents as the field's sheet and follows `isMultiple`, `maxFiles`, and the media `accept` allows; its items arrive in the order `pick()` returns them (`spec:AST-130` FR12 names none). Its items pass through FR9's write step like the grid's. It has no preselection, so a pick through it replaces the field's files as FR5 states, and no `maxDuration` filter: a video whose `duration` is longer is rejected after the write and named in the error status. | `spec:AST-130` FR12; `spec:AST-135` FR1, FR7 | settled | | ||
| | FR9 | Photos, videos, and camera photos MUST pass through FileInput's write step before `onChange`, which writes each file to the app's cache location (`spec:AST-130` FR14). The grid's items start from the photo library export (`spec:AST-135` FR5); the system photo picker's and the camera's items start from the file they return. Each item is written in a type `accept` allows (an unset `accept` allows every type): an image as a JPEG when allowed, else in its stored format when allowed, else as the first other image type `accept` names that the platform encodes (PNG, HEIC); a video as an MP4 when allowed, else in its stored container when allowed. An image is always upright, with its orientation applied. An item with no allowed type it can be written in is rejected and named in the error status. Location and other EXIF and camera metadata are removed from every written photo and video; the step reads `width`, `height`, `creationDate`, and `duration` first and makes a video's poster from the written file (FR2). The core component's rules then run on the records, `maxSize` against the written size, and `maxDuration` against `duration`. | this record's own write step; `spec:AST-130` FR14; `spec:AST-135` FR5 | settled | |
There was a problem hiding this comment.
Non-blocking: this new rejection names the item only in the error status, but the Public concepts row makes a pick failure "why one item was not written" and FR10 reports "an item that cannot be downloaded or written" to onPickFailure, so FR11's verification row cannot tell whether a test should expect a call. Add either "and reaches only the error status, as a rejection by core's accept rule does (DEC-3)" or "and is reported to onPickFailure with error".
| | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------------ | | ||
| | FR1 | Web parity. FileInput MUST keep the core contract's props (`spec:AST-082` FR3), meanings, defaults, validation rules, and states; this record states only what differs. `containerStyle` and `controlStyle` take React Native styles. | core `FileInput` consumer docs and current source | settled | | ||
| | FR2 | `value` and `onChange` MUST keep the core component's shapes with a `FileInputFile` record in place of the browser's `File`: a record or `null` when `isMultiple` is false, a list or `null` when it is true. A record has `name`, `type` (the MIME type, `''` when unknown, as web's `File.type`), `size` in bytes (when a picker does not report it, FileInput reads it from the file; `-1` only when neither says), and `uri`, a URI the app can read: for a photo, a video, or a camera photo, a `file://` URI of the file FileInput wrote in the app's cache location (FR9, `spec:AST-130` FR14); for a file from the document picker, the URI that picker returns (`spec:AST-130` FR12). A photo or video also has `width` and `height` in pixels as written, `creationDate` (milliseconds since 1970, `null` when unknown), and `duration` in seconds (0 for an image); a video has `posterUri`, a JPEG of its first frame in the same cache. FileInput fills these fields itself from each file it writes, on every photo path, the system photo picker included; an item picked from the grid also has `assetId`, its photo library id (`spec:AST-135` FR4). A record the app passes in may leave out every field but `name` and `size`. | core `FileInput` value prop; `spec:AST-130` FR12, FR14; `spec:AST-135` FR4; this record's write step (FR9) | settled | | ||
| | FR3 | `accept` MUST decide the sources and filters. The photo library is offered when `accept` allows images or videos (`image/*`, `video/*`, an image or video MIME type, or an extension of one); the camera when it allows images and the app's binary has the camera view (`spec:AST-132` FR9); files always, filtered by `accept`. An unset `accept` allows every source. The photo source lists only the media `accept` allows: images, with a Live Photo as its still image, and videos. One source opens at once on press; several open a source menu, the photo library first (iOS: a menu pulled down from the trigger; Android: a bottom sheet). In dropzone mode the surface is a press target that opens the sources. | core `FileInput` `accept`; `spec:AST-130` FR12; `spec:AST-132` FR9 | settled | |
There was a problem hiding this comment.
Non-blocking: this offers the photo library for any image or video MIME type, but FR9 writes a video only as MP4 or its stored container, so with accept="video/webm" every library video is rejected. Offer the photo source and camera only when FR9 can produce an allowed type, or add that state to the verification map.
| | FR4, FR5 | Grid tests over a seeded photo library double; Simulator and emulator checks | single; multiple; reopen; `maxFiles`; `maxDuration` | files out of selection order, a selection past the limit, a lost preselection, or a change on cancel fails | `audit:react-native/FileInput/grid` | | ||
| | FR6, FR7 | Tests over the double in each access state; device checks of the prompt | `undetermined`; `limited`; `denied`; `restricted` | a prompt before open, the system's limited alert, no Open Settings when denied, or Open Settings when restricted fails | `audit:react-native/FileInput/access` | | ||
| | FR8 | Tests with the piece absent; built apps with and without the `photos` capability on each platform | no `photos` capability; absent | a grid, a prompt, or a declared photo permission without the capability fails | `audit:react-native/FileInput/fallback` | | ||
| | FR9, FR10 | Write tests through the double; device checks with an iCloud-only photo | JPEG; stored format, re-encoded; a rotated photo; a photo with location; a video; one failed item; Cancel | a sideways image, location metadata in a file, a failed item that drops the others, or a Cancel that keeps files, fails | `audit:react-native/FileInput/export` | |
There was a problem hiding this comment.
Non-blocking: this row (and the FR3 row) lists no accept="image/png" (PNG written) or no-allowed-type state for the new FR9 rule. Core matches an accept extension against the file's name (FileInput.tsx:101-103), so FR9 should also say the written file's name ends in the extension of its written type; otherwise accept=".jpg" can reject a photo written as JPEG under its original HEIC name.
Stacked on #12592; merges after it.
The record cites the open drafts #12553 (
spec:AST-130), #12572 (spec:AST-135), and #12565 (spec:AST-132) by clause, so it merges after them too.Exact decision needed
How
FileInputworks on React Native, recorded as a platform record beside the core record:docs/specs/components/FileInput/FileInput.react-native.spec.md, idcomponent:react-native/FileInput,platform_of: component:FileInput. The central claim is that picking photos is FileInput's photo-library source, not a new public name (DEC-1).Existing authority searched
component:FileInput(current): it owns the theme targets, the upload icon, and the dropzone status placement. The core component's props, validation rules, and states are in its consumer docs and source. This record keeps all of them and states only what React Native adds or does differently; FR2 restates the value shape only to swap the browser'sFilefor a file record.component:swift/Button: the model for a platform record's shape.family:input-fields: it owns the labelled field and its status.spec:AST-135: the photo library and photo thumbnail pieces.spec:AST-130: permissions (FR9), the native file picker (FR12), and the app cache location (FR14).spec:AST-132: the camera view (FR9).packages/core/src/FileInput,docs/specs/components/FileInput. No other record owns React Native file or photo picking.Decision
valueandonChangekeep core's shapes, with aFileInputFilerecord in place of the browser'sFile.name,type, andsize, plusuri. Photos and videos also getwidth,height,creationDate,duration, and, for a video,posterUri; grid picks also getassetId.maxDurationandonPickFailure. The core component has neither: its limits aremaxSizeandmaxFiles, whichmaxDurationfollows in name, and it reports rejections only through its error status.onPickFailurecovers failures with no web counterpart (refused access, a missing source, an iCloud download error).acceptdecides them. Whenacceptallows images or videos, the photo library is a source.maxFileslimit;spec:AST-082FR11). The grid exists for four needs the system-picker path falls short on: themaxDurationfilter (iOS has none; on Android the core file picker'spick()passes none), preselection (Android before API level 36; elsewherepick()), download progress with Cancel (on iOS,pick()), and selection order (pick()names none). DEC-2 names thepick()limits as shortfalls againstspec:AST-082FR11. Where the grid cannot run, the system photo picker serves under that reduced contract: when the app does not opt in to thephotoscapability, when the photo pieces are absent, and from the limited, denied, and restricted states. On Android without the Photo Picker it is the document picker filtered to media.acceptallows: an image as JPEG, else its stored format, else the first other image typeacceptnames that the platform encodes (PNG, HEIC); a video as MP4, else its stored container. An item with no allowed type it can be written in is rejected and named in the error status. iCloud downloads from the grid show progress and can be cancelled; through the system photo picker the field shows loading without either. Failures are reported on both paths.Rejected alternatives
None. Each decision states its direction and reason.
Claim scope and non-goals
The record covers React Native's FileInput only.
OQ1 stays open: does web also want a separately named photo input? Today the one name is
FileInput.Evidence and implementation relationship
The basis for each requirement is
component:FileInputand the cited platform specs. No implementation is in this PR.Writing rubric results
Scope
Components: FileInput
Validation
node scripts/check-knowledge.mjs: records alignedgit diff --check: clean