Repository navigation
1.0.62
What's Changed
Sticky project filter with ⌘G keyboard shortcut (#134)
- Sticky filter input: Moved the project filter from inside the scrollable
ProjectListinto theLeftSidebaras a fixed element above the scroll area. The filter now stays visible while scrolling through projects, rendered in aborder-bcontainer between the sidebar header and the scrollable content. - ⌘G keyboard shortcut: Added a new
nav:filter-projectsshortcut (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 unusedgit:mergeshortcut definition that occupied the same binding. - Filter input UI improvements: Increased input height and font size, added a
⌘Gkeyboard hint badge shown when the input is empty, and slightly enlarged the search icon for better visual balance. - Custom focus event:
ProjectFilterlistens for ahive:focus-project-filtercustom window event to programmatically focus and select the input, enabling the keyboard shortcut integration. - State lifted to LeftSidebar:
filterQuerystate moved fromProjectList(internal) toLeftSidebar(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.tsto validate the newnav:filter-projectsshortcut definition instead of the oldgit:mergeone.
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 streamingcodex-event-mapper.ts— Maps raw Codex SSE events into Hive's normalizedActivityEntry/ message formatcodex-activity-mapper.ts— Activity-level mapping layer for Codex tool calls and responsescodex-health.ts— Health check service for detecting Codex availability on the systemcodex-models.ts— Model catalog with pre-seeded token limits for Codex modelscodex-session-title.ts— Automatic session title generation for Codex sessionscodex-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.tsutility for stripping XML and extracting plan contentinteractionModepassed to CodexsendTurnbased on DB session mode
Codex UI Components (Renderer)
CodexFastToggle.tsx— Toggle for Codex fast/full mode with usage warning dialogFileChangeToolView.tsx— Rich rendering of CodexfileChangetool outputs with diff displaycodex-timeline.ts— Timeline construction for Codex session transcriptstranscript-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_patchpriority fix,fileChangetool wiring, kind badge default case - Updates to
AgentPickerDialog.tsxandAgentSetupGuard.tsxfor Codex provider detection and selection ModelIcon.tsx— Codex model icon support
Context & Token Usage Tracking
session.context_usageandsession.context_compactedevent 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.tsfor 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.shandrelease.shscripts - New
tsconfig.scripts.jsonfor script compilation codex-app-server-probe.tsdiagnostic 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_activitiestable (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 rawCodexManagerEvents (item.started,item.completed,task.progress,runtime.error, approval/user-input requests, etc.) into normalizedSessionActivityrecords for database persistence. - Enhanced
codex-implementer.ts: Persists both activities and canonical messages to SQLite in real-time. AddspersistActivity(),persistSyntheticActivity(), andpersistCanonicalMessages()methods. IntroducesnormalizeCodexMessageTimestamps()to guarantee monotonic ordering. OngetMessages(), 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:listanddb:sessionActivity:listexposed 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 persistedSessionMessage+SessionActivityrows. Derives tool-use parts, approval parts, and info parts from activities and injects them into the correct assistant message context. Also providesmergeCodexActivityMessages()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,SessionActivityTonetypes in bothsrc/main/db/types.tsandsrc/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
AlertDialogtoCodexFastTogglethat warns users fast mode consumes 2X their plan usage before enabling it for the first time. Once accepted, subsequent toggles bypass the dialog. - New
codexFastModeAcceptedsetting: Added a persisted boolean inuseSettingsStore(defaultfalse) that tracks whether the user has acknowledged the fast mode usage warning. Wired intoSessionViewto passaccepted/onAcceptprops toCodexFastToggle. - Expanded test coverage: Grew the
CodexFastToggletest 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.