Repository navigation
1.0.60
What's Changed
Hide archive button for default worktrees (#127)
- Prevent archiving default worktrees: The "Archive Worktree" button was previously shown for all worktrees with merged branches, including the default (primary) worktree. Archiving the default worktree is invalid and would break the project, so the button is now hidden for default worktrees.
- GitPushPull.tsx: Added a
isSelectedBranchDefaultWorktreememo that looks up whether the selected branch's worktree is the project default. The archive button in the cross-worktree merge panel is now conditionally hidden when the target is a default worktree. - Header.tsx: Added a
!selectedWorktree?.is_defaultguard to the merged-PR archive button, preventing it from appearing when viewing the default worktree.
Prefix worktree directories with project name (#126)
- Prefixes worktree directory names with the project name using the format
<projectName>--<breedName>instead of just<breedName>. This applies to all three worktree creation paths: standard creation, forking (versioned branches), and PR checkout. - Updates the existing-directory scan to strip the
<projectName>--prefix before checking for breed name collisions, ensuring unique name selection continues to work correctly with the new naming scheme.
Why
When multiple projects share the same parent worktrees directory (~/.hive-worktrees/hive-electron/), worktree folders like golden-retriever give no indication of which project they belong to. Prefixing with the project name (e.g., my-project--golden-retriever) makes it immediately clear which project owns each worktree directory, improving discoverability and reducing confusion when browsing the filesystem.
Changes
All changes are in src/main/services/git-service.ts:
createWorktree— Directory now created as<projectName>--<breedName>; filesystem scan strips prefix before uniqueness check.forkWorktree— Directory now created as<projectName>--<newBranchName>.checkoutPR— Directory now created as<projectName>--<breedName>; filesystem scan strips prefix before uniqueness check.
Add multi-provider usage tracking (Anthropic + OpenAI) (#124)
- OpenAI usage backend: New
openai-usage-service.tsin main process that reads Codex credentials from~/.codex/auth.jsonor macOS Keychain, handles JWT token decoding/expiry/refresh with deduplication, and fetches usage data from the OpenAI WHAM endpoint with 401 retry logic - IPC & preload bridge: Added
usage:fetchOpenaiIPC channel and exposedwindow.usageOps.fetchOpenai()to the renderer - Dual-provider usage store: Rewrote
useUsageStoreto track Anthropic and OpenAI usage independently with separate state, debounce timers, and loading flags. AddedfetchUsageForProvider(provider),setActiveProvider(provider), and backward-compatiblefetchUsage() - Shared helpers: Exported
resolveUsageProvider(session)(infers provider fromagent_sdk,model_provider_id, ormodel_id) andnormalizeUsage(provider, anthropicUsage, openaiUsage)(converts OpenAI data into the commonUsageDatashape) - Shared types: Added
UsageProvider,OpenAIUsageData, andOpenAIUsageResulttypes insrc/shared/types/usage.ts - Provider-aware UI:
UsageIndicatornow detects the active session's provider, shows the corresponding icon (Claude/OpenAI), usesnormalizeUsagefor unified display, has a dynamic tooltip title, and only renders Anthropicextra_usagecredit info - Provider-aware global listener:
useOpenCodeGlobalListenerresolves the idle session's provider on completion and callsfetchUsageForProviderinstead of the genericfetchUsage