diff --git a/src/client/changes/GitLens.tsx b/src/client/changes/GitLens.tsx
index 01574f1e..48c0bf60 100644
--- a/src/client/changes/GitLens.tsx
+++ b/src/client/changes/GitLens.tsx
@@ -19,6 +19,7 @@ import type { GitLineCounts, GitLogEntry, GitStatusEntry, GitStatusResult, GitWo
import { api, SidebarApiError } from '../api.ts'
import { builtinFileIcon, builtinFolderIcon } from '../file-icons.tsx'
import { usePolling } from '../use-polling.ts'
+import { useSubmenuFlip } from '../menu-flip.ts'
import { baseName, relativeTo } from '../paths.ts'
import { resolveSidebarPath } from '../paths.ts'
import { isZh, t } from '../locales.ts'
@@ -403,7 +404,17 @@ export function GitLens(props: GitLensProps) {
const [graphRefresh, setGraphRefresh] = useState(0)
const [changesOpen, setChangesOpen] = useState(true)
const [graphOpen, setGraphOpen] = useState(true)
- const [moreOpen, setMoreOpen] = useState(false)
+ /**
+ * The open More Actions menu: the trigger's viewport corner (null = closed).
+ * Its repo/worktree rows carry nested submenus, which the primitives anchor
+ * with static CSS growing RIGHT of the card — past the right edge of this
+ * docked panel. This menu is button-anchored (no cursor point to publish),
+ * so open/close keeps the measured corner and hands it to the same flip
+ * mechanism as the file-tree row menu.
+ */
+ const [moreMenu, setMoreMenu] = useState<{ x: number; y: number } | null>(null)
+ const moreOpen = moreMenu !== null
+ useSubmenuFlip(moreMenu)
const [branchOpen, setBranchOpen] = useState(false)
/** Commit drafts, one per scope: the Commit button asks only for a message
* and a staged row, so a draft typed against another project would submit
@@ -557,7 +568,7 @@ export function GitLens(props: GitLensProps) {
setFileMenu(null)
setHistoryMenu(null)
setConfirm(null)
- setMoreOpen(false)
+ setMoreMenu(null)
setBranchOpen(false)
}
@@ -1092,9 +1103,15 @@ export function GitLens(props: GitLensProps) {
disabled={!canCommit} onClick={commit} />
} label={t('refresh')}
disabled={busy || suggesting} onClick={() => { invalidateGitStatus(scope.sessionId); void refresh(false) }} />
-