-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
webRelates to opencode on web / desktopRelates to opencode on web / desktop
Description
Describe the enhancement you want to request
Current Behavior
In the desktop (and web) version of Open Code, the steps panel (showing thinking, tool use, and other details) has a collapse/expand button that users can toggle. However, this preference is not persisted across sessions. Every time a new session is started, the expanded state resets, requiring users to manually collapse the panel again.
The panel also auto-expands when the session is actively working and auto-collapses when the session completes (as seen in packages/app/src/pages/session.tsx:337-341).
Requested Enhancement
Add persistence for the steps panel collapse/expand state in desktop/web
- Persist user's collapse preference across sessions
- Add configuration option (optional) to set default behavior (e.g., always collapsed by default)
- Respect user preference when sessions are created
Benefits
- Improved UX: Users who prefer a cleaner view without the steps panel don't need to manually collapse it in every session
- Consistency: The TUI version already has this functionality (implemented in issue [FEATURE]: Persist TUI thinking block visibility toggle or add config option #4582, completed 2025-11-28)
- Better workflow: Maintains user preferences across the application, similar to how layout, file views, and terminal state are persisted
Technical Context
Desktop/Web Implementation Location:
- State management:
packages/app/src/pages/session.tsx:247-255(in-memory store, not persisted) - Collapse button:
packages/ui/src/components/session-turn.tsx:475-511 - Auto-expansion logic:
packages/app/src/pages/session.tsx:337-341
Comparison with TUI:
- TUI has persistent settings using
kvstore (packages/opencode/src/cli/cmd/tui/context/kv.tsx) - TUI stores preferences like
thinking_visibilityandtool_details_visibility - Desktop app uses
persisted()utility for other settings (layout, file views, terminal state) but not for collapse state
Potential Implementation Approach:
- Wrap the
expandedstate with thepersisted()utility (similar to how other contexts work) - Add a user preference for "collapse all by default"
- Initialize new sessions based on this saved preference
Additional Notes
- Keyboard shortcut exists to toggle steps:
Cmd+E(Mac) /Ctrl+E(Windows/Linux) - This request is specifically about desktop/web persistence, not about the model's thinking behavior
- The TUI version already has similar functionality (issue [FEATURE]: Persist TUI thinking block visibility toggle or add config option #4582), but desktop/web does not
Metadata
Metadata
Assignees
Labels
webRelates to opencode on web / desktopRelates to opencode on web / desktop