mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-30 09:09:35 +08:00
* fix(client): keep client types compatible with React 18 and 19 - SlotComponent returns ReturnType<FunctionComponent>, which is ReactNode under React 18 and ReactNode | Promise<ReactNode> under React 19, so FC-typed components register under both. - useInvalidFocus returns MutableRefObject<HTMLDivElement | null>, the ref type the other hooks use for both majors. - Submit handlers take SyntheticEvent instead of FormEvent, which @types/react 19 deprecates. Regenerate the Cordis inspect catalog. Refs #9214 * test(client): accept React 18 and 19 rendering in client tests The assertions accept both majors, so the same tests pass before and after the React 19 dependency switch: - a detached callback ref is checked by its first argument, which is null in both; React 19's development build appends undefined ones; - fake-timer advances that update state run inside act; - the quota notice waits for the toast its own dismissal removes; - the models refresh clears its spy after the loading frame; - SessionProvider is checked by its props, without the legacy context argument React 18 passes; - the renderer cleanup test no longer requires a console.error, which React 19 does not write inside act; - statements that discard a rendered ReactNode use void, since React 19's ReactNode includes a promise; - forge tests query the replaced Restore button again, edit the form inside act, and reuse one review queue per page as the plugin does; - the test-runtime case releases and replaces the panel source in one step. Refs #9214 * fix(ui-slots): apply the children render check to FC-typed components RendersCheck infers the component props through SlotComponent, whose return type follows React's FunctionComponent. Under React 19 an FC-typed component returns ReactNode | Promise<ReactNode>, which the previous `=> ReactNode` pattern missed, so an FC that declared children without consuming renderSlot registered without the check. The type chain now registers such a component as a negative case. Refs #9214 * test(ui-shortcuts): wait for the recorder focus after mount The editor enables the recorder in one commit and focuses it in a passive effect. The mount helper waited only for the enabled button, so a test could press keys before the focus effect ran; the editor ignores keys outside the focused recorder. Under React 19 this left the recorder idle in CI. The helper now waits until the recorder has focus. Refs #9214