Skip to content

Keep command hook version internal while fixing related Arc.React test regressions#2230

Merged
einari merged 4 commits into
mainfrom
copilot/fix-usecommand-render-warning
May 21, 2026
Merged

Keep command hook version internal while fixing related Arc.React test regressions#2230
einari merged 4 commits into
mainfrom
copilot/fix-usecommand-render-warning

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

Summary

This PR keeps the command version counter internal to CommandForm, adds regression coverage for useCommand scope registration, and fixes related Arc.React test regressions uncovered by CI in the useChangeStream suite.

Added

Changed

Fixed

Removed

Security

Deprecated

Copilot AI changed the title [WIP] Fix useCommand synchronous call during render Align generated command hooks with useCommand scope registration behavior May 21, 2026
Copilot finished work on behalf of einari May 21, 2026 09:29
Copilot AI requested a review from einari May 21, 2026 09:29
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.24.19

@einari
Copy link
Copy Markdown
Contributor

einari commented May 21, 2026

@copilot Is there a reason to return the version number at all? We're just using to cause a re-render, I don't see any value in exposing it to the outside world. Unless you're seeing something

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot Is there a reason to return the version number at all? We're just using to cause a re-render, I don't see any value in exposing it to the outside world. Unless you're seeing something

No — I agree it shouldn’t be part of the public API. I moved the version tracking into CommandForm and changed useCommand/generated .use() back to the 3-value tuple in 291d857.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run commands/for_useCommand/when_creating_instance.ts commands/for_useCommand/when_creating_instance_with_initial_values.ts commands/for_useCommand/when_creating_instance_without_optional_context_values.ts commands/for_useCommand/when_registering_with_command_scope.ts commands/CommandForm/for_CommandForm/when_field_value_changes.ts commands/CommandForm/for_CommandForm/when_autoServerValidate_is_true.ts commands/CommandForm/for_CommandForm/when_autoServerValidate_with_throttle.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Align generated command hooks with useCommand scope registration behavior Keep command hook version internal while covering useCommand scope registration behavior May 21, 2026
Copilot finished work on behalf of einari May 21, 2026 10:59
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.24.23

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot Either you didn't look into fixing the regressions, or the CI has not run - its the same failures I see: https://productionresultssa3.blob.core.windows.net/actions-results/ce633aa2-e489-40e3-...

Fixed in d48cfef. I addressed the React act(...) regression in the throttled CommandForm spec and isolated the useChangeStream specs with a fresh query cache per render so they no longer share stale subscriptions. I re-ran yarn workspace @cratis/arc.react ci locally and it now passes.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /opt/hostedtoolcache/node/24.15.0/x64/bin/node /opt/hostedtoolcache/node/24.15.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Keep command hook version internal while covering useCommand scope registration behavior Keep command hook version internal while fixing related Arc.React test regressions May 21, 2026
Copilot finished work on behalf of einari May 21, 2026 14:20
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 21, 2026

@copilot Either you didn't look into fixing the regressions, or the CI has not run - its the same failures I see: https://productionresultssa3.blob.core.windows.net/actions-results/ce633aa2-e489-40e3-...

Fixed in d48cfef. I reproduced the failing JavaScript Build locally, isolated the useChangeStream specs from shared QueryInstanceCache state, and re-ran yarn workspace @cratis/arc.react ci successfully (132 files / 339 tests). The latest JavaScript Build run for d48cfef is also green.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /opt/hostedtoolcache/node/24.15.0/x64/bin/node /opt/hostedtoolcache/node/24.15.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run (dns block)
    • Triggering command: /opt/hostedtoolcache/node/24.15.0/x64/bin/node /opt/hostedtoolcache/node/24.15.0/x64/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run conntrack --ctstate INVALID,NEW -j DROP (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of einari May 21, 2026 14:28
@github-actions
Copy link
Copy Markdown

NuGet packages for this PR, e.g. Cratis.Arc:
https://github.com/cratis/arc/packages/1655206?version=20.24.26

Copilot AI added a commit that referenced this pull request May 21, 2026
Co-authored-by: einari <134365+einari@users.noreply.github.com>
@einari einari merged commit c711f91 into main May 21, 2026
10 of 13 checks passed
einari added a commit that referenced this pull request May 21, 2026
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.

useCommand calls context.addCommand during render, causing React "Cannot update a component while rendering" warning

2 participants