fix: gate splash safety timeout on sessionsLoaded#690
Open
pedramamini wants to merge 799 commits intomainfrom
Open
fix: gate splash safety timeout on sessionsLoaded#690pedramamini wants to merge 799 commits intomainfrom
pedramamini wants to merge 799 commits intomainfrom
Conversation
…w pipeline When a selected pipeline contained an agent that also existed in another pipeline, the other pipeline's copy rendered at 40% opacity as a 'ghost duplicate'. This was jarring — the user saw a second node pop up as soon as they dragged the shared agent onto the new canvas. Root cause: convertToReactFlowNodes showed dimmed nodes from non-active pipelines when the same session appeared in both. The dimming feature was intended for cross-pipeline awareness but caused visual confusion. Fix: skip all non-active pipeline nodes entirely. The 'All Pipelines' view is unaffected (all pipelines are active when selectedPipelineId === null). Multi-pipeline color indicators on agent nodes continue to work correctly since agentPipelineCount/agentPipelineMap are still computed globally. Extracted convertToReactFlowNodes, convertToReactFlowEdges, and getTriggerConfigSummary to utils/pipelineGraph.ts so they can be unit-tested. Added 51 tests covering the bug fix, All Pipelines view, selected pipeline isolation, multi-pipeline metadata, y-offsets, and edge state.
Fill test coverage gaps across the Cue event-driven automation system: - Add 9 unit tests for calculateNextScheduledTime() pure function (day filters, midnight crossing, week boundary wrap, invalid times) - Add 13 integration tests for time.scheduled engine trigger (fire/no-fire timing, schedule_days, filters, payload, output_prompt, prompt_file, disabled subs, timer cleanup) - Add 3 tests for task.pending template variable population in executor (taskFile, taskCount, taskList, taskContent, defaults for missing payload) - Add 3 tests for output_prompt_file YAML loader resolution (file resolve, inline wins over file, missing file fallback) - Add 1 documentation test confirming time.scheduled is intentionally not reconciled after sleep/wake (by design)
…validation, GitHub state filter - Add scheduledFiredKeys guard to time.scheduled preventing double-fire when YAML hot reload refreshes config within the same minute - Add unknown event type validation in YAML validator with helpful error listing valid types (catches typos like "file.change") - Add gh_state field to GitHub triggers: "open" (default), "closed", "merged", or "all" — enables triggering on PR merges/closures - Add CUE_EVENT_TYPES and CUE_GITHUB_STATES arrays as validation sources - Add ghMergedAt template variable and merged_at payload field - 18 new tests across 3 test files (379 total Cue tests, 23,175 full suite)
Fixes TS2353 lint error from the previous commit where ghMergedAt was used in cue-executor.ts but not declared in the template context type.
The initial selection style check was asserting synchronously after the async session load, causing intermittent failures when the re-render hadn't completed yet.
Create src/shared/cli-server-discovery.ts with read/write/delete functions for the CLI server discovery file (cli-server.json). Follows the same pattern as cli-activity.ts with getConfigDir(), PID validation, and atomic writes (write to .tmp then rename). Exports: CliServerInfo interface, writeCliServerInfo, readCliServerInfo, deleteCliServerInfo, isCliServerRunning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ensureCliServer() to web handlers that creates/starts the web server during app initialization and writes the discovery file (cli-server.json) so the CLI can locate and connect via WebSocket. The existing live:startServer handler continues to work — if the server is already running it returns the existing URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…stop Add deleteCliServerInfo() calls in three places: - quit-handler.ts performCleanup(): after web server stop, before stats DB close - web.ts live:stopServer handler: when server is manually stopped - web.ts live:disableAll handler: when all live sessions are disabled Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover writeCliServerInfo, readCliServerInfo, deleteCliServerInfo, and isCliServerRunning with mocked fs/os modules. Includes platform-specific config dir tests and validation edge cases (21 tests). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new open_file_tab message handler across the web-server module: - messageHandlers.ts: switch case, handler method, callback interface - types.ts: OpenFileTabCallback type - CallbackRegistry.ts: storage, getter, setter - WebServer.ts: callback setter, message handler wiring - web-server-factory.ts: forward to renderer via remote:openFileTab IPC Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the refresh_auto_run_docs message across the 5-file callback pattern: messageHandlers → types → CallbackRegistry → WebServer → factory. Also fixes pre-existing test mock missing setOpenFileTab/setRefreshFileTree callback methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…vents Add onRemoteOpenFileTab, onRemoteRefreshFileTree, and onRemoteRefreshAutoRunDocs listeners in preload/process.ts and corresponding type declarations in global.d.ts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…file_tree, refresh_auto_run_docs Add three useEffect blocks in useRemoteIntegration.ts that subscribe to preload IPC events and dispatch CustomEvents. Add corresponding event listeners in App.tsx that handle file reading/opening, file tree refresh, and auto-run document refresh. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ow foregrounding When focus: true is sent with a select_session message, the desktop window is brought to the foreground via mainWindow.show() and mainWindow.focus() before forwarding the session selection to the renderer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… refresh_file_tree, refresh_auto_run_docs, select_session focus) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements MaestroClient class and withMaestroClient helper that connects to the running Maestro desktop app via the discovery file from Phase 01. Supports connect/disconnect lifecycle, typed command/response matching, and configurable timeouts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `maestro-cli open-file <file-path> [--session <id>]` command that opens a file as a preview tab in the running Maestro desktop app via WebSocket IPC. Also extracts resolveSessionId() into maestro-client.ts as a shared helper for commands that need session resolution with fallback to first available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds -t/--tab option to the CLI send command that, after a successful send, connects to the Maestro desktop app via WebSocket and focuses the agent's session tab. Gracefully warns if the desktop app is not running without failing the send itself. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `maestro-cli status` command that checks if the Maestro desktop app is running and reachable via WebSocket. Reports port and session count on success, or clear error messages for common failure modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the configure_auto_run message handler across the full WebSocket IPC stack: message handler, callback type, registry, WebServer, factory wiring, preload listener, and renderer type declarations. Uses response channel pattern for async results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add onRemoteConfigureAutoRun listener in useRemoteIntegration.ts that dispatches maestro:configureAutoRun CustomEvent, and handler in App.tsx that supports three modes: save as playbook, launch batch run, or configure-only. Uses response channel pattern for WebSocket confirmation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds `maestro-cli auto-run <docs...>` command that sends configure_auto_run messages over WebSocket IPC to the desktop app. Supports --prompt, --loop, --max-loops, --save-as, --launch, and --reset-on-completion options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents maestro-cli commands (open-file, refresh-files, refresh-auto-run, auto-run, status) in the agent system prompt so AI agents know how to interact with the Maestro desktop app via CLI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…bSocket handler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix issues identified by Greptile and CodeRabbit reviews: - Send full absolute path instead of basename in auto-run documents - Fix WebSocket timeout race condition with settled flag - Include requestId in outgoing messages for correct response matching - Wrap test env var cleanup in try/finally with proper delete for undefined - Catch callback failures in onRemoteConfigureAutoRun preload handler - Validate document entries in messageHandlers before forwarding - Use randomUUID for collision-free response channels - Pass SSH remote context into file reads for open-file-tab - Fix refresh-auto-run to target the requested session - Return error for configure-only branch instead of silent no-op Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
useFilePreviewSearch: - Fix clamp logic: initialize currentMatchIndex from -1 to 0 when new matches appear (was staying at -1 due to Math.min(-1, len-1) = -1) - Fix goToPrevMatch wrap-around from -1 (was skipping last match) - Add displayedContentLength dep to code highlight effect so marks are re-applied after "Load full file" replaces DOM nodes filePreviewUtils: - Hoist languageMap to module-scope LANGUAGE_MAP (same pattern as BINARY_EXTENSIONS) - Guard formatFileSize against negative bytes (Math.log(neg) = NaN) FilePreview shell: - Move isLargeFile + displayContent memos before useFilePreviewSearch call so displayedContentLength is available
…rch sync filePreviewUtils: - Code fence regex allows 0-3 leading spaces (GFM spec) in both countMarkdownTasks and extractHeadings - formatFileSize clamps index to sizes array length (prevents undefined unit for values >= 1 PB) - resolveImagePath returns normalized src directly when markdownDir is empty (root-level files) useFilePreviewSearch: - Markdown CSS Highlight API branch now syncs currentMatchIndex (was only setting totalMatches, leaving index stale) - No-matches branch in markdown effect sets currentMatchIndex to -1 - initialSearchQuery capped to MAX_SEARCH_QUERY_LENGTH on init
refactor(filepreview): decompose FilePreview + zoomable image viewer
Claude Code emits response text in assistant messages, not in the result message's `result` field (which is empty). The CLI spawner only checked `msg.result`, so it always returned `response: null`. Now accumulates text from assistant messages as a fallback and flushes the JSON line buffer on process close to handle output that lacks a trailing newline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The default shell was hardcoded to 'zsh' in the renderer settings store, IPC handler fallbacks, and tab merge helpers. On Windows, zsh doesn't exist, causing terminal tab spawns to fail with ENOENT immediately. Now defaults to 'powershell' on Windows and 'zsh' on Unix, matching the existing main-process getDefaultShell() logic. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tors Address review feedback: - Extract processMessage/processEvent helpers to deduplicate parsing logic between stdout data handler and close handler buffer flush - Add newline separators between accumulated assistant text blocks to prevent concatenation without whitespace Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit changed the default shell from 'zsh' to 'powershell' on Windows, but 'powershell' is a shell ID, not an executable name. PtySpawner passed it directly to pty.spawn(), which fails on Windows because it needs 'powershell.exe'. Use resolveShellPath() to translate shell IDs to executable names before spawning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…est assertion - Narrow try/catch in close handler to only catch JSON.parse failures, letting unexpected errors in processMessage bubble up - Fix trailing whitespace caught by CI prettier - Add missing usage assertion in buffer flush test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses review nitpick — mockReturnValueOnce avoids leaking state if an assertion fails before the manual reset lines. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…umb nav fix Replace form-based FeedbackView with conversational FeedbackChatView that guides users through structured feedback via chat. Add IPC handlers for issue search, subscription, conversation prompts, and conversation-based submission with debug package support. Swap sidebar Wizard button for Feedback button. Add NewAgentChoiceModal for wizard vs manual agent setup. Fix Cmd+Shift+<> breadcrumb navigation by mapping Shift+comma/period to their shifted characters in the shortcut matcher.
- Add missing feedback mock methods (getConversationPrompt, submitConversation, searchIssues, subscribeIssue) to test setup - Update useSessionCrud test to expect newAgentChoice modal instead of newInstance
…fications toggle - Search fires after every agent response (not just at 80%), using gh search issues for full-text matching across open and closed issues - Inline "similar issues found" card appears mid-conversation with +1 subscribe - Fixed race condition where clicking Submit before useEffect search would skip duplicate detection entirely - Added custom notifications toggle to Quick Actions command palette
Tab overlay menus were rendering off-screen when tabs were near the right or bottom edge. Added viewport clamping to useTabHoverOverlay hook so all tab types (AI, File, Terminal) stay fully visible.
…esize - Pin header (progress bar) and footer (screenshots/input) in feedback modal so only messages scroll — adds contentClassName prop to Modal - Narrow feedback modal (420px) during provider selection, 780px for chat - Cmd+N bypasses choice modal and opens manual agent creation directly - Textarea auto-grows as user types (up to 176px), matching GroupChatInput - Submit button text changed to black for readability on green background
Enhance web/mobile hooks and components to align with desktop feature set: - Update hooks (cue, group chat, settings, git status, websocket, etc.) for better state management - Expand App.tsx with improved routing, navigation, and feature integration - Refine panels (AutoRun, Git, Settings, Achievements, UsageDashboard) for mobile UX - Fix formatting across 22 web files (Prettier) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix bugs and issues identified by CodeRabbit and Greptile reviews: - useSettings: roll back optimistic update when server returns success: false - useWebSocket: reject pending requests on error-typed server responses - AllSessionsView: use div instead of button when renaming (invalid nesting), add stopPropagation to Escape in rename input - GitStatusPanel: use charAt(0) for status filtering to handle '??' correctly - useRemoteIntegration: use destination path for renamed files in git status - AutoRunPanel: hide task counter when totals are unknown (prevents "Task 1/0") - useMobileKeyboardHandler: guard preventDefault behind handler existence checks - AutoRunSetupSheet: reinitialize draft state when sessionId changes - RightDrawer: default to 'history' tab instead of unimplemented 'files' - ContextManagementSheet: prevent Escape from closing during execution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ContextManagementSheet: remove unused progressListenerRef and its cleanup effect - RightDrawer: remove unused props from AutoRunTabContent signature and call site, prefix remaining unused RightDrawer props with _ for TS compliance Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Symphony features called `execFileNoThrow('gh', ...)` directly without
using the existing `resolveGhPath()` utility. This meant gh CLI was not
found when installed in non-standard locations (official MSI installer,
Scoop, Chocolatey, Winget) because:
1. `gh` was missing from `knownExeCommands` in execFile.ts, forcing
unnecessary shell execution on Windows
2. No known installation paths existed for `gh` in the path prober
3. Symphony files bypassed the `resolveGhPath()` detection that other
features (git handlers, Cue poller) already used correctly
Changes:
- Add `gh` to `knownExeCommands` for direct execution on Windows
- Add `gh` known paths for Windows (MSI, Winget, Scoop, Chocolatey)
and Unix (Homebrew, local bin, Linuxbrew)
- Add GitHub CLI MSI install dir to expanded env PATH
- Replace all bare `'gh'` calls in symphony-fork.ts, symphony-runner.ts,
and symphony.ts IPC handler with `resolveGhPath()`
- Update test mocks to include cliDetection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review feedback: - Add GitHub CLI MSI dir to buildExpandedPath() in shared/pathUtils.ts so resolveGhPath() can detect gh via isGhInstalled() (P1 - Greptile) - Add Linuxbrew bin dir to buildExpandedPath() Unix paths so gh installed via Linuxbrew is discoverable (P1 - CodeRabbit) - Fix inaccurate "Conda / Mamba" comment on ~/bin to "User bin directory" (P2 - Greptile) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix(cli): capture response from claude-code in maestro-cli send
fix: use platform-aware default shell for Windows terminal tabs
fix(symphony): use resolveGhPath() for gh CLI detection
…ix any type - Replace 3 console.log calls in useWebSocket.ts with webLogger.debug (fired on every WS message in production) - Remove 6 debug console.log calls from findParentSession in AllSessionsView - Add missing broadcast types to ServerMessageType union: session_live, session_offline, context_operation_progress, context_operation_complete, cue_activity_event, cue_subscriptions_changed - Replace `any` type on configureAutoRun config param in WebServer.ts with proper type derived from CallbackRegistry
Bring quit handler safety timeout (#677, #689) and power manager into RC. Resolve merge conflicts: - quit-handler.ts: keep both deleteCliServerInfo (RC) and powerManager + QUIT_CONFIRMATION_TIMEOUT_MS (main) - index.ts: keep Cue engine stop (RC) and powerManager + stopSessionCleanup (main) - releases.md: take main's version (more complete changelog)
feat(web): mobile UX parity with desktop interface
…e dismissal The 5-second safety timeout in useFileTreeManagement started counting from component mount, before settings and sessions had finished loading. Session restoration (git checks, migrations) could consume 2-4s of the budget, leaving barely 1-2s for the actual file tree load. Once the timeout fired, the splash dismissed immediately while the UI was still loading. Gate the timeout on sessionsLoaded so the full 5 seconds is dedicated to the file tree load. Also updates FeedbackChatView with improved provider-select copy and icon.
|
Important Review skippedToo many files! This PR contains 292 files, which is 142 over the limit of 150. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (8)
📒 Files selected for processing (292)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Windows users get a better experience with the native title bar enabled by default. The setting now uses platform detection (`isWindows()` / `isWindowsPlatform()`) instead of a hard-coded `false`, while still respecting any explicit user preference via the `??` nullish coalescing operator. Claude ID: e3978be7-c68a-4d51-8659-ee29584f36e7 Maestro ID: 865ec2d1-8898-4a68-9d06-e13562d127e0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useFileTreeManagementstarted counting from component mount, before settings and sessions had finished loading. Session restoration (git checks, migrations) consumed most of the budget, causing the splash to dismiss while the file tree was still loading — leaving the UI in a visually incomplete "curtains up but not ready" state.sessionsLoaded: The safety timeout now only starts counting after sessions have been restored, giving the full 5 seconds to the actual file tree load.Test plan
does not fire safety timeout until sessionsLoaded is true— verifies timeout doesn't fire before sessions load, then fires correctly aftersessionsLoaded: trueinbeforeEachto match new gate