Repository navigation
1.0.80
What's Changed
Add Super Plan mode for interview-driven planning (#203)
- Super Plan mode: Adds a new "Super Plan" session mode that interviews the user relentlessly about every aspect of a plan before implementation. Cycles through Build → Plan → Super Plan when enabled via settings toggle.
- One-shot auto-revert: Super Plan mode is a one-shot interaction — after sending, it automatically reverts to regular Plan mode, ensuring the interview prefix is only applied once per activation.
- Settings toggle: Adds a
superPlanModeEnabledsetting (default: off) in General settings with a toggle switch. When disabled, the mode cycle stays at the existing Build ↔ Plan. - Full UI integration: Super Plan mode is supported across all entry points — session mode toggle, kanban ticket modals (plan review, review, error modes), and the worktree picker modal. Uses orange accent color and Sparkles icon to visually distinguish from Plan (violet) and Build (blue).
- Constants & helpers: Introduces
SUPER_PLAN_MODE_PREFIX,isPlanLike()helper, andstripModePrefix()in constants. Allmode === 'plan'status checks updated to useisPlanLike()so super-plan sessions show "planning" status correctly. - Type updates: Extends
SessionMode,KanbanTicket,TicketFollowupMessage, and related DB types to include'super-plan'as a valid mode value. - User bubble badge: Displays a "SUPER PLAN" badge on user messages sent in super-plan mode, similar to the existing "PLAN" badge.
- Hive server startup: Adds a
join(__dirname, '..', 'web')candidate path for headless web UI resolution. - Build pipeline: Updates all build scripts (
build:unpack,build:win,build:mac,build:mac:unsigned,build:linux) and release scripts (release.sh,release-canary.sh) to build and bundle the web UI for headless mode (pnpm build:web && cp -r dist/web out/web).
Add live session stream panel to kanban ticket modal (#202)
- New
SessionStreamPanelcomponent — Renders a real-time session message stream directly inside the kanban ticket modal, with auto-scroll, scroll-to-bottom FAB, loading/empty states, and streaming indicator - New
useSessionStreamhook — Manages full session stream lifecycle: initial message loading from the OpenCode transcript, live SSE event handling (text deltas, tool use, subagents), rAF-batched state updates, and finalization with source-of-truth refresh - Refactored
KanbanTicketModalinto three layout modes:- Full-width — In-progress edit mode shows only the session stream at near-viewport width
- Dual-pane — Plan review, review, error, and question modes show ticket actions on the left (480px) with the live session stream on the right
- Standard — Tickets with no active session use the original compact dialog
- Removed the
TicketFollowupMessagepersistence layer — The session stream panel replaces the old conversation history approach. Removed DB types (TicketFollowupMessage,TicketFollowupMessageCreate),DatabaseServicemethods (createTicketFollowupMessage,getTicketFollowupMessages), IPC handlers (kanban:followup:create,kanban:followup:getByTicket), preload bridge, GraphQL schema/resolvers/adapters, and theConversationHistoryUI component - Removed AI response capture from
useOpenCodeGlobalListener— EliminatedcaptureAIResponseForTicket,findLinkedKanbanTicket, andlastAssistantTextBySessiontracking since followup messages are no longer persisted to the database - Minor fix:
ModeTogglenow safely falls back tobuildconfig when mode is undefined
feat: add per-session token counter on kanban cards (#200)
- Token delta tracking: New
token-baselinesmodule snapshots cumulative token totals at every user-send point and computes deltas (tokens consumed during a single turn). Baselines are captured across all send sites:SessionView,KanbanTicketModal, andWorktreePickerModal. - Live + frozen display: New
useSessionTokenDeltahook provides a reactive formatted string — live-computed fromuseContextStorewhile the session is active, and read from frozenSessionStatusEntrymetadata once completed. Mirrors theuseSessionTimerpattern. - Kanban card UI: Token counter displayed inline next to the ticket title on
KanbanTicketCardin muted 11px tabular-nums styling (e.g.12.5k). formatTokenCountutility: Formats raw token counts withk/mnotation (e.g.999→999,1500→1.5k,2300000→2.3m).- Store extension:
SessionStatusEntryinuseWorktreeStatusStorenow carries an optionaltokenDeltafield, populated at all session completion points (SessionView,useOpenCodeGlobalListener). - Error handling improvements:
KanbanTicketModalnow throws on missing session/worktree/opencode-session-id instead of silently returning. Ticket mode updates moved after successful prompt. Session status cleared on followup send failure. - Tests: Comprehensive Vitest suite covering
formatTokenCount,sumAllTokens,snapshotTokenBaseline,computeTokenDelta, andSessionStatusEntrytokenDelta metadata.
Add pin/unpin and edit context actions to Kanban card context menu (#199)
- Pin/Unpin worktree — Adds a context menu item on Kanban ticket cards to pin or unpin the assigned worktree. Reads pin state from
usePinnedStoreand toggles viapinWorktree/unpinWorktree. The menu item dynamically shows "Pin worktree" (withPinicon) or "Unpin worktree" (withPinOfficon) based on current state. - Edit Context — Adds a context menu item to open the context editor for the assigned worktree via
useFileViewerStore.openContextEditor. - Both actions are conditionally rendered only when the ticket has an assigned
worktree_id. - New
lucide-reacticons imported:FileText,Pin,PinOff.
Add orphaned session support and enhanced session history (#198)
This PR implements comprehensive improvements to session history and lifecycle management, enabling users to access and view sessions from archived worktrees.
Key Features
🗂️ Orphaned Session Support
- Reopen sessions from archived worktrees in read-only mode
- Visual read-only banner with clear messaging
- Disabled input controls prevent accidental modifications
- Auto-cleanup when navigating away from the session
🔍 Enhanced Session History
- Connection name filtering and display in session search
- Ability to reopen connection sessions from history
- Search now matches against connection names
- Automatic re-search when filters change (not just keyword)
♻️ Session Lifecycle Improvements
- Clear all prompt stores before reopening sessions (questions, permissions, command approvals)
- Clear file viewer state to ensure proper session focus
- Database-first updates for consistency
- Prevents stale/malformed data from interfering with reopened sessions
🛡️ Type Safety
- Array guards in
LspToolViewprevent crashes on malformed tool data - Array guard in
QuestionToolViewfor safer rendering
Technical Changes
- Database: Extended session search to include
connection_nameand match against it - Store: Added
orphanedSessionsmap and lifecycle methods (openOrphanedSession,closeOrphanedSessions,reopenConnectionSession) - UI: Read-only banner, disabled input controls, connection badges in history
- Tab Management: Orphaned sessions appear as additional tabs, auto-removed on navigation
Add headless web mode as alternative to Electron (#197)
Introduces a full headless web mode that allows the application to run in a browser without Electron, powered by a GraphQL transport layer that replaces Electron IPC.
Server-side infrastructure
- Static file handler for serving web assets with path traversal protection and hardened URL encoding
- REST auth endpoint (
/api/auth/validate) for API key validation in web mode - Integrated static handler and auth endpoint into server config, routing, and bootstrap
- Config cleanup with
webRootwarning on misconfiguration
GraphQL schema & resolvers
- Kanban board — full schema (
kanban.graphql) with query and mutation resolvers for boards, columns, and tickets - Git operation extensions — branch diff, base64 content reads, and PR state queries (
git.graphql) - Worktree extensions — connection pinning query and project sorting query (
project.graphql) - Usage tracking — usage, file image read, and command approval GraphQL operations (
opencode.graphql,results.graphql) - Fixed
KanbanTicketColumnenum to match DB values
Transport adapter layer (client-side)
- Transport detection (
detect.ts) — auto-selects Electron IPC or GraphQL HTTP based on runtime environment - Core adapters —
db,git-ops,opencode-opscovering database, git, and opencode operations - Domain adapters —
connection-ops,terminal-ops,worktree-ops,project-ops,file-ops,file-tree-ops,script-ops,system-ops,settings-ops - Auxiliary adapters —
logging-ops,updater-ops,usage-ops,analytics-ops,kanban - GraphQL client (
client.ts) with auth header injection - Electron-only stubs for graceful degradation of unsupported features in web mode
Frontend / UI
WebAuthScreen— API key entry screen shown on initial web load- Web entry point (
main.tsxbranching) and Vite build pipeline (vite.config.web.ts) - UI adjustments — conditionally hides Electron-only features (native terminal settings, auto-update, Ghostty promotion, native file dialogs, deep link commands) via
useIsWebModehook - Adapted
Header,QuickActions,AddProjectButton,SettingsModal,FileContextMenufor web compatibility
Testing
- Comprehensive test suites for auth endpoint (296 lines) and static handler (259 lines)
- Path traversal, prefix collision, and malformed URL encoding edge cases covered
Stats
- 63 files changed, +9,310 / −3,304 lines across 21 commits