Skip to content

Expand agentic component unit and native Storybook tests - #4475

Merged
Jason Morse (JasonVMo) merged 10 commits into
mainfrom
user/sriramas/agentic-control-test-gaps
Nov 11, 2026
Merged

Jason Morse (JasonVMo) merged 10 commits into
mainfrom
user/sriramas/agentic-control-test-gaps

Conversation

@srividyaramas

@srividyaramas srividyaramas commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

New tests

I went through the existing tests for all 29 agentic components and primitives and added tests for the gaps I found. This adds unit tests and 24 native Storybook tests. No tests were added for the older components or primitives.

The new tests cover:

  • Keyboard activation, held keys, focus movement and disabled controls.
  • Callbacks, caller-controlled state, animation and cleanup.
  • Accessible names, roles and activation through native accessibility actions.
  • Text and icon sizing, layout and forwarding props to the native control.

I also added eight more story files to the TypeScript checks.

Validation completed

  • Full local validation passed all 178 tasks.
  • Focused unit tests passed.
  • All 24 component contract checks, story TypeScript checks, formatting and lint checks passed.
  • All platform builds passed.
  • Native Storybook test runs passed on Win32, Windows Fabric and macOS Paper and Fabric.

Review all 29 agentic controls and add 62 unit cases plus 25 capability-described native Storybook cases. Register additional stories for strict checking; preserve legacy tests, snapshots, app exclusions and product behavior.

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

github-actions Bot commented Nov 10, 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 79 (+1) 80 (+1) 72.92k (-702b) 72.85k (-702b)
components-catalog 228 (+1) 229 (+1) 229.66k (+349b) 229.59k (+349b)
design-themed-root 55 (+4) 56 (+4) 56.26k (+998b) 56.18k (+998b)
design-color-lib 6 (+0) 6 (+0) 6.27k (+0b) 6.27k (+0b)
design-theme-state-legacy-source 49 (+1) 50 (+1) 52.96k (-841b) 52.89k (-841b)
design-legacy-theme 42 (+0) 42 (+0) 39.11k (+0b) 42.91k (+0b)
design-legacy-theme-from-flex 58 (+4) 58 (+4) 60.70k (+824b) 64.51k (+822b)
design-fluent-light-theme 7 (+0) 7 (+0) 18.74k (+0b) 22.59k (+0b)
design-fluent-theme 35 (+0) 35 (+0) 27.46k (+4b) 31.25k (-1b)
design-fluent-hc-theme 32 (+0) 32 (+0) 27.34k (+0b) 31.13k (+0b)
design-flex-theme 29 (-4) 29 (-4) 14.30k (-9.07k) 14.29k (-9.07k)
design-flex-cool-theme 26 (New) 26 (New) 12.51k (New) 12.50k (New)
design-flex-warm-theme 26 (-7) 26 (-7) 12.28k (-11.15k) 12.27k (-11.15k)

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

@srividyaramas

Copy link
Copy Markdown
Contributor Author

First native results at 4e703a1

The Win32 jobs successfully built the packages, bundled the stories and started the actual host. They found two failures that the mocked unit tests could not establish.

Lane Actual result
Accessible 229 passed, one failed; 64 physical-input cases excluded.
Physical 212 passed, one failed, one unsupported; one quarantined case. Another 116 work items were not run after the failure.

Tag: TAG-004 reports a native accessibility action once without removing itself received one accessibility-click delivery, but onPress was never called. The captured target remained visible, enabled and exposed as a button. Contract/implementation review confirms a native activation gap, not a reason to add a fixture handler or silently switch to a physical click. The assertion remains.

Checkbox: the new keyboard traversal/toggle and stale-key-up cancellation cases passed. The held-key case toggled correctly but reported zero press-release callbacks where the fixture expected one. The native fallback and callback contract are being checked before changing that expectation.

These are not all-platform passes. The PR remains a draft; other platform jobs are still running.

@srividyaramas

Copy link
Copy Markdown
Contributor Author

Completed CI at 4e703a1

Run 42732166279 has finished. JS/build/package checks passed, including Android, iOS, macOS, Windows and Win32 builds. The incomplete local dependency setup did not prevent the clean hosted builds.

All five native Storybook jobs failed an assertion:

Target/lane Passed Failed Unsupported Work items not run Failed check
Windows Fabric, accessible 229 1 0 49 Divider role: group, expected separator
macOS Fabric 235 1 16 153 Divider role: unknown, expected separator
macOS Paper 235 1 16 153 Divider role: textbox, expected separator
Win32, accessible 229 1 0 8 Tag accessibility activation: onPress count stays zero
Win32, physical 212 1 1 116 Checkbox held-key activation: release callback count stays zero

Counts are from the authoritative test runs, not successful helper-preparation runs. They include navigation and callbacks. Unsupported and unfinished work are not passes. Win32 physical also has one quarantined case; each macOS run has one declared unsupported case within its 16 unsupported results. Platform/input exclusions remain separate from these counts.

The Tag failure is supported by captured native state: a visible, enabled button received an accessibility action without reporting activation.

Divider's contract explicitly requires separator semantics and its implementation requests that role. The captured nodes match the intended ID/name, and normalization alone does not explain the three observed roles. This is a native projection gap, not a safe test-only correction. The raw macOS AXRole is not retained in the artifacts, so the precise provider boundary remains unlocalized.

For Checkbox, the native fallback code suggests a possible explanation, but neither a recorded native key code nor an explicit contract exception supports allowing missing callbacks. An exploratory relaxation was rejected and restored locally; no weaker assertion was committed or pushed.

The PR remains draft. The meaningful failures are retained; no physical-click substitution, synthetic fixture activation, invented unsupported marker or timeout increase was used to make them pass. These results do not establish readiness for all 29 controls.

SriRamas23 and others added 4 commits November 9, 2026 18:07
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
Preserve trigger callbacks and controlled state, reserve grouped Win32 navigation keys, and connect enabled macOS Fabric AXPress to the registered native tap. Add focused regressions including disabled native action availability, preserving every existing dependency patch and test assertion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Give Tag focus-entry editors visible dimensions and keep ProgressBar's native
geometry checks inside a sized, restored window. Preserve the original native
assertions and record ordered Menu callbacks for the Windows closing trace.

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

@JasonVMo Jason Morse (JasonVMo) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know when this is ready to go and I can sign off. The change looks good.

SriRamas23 and others added 5 commits November 10, 2026 11:28
Preserve the existing button activation contract on macOS and Windows Fabric, with focused cross-desktop regression coverage. Native qualification remains pending.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Keep the existing second-Invoke closing assertion and public Menu pipeline unchanged while exposing the native dismissal reason in the bounded story journal.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
Set aside the new second-Invoke Menu case as requested, preserving its source and failure evidence outside the PR. Remove its diagnostic-only story assembly. Keep native Text width/height requirements while measuring macOS Text layout separately from AX projection. Compare image Icon dimensions with an equivalent native Image rather than treating Image and View AX frames as identical. Native macOS qualification is pending.

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
Keep the other Popover tests unchanged. Investigate the repeated-activation case together with the deferred Menu case in a separate PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4b66f3ef-85ac-4405-bd35-dcc167a077b1
@srividyaramas
srividyaramas marked this pull request as ready for review November 10, 2026 21:41
@srividyaramas

Copy link
Copy Markdown
Contributor Author

Jason Morse (@JasonVMo) - Thanks! This is ready for your review, and all checks have passed.

I’ve deferred two new Menu and Popover accessibility tests to a separate PR. They exposed a close/reopen issue on Windows Fabric: activating an already-open trigger leaves the popup open instead of closing it. I’m investigating whether both share the same underlying cause.

@JasonVMo
Jason Morse (JasonVMo) merged commit 6b644ce into main Nov 11, 2026
19 checks passed
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