web: give chat details a real back route

Opening a chat now pushes /chat/:id, so Android/browser Back returns to the
chat list rather than the previous destination. The conversation header owns a
compact Back to chats control matching the create pane, replacing the
full-width Back to list row on phones.
This commit is contained in:
2026-10-20 03:25:31 +01:00
parent 526c19fc21
commit c291327610
6 changed files with 90 additions and 10 deletions
+4
View File
@@ -50,6 +50,9 @@ test("top-level destinations", () => {
assert.deepEqual(parseRoute("/pipelines"), { kind: "pipelines" });
assert.deepEqual(parseRoute("/runs"), { kind: "runs" });
assert.deepEqual(parseRoute("/chat"), { kind: "chat" });
assert.deepEqual(parseRoute("/chat/ses_abc123"), { kind: "chatSession", id: "ses_abc123" });
assert.deepEqual(parseRoute("/chat/ses_a/b"), { kind: "pipelines" });
assert.deepEqual(parseRoute("/chat/"), { kind: "chat" });
assert.deepEqual(parseRoute("/settings"), { kind: "settings" });
assert.deepEqual(parseRoute("/templates"), { kind: "templates" });
});
@@ -207,6 +210,7 @@ test("serialisation is idempotent and parse(serialize(route)) preserves every ro
{ kind: "pipelines" },
{ kind: "runs" },
{ kind: "chat" },
{ kind: "chatSession", id: "ses_abc123" },
{ kind: "settings" },
{ kind: "templates" },
{ kind: "template", key: "plan" },