fix: gate splash safety timeout on sessionsLoaded#690
Open
pedramamini wants to merge 805 commits intomainfrom
Open
fix: gate splash safety timeout on sessionsLoaded#690pedramamini wants to merge 805 commits intomainfrom
pedramamini wants to merge 805 commits intomainfrom
Conversation
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>
- Add missing onRemoteOpenFileTab, onRemoteRefreshFileTree, onRemoteRefreshAutoRunDocs, onRemoteConfigureAutoRun, and sendRemoteConfigureAutoRunResponse mocks to useRemoteIntegration test - Run prettier --write on all files flagged by CI Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use Promise.resolve() wrapper instead of testing void return for truthiness, which TypeScript disallows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ents - Wrap process.kill mock/restore in try/finally in cli-server-discovery tests - Reject non-integer strings (e.g. "3foo") in --max-loops validation - Add WebSocket close handler to reject pending requests immediately - Await startBatchRun before sending success response, with error handling - Pass sshRemoteId to handleOpenFileTab for remote file context - Fix handleAutoRunRefresh racing with session switch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and agent terminology - Validate documents array is non-empty before launching auto-run batch, returning an error response instead of proceeding with empty config - Add targetSessionId option to handleOpenFileTab so remote file-open events pin tabs to the originally requested session, avoiding races when the active session changes during async file reads - Update CLI error message from "sessions" to "agents" per terminology guidelines, with matching test update Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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
The sessionsLoaded gate (2a05530) gave the file-tree load a dedicated 5s budget but created a worst-case path where session restoration (5s) + file-tree timeout (5s) = 10s of splash blocking. Add an 8-second absolute backstop from mount that fires regardless of session state, so the splash never blocks longer than 8s even when both stall.
…ery search The previous implementation sent the full agent summary as a single search query to GitHub, which uses strict AND matching. Queries like "Tiled tab groups: drag-and-drop split-pane layouts with persistence" failed to find duplicate issues that used different terminology (e.g., "split pane"). Now extracts keywords (stripping stop words and punctuation), builds 2-3 overlapping search queries from keyword chunks, runs them in parallel, and deduplicates results. This significantly improves recall for semantically similar issues. Adds test coverage for the search-issues handler: keyword extraction, deduplication, error handling, and result capping. Claude ID: c4362e04-e617-48eb-8643-20d9709bc4ab Maestro ID: 865ec2d1-8898-4a68-9d06-e13562d127e0
…of runtime file I/O The packaged app couldn't find feedback-conversation.md at runtime because it wasn't in extraResources. Switch to the build-time generated constant from src/generated/prompts.ts, matching how all other prompts work.
Tilde-prefixed paths (~/Downloads/file.wav) and media/data extensions (.wav, .mp3, .pdf, .csv, etc.) were not recognized as clickable links. - Extract LINKABLE_EXTENSIONS constant to deduplicate extension lists - Add TILDE_PATH_PATTERN for ~/... paths with homeDir expansion - Tilde paths within projectRoot → maestro-file:// (opens in tab) - Tilde paths outside projectRoot → file:// (opens in system app) - Add homeDir utility (src/renderer/utils/homeDir.ts) with module-level cache to avoid per-component IPC calls - Thread homeDir through MarkdownRenderer, AutoRun, and FilePreview
Use [^\s/] instead of [^/\n] for tilde path segments so that ~/a.wav and ~/b.mp3 in running text are matched as two separate paths rather than one greedy match spanning the whitespace.
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