feat(desktop): worktree-aware sidebar grouping + composer/sidebar UX fixes

Group recents as parent-repo → worktree → sessions using local git
metadata (probed over IPC, with a path-name heuristic fallback for
remote backends). Single-worktree repos collapse to one level. Sessions
order by creation time and never reshuffle on new messages.

Also: fuse the status stack to the composer border, restore icon actions
in the queue panel, fix sidebar label truncation and drag styling, hide
sticky-message attachments while pinned, and bump the terminal font.
This commit is contained in:
Brooklyn Nicholson
2026-06-12 18:18:39 -05:00
parent a118b94a85
commit e90672696e
21 changed files with 1298 additions and 140 deletions
+20 -2
View File
@@ -1,7 +1,12 @@
import type {
HermesConnection,
HermesReadDirResult,
HermesReadFileTextResult,
HermesSelectPathsOptions,
HermesWorktreeInfo
} from '@/global'
import { $connection } from '@/store/session'
import type { HermesConnection, HermesReadDirResult, HermesReadFileTextResult, HermesSelectPathsOptions } from '@/global'
export interface DesktopFsRemotePicker {
selectPaths: (options?: HermesSelectPathsOptions) => Promise<string[]>
}
@@ -75,6 +80,19 @@ export async function desktopGitRoot(path: string): Promise<string | null> {
return result.root
}
// Worktree detection runs against the LOCAL filesystem (the electron main
// process). For a remote backend the session cwds live on another machine, so
// we can't resolve them here — callers fall back to the path-name heuristic.
export async function desktopWorktrees(cwds: string[]): Promise<Record<string, HermesWorktreeInfo | null>> {
if (isDesktopFsRemoteMode()) {
return {}
}
const desktop = bridge()
return desktop.worktrees ? desktop.worktrees(cwds) : {}
}
export async function desktopDefaultCwd(): Promise<{ branch: string; cwd: string } | null> {
if (!isDesktopFsRemoteMode()) {
return null