feat(ux) Expandable (ctrl-O) and scrollable approvals in alternate buffer mode. (#17640)

This commit is contained in:
Jacob Richman
2026-01-27 16:06:24 -08:00
committed by GitHub
parent ff6547857e
commit d165b6d4e7
34 changed files with 1177 additions and 496 deletions

View File

@@ -416,10 +416,13 @@ export function renderHookWithProviders<Result, Props>(
const result = { current: undefined as unknown as Result };
let setPropsFn: ((props: Props) => void) | undefined;
let forceUpdateFn: (() => void) | undefined;
function TestComponent({ initialProps }: { initialProps: Props }) {
const [props, setProps] = useState(initialProps);
const [, forceUpdate] = useState(0);
setPropsFn = setProps;
forceUpdateFn = () => forceUpdate((n) => n + 1);
result.current = renderCallback(props);
return null;
}
@@ -439,8 +442,10 @@ export function renderHookWithProviders<Result, Props>(
function rerender(newProps?: Props) {
act(() => {
if (setPropsFn && newProps) {
setPropsFn(newProps);
if (arguments.length > 0 && setPropsFn) {
setPropsFn(newProps as Props);
} else if (forceUpdateFn) {
forceUpdateFn();
}
});
}