titlebar: await windowMaximize promise instead of setTimeout race (P2-39)

This commit is contained in:
ZacharyZhang-NY committed 2026-04-16 23:10:19 -04:00
1 parent 169f5d686c
commit ca9b94b5a6
1 file changed
+1 -2
+1 -2
View File
@@ -37,8 +37,7 @@ export default function TitleBar() {
aria-label={maximized ? "Restore" : "Maximize"}
className="titlebar-button flex h-full w-[46px] items-center justify-center text-muted-foreground transition hover:bg-muted hover:text-foreground"
onClick={() => {
void window.agentCompany.windowMaximize();
setTimeout(refreshMaximized, 50);
void window.agentCompany.windowMaximize().then(refreshMaximized);
}}
>
{maximized ? (