Repository navigation
1.0.46
What's Changed
Add local supercharge and connection-aware session flow (#74)
- Connection-aware handoff & supercharge: Both
handlePlanReadyHandoffandhandlePlanReadySuperpowersinSessionViewnow detect when the current session is a connection session and branch into a dedicated path that usescreateConnectionSessioninstead of creating a local worktree session. - New "Supercharge locally" button: Added a
handlePlanReadySuperpowersLocalhandler that creates a supercharge session in the same worktree (no branch duplication), enabling local supercharge without spinning up a new worktree. A corresponding outlined violet "Supercharge locally" button appears inPlanReadyImplementFabwhen superpowers are available and the session is not a connection session. - Consistent
setSessionModeawait pattern: All code paths (handoff, supercharge, local supercharge, connection variants) now use a fire-and-await pattern — capturing thesetSessionModepromise early andawaiting it at the end — for consistency and correct ordering. - Improved error messages: Error toasts now use
result.error ?? 'fallback message'instead of hardcoded strings, surfacing server-side error details when available.
Redesign run pane with virtualized rendering, search, and RAF-throttled updates (#73)
Comprehensive redesign of the Run output pane with performance optimizations, always-on virtualization, and an inline search feature.
New Utilities
ansi-utils.ts—stripAnsi()andparseAnsiSegments()for stripping ANSI escape sequences (SGR, OSC, CSI, private-mode CSI) and parsing them into text+code segments, enabling search matching on plain text and highlight renderingOutputRingBufferenhancements — Added O(1) random-accessget(index)method andrenderCountgetter, eliminating the O(n)toArray()copy on every render cycle
Performance Improvements
- RAF-throttled version bumps — Replaced per-line Zustand
set()calls inappendRunOutputwithrequestAnimationFrame-batched updates, capping re-renders at ~60/sec instead of potentially thousands during rapid build output - Always-virtualized rendering — Removed the
VIRTUALIZE_THRESHOLDand non-virtualized.map()code path; the virtualizer now always drives rendering, usingbuffer.get(index)for O(1) row access - Smart auto-scroll — Tracks user scroll position and only auto-scrolls when near the bottom; suppresses auto-scroll while search is open
New Components
RunOutputLine—React.memocomponent extracting individual line rendering with truncation, command, error, and normal ANSI output markers. Supports search highlight rendering viaparseAnsiSegmentswith bright/dim<mark>styling (intentionally drops ANSI coloring in favor of highlight visibility, matching VS Code terminal search behavior)RunOutputSearch— Debounced (150ms) inline search bar triggered byCmd+F. Searches throughOutputRingBufferlines, stripping ANSI codes and skipping marker lines. Reports matches via callback for the parent to build a highlight map and scroll. Keyboard navigation withEnter/Shift+Enter/Escape, plus prev/next/close buttons
RunTab Restructuring
- Replaced
toArray()/useMemowith index-basedbuffer.get(index)access - Replaced manual
scrollTopassignment withvirtualizer.scrollToIndex - Integrated
Cmd+Fsearch with highlight map for O(1) per-row lookup - Used refs for callbacks to avoid re-triggering debounce on parent re-renders
- Removed dead
Loader2spinner code and unnecessary containment checks
Bug Fixes
- Guard
cancelAnimationFrameagainst sentinel value (-1) inclearRunOutput - Replace non-null assertions with guard patterns for type safety
- Preserve current match index when re-searching on
outputVersionchanges
Tests (6 new test files, 1868 lines added)
ansi-utils.test.ts— ANSI stripping and segment parsingoutput-ring-buffer-access.test.ts— O(1) random access, renderCount, truncation marker behaviorrun-output-line.test.tsx— Line rendering with markers, truncation, ANSI, and search highlightsrun-output-search.test.tsx— Search lifecycle, debounce, keyboard navigation, match reportingscript-store-raf-throttle.test.ts— RAF-throttled version bumps, batch behavior, cancellation