fix(journal): decouple broker from session

The broker connection now persists across session changes. Joining or switching a session swaps subscriptions instead of reconnecting, and a lobby lets sessions be listed and created before joining one.

Fixes session switching being a no-op (the store only updated local state) and session creation being unreachable before connecting. Also removes the dead ConnectionBar and the no-op hydrateFromServer/setSessionId store calls.
This commit is contained in:
2026-09-13 13:23:50 +08:00
parent 59f87bffda
commit 30ec8a43cf
9 changed files with 350 additions and 293 deletions
+5 -3
View File
@@ -14,9 +14,12 @@ export {
} from "./registry";
export type { MessageTypeDef, StreamMessage } from "./registry";
export {
connectStream,
connectBroker,
joinSession,
switchSession,
leaveSession,
disconnectStream,
hydrateFromServer,
resolveBrokerUrl,
sendMessage,
revertLatest,
canRevert,
@@ -42,7 +45,6 @@ export { ConnectDialog } from "./ConnectDialog";
export { InviteDialog } from "./InviteDialog";
export { SessionDropdown } from "./SessionDropdown";
export { CreateSessionDialog } from "./CreateSessionDialog";
export { ConnectionBar } from "./ConnectionBar";
export { StreamView } from "./StreamView";
export { StreamMessageCard } from "./StreamMessage";
export { ComposePanel } from "./ComposePanel";