Skip to content

1.0.80

Choose a tag to compare

@morapelker morapelker released this 29 Mar 16:48
· 2338 commits to main since this release

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 superPlanModeEnabled setting (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, and stripModePrefix() in constants. All mode === 'plan' status checks updated to use isPlanLike() 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 SessionStreamPanel component — 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 useSessionStream hook — 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 KanbanTicketModal into 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 TicketFollowupMessage persistence layer — The session stream panel replaces the old conversation history approach. Removed DB types (TicketFollowupMessage, TicketFollowupMessageCreate), DatabaseService methods (createTicketFollowupMessage, getTicketFollowupMessages), IPC handlers (kanban:followup:create, kanban:followup:getByTicket), preload bridge, GraphQL schema/resolvers/adapters, and the ConversationHistory UI component
  • Removed AI response capture from useOpenCodeGlobalListener — Eliminated captureAIResponseForTicket, findLinkedKanbanTicket, and lastAssistantTextBySession tracking since followup messages are no longer persisted to the database
  • Minor fix: ModeToggle now safely falls back to build config when mode is undefined

feat: add per-session token counter on kanban cards (#200)

  • Token delta tracking: New token-baselines module 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, and WorktreePickerModal.
  • Live + frozen display: New useSessionTokenDelta hook provides a reactive formatted string — live-computed from useContextStore while the session is active, and read from frozen SessionStatusEntry metadata once completed. Mirrors the useSessionTimer pattern.
  • Kanban card UI: Token counter displayed inline next to the ticket title on KanbanTicketCard in muted 11px tabular-nums styling (e.g. 12.5k).
  • formatTokenCount utility: Formats raw token counts with k/m notation (e.g. 999 → 999, 1500 → 1.5k, 2300000 → 2.3m).
  • Store extension: SessionStatusEntry in useWorktreeStatusStore now carries an optional tokenDelta field, populated at all session completion points (SessionView, useOpenCodeGlobalListener).
  • Error handling improvements: KanbanTicketModal now 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, and SessionStatusEntry tokenDelta 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 usePinnedStore and toggles via pinWorktree / unpinWorktree. The menu item dynamically shows "Pin worktree" (with Pin icon) or "Unpin worktree" (with PinOff icon) 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-react icons 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 LspToolView prevent crashes on malformed tool data
  • Array guard in QuestionToolView for safer rendering

Technical Changes

  • Database: Extended session search to include connection_name and match against it
  • Store: Added orphanedSessions map 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 webRoot warning 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 KanbanTicketColumn enum 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-ops covering 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.tsx branching) 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 useIsWebMode hook
  • Adapted Header, QuickActions, AddProjectButton, SettingsModal, FileContextMenu for 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