Skip to content

Agentic Card: extend contract tests and native structure checks - #4411

Merged
Jason Morse (JasonVMo) merged 6 commits into
mainfrom
user/sriramas/card-spec-tests
Oct 29, 2026
Merged

Jason Morse (JasonVMo) merged 6 commits into
mainfrom
user/sriramas/card-spec-tests

Conversation

@srividyaramas

@srividyaramas srividyaramas commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Why

Adds unit coverage and native Storybook checks for Card's structured reading order and an independently enabled nested action inside a disabled selectable surface. The product implementation is unchanged.

Testing

  • Adds 7 unit regression cases; the owning components-package unit suite and existing snapshots passed in the recorded local run.
  • Package build, lint, formatting, Storybook type-checking, and component contract checks passed in the recorded local validation.
  • 2 new non-input native Storybook checks passed on Win32 Paper/REX at this exact branch head.

Keyboard, pointer, and wheel input were disabled for that native run. Existing input-dependent skips are not counted as passes. Subsequent native CI results are recorded below.

The Storybook TypeScript configuration also includes Card's story file so its native test callbacks are type-checked.

These initial results were local; exact-head CI results are recorded below. No all-platform or overall readiness claim is made. The Windows tooling repair landed separately in #4400 and is not included in this PR.

Native test follow-up

Both macOS renderer reports reached the authored checks, but the geometry check failed because the 302-high native host left zero preview height above Storybook's 300-high addons panel. The earlier nonshrinking story wrapper alone did not resolve that host constraint.

At commit 9616c361537ed6b734a6a5e49ca71e813b35584b, the geometry callback requests sufficient native window space, waits for positive header geometry, and restores the original window rectangle in finally. All positive section-height and reading-order assertions remain, with an additional positive-height assertion for the nested action. There are no runtime changes, platform skips, timeout changes, or physical-input requirements.

Package build, lint, formatting, Storybook type-checking, contract checks, 568 owning-package unit cases, and 8 snapshots passed. Both authored Card callbacks passed once, without skips or retries, in the exact-head Win32 run. macOS and Windows bundles passed. CI subsequently confirmed both callbacks passed on Windows Fabric and Win32, but both Mac renderers still timed out waiting for positive header geometry. The nested-action check passed on both Mac renderers.

That correction's cache-cleared root aggregate passed all 175 tasks on an unpublished combined validation branch, with the Card, Checkbox, and Dropdown source subtrees verified identical to their isolated PR heads. The tooling and combined validation commits are not included in this PR.

Geometry diagnostics

Commit 6fd046ff8f9ddc4c0dba6c0f7868538d0c6de530 adds failure-only diagnostics, not another claimed Mac fix. The callback records requested, returned, and read-back window bounds and, on failure, reports current native window, preview, and section rectangles before restoring the original window. The original error remains the cause; diagnostic read errors are explicit. Existing assertions, timeout, and cleanup remain unchanged.

Package checks, 568 unit cases and 8 snapshots, both bundles, diagnostic-path probes, and both exact-head Win32 callbacks passed. The final cache-cleared combined root aggregate did not pass: 104 tasks passed and the unchanged Storybook sourceConfig subprocess hit its existing 10-second limit. A focused reproduction failed the same way on the restored original tooling baseline. No timeout, concurrency, or tooling setting was changed.

That diagnostic head subsequently produced the native Mac evidence described below. No extra unit cases or native callbacks are added by these follow-ups, and no all-platform or readiness claim is made.

Window positioning correction

Both diagnostic Mac reports recorded the same requested window at (89,322) with size 1024x768, but returned and read-back bounds were only 935x385; the preview had height 4. The native driver applies position before size and returns a fresh AX frame. These observations support a native screen/work-area constraint; the exact private constraint algorithm is not established.

Commit 007b890d53b064a322ad2ca41317129fa4d71a4e changes only the temporary requested origin to (0,0) so resizing is not constrained by the old offset. The system may adjust that request; the callback does not require an exact window size. All geometry assertions, diagnostics, waits, and restoration of the original position and size remain unchanged. No runtime, driver, native helper, or framework code changes.

Package checks, 568 unit cases and 8 snapshots, both bundles, regression probes, and both exact-head Win32 callbacks passed. The cache-cleared root aggregate again recorded 104 passed tasks and one unchanged sourceConfig subprocess timeout. This time the isolated baseline's two sourceConfig tests passed; prior exact-baseline failures remain recorded. This is not a fully green local root aggregate. No timeout or concurrency setting was changed.

At this exact head, CI run 40801316209 passed all reported checks, including license/cla. The actual macOS Fabric and Paper reports each confirm both authored Card callbacks passed once, with no authored skips, retries, or flakiness. Each renderer reported 214 passed, 69 skipped, and zero failed, unsupported, incomplete, retried, or flaky tests; those global skips are not passes. The Card CI follow-up is resolved. The local root aggregate limitation above remains, and this is not an all-platform or overall readiness claim.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Tree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.

Scenario Modules-Mac (Δ) Modules-Win (Δ) Size-Mac (Δ) Size-Win (Δ)
components-button 64 (+0) 65 (+0) 50.63k (+0b) 50.55k (+0b)
components-catalog 214 (+0) 215 (+0) 205.49k (+0b) 205.41k (+0b)
design-theme-state 34 (+0) 35 (+0) 30.15k (+0b) 30.08k (+0b)
design-themed-root 38 (+0) 39 (+0) 32.12k (+0b) 32.04k (+0b)
design-color-lib 6 (+0) 6 (+0) 6.33k (+0b) 6.33k (+0b)
design-theme-state-legacy-source 35 (+0) 36 (+0) 31.81k (+0b) 31.73k (+0b)
design-legacy-theme-from-flex 58 (+0) 59 (+0) 97.77k (+0b) 97.63k (+0b)

The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail.


View bundle-size workflow run

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
SriRamas23 and others added 4 commits October 28, 2026 16:26
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Record exact resize request, response and read-back bounds. On failure, include bounded window, preview and section measurements while retaining the original error as cause and restoring the original window in finally. This is diagnostic evidence, not a macOS geometry fix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Request the primary-screen top-left so the host can use its available screen height instead of retaining the old offset during native size clamping. Keep actual bounds diagnostics, positive section geometry, reading order, existing waits and exact original-window restoration unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
@JasonVMo
Jason Morse (JasonVMo) merged commit c4481d1 into main Oct 29, 2026
18 checks passed
@JasonVMo
Jason Morse (JasonVMo) deleted the user/sriramas/card-spec-tests branch October 29, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants