Repository navigation
1.0.83
What's Changed
Fix new ticket placement in todo column (#220)
- Fix default sort order for new kanban tickets: Previously, when creating a new ticket without an explicit
sort_order, it defaulted to0, causing all new tickets to stack at the top of the column and collide with existing tickets. Now, the database is queried for the current maximumsort_orderwithin the same project and column (excluding archived tickets), and the new ticket is placed at the bottom (max + 1).
fix(kanban): resolve session stream failures for sessions not in memory store (#219)
- DB fallback for session & worktree resolution: When a kanban ticket references a session that isn't in the in-memory Zustand store (e.g. worktree not loaded in sidebar), the modal now falls back to the DB via
findSessionByIdandwindow.db.worktree.get()to resolve both the session record and its worktree path. - Session hydration into Zustand store: New
hydrateSession()method onuseSessionStoreinjects DB-loaded sessions intosessionsByWorktreeorsessionsByConnectionso thatgetWorktreeStatus()and zustand selectors can find them going forward. sessionsByConnectionlookup: Session status and record selectors now also searchsessionsByConnection(not justsessionsByWorktree), fixing sessions attached via connections instead of worktrees.pending::session ID resolution: When the Zustand store still holds a placeholderpending::UUIDopencode session ID, the modal now re-reads from the DB to resolve the real materialized ID, and updates the store so other components pick it up.- Global
session.materializedevent handling:useOpenCodeGlobalListenernow handles thesession.materializedevent to update the Zustand store with the real SDK session ID — critical for kanban-created sessions whereSessionView/useSessionStreamare never mounted. - Pre-warm message cache on modal open: A new
sessionReadystate drives a reconnect →getMessagessequence (mirroringSessionView.initializeSession()) before renderingSessionStreamPanel, ensuring the backend's message cache is warm. - Retry logic for empty
getMessagesresults:useSessionStreamnow retries once (after 800ms) if the initialgetMessagescall returns empty, handling race conditions where the backend hasn't finished loading session data. - Early dual-pane layout commitment: New
wantsDualPaneflag commits to the dual-pane layout as soon as the ticket has a session ID, showing a loading spinner instead of a narrow empty modal while async lookups resolve. Falls back to standard layout only when the DB lookup definitively fails. - Plan review buttons gated on
pendingPlan: Action buttons (Implement, Handoff, Supercharge) are now only rendered whenpendingPlanis non-null, matchingSessionView's gating behavior. - Bug fixes: Fixed
reconnectcall usingworktreePathinstead ofworkingPath; preservedconnection_idfrom DB sessions (was hardcoded tonull).
Compaction loading state UI & session performance optimizations (#218)
- Compaction loading state UI: Adds a visual "Compacting" indicator with a red-themed indeterminate progress bar when the AI session is compacting conversation context. The backend now emits a
compaction_startedevent so the UI can show this state before the compaction result arrives. - Virtualized message list: Extracts the message rendering loop into a new
VirtualizedMessageListcomponent powered by@tanstack/react-virtual, enabling efficient rendering of long conversation threads without mounting every message DOM node at once. - Database composite indexes: Adds a schema migration (v16) with composite indexes on
sessionsandworktreestables (worktree_id/status/updated_at,connection_id/status/updated_at,project_id/status/last_accessed_at,status/last_message_at) to accelerate common queries. - Memoized tab components: Wraps
SessionTabandConnectionSessionTabwithReact.memoto prevent unnecessary re-renders when sibling tabs update. - Granular Zustand selectors in SessionTabs: Replaces the full-store destructure of
useSessionStore()with individual selectors anduseShallowfor collection-valued state, reducing re-render scope. - Skip redundant transcript reload on idle reconnect: When reconnecting to an idle session, skips the second
loadMessagescall since the initial load already has the complete transcript. - Scroll container callback ref: Uses a callback ref +
useStatefor the scroll container so that@tanstack/react-virtual's virtualizer reliably receives the element on first render.
perf: fix sessions taking a very long time to open (#217)
- Virtualized message list: Extract the flat
.map()message rendering fromSessionViewinto a newVirtualizedMessageListcomponent using@tanstack/react-virtual. Only visible messages (plus a small overscan buffer) are rendered in the DOM, preventing linear memory/CPU growth in long conversations. - Fix virtualizer scroll element timing: The virtualizer's
useLayoutEffectran before the parent's ref was attached (React processes layout effects bottom-up), causinggetScrollElement()to returnnullpermanently. Fixed by using a ref callback +useStateso the scroll element triggers a re-render when the DOM element becomes available. - Fix memo-defeating patterns: Memoize
streamingMessagewithuseMemo, wraponRedoRevertinuseCallback, replace content-awareestimateSizewith a static value (sincemeasureElementcorrects), and convertrenderItemfromuseCallbackto a plain function (consumed synchronously). - Granular Zustand selectors in SessionTabs: Replace the single
useSessionStore()destructure (~25 properties, re-rendering on ANY store change) with individual selectors. Map/Set state values useuseShallowto avoid reference-change re-renders. This preventsSessionTabsfrom re-rendering during streaming events and other unrelated store updates. - Memoize tab components: Wrap
SessionTabandConnectionSessionTabwithReact.memo()so they only re-render when their props actually change, instead of on every parent state change. - Skip redundant
loadMessageson idle reconnect: When reconnecting to an existing OpenCode session,initializeSession()was callingloadMessages()twice with the same session ID. The second call is only needed when the session is busy (the agent may have produced new messages in between). For idle/retry sessions the first load already has the complete transcript. - Composite database indexes: Add migration v16 with composite indexes on
sessions(worktree_id, status, updated_at),sessions(connection_id, status, updated_at),worktrees(project_id, status, last_accessed_at), andworktrees(status, last_message_at)to eliminate full-table scans on filtered sorted queries.
feat: Add Jira integration with JQL query import (#214)
Adds full Jira Cloud integration, allowing users to search and import Jira issues into the kanban board via JQL queries.
New Features
- JiraProvider (
jira-provider.ts): CompleteTicketProviderimplementation for Jira Cloud REST API v3- Basic Auth via
base64(email:token)for Jira Cloud API - JQL-based issue search using the new
/rest/api/3/search/jqlendpoint with cursor-based pagination - Status category mapping:
done→ closed,indeterminate→ in_progress,new→ open - Issue status transitions via the Jira transitions API (
getAvailableStatuses,updateRemoteStatus) - Error handling for 401 (auth), 429 (rate limit), and JQL syntax errors with clear user messages
- Basic Auth via
- ADF-to-Markdown converter (
adf-to-markdown.ts): Lightweight walker that converts Atlassian Document Format JSON to Markdown, supporting all common node types (paragraphs, headings, lists, code blocks, blockquotes, rules) and inline marks (bold, italic, code, links, strikethrough) - JiraImportModal (
JiraImportModal.tsx): Full-featured import modal with:- JQL query input via textarea with
Cmd/Ctrl+Entershortcut - 3-state status badges (open / in_progress / closed)
- Cursor-based pagination (forward/back)
- Multi-select and bulk import via
window.ticketImport
- JQL query input via textarea with
- Import dropdown: Replaced the single import button in the kanban tab bar with a
DropdownMenuoffering "Import from GitHub" and "Import from Jira" options - Jira provider icon:
ClipboardListicon with blue theme colors for visual distinction
Type System & Mapping Updates
- Added
'jira'to theTicketProviderIdunion type - Extended
RemoteIssue.statewith'in_progress'across preload, renderer, and GraphQL adapter types - Updated ticket-import handlers and resolvers with 3-way column mapping (
closed→ done,in_progress→ in_progress, default → todo), backward-compatible with GitHub'sopen/closedstates
Bug Fixes
- Migrated from deprecated Jira search endpoint: Switched from
/rest/api/3/searchto/rest/api/3/search/jqlwith cursor-based (nextPageToken) pagination - Fixed domain sanitization: All
JiraProvidermethods now useextractCredentials().domain, strippinghttps://prefixes and trailing slashes to prevent double-protocol URLs - Fixed credential persistence: Moved provider credentials to a dedicated
'hive-provider-settings'localStorage key so Zustand store updates no longer overwrite them - JiraImportModal UX: Added textarea auto-focus and guard against empty JQL searches
Files Changed (17 files, +1019 / −55)
src/main/services/ticket-providers/jira-provider.ts— new JiraProvider implementationsrc/main/services/ticket-providers/adf-to-markdown.ts— new ADF→Markdown convertersrc/renderer/src/components/kanban/JiraImportModal.tsx— new Jira import modalsrc/main/index.ts— register JiraProvider alongside GitHubProvidersrc/main/ipc/ticket-import-handlers.ts— 3-way column mapping, nextPageToken supportsrc/main/services/ticket-providers/ticket-provider-types.ts— type updatessrc/main/services/ticket-providers/index.ts— export JiraProvidersrc/preload/index.d.ts,src/preload/index.ts— addin_progressstate,nextPageTokensrc/renderer/src/components/kanban/ImportTicketsModal.tsx— addin_progressstatesrc/renderer/src/components/sessions/SessionTabs.tsx— import dropdown menusrc/renderer/src/components/settings/SettingsIntegrations.tsx— Jira credential fieldssrc/renderer/src/components/ui/provider-icon.tsx— Jira icon configsrc/renderer/src/lib/provider-settings.ts— dedicated provider settings storagesrc/renderer/src/transport/graphql/adapters/ticket-import.ts— type updatesrc/renderer/src/transport/graphql/resolvers/mutation/ticket-import.resolvers.ts— 3-way mapping
fix(kanban): resolve 'failed to send followup' for sessions not in memory (#213)
Fixes the "Failed to send followup" error that occurs when sending followup prompts from the Kanban board to sessions that are not currently loaded in the in-memory store (e.g. when the associated worktree is not actively selected).
Root Causes Addressed
- Session not found in memory —
findSessionByIdonly searched the in-memory session store. If the worktree wasn't currently selected, the session wouldn't be present, causing an immediate failure. - Agent SDK map not populated — The Claude Code agent SDK implementer requires sessions to be in its internal
Map, which is normally populated bySessionView.initializeSession(). The kanban followup path bypassesSessionViewentirely, so the map was never populated. - Missing model resolution fallback —
resolveSessionModelcouldn't resolve the model when the session wasn't in the store, even if the data was available from the DB.
Changes
findSessionById→ async with DB fallback: After checking the in-memory store, falls back towindow.db.session.get()andwindow.db.worktree.get()to retrieve session and worktree data directly from the database. Returns additional model fields (model_provider_id,model_id,model_variant) needed for model resolution.resolveSessionModelaccepts fallback data: New optionalsessionDataFallbackparameter allows passing DB-fetched session data when the session isn't in the store.opencodeOps.reconnectbefore prompt: Ensures the agent SDK's in-memory session map is populated before sending the prompt, preventing "session not found" errors in the SDK layer.- Eager session loading via
useEffect: When a ticket references acurrent_session_idthat isn't in the store, triggersloadSessionsfor the ticket's worktree to populate the store proactively. - Ticket state update on followup: Calls
updateTicketwith updatedmodeandplan_ready: falsewhen sending followups from bothPlanReviewModeContentandReviewModeContent, ensuring the board reflects the correct state. - Defensive followup persistence: Wraps
window.kanban?.followup?.create()with optional chaining and try/catch since the API may not be fully wired up in all environments. - Improved error reporting: Surfaces detailed error messages (including the underlying reason) in toast notifications and logs structured error messages to the console for easier debugging.
feat: add Kanban board support for connections (#212)
Extends the Kanban board to work in connection mode, where a connection aggregates multiple projects and the board displays tickets from all member projects in a unified view.
Kanban Store — connection-level accessors
getConnectionProjectIds(connectionId)— resolves unique project IDs from connection membersloadTicketsForConnection(connectionId)— fetches tickets for all member projects in parallel, batch-updates the store, with inlineisLoadingmanagement to prevent race conditionsgetTicketsByColumnForConnection(connectionId, column)— merges and sorts tickets across all projects for a given column
KanbanBoard — dual-mode rendering
- Accepts optional
connectionIdprop; when set, loads and displays connection-aggregated tickets instead of a single project's tickets - Passes
connectionIddown to columns, modals, and ticket cards
KanbanColumn — connection-aware drag-drop
- In connection mode, searches all connection tickets (not just one project) when resolving cross-column drag-and-drop targets
- Routes create/import actions through connection-aware modals
KanbanTicketCard — project tags & jump-to-session
- Displays a project name tag on each card so users can distinguish which project a ticket belongs to
- "Jump to session" navigates to the correct worktree/session within the connection context
- Fixed infinite re-render loop caused by non-memoized Zustand selectors
KanbanTicketModal — connection-session linking
- Session linking respects connection scope — filters and navigates within the active connection
TicketCreateModal — project picker
- In connection mode, shows a project picker dropdown so users choose which member project owns the new ticket
ImportTicketsModal — project picker
- In connection mode, shows a project picker populated from connection members, fetches provider repos per selected project
WorktreePickerModal — simplified connection mode
- Filters worktree list to only those belonging to the connection's member projects
Layout & routing
- Header: board toggle button now visible for connections (not only projects)
- MainPane: routes to
<KanbanBoard connectionId={…} />when board view is active in connection mode - SessionTabs: hides session-tab-bar board buttons (create/import) in connection board mode — the board itself provides its own in-column equivalents
Tapping provider icon on a ticket opens browser (#211)
- KanbanTicketCard: Replaced the
<a>anchor tag wrapping the provider icon with a<button>that callswindow.systemOps.openInChrome()to open the external URL. This ensures the link opens in Chrome via the system's native handler rather than relying on default anchor behavior, which may not work correctly in an Electron context. - KanbanTicketModal: Added a provider icon button next to the "Edit Ticket" dialog title. When a ticket has an external provider and URL, clicking the icon opens the external URL in Chrome. Imported
ProviderIconandgetProviderLabelfrom the shared UI components.
Both changes use e.stopPropagation() or direct click handlers to prevent triggering parent card/modal interactions.
Fix checkbox toggle bug in ticket import modal (#210)
- Fix double-toggle bug on checkboxes in the Import Tickets modal. Clicking a checkbox to select/deselect a ticket appeared to do nothing because both the
Checkbox'sonCheckedChangehandler and the parentdiv'sonClickhandler were callingtoggleSelect(), causing the selection to toggle twice (on then immediately off). - Removed the redundant
onCheckedChangeprop from the individual issueCheckboxinImportTicketsModal.tsx. The parentdivwrapper already handles the click via itsonClick={() => toggleSelect(issue.externalId)}, so the checkbox now correctly reflects the toggled state on a single click.
Fix ticket modal buttons being cut off in review mode (#209)
- Added
overflow-hiddento theplan_reviewandreviewmodal dialog containers to prevent content from overflowing the modal boundary - Added
min-h-0to the plan review and review content scroll areas — a classic flexbox fix that allows flex children to shrink below their intrinsic content size, enabling proper overflow scrolling within the constrainedmax-h-[80vh]container - Added
flex-wrapto theDialogFooterin plan review mode so action buttons wrap gracefully instead of being clipped when horizontal space is tight
All changes are in src/renderer/src/components/kanban/KanbanTicketModal.tsx.