fix(webui): correlate chat requests and cancel stale reconnects (#6617)

* fix(webui): correlate chat requests and cancel stale reconnects

* refactor(webui): remove chat request capability negotiation

* docs(webui): clarify version pairing and cover HTTP startup

* test(webui): focus lifecycle coverage and clarify support policy
This commit is contained in:
chengyongru authored and GitHub committed 2026-11-12 14:44:38 +08:00
1 parent 9f7ae6fb7b
commit 1046a37be1
16 files changed
+478 -138

No files matched your search

+4 -3
View File
@@ -611,8 +611,9 @@ export default function App() {
const bootstrapSecretRef = useRef("");
const refreshReadyClient = useCallback(
async (client: NanobotClient, fallbackSurface: RuntimeSurface) => {
async (client: NanobotClient, fallbackSurface: RuntimeSurface, signal?: AbortSignal) => {
const boot = await fetchBootstrap("", bootstrapSecretRef.current);
signal?.throwIfAborted();
const url = deriveWsUrl(boot.ws_path, boot.token, boot.ws_url);
const runtimeSurface = resolveRuntimeSurface(boot.runtime_surface, fallbackSurface);
const runtimeHost = createRuntimeHost(runtimeSurface, boot.runtime_capabilities);
@@ -661,9 +662,9 @@ export default function App() {
url,
maxFrameBytes: boot.limits?.transport.max_frame_bytes,
socketFactory: runtimeHost.socketFactory,
onReauth: async () => {
onReauth: async (signal) => {
try {
const refreshed = await refreshReadyClient(client, runtimeSurface);
const refreshed = await refreshReadyClient(client, runtimeSurface, signal);
return refreshed.url;
} catch {
return null;