Skip to content

1.0.62

Choose a tag to compare

@morapelker morapelker released this 17 Mar 07:25
· 2568 commits to main since this release

What's Changed

Sticky project filter with ⌘G keyboard shortcut (#134)

  • Sticky filter input: Moved the project filter from inside the scrollable ProjectList into the LeftSidebar as a fixed element above the scroll area. The filter now stays visible while scrolling through projects, rendered in a border-b container between the sidebar header and the scrollable content.
  • ⌘G keyboard shortcut: Added a new nav:filter-projects shortcut (bound to ⌘G) that focuses the project filter input. If the left sidebar is collapsed, it auto-opens first, then focuses the input after a tick. Replaced the previous unused git:merge shortcut definition that occupied the same binding.
  • Filter input UI improvements: Increased input height and font size, added a ⌘G keyboard hint badge shown when the input is empty, and slightly enlarged the search icon for better visual balance.
  • Custom focus event: ProjectFilter listens for a hive:focus-project-filter custom window event to programmatically focus and select the input, enabling the keyboard shortcut integration.
  • State lifted to LeftSidebar: filterQuery state moved from ProjectList (internal) to LeftSidebar (parent), passed down as a prop. Filter is automatically cleared when entering connection mode.
  • Tests updated: Renamed and updated the shortcut tests in merge-shortcut-store.test.ts to validate the new nav:filter-projects shortcut definition instead of the old git:merge one.

feat: Full Codex provider integration with plan mode, context tracking, and UI (#133)

This is a comprehensive integration of Codex as a new AI provider in Hive, alongside the existing Claude Code provider. The branch includes the full backend lifecycle, event mapping, UI rendering, plan-mode workflow, context/token tracking, and an extensive test suite.

Codex Backend Services (Main Process)

  • codex-implementer.ts — Full Codex session lifecycle management (create, send turns, abort, undo/redo, get messages, get session info)
  • codex-app-server-manager.ts — Manages the Codex app-server child process, including spawn, health-check, graceful shutdown, and event streaming
  • codex-event-mapper.ts — Maps raw Codex SSE events into Hive's normalized ActivityEntry / message format
  • codex-activity-mapper.ts — Activity-level mapping layer for Codex tool calls and responses
  • codex-health.ts — Health check service for detecting Codex availability on the system
  • codex-models.ts — Model catalog with pre-seeded token limits for Codex models
  • codex-session-title.ts — Automatic session title generation for Codex sessions
  • codex-utils.ts — Shared utilities for Codex integration

Codex Plan Mode

  • Support for Codex's plan-then-implement workflow with plan approval before implementation
  • Progressive plan card rendering in the UI
  • proposedPlan.ts utility for stripping XML and extracting plan content
  • interactionMode passed to Codex sendTurn based on DB session mode

Codex UI Components (Renderer)

  • CodexFastToggle.tsx — Toggle for Codex fast/full mode with usage warning dialog
  • FileChangeToolView.tsx — Rich rendering of Codex fileChange tool outputs with diff display
  • codex-timeline.ts — Timeline construction for Codex session transcripts
  • transcript-refresh.ts — Transcript refresh utilities for live-updating sessions
  • Major updates to SessionView.tsx (~800 lines changed) — Codex session rendering, context bar pre-seeding, reconnect hydration
  • Updates to ToolCard.tsx — apply_patch priority fix, fileChange tool wiring, kind badge default case
  • Updates to AgentPickerDialog.tsx and AgentSetupGuard.tsx for Codex provider detection and selection
  • ModelIcon.tsx — Codex model icon support

Context & Token Usage Tracking

  • session.context_usage and session.context_compacted event handling in the global listener
  • Token usage hydration on reconnect so the context bar shows accumulated usage
  • Pre-seeded Codex model limits for immediate context bar display

Auto-scroll & Streaming Fixes

  • Fixed scroll interruption issues during SDK streaming
  • Terminal escape sequence rendering improvements
  • New ansi-utils.ts for ANSI escape sequence handling

Fast Mode Usage Warning

  • Warning dialog when enabling fast mode to inform users about increased token consumption

Database & Schema

  • Schema migrations to support Codex provider data (schema version bumps)
  • Database handler additions for Codex session types

GraphQL / Server

  • Updated schema types (project.graphql, system.graphql) with Codex/terminal enum values
  • Generalized GraphQL resolvers for Codex routing via sdk-dispatch.ts
  • Updated mutation and query resolvers for Codex session operations

IPC & Preload

  • New IPC channels for Codex operations in opencode-handlers.ts
  • Preload type declarations updated for new Codex window APIs
  • Prompt options IPC routing

Release & Build

  • Updated release-canary.sh and release.sh scripts
  • New tsconfig.scripts.json for script compilation
  • codex-app-server-probe.ts diagnostic script

Test Suite (~25 new test files)

  • phase-22/session-1: Agent SDK manager Codex routing, SDK dispatch
  • phase-22/session-2: Agent setup guard, settings provider, system info detection
  • phase-22/session-3: Codex health checks, implementer skeleton, model catalog
  • phase-22/session-4: App server manager lifecycle, Codex session lifecycle
  • phase-22/session-5: Child session routing, event mapper, prompt streaming
  • phase-22/session-6: Abort/getMessages, permission requests, question prompts
  • phase-22/session-7: getSessionInfo, model selection, session titles, undo/redo
  • phase-22/session-8: Backward compatibility, fast toggle, timeline, UI polish, transcript refresh
  • phase-22/session-9: Regression smoke tests, GraphQL Codex routing
  • phase-22/session-10: Codex proposed plan tests
  • Updated existing tests for compatibility with new Codex code paths

Add durable Codex session activity tracking and timeline rendering (#131)

  • New session_activities table (schema v9): Introduces a persistent store for Codex session activities — tool executions, approvals, user-input requests, task progress, errors, and plan events — with indexed queries by session, turn, and timestamp.
  • Activity mapper (codex-activity-mapper.ts): New service that translates raw CodexManagerEvents (item.started, item.completed, task.progress, runtime.error, approval/user-input requests, etc.) into normalized SessionActivity records for database persistence.
  • Enhanced codex-implementer.ts: Persists both activities and canonical messages to SQLite in real-time. Adds persistActivity(), persistSyntheticActivity(), and persistCanonicalMessages() methods. Introduces normalizeCodexMessageTimestamps() to guarantee monotonic ordering. On getMessages(), loads from persisted DB rows first (falling back to live thread read). Emits synthetic activity records for plan-ready, approval-resolved, and user-input-resolved events. Suppresses duplicate idle status events on turn completion.
  • New IPC channels: db:sessionMessage:list and db:sessionActivity:list exposed via preload for renderer access to persisted Codex data.
  • Codex timeline library (codex-timeline.ts): New renderer-side module that reconstructs the full session timeline from persisted SessionMessage + SessionActivity rows. Derives tool-use parts, approval parts, and info parts from activities and injects them into the correct assistant message context. Also provides mergeCodexActivityMessages() for enriching live OpenCode messages with activity data.
  • Enhanced SessionView.tsx: Codex sessions now load durable state first (DB-persisted messages + activities), with retry logic for suspicious role-grouping artifacts. Derives pending plans from persisted ExitPlanMode tool-use parts. Disables localStorage transcript caching for Codex sessions (DB is the source of truth). Simplifies plan acceptance for Codex to send "Implement the plan." instead of echoing the full plan text. Fixes streaming state cleanup when plan.ready arrives.
  • Type definitions: New SessionActivity, SessionActivityCreate, SessionActivityKind, SessionActivityTone types in both src/main/db/types.ts and src/preload/index.d.ts.
  • Tests: New test suites for codex timeline derivation, session view Codex integration, proposed plan detection, and prompt streaming.

Add fast mode usage warning dialog (#130)

  • Fast mode confirmation dialog: Added an AlertDialog to CodexFastToggle that warns users fast mode consumes 2X their plan usage before enabling it for the first time. Once accepted, subsequent toggles bypass the dialog.
  • New codexFastModeAccepted setting: Added a persisted boolean in useSettingsStore (default false) that tracks whether the user has acknowledged the fast mode usage warning. Wired into SessionView to pass accepted / onAccept props to CodexFastToggle.
  • Expanded test coverage: Grew the CodexFastToggle test suite from 1 test to 6 tests covering: rendering, direct toggle when already accepted, confirmation dialog appearance, accepting the dialog, canceling the dialog, and toggling off without a dialog.