Repository navigation
1.0.69
What's Changed
Add connection rename UI with tooltip and improved blur handling (#152)
This PR enhances the ConnectionItem component with a key UX improvement for connections with custom names:
- Tooltip for custom connection names: When a connection has a custom name, hovering shows a tooltip with the underlying project name(s) and branch(es)
This feature helps users understand which projects are part of a connection when they've given it a custom name.
Add GitHub PR review comments viewer tab (#151)
Adds a full-featured PR Review Comments tab to the file sidebar that lets users browse, filter, and navigate inline GitHub PR review comments — and optionally attach them as context to AI chat sessions.
New IPC channel: git:getPRReviewComments
- Uses GitHub CLI's GraphQL API to fetch all review threads (with replies) for a given PR number
- Extracts
baseRefName, comment metadata, thread structure, diff hunks, and author info - Exposed through preload as
window.gitOps.getPRReviewComments()
New shared type: PRReviewComment (src/shared/types/git.ts)
- Typed interface for review comments shared across main, preload, and renderer processes
New Zustand store: usePRReviewStore
- Manages comments keyed by worktree ID, with loading/error states
- Provides selection (checkbox) tracking, reviewer filtering (hide/show by author), and "attach to chat" workflow
- Derived helpers:
getVisibleComments,getGroupedByFile,getThreads,getUniqueReviewers
New components
PrReviewViewer— Main sidebar panel with reviewer filter chips, refresh button, file-grouped comment list, and a sticky footer for "Add to chat" actionPrReviewFileGroup— Collapsible file section showing root comments with reply countsPrCommentCard— Compact comment row with avatar, author, line number, snippet preview, outdated badge, and checkboxPrCommentGutter— Monaco view-zone integration that renders threaded comment cards inline between diff lines (like GitHub's "Files changed" tab), usingcreatePortalinto Monaco view zones withResizeObserver-based auto-sizing
Enhancements to existing components
FileSidebar— New "Comments" tab (visible only when a PR is attached to the worktree); auto-switches away if PR is detachedMonacoDiffView— AcceptsscrollToLine,scrollTrigger, andprReviewWorktreeIdprops; auto-scrolls to target line after editor + view zones are ready; defaults to inline mode for PR review diffsMainPane— Passes new PR review props through toMonacoDiffView; uses compound key to force remount on PR review navigationSessionView— PR comment attachments are serialized as<pr-comment>XML blocks prepended to prompts (code, plan, and ask modes); attachments are cleared after send; inlinePrCommentAttachmentschip bar shown above the textareauseFileViewerStore—ActiveDiffandDiffTabtypes extended withscrollToLine,scrollTrigger,prReviewWorktreeId;setActiveDiffauto-increments scroll trigger
Styling
- Added
.pr-comment-htmlCSS rules for rendering GitHubbodyHTML(code blocks, links, lists, blockquotes, images) - Updated CSP to allow
img-src https:for GitHub avatars
Add drag-and-drop file attachment from Finder (#150)
- Drag-and-drop from Finder: Users can now drag files from macOS Finder (or any file manager) directly into the Hive window to attach them to the active coding session. A visual overlay appears during the drag — blue when a session is active, amber warning when no session is open.
- Attachment type refactor: The
Attachmenttype is now a discriminated union (kind: 'data'for inline base64 images/PDFs,kind: 'path'for file-path references). Images dropped from Finder are read as base64 data URLs; all other file types are attached by path and serialized as XML<attached_files>references in the message. - Shared utilities extracted:
buildMessageParts,MAX_ATTACHMENTS, andisImageMimeare moved to a newfile-attachment-utils.tsmodule, eliminating three duplicated message-building blocks inSessionView.tsx. - File-type restriction removed:
AttachmentButtonno longer restricts toimage/*,.pdf— any file type can now be attached.
Improve command parsing and security settings UX (#149)
This PR enhances the command approval security system with robust bash command parsing and improved user experience in security settings:
- Smart Bash Command Parser: Implements a sophisticated parser that correctly handles quotes (single/double), heredocs, command substitutions (
$(...)and backticks), nested structures, and escaped characters when splitting commands on&& - Security Settings Search: Adds search/filter functionality to the allowlist and blocklist in security settings, making it easier to manage large pattern lists
- Improved Pattern Suggestions: Refines the suggestion algorithm to provide exactly 4 relevant options (or fewer for short commands), ordered from most general to most specific
- Better Command Display: Updates the command approval prompt to use the smart parser for accurate command visualization
- Consistent Parsing Logic: Mirrors the parsing implementation between
CommandFilterService(main process) andpermissionUtils(renderer) to ensure consistent behavior across OpenCode and Claude Code security systems - Comprehensive Tests: Adds test suite covering edge cases like nested quotes, heredocs, command substitutions, and complex real-world commands
Replace SyntaxHighlighter with CodeMirror 6 inline editor (#147)
Replaces the read-only react-syntax-highlighter code viewer with a full CodeMirror 6 editor embedded in the FileViewer, enabling inline file editing with a complete save pipeline, dirty-state tracking, and external change detection.
CodeMirror 6 Editor
- New
CodeMirrorEditor.tsxcomponent with oneDark theme, line numbers, bracket matching, undo/redo, and native Cmd+F search cm-languages.tsmaps ~30 file extensions to CodeMirror language extensions for syntax highlighting- Removed
FileSearch.tsx(superseded by CodeMirror's built-in search) and all Prism/react-syntax-highlighter imports - Installed
codemirrorand 17@codemirror/*packages
File Save Pipeline
- Backend:
file-ops.tsservice with content validation and directory checks; new IPCwrite-filehandler - Preload:
window.fileOps.writeFile()bridge - Editor: CM6
Mod-skeymap triggers save with toast feedback and git status refresh
Dirty State Tracking
- Per-file unsaved change tracking by comparing editor content against original loaded content
- Dirty indicator in tabs (dot replaces ✕ icon; ✕ reappears on hover)
UnsavedChangesDialogwith three-button flow (Save / Don't Save / Cancel) shown before closing dirty tabs- Keyboard shortcut (
Cmd+W) routed throughrequestCloseFileso dirty files always prompt - Background dirty tabs are focused before showing dialog to ensure correct FileViewer is mounted
- Bulk close operations (
closeAll,closeOthers,closeToRight) clean up dirty state maps
External File Change Detection
ExternalChangesBanner— amber warning banner when an open file changes on disk (e.g., AI agent edit, git pull)- File watcher subscription with own-save suppression to avoid false positives
- Reload / Keep Mine options
- Handles file deletion events with error state and store cleanup
Preview Sync
- Markdown preview renders edited (unsaved) content via
latestContentReffallback - SVG preview regenerates data URI from edited content on mode switch
Tests
- 19 new tests in
test/file-viewer/file-editor.test.tscovering store actions andcm-languagesmappings