Conversation
The flag was set ad hoc at the top of six specs, with two competing typings (a globalThis cast and a declare global block). vitest.setup.ts sets it for every test, types.d.ts declares it, and the setup file is type-checked but excluded from the emitted declarations.
Same layout as packages/ui: vitest.setup.ts sets the flag, types.d.ts declares it, the spec drops its declare global block.
librowski
marked this pull request as ready for review
September 15, 2026 11:13
librowski
requested review from
lukasz-jazwa,
piotrblaszczyk and
szymon-t-sc
as code owners
September 15, 2026 11:13
librowski
added this pull request to stack #151
September 15, 2026 11:13
piotrblaszczyk
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IS_REACT_ACT_ENVIRONMENTwas set at the top of seven specs (six in ui, one in AI Studio), with two competing typings: aglobalThiscast in five files and adeclare globalblock with aneslint-disable no-varin the other two. Neither package has testing-library, so nothing set the flag centrally. In AI Studio the app tsconfig excludes spec files, so itsdeclare globalwas never type-checked at all.Changes
Per package (
packages/ui,apps/ai-studio):vitest.setup.tssets the flag once; the vitesttestblock loads it throughsetupFiles.types.d.tsdeclaresvar IS_REACT_ACT_ENVIRONMENT: booleanindeclare global, so specs need no cast.tsconfig.jsonincludes the setup file so tsc checks it (AI Studio picks it up by default, its tsconfig has noinclude), andvite-plugin-dtsexcludes it so nothing lands indist.Checks
setupFilesremoved: the ui menu spec logs 44 "not configured to support act" warnings and AI Studio logs 8; with the setup none.= 'x'in each setup file fails the package typecheck, so both files are type-checked.disthas no new files, publint andcheck:built-csspass; AI Studio builds.