Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9dd9add
chore(knowledge): accept react-native platform component records
imdreamrunner Nov 18, 2026
e780a42
spec(FileInput): React Native record with the photo library source
imdreamrunner Nov 18, 2026
7d870d8
spec(FileInput): React Native record keeps only platform differences …
imdreamrunner Nov 18, 2026
35e1c29
spec(FileInput): the photo grid comes with the photos capability
imdreamrunner Nov 18, 2026
2f35de9
spec(FileInput): FileInput's write step serves every photo path; came…
imdreamrunner Nov 18, 2026
ef45d0d
spec(FileInput): DEC-2 places the grid under the platform-control rul…
imdreamrunner Nov 18, 2026
1909db2
spec(FileInput): DEC-2 states the system picker's reduced contract; d…
imdreamrunner Nov 18, 2026
fb6419a
spec(FileInput): DEC-2 names which platform or interface lacks each need
imdreamrunner Nov 18, 2026
182e815
spec(FileInput): DEC-2 names the Android picker options and the pick(…
imdreamrunner Nov 18, 2026
ff9f224
spec(FileInput): wording for the limited path, picked order and re-en…
imdreamrunner Nov 18, 2026
0ebecb1
spec(FileInput): DEC-3 justifies the two React Native additions
imdreamrunner Nov 18, 2026
108367f
spec(FileInput): onPickFailure fires only when a source returns no files
imdreamrunner Nov 18, 2026
063bb0c
spec(FileInput): the person's order is the grid's; pick() order joins…
imdreamrunner Nov 18, 2026
c56acb4
spec(FileInput): state what React Native builds, positively
imdreamrunner Nov 18, 2026
c75fd1c
spec(FileInput): drop the Stage and Preview pointers
imdreamrunner Nov 18, 2026
a2d915d
spec(FileInput): Does-not-own keeps only owner pointers
imdreamrunner Nov 18, 2026
8eeccd6
spec(FileInput): the dropzone is a press target; own-rule and styling…
imdreamrunner Nov 18, 2026
0e6d6af
spec(FileInput): the write step picks a type accept allows
imdreamrunner Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/scripts/change-scope.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ describe('spec-only change scope', () => {
expect(result.specOnly).toBe(true);
});

it('treats a platform record beside the core record as a component record', () => {
const result = classifyChanges([
{filename: 'docs/specs/components/TextInput/TextInput.swift.spec.md'},
]);
it.each([
'docs/specs/components/TextInput/TextInput.swift.spec.md',
'docs/specs/components/NavigationStack/NavigationStack.react-native.spec.md',
])('treats platform record %s as a component record', filename => {
const result = classifyChanges([{filename}]);
expect(result.touchesKnowledgeRecords).toBe(true);
expect(result.specOnly).toBe(true);
expect(result.surfaces).toEqual([SURFACES.KNOWLEDGE]);
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/knowledge-paths.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ const COMPONENT_SPEC_ROOT = 'docs/specs/components';
* Platform implementation languages whose component records sit beside the
* core record as `<PublicName>.<language>.spec.md`.
*/
const PLATFORM_SPEC_LANGUAGES = Object.freeze(['swift']);
const PLATFORM_SPEC_LANGUAGES = Object.freeze(['swift', 'react-native']);

/**
* Where each platform language keeps its component code, as
* `<root>/<Module>/<ComponentRoot>/…`.
* `<root>/<Module>/<ComponentRoot>/…`. A language with no entry has no
* component code in this repository, so no code path places its records.
*/
const PLATFORM_SOURCE_ROOTS = Object.freeze({
swift: 'packages/native/apple/Sources',
Expand Down
13 changes: 13 additions & 0 deletions .github/scripts/knowledge-paths.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,19 @@ describe('component knowledge paths', () => {
language: 'swift',
publicName: 'AvatarStatusDot',
});
expect(
classifyPlatformComponentSpecPath(
'docs/specs/components/NavigationStack/NavigationStack.react-native.spec.md',
),
).toEqual({
componentRoot: 'NavigationStack',
fileName: 'NavigationStack.react-native.spec.md',
language: 'react-native',
publicName: 'NavigationStack',
});
for (const filePath of [
'docs/specs/components/Avatar/Avatar.klingon.spec.md',
'docs/specs/components/Avatar/Avatar.react.spec.md',
'docs/specs/components/Avatar/modules/Avatar.swift.spec.md',
'docs/specs/components/Avatar.swift.spec.md',
]) {
Expand All @@ -128,6 +139,8 @@ describe('component knowledge paths', () => {
'packages/native/apple/Sources/Astryx/Avatar/tests/Avatar.swift',
'packages/native/apple/Tests/AstryxTests/AvatarTests.swift',
'packages/core/src/Avatar/Avatar.tsx',
// React Native records have no component code root here.
'packages/react-native/src/NavigationStack/NavigationStack.tsx',
]) {
expect(locatePlatformComponentSource(filePath)).toBeNull();
}
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture/knowledge-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,8 @@ this flow passes the historical review benchmark and is enforced on pull request
package that owns a record is the one whose source tree has its component
root; when two packages have a root of that name, it is the one holding the
record's code. A platform implementation's record sits in the same folder as
`<PublicName>.<language>.spec.md` (for example
`<PublicName>.<language>.spec.md`, where `<language>` is `swift` or
`react-native` (for example
`docs/specs/components/Button/Button.swift.spec.md`), has the id
`component:<language>/<PublicName>` (for example `component:swift/Button`),
names its core component in `platform_of` (`component:<PublicName>`), and
Expand Down
Loading