Repository navigation
Repair the two frontend CI breaks main inherited from #11373 - #11416
Conversation
Frontend CI has been failing typecheck on main since planSidebarDrop started answering STAY. Its return type is SidebarDropPlan | STAY | null, and the test read .action, .cue and .effects straight off that, which is 61 errors in one file and a red Frontend CI on every open pull request. assert.ok only rules out null, so a plannedDrop helper rules out both and returns the plan. Asserting rather than casting is the point: where a test expects a plan and the planner answers STAY, it now fails saying so, instead of reading a property off a string somewhere further on. Two inline dereferences that used ?. are wrapped the same way, and the asserts that only checked for null are gone where the helper already covers them. Test-only. tsc -b and tsc -p tsconfig.test.json are both clean, and the frontend suite is 8165 passed, 0 failed.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
ToolGroupRoot started reading message.status through useAuiState in #11373. useAuiState throws outside an AuiProvider, and the harness page renders those primitives on their own, so it died before publishing __probeReady and the Tool activity collapse regression job has failed on main ever since. The page has no runtime and no message, and "no message is running" is the scene it wants, so it provides the two things useAuiState actually uses: a subscribe for useSyncExternalStore and the symbol-keyed state its selector reads. Anything else a component reaches for still throws, which is the right outcome for a harness: faking a whole client would hide the next dependency like this one. Verified in chromium against the dev server, with the page loaded both ways: without this change __probeReady undefined, page error "You are using a component or hook that requires an AuiProvider" with it no page errors, 14 probe elements, __probeReady published The sibling collapse-layout harness does not render a tool group and was already clean; it was checked the same way.
|
@codex review |
|
@codex security review |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…unslothai#11416) * Narrow the drag planner's outcome before reading a plan off it Frontend CI has been failing typecheck on main since planSidebarDrop started answering STAY. Its return type is SidebarDropPlan | STAY | null, and the test read .action, .cue and .effects straight off that, which is 61 errors in one file and a red Frontend CI on every open pull request. assert.ok only rules out null, so a plannedDrop helper rules out both and returns the plan. Asserting rather than casting is the point: where a test expects a plan and the planner answers STAY, it now fails saying so, instead of reading a property off a string somewhere further on. Two inline dereferences that used ?. are wrapped the same way, and the asserts that only checked for null are gone where the helper already covers them. Test-only. tsc -b and tsc -p tsconfig.test.json are both clean, and the frontend suite is 8165 passed, 0 failed. * Give the tool-activity harness the provider its components now need ToolGroupRoot started reading message.status through useAuiState in unslothai#11373. useAuiState throws outside an AuiProvider, and the harness page renders those primitives on their own, so it died before publishing __probeReady and the Tool activity collapse regression job has failed on main ever since. The page has no runtime and no message, and "no message is running" is the scene it wants, so it provides the two things useAuiState actually uses: a subscribe for useSyncExternalStore and the symbol-keyed state its selector reads. Anything else a component reaches for still throws, which is the right outcome for a harness: faking a whole client would hide the next dependency like this one. Verified in chromium against the dev server, with the page loaded both ways: without this change __probeReady undefined, page error "You are using a component or hook that requires an AuiProvider" with it no page errors, 14 probe elements, __probeReady published The sibling collapse-layout harness does not render a tool group and was already clean; it was checked the same way.
The break
Frontend CI fails typecheck on
mainitself, and has been sinceplanSidebarDropstarted answeringSTAY:The planner returns
SidebarDropOutcome = SidebarDropPlan | typeof STAY | null. The test reads.action,.cueand.effectsstraight off that.assert.ok(plan)rules outnulland leaves"stay", so every dereference is an error.Every open pull request inherits it. Frontend CI is red on
main, so it is red on all of them, and none of them touched the sidebar.The fix
A
plannedDrophelper that rules out both and returns the plan:Asserting instead of casting is the point. A cast would make the type error go away and leave a test that reads
undefinedoff a string when the planner answersSTAY, failing somewhere that does not say why. This fails at the call, naming what came back.27 plan bindings are wrapped, two inline
?.dereferences with it, and theassert.oklines that only checked for null are dropped where the helper already covers them. The tests that expectSTAYornullare untouched: they compare the outcome directly and never dereference it.The second break, same cause
ToolGroupRootstarted readingmessage.statusthroughuseAuiStatein the same merged PR. That hook throws outside anAuiProvider, andsmoke-tool-activity-main.tsxrenders those primitives on their own, so the page died before publishing__probeReady:That is the
Tool activity collapse regression (Playwright)job, red onmainsince.The harness has no runtime and no message, and "no message is running" is the scene it wants, so it now provides exactly what
useAuiStateuses: asubscribeforuseSyncExternalStoreand the symbol-keyed state its selector reads. Anything else a component reaches for still throws, deliberately. Faking a whole client would hide the next dependency like this one instead of surfacing it.Checked in chromium against the dev server, both ways:
__probeReadyrequires an AuiProviderThe sibling
smoke-collapse-layoutharness renders no tool group and was already clean; it was loaded the same way to confirm.I could not run the Playwright job itself here, since it drives a full Studio with a model loaded. What is verified is the thing that was failing: the page now reaches
__probeReady.Checks
npx tsc -bclean,npx tsc -p tsconfig.test.jsonclean, both from 61 errors.npm testinstudio/frontend: 8165 passed, 0 failed.prettierandeslintclean on the changed file.src/file is touched, so no app behaviour moves. The two changed files are a test and a test harness page.Pairs with #11404, which fixes the three Python contract guards that are red on
mainfor the same reason. Between them, an open PR's CI starts meaning something again.