Skip to content

Conversation

@ariane-emory
Copy link
Owner

Resolves #101.

- Add fallback to select most recently updated session when no active session exists
- Merge search results with live session data to show bookmark changes immediately while filtering
- Fixes issue where bookmarked session was selected by default instead of most recent activity
- Fixes issue where bookmarked sessions didn't move between groups while filtering
- Store last_session_id in local KV store when using /new or session.new command
- Use last_session_id as default selection when opening session list from home
- Allows easily returning to the previous session by pressing Enter
- Per-instance tracking prevents interference between multiple OpenCode instances
- Falls back to most recently updated session if last_session_id is not found
Hook cannot be called inside onSelect callback. Use kv from component scope.
- Add scrollToValue(value) method to DialogSelectRef that finds the value's index and scrolls to it
- Change initial current effect to use moveTo() for proper viewport scrolling
- Call scrollToValue() after bookmark toggle to follow the session to its new position
- Use moveTo() instead of setStore() + scrollTo(0) in filter/current effect
- moveTo() properly scrolls to the selected item's position
- Remove redundant effect that only handled props.current
The scroll component wasn't ready when the effect first ran, causing
moveTo() to return early. Using setTimeout(0) defers the scroll until
after the component has rendered.
…kmark

- Add 'center' parameter to moveTo() function
- Pass center=true from effect (dialog open) and scrollToValue (bookmark toggle)
- Keyboard navigation still uses edge-scroll behavior for smooth UX
@ariane-emory ariane-emory force-pushed the feat/session-bookmarks branch from ca4373c to 059ca29 Compare January 15, 2026 00:03
Keep centering fix separate in fix/center-selected-session branch.
This branch now only contains bookmark-specific changes.
- Add getEphemeral/setEphemeral methods to KV context for in-memory storage
- Change app.tsx to use setEphemeral for last_session_id
- Change dialog-session-list to use getEphemeral for last_session_id
- Ephemeral storage is per-process, not persisted to disk
- This ensures each opencode process has its own last_session_id
- After program restart, the topmost session is selected
Resolved merge conflict by keeping both session-related routes from HEAD and command/log/agent routes from dev branch
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.

[FEATURE]: Add a way to bookmark sessions to make finding them again later easier.

2 participants