Repository navigation
Conversation
Records the owner decision that callbacks in a create* config take their instance key, typed id, or event as arguments, so a definition can be made once at module scope or memoized.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/approve-spec 2f93bfd |
|
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.
Changes requested. INV28 and DEC-7 carry an engineering owner's approval for this head, so the rule itself is settled; three fixes remain in this pull request.
spec:AST-057still typesSwipeAction.onActivateas() => void | Promise<void>and its FR11 relies on handlers that read the caller's latest state, which INV28 forbids for the unbuiltcreateSwipe; amend AST-057 here soonActivatereceives the row it acts on (itsSwipeActionrow, FR1, FR11 and the DEP-0017 type mapping), or say in INV28 howcreateSwiperelates to it.- The
INV28, DEC-7verification row indocs/architecture/public-component-api.md(line 496) has no Failure signal cell; add the condition that fails INV28, as the architecture record template requires. - The description says builders can create
createSwipedefinitions once because every callback receives its item, but at this headcreateSwipe's contract still passes nothing (andcreateReorderablealready passed its key); deliver the swipe half with the AST-057 amendment or narrow the sentence.
Also worth doing: add INV28 to the record's review-applicability public-api list so global public-API review loads it.
…r row; INV28 has a failure signal
- AST-057: SwipeAction.id is required and onActivate receives {id,
itemKey}, as createSwipe ships; FR11 and the DEP-0017 mapping say so.
- INV28 lists createSwipe among the released APIs that satisfy it, is in
the global public-api review triggers, and its verification row names
the failure signal.
There was a problem hiding this comment.
Approval waits on an engineering owner's spec decision, and two fixes are needed in this pull request first.
- The
spec:AST-057edits (the Public API rows, FR1, FR11 and the DEP-0017 replacement row) were made against an older copy of the record.mainalready amends those lines for the shippedcreateSwipe(ItemSwipeActionVariant,ItemSwipeBehavior, literal-typed ids, and aListItemthat adds itsitemKey), so this branch conflicts withmainthere and describes types that do not ship: please rebase and keepmain's text in those four places. - The description says AST-057 "matches the
createSwipethat ships", which is not true yet: the record here namesSwipeActionVariantandSwipeBehaviorand still callscreateSwipeunbuilt, and the rebase above makes the claim true.
INV28 as now worded, DEC-7 and the INV28 verification row are new requirements, and the earlier /approve-spec covers only the previous commit. An engineering owner records the decision by commenting /approve-spec <full head SHA> on the commit that lands, and the author may do so as an engineering owner. Two optional wording points: INV28 calls createSwipe released before any release contains it, and DEC-7 could point to AST-057 DEC-10, where the owner's quote is recorded.
Claims and files checked
Review mode: full; reason: spec-record
- Claim:
createSwipe'sonActivatealready receives the action's id and the row's item key. Verified onmainin the Swipe module's types. - Claim:
createReorderable's callbacks receive their keys. Verified. - Claim: INV28 states the rule for new APIs and lists released factories that satisfy it. Verified;
createSwipeis not yet in a release (wording note). - Claim: DEC-7 records the owner's decision and rejects a swipe-only rule. Verified.
- Claim: the INV28 verification row names its failure signal. Verified.
- Claim: INV28 is in the record's public-API review triggers. Verified.
- Claim: AST-057 matches the shipped
createSwipe, and DEP-0017's mapping names the two differences. False at this commit (finding above). - Claim: AST-057's action row, FR1 and DEC-1 require an id and pass the id and item key, and FR11 adds the module-scope case. Present, but written against an older record (finding above).
- Claim: INV26, INV27, DEC-4 and DEC-5 are taken by other open pull requests, so this uses INV28 and DEC-7. Verified; both numbers are free on
main. - Claim: fewer re-renders and no stale-closure bugs. A prediction a records change cannot show.
- Claim: the writing rubric results. Consistent with the added text.
- File
docs/architecture/public-component-api.md: owner approval pending; otherwise clear. - File
docs/specs/AST-057-row-actions/spec.md: blocking finding above.
| APIs; released APIs that already pass their input (the Markdown plugin | ||
| factories, `createStaticSource`, the gesture controllers, `createSwipe`, whose | ||
| `onActivate` receives the entry's `id` and the row's `itemKey`) satisfy it |
There was a problem hiding this comment.
Non-blocking: createSwipe is on main but not yet in a published release, so "released APIs" is not quite true for it. Wording that does not depend on release state reads truer, for example "APIs that already pass their input (…) satisfy it".
spec:AST-057 on main already gives SwipeAction a required id and has
onActivate receive {id, itemKey}, with the DEP-0017 mapping, so this
branch takes main's record; the public-component-api edits stay.
|
/approve-spec cf4f364 |
There was a problem hiding this comment.
Changes requested: one claim in the description needs fixing; the rule itself is settled.
- The description says
spec:AST-057DEC-1's shape requires anidand passes{id, itemKey}toonActivate, but mergingmainreplaced that record whole, so DEC-1 still reads{id?, label, icon?, onActivate, …}: please restore the earlier commit's DEC-1 line (the new commit then needs its own/approve-spec), or drop "and DEC-1's shape" from the description.
INV28, DEC-7 and the verification row have an engineering owner's approval for this commit, and the earlier spec:AST-057 conflicts with main are gone. Optional: INV28 calls createSwipe released before any release contains it, INV16's bare "DEC-7" now also reads as this record's new DEC-7, and DEC-7 could point to spec:AST-057 DEC-10, where the owner's words are recorded.
Claims and files checked
Review mode: full; reason: spec-record
- Claim:
createSwipe'sonActivatealready receives the action's id and the row's item key. Verified in the Swipe module's types. - Claim:
createReorderable's callbacks receive their keys. Verified. - Claim: future
create*factories follow the same rule. Stated by INV28. - Claim: fewer re-renders and no stale-closure bugs. A prediction a records change cannot show.
- Claim: INV28 states the rule for new APIs and lists APIs that already satisfy it. Verified;
createSwipeis not in a release yet (wording note). - Claim: DEC-7 records the owner's decision and rejects a swipe-only rule. Verified.
- Claim: the INV28 verification row names its failure signal. Verified.
- Claim: INV28 is in the record's public-API review triggers. Verified.
- Claim: AST-057 requires an action id and passes the id and item key in its action row and FR1. Verified.
- Claim: AST-057's DEC-1 shape says the same. False (finding above).
- Claim: AST-057 FR11 covers a module-scope definition. Verified.
- Claim: AST-057's deprecation mapping names the two differences. Verified.
- Claim: INV28 lists
createSwipeamong the APIs that satisfy it. Verified. - Claim: INV28 and DEC-7 are free numbers in this record. Verified on
main. - Claim: the writing rubric results. Consistent with the added text.
- File
docs/architecture/public-component-api.md: owner-approved; two optional wording notes.
| APIs; released APIs that already pass their input (the Markdown plugin | ||
| factories, `createStaticSource`, the gesture controllers, `createSwipe`, whose | ||
| `onActivate` receives the entry's `id` and the row's `itemKey`) satisfy it | ||
| (DEC-7). |
There was a problem hiding this comment.
Non-blocking: this record now has its own DEC-7, and INV16 above cites (spec:AST-111 FR15, DEC-7) with a bare DEC-7 that means AST-111's. Writing that one as spec:AST-111/DEC-7 keeps the two apart.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because a draft pull request runs none; marking it ready for review starts it.
INV28, DEC-7 and the verification row have an engineering owner's approval for this commit, and what the description now says about spec:AST-057 matches that record. Optional wording notes: INV28 calls createSwipe released before any release contains it, INV16's bare "DEC-7" now also reads as this record's new DEC-7, and DEC-7 could point to spec:AST-057 DEC-10, where the owner's words are recorded. Any such edit makes a new commit that needs its own /approve-spec.
Claims and files checked
Review mode: same-head; reason: none
- Claim:
createSwipe'sonActivatealready receives the action's id and the row's item key. Verified in the Swipe module's types. - Claim:
createReorderable's callbacks receive their keys. Verified. - Claim: future
create*factories follow the same rule. Stated by INV28. - Claim: fewer re-renders and no stale-closure bugs. A prediction a records change cannot show.
- Claim: INV28 states the rule for new APIs and lists released APIs that already satisfy it. Verified;
createSwipeis not in a release yet (wording note). - Claim: DEC-7 records the owner's decision and rejects a swipe-only rule. Verified; the quoted words are in
spec:AST-057DEC-10. - Claim: the INV28 verification row names its failure signal. Verified.
- Claim: INV28 is in the record's public-API review triggers. Verified.
- Claim:
spec:AST-057already requires an action id, passes the id and item key toonActivate, and its deprecation mapping names both. Verified in its action row, FR1 and the deprecation mapping. - Claim: this pull request no longer edits
spec:AST-057. Verified. - Claim: INV28 lists
createSwipeamong the APIs that satisfy it. Verified. - Claim: INV28 and DEC-7 are free numbers in this record. Verified on
main. - Claim: the writing rubric results. Consistent with the added text.
- File
docs/architecture/public-component-api.md: owner-approved; three optional wording notes.
User impact
Builders can create a behavior definition once at module scope or memoize it, because its callbacks receive the item they act on.
createSwipe'sonActivatealready receives the entry'sidand the row'sitemKey, andcreateReorderable's callbacks receive their keys; futurecreate*factories follow the same rule. People using the app get fewer re-renders and no stale-closure bugs, where an action fires against an old item.Expected behavior and authority
architecture:public-component-apiINV28: a callback in acreate*config receives what it acts on as arguments (the instance key, the typed id, the event), never through a closure over render state. It applies to new APIs; released APIs that already pass their input (the Markdown plugin factories,createStaticSource, the gesture controllers) satisfy it.cixzhangon 2026-11-11, extending her swipe decision ("per action and allow it to be memoized") to everycreate*config. Rejected: a rule for swipe actions only.create*config whose callback gets the instance key, typed id or event from a closure over render state instead of an argument.INV28is in the record's globalpublic-apireview triggers, so public-API review loads it.spec:AST-057already matches thecreateSwipethat ships onmain:SwipeAction.idis required,onActivatereceives{id, itemKey}, and DEP-0017's mapping names both. This pull request no longer edits that record.createSwipeamong the released APIs that satisfy it.Numbering: INV26 and INV27 and DEC-3 to DEC-5 are held by other open records pull requests on this file, so this uses INV28 and DEC-7.
Writing rubric results
R1 narration: none; the invariant and decision are present tense.
R2 research: none in the record.
R3 evidence: none cited beyond the owner's decision.
R4 rejected alternatives: one, inside DEC-7, one line.
R5 change references: none.
R6 open questions: none added.
R7 project status: none.