Skip to content

1.0.45

Choose a tag to compare

@morapelker morapelker released this 26 Feb 16:07
· 2946 commits to main since this release

What's Changed

Add PostHog analytics with privacy opt-out (#72)

Adds anonymous PostHog analytics to Hive with a privacy-first opt-out model. This enables product usage tracking to understand how features are used while respecting user privacy.

What's included

  • TelemetryService (src/main/services/telemetry-service.ts): Singleton service wrapping the posthog-node SDK. Manages a per-install anonymous distinct_id (stored in SQLite), supports track(), identify(), setEnabled(), and graceful shutdown() with flush. Includes API key guard, client deduplication, and error handling.

  • IPC bridge & preload: Three new IPC channels (telemetry:track, telemetry:setEnabled, telemetry:isEnabled) registered in the main process, exposed to the renderer as window.analyticsOps with full TypeScript types in index.d.ts.

  • App lifecycle telemetry: Tracks app_launched on startup with platform/version identification, and app_session_ended with session duration on quit. Telemetry flushes before database close on shutdown.

  • IPC handler instrumentation (9 events across 7 handler files):

    • project_added — when a project is created
    • worktree_created — when a worktree is created
    • connection_created — when a connection is established
    • session_started — when an AI session starts (with agent_sdk property)
    • prompt_sent — when a prompt is sent (with agent_sdk property)
    • git_commit_made / git_push_made — on successful git operations
    • script_run — on setup/run/archive script execution (with type property)
    • worktree_opened_in_editor — when opening a worktree in an external editor
  • Onboarding tracking: Tracks onboarding_completed when the agent setup guard completes.

  • Privacy Settings UI (SettingsPrivacy.tsx): New "Privacy" section in the Settings modal with a toggle to enable/disable anonymous analytics. Syncs state through analyticsOps IPC and updates the settings store. Includes a new "Privacy" tab in the settings navigation.

  • Test mocks: window.analyticsOps mock added to test/setup.ts so existing and new tests work without hitting PostHog.

  • Documentation: PRD and implementation plan documents added under docs/.

Events are only tracked on success

All IPC handler events are gated behind result.success checks where applicable, ensuring failed operations are not tracked.

Add Supercharge feature for automated plan implementation via worktree duplication (#71)

Adds a Supercharge feature that enables one-click automated plan implementation by duplicating the current worktree and dispatching a multi-step AI message flow:

  • New "Supercharge" button in PlanReadyImplementFab — appears (violet-styled) between Handoff and Implement only when the using-superpowers skill is detected in available slash commands
  • Full supercharge handler in SessionView — duplicates the worktree, creates a new session, queues /using-superpowers as the initial message followed by the plan content as a subagent implementation prompt, then navigates to the new worktree
  • Follow-up message queue in useSessionStore — new pendingFollowUpMessages Map enables ordered multi-step message flows that auto-send sequentially after each AI idle event (setPendingFollowUpMessages / consumeFollowUpMessage)
  • Auto-dispatch on idle — when a session transitions to idle with queued follow-up messages, the next message is automatically sent as a prompt instead of finalizing, keeping the session working through the queue without user intervention
  • Error handling for follow-up prompt dispatch to prevent the UI from getting stuck in "sending" state on failure
  • Fix: skip isLoading flash when sessions are already cached in loadSessions — prevents SessionView unmount/remount during supercharge flow which was causing the pending message to be consumed but never sent

Files changed

File Changes
PlanReadyImplementFab.tsx New onSuperpowers + superpowersAvailable props; conditional Supercharge button
SessionView.tsx hasSuperpowers detection, handlePlanReadySuperpowers handler, follow-up auto-dispatch in idle handler
useSessionStore.ts pendingFollowUpMessages state + setPendingFollowUpMessages / consumeFollowUpMessage actions; loadSessions isLoading fix

Fix Agent SDK plan not displaying until refresh (#70)

Fixes a race condition where Agent SDK plans (ExitPlanMode tool cards) would not render until the user manually refreshed the session. The root cause was a timing issue between multiple streaming events (plan.ready, content_block_start, content_block_stop) arriving in unpredictable order.

Persist slash commands to DB and fix init message detection (#69)

  • Fix SDK init message detection: The SDK sends init as { type: 'system', subtype: 'init' }, not { type: 'init' }. Updated the condition to match on type === 'system' && subtype === 'init', which was preventing slash commands from being cached during session initialization.
  • Persist slash commands to SQLite: Cached slash commands are now saved to the database (via persistCommandsToDb) whenever they are populated from the SDK init message or from supportedCommands(). This allows commands to survive across app restarts / session boundaries.
  • DB fallback in listCommands: When the in-memory cache is empty (e.g. fresh app start before a session is created), listCommands now falls back to loading persisted commands from the DB cache written by a previous session.
  • Support pending:: sessions: Added a code path in opencode-handlers.ts so that pending sessions (not yet materialized in the DB) can route through the Claude Code implementer to serve slash commands from its DB cache, rather than falling through to an empty result.
  • Enhanced logging: Slash command cache log messages now include command names for easier debugging.

Fix settings pane scrolling issue (#68)

  • Fix settings modal content overflow: Added min-h-0 to the flex container inside the settings modal (SettingsModal.tsx). Without this, the flex child could grow beyond the modal's h-[70vh] constraint, preventing the settings content pane from scrolling when its content exceeds the available height. The min-h-0 override allows the flex layout to properly constrain and enable overflow scrolling within the settings panels.

Add custom Figma MCP tool UI in ToolCard (#67)

  • Adds first-class Figma MCP tool support to the ToolCard component, giving all 13 Figma MCP operations (e.g. mcp__figma__get_screenshot, mcp__figma__generate_figma_design, etc.) branded UI treatment instead of the generic fallback
  • Figma icon (lucide-react Figma) with the Figma brand purple (#a259ff) used consistently across collapsed headers, expanded state, and success indicators
  • Human-readable operation labels — maps internal tool names like get_design_context → "Design context", generate_diagram → "Generate diagram", etc. via FIGMA_OPERATION_LABELS
  • Color-coded operation badges — operations are grouped by category with distinct badge colors:
    • 🔵 Blue — read/fetch operations (get_screenshot, get_design_context, get_metadata, get_variable_defs, get_figjam)
    • 🟣 Purple — generative/creation operations (generate_figma_design, generate_diagram, create_design_system_rules)
    • 🟢 Teal — code-connect operations (get_code_connect_map, add_code_connect_map, get_code_connect_suggestions, send_code_connect_mappings)
    • ⚪ Zinc — utility (whoami)
  • Routing to compact layout — Figma tools now use the CompactFileToolCard path with CollapsedContent, matching the existing pattern for search and LSP tools
  • Explicit fallback renderer — isFigmaTool is routed to FallbackToolView for now, with a comment noting a dedicated FigmaToolView can be added later

Files changed

  • src/renderer/src/components/sessions/ToolCard.tsx — all changes in a single file (+96 lines, -6 lines)