feat: add URL parameter syncing for session and player
Implement URL search parameter synchronization for `session` and `player` to allow for bookmarkable links. Added `sessionName` to the journal stream state to support displaying human-readable session names in the UI. Improved layout transitions and updated the JournalPanel to show more detailed connection information.
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
createSession,
|
||||
deleteSession,
|
||||
disconnectStream,
|
||||
setSessionId,
|
||||
} from "../stores/journalStream";
|
||||
import { journalSetState } from "../stores/journalStream";
|
||||
|
||||
@@ -38,7 +39,7 @@ export const ConnectionBar: Component = () => {
|
||||
const handleSessionSelect = async (id: string) => {
|
||||
try {
|
||||
await hydrateFromServer(id);
|
||||
journalSetState("sessionId", id);
|
||||
setSessionId(id);
|
||||
} catch (e) {
|
||||
setError("Failed to load session");
|
||||
}
|
||||
@@ -56,7 +57,7 @@ export const ConnectionBar: Component = () => {
|
||||
<span class="text-xs text-gray-500">connected</span>
|
||||
<Show when={stream.sessionId}>
|
||||
<span class="text-xs font-mono bg-gray-100 px-1.5 py-0.5 rounded">
|
||||
{stream.sessionId}
|
||||
{stream.sessionName || stream.sessionId}
|
||||
</span>
|
||||
</Show>
|
||||
<div class="flex-1" />
|
||||
|
||||
Reference in New Issue
Block a user