fix(web): make the web console work end-to-end
- Pair through the public POST /api/v1/pair and persist the device scopes; keep the allow-listed next deep link. Rename the manual field to pairing code. - Authenticate the WebSocket with the raw device token (strip Bearer) and recover from a 401 by clearing the connection once. - Fix chat payloads: setModel/setThinking, attention/diff responses, subagent dispatch items, queue ids/mode, task output and WS resume since. - Render exactly one assistant message per turn: one-to-one snapshot/history merge plus a stale-delta guard after message_end (fixes PONGONG). - Fix dialogs (content above the overlay), unknown-session deep links (error + retry, no silent fallback), device list/revoke, status identity and live pairing code, reconnect banner and Playwright selectors.
This commit is contained in:
1 parent
5572ac0d84
commit
0ef019f58d
57 files changed
+3549
-684
No files matched your search
@@ -40,6 +40,31 @@ describe("i18n catalogs", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("defines every shipped UI string", () => {
|
||||
// Regression guard: these were referenced by src/pages/status.tsx and the
|
||||
// chat task renderers but missing from both catalogs.
|
||||
for (const key of [
|
||||
"status.infoError",
|
||||
"status.healthError",
|
||||
"status.resourcesError",
|
||||
"status.modelsError",
|
||||
"status.devicesError",
|
||||
"status.tasksError",
|
||||
"chat.steerMode",
|
||||
"chat.taskExitCode",
|
||||
]) {
|
||||
expect(enFlat[key], `en ${key}`).toBeTruthy();
|
||||
expect(zhFlat[key], `zh ${key}`).toBeTruthy();
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps interpolation params aligned across catalogs", () => {
|
||||
const params = (value: string) => [...value.matchAll(/\{(\w+)\}/g)].map((match) => match[1] ?? "").sort();
|
||||
for (const [key, value] of Object.entries(enFlat)) {
|
||||
expect(params(zhFlat[key] ?? ""), key).toEqual(params(value));
|
||||
}
|
||||
});
|
||||
|
||||
it("covers every prototype namespace", () => {
|
||||
for (const prefix of [
|
||||
"common.",
|
||||
|
||||
Reference in new issue
Block a user