feat(ui): expose desktop session actions in header

Add a dedicated desktop header menu for the active session while keeping recent-session switching available when the sidebar is closed. Match inline rename behavior with the sidebar and expose rename, copy ID, share, export, archive, and delete actions with localized feedback.

Automatically copy newly created share links, keep share/unshare state synchronized across live and global stores, and normalize stale upstream unshare responses so the UI immediately reflects successful unsharing.

Require Markdown exports to load every available message page before formatting the conversation. Abort incomplete root exports, retain explicit child-session skip warnings, and guard complete-history pagination against failures and cursor cycles.
This commit is contained in:
Bohdan Triapitsyn
2026-07-31 21:02:23 +03:00
parent aae889b904
commit a6fb7193dc
20 changed files with 564 additions and 72 deletions
+7 -1
View File
@@ -843,7 +843,13 @@ export async function shareSession(sessionId: string): Promise<Session | null> {
export async function unshareSession(sessionId: string): Promise<Session | null> {
const sessionDirectory = getSessionDirectory(sessionId)
const result = await sdk().session.unshare({ sessionID: sessionId, directory: sessionDirectory })
const session = stripSessionDiffSnapshots(assertSdkData(result, "session.unshare"))
// A successful unshare is authoritative even when the upstream response
// echoes the pre-mutation session with its old share URL. Normalize that
// stale field at the action boundary before publishing to either store.
const session = {
...stripSessionDiffSnapshots(assertSdkData(result, "session.unshare")),
share: undefined,
}
useGlobalSessionsStore.getState().upsertSession(session)
updateLiveSession(session, sessionDirectory)
return session