You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recent sidebar: first context menu after a window starts lacks Mark as unread and closes itself a second later #1977
Build: OpenCode (Rune) desktop 0.0.0-dev-517, Windows 11. Sidebar layout: Settings › Experimental › Organize vertical sidebar → Recent.
Steps
Open a window and right-click a session under 最近 while the window is still doing its first load — right after starting the app, or in a new window (Ctrl+Shift+N).
Leave the pointer where it is.
Actual
The first menu is missing the mark read/unread row: Rename, Pin, Mute, Hide, Copy ▸, Export…, Archive, Delete… (8 rows). There is no 标记为未读 / Mark as unread.
About a second later the menu fades out on its own. In the recording the pointer comes to rest at ~0.7 s and the menu is gone by 1.4 s.
Right-clicking again gives the full menu, now with 标记为未读 (9 rows), and it stays open.
The mark read/unread row is gated on Menus::unread_generation != 0 (features/session-menu/src/lib.rs, read_item); that generation is set by unread::poll only after the checkout booted and storage is ready (features/session-menu/src/unread.rs), which is scheduled in INGEST_HYDRATE (apps/desktop/src/session/menu.rs, session_menu.unread). A menu opened before that first poll is built from unhydrated state — exactly the difference between the two menus in the recording.
The dismissal happens as that state finishes loading. The drawn popup otherwise closes on an outside press, a key, a pick or an explicit dismiss (crates/opencode-ui/src/popup/state.rs), so the rebuild that runs at that moment is worth checking.
The second menu is ~55 px lower only because the right-click point moved down between the two opens; it is the same row.
Expected
Either build the menu once its state is ready, or keep the open menu and let the missing row appear when it loads. It should not close while the pointer is still.
Immediate unread & preference hydration:unread and preferences in features/session-menu now hydrate before Frame 1 during window setup (and eagerly before building any session context menu) directly from the in-memory boot packet (opencode.global.dat is already in BOOT_NAMESPACES), then reconcile cleanly when SQLite stage B finishes. First context menus after launch and in new windows (Ctrl+Shift+N) now include Mark as unread / Mark as read and accurate Mute / Unmute state right away instead of waiting for boot_ready() and INGEST_HYDRATE.
Self-dismissal audit: Every popup::close / popup::dismiss call site was checked — background hydration and sidebar/session refreshes do not dismiss open context menus. Note also that in the recording, the first 8-row menu was opened on the busy computer use row (busy sessions intentionally omit Mark as unread), and clicking on the idle Clash VPS row dismissed that first menu via popup-scrim before the next right-click opened the 9-row menu for Clash VPS.
Verified locally:pwsh scripts/guardrails.ps1 (11/11), cargo check -p opencode-feature-session-menu -p opencode-desktop, and cargo clippy -p opencode-feature-session-menu --no-deps -- -D warnings. Not verified locally: live Windows/macOS/Linux GUI window interaction.
Please reopen if you still see a missing row or unexpected dismissal on a build containing 7a778fba.
Activity
Hona commentedon Dec 1, 2026
Fixed in #1996 (
7a778fba).unreadandpreferencesinfeatures/session-menunow hydrate before Frame 1 during windowsetup(and eagerly before building any session context menu) directly from the in-memory boot packet (opencode.global.datis already inBOOT_NAMESPACES), then reconcile cleanly when SQLite stage B finishes. First context menus after launch and in new windows (Ctrl+Shift+N) now include Mark as unread / Mark as read and accurate Mute / Unmute state right away instead of waiting forboot_ready()andINGEST_HYDRATE.popup::close/popup::dismisscall site was checked — background hydration and sidebar/session refreshes do not dismiss open context menus. Note also that in the recording, the first 8-row menu was opened on the busycomputer userow (busy sessions intentionally omit Mark as unread), and clicking on the idleClash VPSrow dismissed that first menu viapopup-scrimbefore the next right-click opened the 9-row menu forClash VPS.Verified locally:
pwsh scripts/guardrails.ps1(11/11),cargo check -p opencode-feature-session-menu -p opencode-desktop, andcargo clippy -p opencode-feature-session-menu --no-deps -- -D warnings. Not verified locally: live Windows/macOS/Linux GUI window interaction.Please reopen if you still see a missing row or unexpected dismissal on a build containing
7a778fba.