Skip to content

Sync Open Knowledge from agents-private#535

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jul 8, 2026
Merged

Sync Open Knowledge from agents-private#535
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated commits from agents-private. Rebase-merge this PR so the prepared commits land directly on public main.

…#2473)

* fix(open-knowledge): refresh worktree list on window focus

The project switcher's worktree model was fetched once per window and only
re-fetched after an in-app create, so a worktree created out-of-band (a
terminal git worktree add, or a create in another OK window) stayed hidden
until the app was restarted. Revalidate the cached model on window focus /
tab-visible, matching the focus/visibilitychange pattern PageListContext /
FileTree / GraphView already use. Wired via an injectable, ref-counted
subscribeRevalidate dep so the listener attaches on first subscribe and
detaches on last unsubscribe (no leak); load()'s in-flight coalescing bounds
focus bursts. No IPC / bridge-contract / desktop-main change.

* fix(open-knowledge): worktree flyout uses a real DropdownMenuSub submenu

Migrate the ProjectSwitcher worktree 'Search worktrees' flyout from a
controlled Popover to shadcn DropdownMenuSub/SubTrigger/SubContent. The
whole group row is the SubTrigger, so hovering or clicking it opens the
submenu with Radix safe-triangle hover and native close-on-hover-out;
opening the bare project root is the flyout's pinned default entry.

The search field lives inside the role=menu SubContent: the input stops
keydown propagation to suppress the submenu typeahead (Escape still
closes via Radix's document-level dismiss), and the list keeps manual
roving with stopPropagation on Up/Down/Enter so Radix roving does not
double-fire; ArrowLeft/Escape bubble so Radix closes the sub. Focus into
the search input is driven by an open effect because SubContent hardcodes
its own onOpenAutoFocus.

Radix anchors the submenu to its trigger and would follow the row when
the recents list scrolls, so ProjectSwitcher closes the open flyout on
scroll. The hoisted flyout setter uses a functional update so a native
sibling close cannot clobber a fresh open.

Live Electron testing showed Radix submenus open on pointermove/click
(the earlier no-pointerdown concern only affects drag-region title-bar
triggers, which this is not).

* fix(open-knowledge): restore two-target worktree row (click opens project, hover opens flyout)

Reintroduce the pre-migration two-target ergonomics on top of the
DropdownMenuSub flyout. Hovering a worktree-bearing project row (or
ArrowRight) opens the worktree flyout as before; a direct click on the
row (or Enter/Space) opens the bare project root in one click, matching a
flat row.

The whole row is still the single SubTrigger, so hover-anywhere keeps the
flyout discoverable. Radix opens the submenu on click and on the
Enter/Space/ArrowRight open keys, but its SubTrigger bails when our
handler already called preventDefault, so the row's onClick and its
Enter/Space keydown preventDefault and navigate to the project instead,
while ArrowRight still falls through to open the flyout and ArrowLeft
closes it. The Electron menu-open click fall-through guard is applied to
the row-open path, as on the flat rows.

Close-on-hover-out, close-on-scroll, the search field, and the flyout's
keyboard roving are unchanged.

* fix(open-knowledge): remove trailing branch icon from worktree search bar

* fix(open-knowledge): single-source worktree count from the flyout builder

* chore(open-knowledge): regenerate i18n catalogs after rebase onto main

GitOrigin-RevId: a8f48c2ea13d061a392ab391b745dd2be2eafa1a

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28921384208). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync inkeep-oss-sync Bot merged commit 03dd0ca into main Jul 8, 2026
1 check passed
@inkeep-oss-sync inkeep-oss-sync Bot deleted the copybara/sync branch July 8, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant