fix(webui): reconcile threads after browser resume

This commit is contained in:
chengyongru
2026-07-28 16:25:08 +08:00
committed by chengyongru
parent 78cf68c291
commit ae089aa3ae
39 changed files with 6151 additions and 243 deletions
+3
View File
@@ -738,6 +738,7 @@ export default function App() {
} else {
client.updateUrl(url);
}
client.updateMaxFrameBytes(boot.limits?.transport.max_frame_bytes);
setState((current) =>
current.status === "ready" && current.client === client
? {
@@ -769,6 +770,7 @@ export default function App() {
const runtimeHost = createRuntimeHost(runtimeSurface, boot.runtime_capabilities);
const client = new NanobotClient({
url,
maxFrameBytes: boot.limits?.transport.max_frame_bytes,
socketFactory: runtimeHost.socketFactory,
onReauth: async () => {
try {
@@ -1206,6 +1208,7 @@ function Shell({
useEffect(() => {
return client.onError((error) => {
if (error.kind !== "workspace_scope_rejected") return;
if (error.chatId && error.chatId !== activeChatIdRef.current) return;
setWorkspaceError(t("errors.workspaceScopeRejected.body"));
void refreshWorkspaces();
});