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
+10 -1
View File
@@ -320,6 +320,14 @@ export function useSync() {
[messageLoader, touch],
)
const loadCompleteHistory = useCallback(
async (sessionID: string, targetDirectory: string) => {
touch(sessionID, targetDirectory)
await messageLoader.loadComplete({ directory: targetDirectory, sessionID })
},
[messageLoader, touch],
)
const prefetchSession = useCallback(
async (sessionID: string, targetDirectory: string) => {
if (getRuntimeKey() !== runtimeKey) return
@@ -396,6 +404,7 @@ export function useSync() {
syncSession,
prefetchSession,
loadMore,
loadCompleteHistory,
hasMore,
isLoading,
isComplete,
@@ -405,6 +414,6 @@ export function useSync() {
confirm: optimisticConfirm,
},
}),
[syncSession, prefetchSession, loadMore, hasMore, isLoading, isComplete, optimisticAdd, optimisticRemove, optimisticConfirm],
[syncSession, prefetchSession, loadMore, loadCompleteHistory, hasMore, isLoading, isComplete, optimisticAdd, optimisticRemove, optimisticConfirm],
)
}