Skip to content

refactor: consolidate duplicated code across Maestro - #1232

Open
jSydorowicz21 wants to merge 161 commits into
rcfrom
dedup/maestro-cleanup
Open

refactor: consolidate duplicated code across Maestro#1232
jSydorowicz21 wants to merge 161 commits into
rcfrom
dedup/maestro-cleanup

Conversation

@jSydorowicz21

@jSydorowicz21 jSydorowicz21 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

This PR is ready for review after repository-wide deduplication, a fresh rebase onto current rc, six completed independent review passes, repaired review findings, focused regressions, production builds, full local pre-push validation, and green GitHub Actions.

Summary

This implements the cleanup audit recorded in dedup-report.md and Plans/dedup-playbook/IMPLEMENTATION-LEDGER.md.

  • Resolves all 147 audited priorities: 134 implemented, 11 retained with evidence, and 2 already resolved
  • Consolidates compatible build, test, settings, plugin, storage, process/IPC, Cue, web, provider, renderer, CLI, and documentation mechanics
  • Removes verified dead APIs, aliases, dependencies, generated bundles, instrumentation, assets, scaffolding, and obsolete UI code
  • Preserves domain-specific implementations where behavior, compatibility, security, platform behavior, or ownership differs
  • Restores deliberately maintained build/archive/** and build/new-icon/** design sources

The ledger contains every priority's disposition, evidence, rollback boundary, verification notes, and playbook stage.

Wave 15 follow-up

Six additional saturation audits found priorities P135-P147. Twelve were implemented and one was retained:

  • removed the unused Husky dependency and generated .husky/_ shims while preserving the native root hooks
  • deleted an orphaned Wave 1 status note and zero-consumer shared/prompt barrels
  • migrated the legacy shared/agentIds import path to the canonical agent registry
  • removed duplicate ambient/type compatibility declarations
  • removed the unused plugin runtime-agent registry while preserving manifest agent contributions
  • reused canonical grouping byte measurement and eliminated duplicate SessionList contribution loading
  • centralized Wizard provider-output and fallback-document parsing with malformed nested-record regression coverage
  • retained ui:render-unsafe unchanged because removing it requires a host-major compatibility plan and would invalidate current v1-targeted plugins

Adversarial review caught the plugin capability-major incompatibility and malformed nested JSON block handling. The capability removal was fully reverted; malformed records now fall back safely.

Current rc integration

Rebased the complete branch onto current origin/rc at fbc664ff43fd2781196f090c3dd83de77dc81ac3. Current head is 2ad6941e024e4c0585ead0e3155655aceec00f4e; origin/rc is an ancestor and GitHub reports the PR merge state as clean.

The rebase conflicts were resolved against current contracts. Six independent review passes inspected main/shared/parser behavior, renderer behavior, release/build/package configuration, plugin/security contracts, rebase conflict resolutions, tests, documentation claims, and the final aggregate diff.

Confirmed review findings were repaired in 4693184, a556421, f31f385, and 2ad6941:

  • migrated the release workflow fully to Bun and added architecture-specific Bun caching, fixing all-platform tagged-release blockers after package-lock.json removal
  • preserved OMP whitespace-only final-message suppression and Pi/OMP usage model propagation in the shared parser core
  • restored Movement Designer web-client discriminants and contract tests
  • updated the Cadenza transport fixture to the current required payload
  • removed a stale SessionList plugin-slot mock that hid the real component behavior
  • reconciled the rebased SessionList/AutoRun integration fixture with current store ownership and migrated native Husky hooks back to Bun
  • restored the authenticated initial WebSocket frame required by the canonical web protocol validator and connection-gated web hooks

Verification

  • repository Prettier check: passed
  • main, CLI, and renderer TypeScript checks: passed
  • ESLint: passed
  • focused regression matrix: 14 files, 585 tests passed
  • rebase-conflict regression matrix: 12 files, 392 tests passed
  • full Vitest: 1,452 files passed, 1 skipped; 34,714 tests passed, 109 skipped
  • plugin SDK build and focused tests: passed; 2 files, 28 tests
  • main production build: passed
  • renderer production build: passed
  • release workflow YAML parse and release-contract test: passed
  • pre-push hook reran Prettier, TypeScript, ESLint, and the full Vitest suite successfully
  • GitHub Actions run 29801811119: all five lint/format, Ubuntu, and Windows jobs passed

The scoped plugin E2E attempt timed out on unrelated existing broker/scheduler failures and is not claimed as a passing gate. Existing non-failing Vite CSS/chunk warnings and Node localstorage-file test warnings remain.

Review guidance

Review is easiest by playbook stage or focused commit rather than as one aggregate diff. Wave 15 implementation is 362f6de; ledger reconciliation is 1cc52d9; validation evidence is e73bdc9; the current rc rebase spans the rewritten branch; final review repairs are 4693184, a556421, f31f385, and 2ad6941.

@jSydorowicz21 jSydorowicz21 self-assigned this Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 632 files, which is 332 over the limit of 300.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 78b55ee9-e2f2-42a8-9385-b2f0176e3e46

📥 Commits

Reviewing files that changed from the base of the PR and between 73f5a50 and 2ad6941.

⛔ Files ignored due to path filters (4)
  • bun.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
  • src/generated/prompts.ts is excluded by !**/generated/**
  • src/renderer/assets/pedram-avatar.png is excluded by !**/*.png
📒 Files selected for processing (661)
  • .github/scripts/__tests__/verify-native-arch.test.sh
  • .github/scripts/rebuild-and-verify-native.sh
  • .github/scripts/verify-native-arch.sh
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .husky/_/.gitignore
  • .husky/_/applypatch-msg
  • .husky/_/commit-msg
  • .husky/_/h
  • .husky/_/husky.sh
  • .husky/_/post-applypatch
  • .husky/_/post-checkout
  • .husky/_/post-commit
  • .husky/_/post-merge
  • .husky/_/post-rewrite
  • .husky/_/pre-applypatch
  • .husky/_/pre-auto-gc
  • .husky/_/pre-commit
  • .husky/_/pre-merge-commit
  • .husky/_/pre-push
  • .husky/_/pre-rebase
  • .husky/_/prepare-commit-msg
  • .husky/pre-commit
  • .husky/pre-merge-commit
  • .husky/pre-push
  • AGENT_SUPPORT.md
  • ARCHITECTURE.md
  • CLAUDE-AGENTS.md
  • CLAUDE-PATTERNS.md
  • CLAUDE-PLUGINS.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • Plans/autonomous-manager-agent-investigation.md
  • Plans/dedup-playbook/00-operating-model.md
  • Plans/dedup-playbook/01-conflict-baseline.md
  • Plans/dedup-playbook/02-test-foundation.md
  • Plans/dedup-playbook/03-build-tooling.md
  • Plans/dedup-playbook/04-pure-utilities.md
  • Plans/dedup-playbook/05-contracts-registries.md
  • Plans/dedup-playbook/06-settings.md
  • Plans/dedup-playbook/07-plugin-security.md
  • Plans/dedup-playbook/08-storage-cache.md
  • Plans/dedup-playbook/09-process-ipc.md
  • Plans/dedup-playbook/10-cue-pianola-bmad.md
  • Plans/dedup-playbook/11-web-symphony.md
  • Plans/dedup-playbook/12-provider-agent.md
  • Plans/dedup-playbook/13-renderer-ui.md
  • Plans/dedup-playbook/14-dead-code-artifacts.md
  • Plans/dedup-playbook/15-cli.md
  • Plans/dedup-playbook/16-documentation.md
  • Plans/dedup-playbook/17-final-integration.md
  • Plans/dedup-playbook/IMPLEMENTATION-LEDGER.md
  • Plans/dedup-playbook/README.md
  • Plans/plugin-build-contract.md
  • Plans/wave1-integration-state.md
  • dedup-report.md
  • docs/agent-guides/AGENT-INFRA.md
  • docs/agent-guides/CLI-PLAYBOOKS.md
  • docs/agent-guides/CUE-PIPELINE.md
  • docs/agent-guides/PROMPTS-SPECS.md
  • docs/agent-guides/REMAINING-SYSTEMS.md
  • docs/agent-guides/RENDERER-SERVICES.md
  • docs/agent-guides/SHARED-UTILS.md
  • docs/autorun-playbooks.md
  • docs/cli.md
  • docs/director-notes.md
  • docs/features.md
  • docs/feedback.md
  • docs/general-usage.md
  • docs/getting-started.md
  • docs/index.md
  • docs/installation.md
  • docs/maestro-cue-advanced.md
  • docs/maestro-cue.md
  • docs/provider-notes.md
  • docs/slash-commands.md
  • e2e/autorun-batch.spec.ts
  • e2e/autorun-editing.spec.ts
  • e2e/autorun-sessions.spec.ts
  • e2e/autorun-setup.spec.ts
  • e2e/plugins.spec.ts
  • package.json
  • scripts/__tests__/cdp.test.mjs
  • scripts/__tests__/http.test.mjs
  • scripts/build-cli.mjs
  • scripts/build-maestro-p.mjs
  • scripts/build-permission-relay-bridge.mjs
  • scripts/cdp-drive.mjs
  • scripts/cdp-eval.mjs
  • scripts/dev.mjs
  • scripts/lib/build.mjs
  • scripts/lib/cdp.mjs
  • scripts/lib/http.mjs
  • scripts/refresh-bmad.mjs
  • scripts/refresh-openspec.mjs
  • scripts/refresh-speckit.mjs
  • scripts/set-version.mjs
  • src/__tests__/build/package-prompt-resources.test.ts
  • src/__tests__/cli/commands/cadenza-movement.test.ts
  • src/__tests__/cli/commands/contract-subprocess.test.ts
  • src/__tests__/cli/commands/director-notes-history.test.ts
  • src/__tests__/cli/commands/notify.test.ts
  • src/__tests__/cli/commands/pianola-gate.test.ts
  • src/__tests__/cli/commands/pianola.test.ts
  • src/__tests__/cli/commands/settings-error-envelope.test.ts
  • src/__tests__/cli/commands/settings-subprocess.test.ts
  • src/__tests__/cli/output/duration.test.ts
  • src/__tests__/cli/utils/environment.test.ts
  • src/__tests__/cli/utils/settings-value.test.ts
  • src/__tests__/e2e/WebServerSync.e2e.test.ts
  • src/__tests__/fixtures/pi-protocol.ts
  • src/__tests__/helpers/coarsePointerMatchMedia.ts
  • src/__tests__/helpers/fakeIntersectionObserver.ts
  • src/__tests__/helpers/index.ts
  • src/__tests__/helpers/mockGroup.test.ts
  • src/__tests__/helpers/mockGroup.ts
  • src/__tests__/helpers/mockSession.test.ts
  • src/__tests__/helpers/mockSession.ts
  • src/__tests__/helpers/mockTab.ts
  • src/__tests__/integration/AutoRunRightPanel.test.tsx
  • src/__tests__/integration/AutoRunSessionList.test.tsx
  • src/__tests__/integration/GoalDrivenAutoRun.test.tsx
  • src/__tests__/integration/RemoteControlSync.test.ts
  • src/__tests__/integration/remote-control.integration.test.ts
  • src/__tests__/integration/symphony.integration.test.ts
  • src/__tests__/main/agents/agent-completeness.test.ts
  • src/__tests__/main/agents/capabilities.test.ts
  • src/__tests__/main/agents/session-storage.test.ts
  • src/__tests__/main/app-lifecycle/settings-watcher.test.ts
  • src/__tests__/main/bmad-manager.test.ts
  • src/__tests__/main/claude-session-storage.test.ts
  • src/__tests__/main/coworking/coworking-response-channel.test.ts
  • src/__tests__/main/coworking/installers/claude-code.test.ts
  • src/__tests__/main/coworking/installers/comment-json-config-store.test.ts
  • src/__tests__/main/coworking/installers/factory-droid.test.ts
  • src/__tests__/main/coworking/installers/opencode.test.ts
  • src/__tests__/main/cue/cue-config-repository.real-fs.test.ts
  • src/__tests__/main/cue/cue-config-repository.test.ts
  • src/__tests__/main/cue/cue-engine.saveSettings.test.ts
  • src/__tests__/main/cue/cue-engine.test.ts
  • src/__tests__/main/cue/cue-executor.test.ts
  • src/__tests__/main/cue/cue-ipc-handlers.test.ts
  • src/__tests__/main/cue/cue-query-service.test.ts
  • src/__tests__/main/cue/cue-run-manager.test.ts
  • src/__tests__/main/cue/cue-self-destruct.test.ts
  • src/__tests__/main/cue/cue-yaml-roundtrip.test.ts
  • src/__tests__/main/debug-package/index.test.ts
  • src/__tests__/main/group-chat/group-chat-router.test.ts
  • src/__tests__/main/ipc/handlers/agent-run.test.ts
  • src/__tests__/main/ipc/handlers/claude.test.ts
  • src/__tests__/main/ipc/handlers/coworking-response.integration.test.ts
  • src/__tests__/main/ipc/handlers/feedback.test.ts
  • src/__tests__/main/ipc/handlers/feedbackGithubContents.test.ts
  • src/__tests__/main/ipc/handlers/groupChat.test.ts
  • src/__tests__/main/ipc/handlers/leaderboard.test.ts
  • src/__tests__/main/ipc/handlers/memory.test.ts
  • src/__tests__/main/ipc/handlers/persistence.test.ts
  • src/__tests__/main/ipc/handlers/playbooks.test.ts
  • src/__tests__/main/ipc/handlers/prompts.test.ts
  • src/__tests__/main/ipc/handlers/symphony-security.test.ts
  • src/__tests__/main/ipc/handlers/symphony.test.ts
  • src/__tests__/main/ipc/handlers/tabNaming.test.ts
  • src/__tests__/main/openspec-manager.test.ts
  • src/__tests__/main/parsers/pi-protocol-golden.test.ts
  • src/__tests__/main/permission-relay/relay-integration.test.ts
  • src/__tests__/main/plugins/authorization-ledger.test.ts
  • src/__tests__/main/plugins/plugin-grouping-registry.test.ts
  • src/__tests__/main/plugins/plugin-sandbox-host-invoke-tool.test.ts
  • src/__tests__/main/plugins/plugin-sandbox-host.test.ts
  • src/__tests__/main/plugins/plugin-store-main.test.ts
  • src/__tests__/main/preload/coworking.test.ts
  • src/__tests__/main/preload/ipcSubscription.test.ts
  • src/__tests__/main/preload/notifications.test.ts
  • src/__tests__/main/process-manager.test.ts
  • src/__tests__/main/process-manager/ProcessManager.cwd.test.ts
  • src/__tests__/main/process-manager/runners/LocalCommandRunner.test.ts
  • src/__tests__/main/process-manager/spawners/PtySpawner.test.ts
  • src/__tests__/main/process-manager/utils/managedProcess.test.ts
  • src/__tests__/main/services/marketplace-service.test.ts
  • src/__tests__/main/spec-command-manager.test.ts
  • src/__tests__/main/speckit-manager.test.ts
  • src/__tests__/main/stats/integration.test.ts
  • src/__tests__/main/storage/claude-session-storage.test.ts
  • src/__tests__/main/storage/codex-session-storage-messages.test.ts
  • src/__tests__/main/storage/session-storage-constants.test.ts
  • src/__tests__/main/stores/claude-origins-migration.test.ts
  • src/__tests__/main/stores/migrations/adaptive-mode-default.test.ts
  • src/__tests__/main/stores/migrations/api-mode-default.test.ts
  • src/__tests__/main/stores/usageSnapshotPersistence.test.ts
  • src/__tests__/main/utils/agent-args.test.ts
  • src/__tests__/main/utils/atomic-json-store-policy.test.ts
  • src/__tests__/main/utils/claude-project-path.test.ts
  • src/__tests__/main/utils/dirent-utils.test.ts
  • src/__tests__/main/utils/ipcHandler.test.ts
  • src/__tests__/main/utils/json-file-readers.test.ts
  • src/__tests__/main/utils/networkUtils.test.ts
  • src/__tests__/main/utils/pricing.test.ts
  • src/__tests__/main/utils/shellDetector.test.ts
  • src/__tests__/main/utils/ssh-config-parser.test.ts
  • src/__tests__/main/utils/ssh-remote-resolver.test.ts
  • src/__tests__/main/utils/statsCache.test.ts
  • src/__tests__/main/web-server/handlers/appInfoHandler.test.ts
  • src/__tests__/main/web-server/handlers/messageHandlers.test.ts
  • src/__tests__/main/web-server/routes/wsRoute.test.ts
  • src/__tests__/preload/memory.test.ts
  • src/__tests__/preload/prompts.test.ts
  • src/__tests__/renderer/components/AgentRunDashboard/AgentRunDashboardModal.test.tsx
  • src/__tests__/renderer/components/AgentSessionsBrowser/hooks/useAgentSessionsSearch.test.ts
  • src/__tests__/renderer/components/AutoRunExpandedModal.test.tsx
  • src/__tests__/renderer/components/AutoRunSetupModal.test.tsx
  • src/__tests__/renderer/components/ConfirmModal.test.tsx
  • src/__tests__/renderer/components/CsvTableRenderer.test.tsx
  • src/__tests__/renderer/components/CueYamlEditor.test.tsx
  • src/__tests__/renderer/components/FileExplorerPanel/components/FileTreeRow.test.tsx
  • src/__tests__/renderer/components/FileExplorerPanel/utils/pathHelpers.test.ts
  • src/__tests__/renderer/components/FilePreview/markdownFast/codeHighlighter.test.ts
  • src/__tests__/renderer/components/FilePreview/markdownFast/mermaidRenderer.test.ts
  • src/__tests__/renderer/components/FilePreview/search/queryMatch.test.ts
  • src/__tests__/renderer/components/FilePreview/shared/lazyShikiObserver.test.ts
  • src/__tests__/renderer/components/FilePreview/textFast/codeHighlighter.test.ts
  • src/__tests__/renderer/components/FirstRunCelebration.test.tsx
  • src/__tests__/renderer/components/GitStatusWidget.test.tsx
  • src/__tests__/renderer/components/History/activityGraphAxis.test.ts
  • src/__tests__/renderer/components/History/lookbackOptions.test.ts
  • src/__tests__/renderer/components/InputArea/components/ToolbarControls.test.tsx
  • src/__tests__/renderer/components/MainPanel.test.tsx
  • src/__tests__/renderer/components/NewInstanceModal.test.tsx
  • src/__tests__/renderer/components/QuickActionsModal.test.tsx
  • src/__tests__/renderer/components/SessionList.test.tsx
  • src/__tests__/renderer/components/SessionList/SessionListMemoization.test.tsx
  • src/__tests__/renderer/components/TabBar/ShortcutHint.test.tsx
  • src/__tests__/renderer/components/TerminalView.test.tsx
  • src/__tests__/renderer/components/ThinkingStatusPill.test.tsx
  • src/__tests__/renderer/components/UpdateCheckModal.test.tsx
  • src/__tests__/renderer/components/UsageDashboard/AgentOverviewUtils.test.ts
  • src/__tests__/renderer/components/UsageDashboard/AutoRunUtils.test.ts
  • src/__tests__/renderer/components/UsageDashboard/chart-performance.test.tsx
  • src/__tests__/renderer/components/UsageDashboard/usageDashboardUtils.test.ts
  • src/__tests__/renderer/components/Wizard/services/phaseGenerator.test.ts
  • src/__tests__/renderer/components/Wizard/shared/DocumentSelector.test.tsx
  • src/__tests__/renderer/hooks/agentExecutionPolicy.test.ts
  • src/__tests__/renderer/hooks/batch/useGoalRunner.test.ts
  • src/__tests__/renderer/hooks/keyboard/shortcutMatcher.test.ts
  • src/__tests__/renderer/hooks/tabs/internal/testUtils.ts
  • src/__tests__/renderer/hooks/useAgentCapabilities.test.ts
  • src/__tests__/renderer/hooks/useAgentExecution.test.ts
  • src/__tests__/renderer/hooks/useAutoScrollToBottom.test.ts
  • src/__tests__/renderer/hooks/useAvailableAgents.test.ts
  • src/__tests__/renderer/hooks/useBatchProcessor.test.ts
  • src/__tests__/renderer/hooks/useClickOutside.test.ts
  • src/__tests__/renderer/hooks/useCommandPanelState.test.ts
  • src/__tests__/renderer/hooks/useCopyFeedback.test.ts
  • src/__tests__/renderer/hooks/useGroupManagement.test.ts
  • src/__tests__/renderer/hooks/useListNavigation.test.ts
  • src/__tests__/renderer/hooks/usePointerResize.test.tsx
  • src/__tests__/renderer/hooks/useResizableModal.test.tsx
  • src/__tests__/renderer/hooks/useResizablePanel.test.ts
  • src/__tests__/renderer/hooks/useSessionRestoration.test.ts
  • src/__tests__/renderer/hooks/useWorktreeValidation.test.ts
  • src/__tests__/renderer/hooks/utils/useDebouncedPersistence.test.ts
  • src/__tests__/renderer/services/bmad.test.ts
  • src/__tests__/renderer/services/cue.test.ts
  • src/__tests__/renderer/services/inlineWizardDocumentGeneration.test.ts
  • src/__tests__/renderer/services/openspec.test.ts
  • src/__tests__/renderer/stores/centerFlashStore.test.ts
  • src/__tests__/renderer/stores/notificationStore.test.ts
  • src/__tests__/renderer/stores/settingsStore.test.ts
  • src/__tests__/renderer/stores/settingsStoreMigrations.test.ts
  • src/__tests__/renderer/stores/settingsStoreSetters.test.ts
  • src/__tests__/renderer/utils/groupChatExport.test.ts
  • src/__tests__/renderer/utils/tabExport.test.ts
  • src/__tests__/renderer/utils/wizardOutputParsing.test.ts
  • src/__tests__/setup.ts
  • src/__tests__/shared/agent-run/provider.test.ts
  • src/__tests__/shared/agent-run/validators.test.ts
  • src/__tests__/shared/agentConstants.test.ts
  • src/__tests__/shared/agentIds.test.ts
  • src/__tests__/shared/agentMetadata.test.ts
  • src/__tests__/shared/agentRegistry.test.ts
  • src/__tests__/shared/comparison-path.test.ts
  • src/__tests__/shared/escapeRegExp.test.ts
  • src/__tests__/shared/formatters.test.ts
  • src/__tests__/shared/group-chat-types.test.ts
  • src/__tests__/shared/history.test.ts
  • src/__tests__/shared/imageDataUrl.test.ts
  • src/__tests__/shared/notification.test.ts
  • src/__tests__/shared/pathUtils.test.ts
  • src/__tests__/shared/plugins/agent-registry.test.ts
  • src/__tests__/shared/plugins/contribution-registry.test.ts
  • src/__tests__/shared/plugins/theme-bridge.test.ts
  • src/__tests__/shared/settings-defaults.test.ts
  • src/__tests__/shared/validation.test.ts
  • src/__tests__/shared/web-protocol.test.ts
  • src/__tests__/web-desktop/fixtures/debugger-drop.ts
  • src/__tests__/web-desktop/vite-config.test.ts
  • src/__tests__/web/hooks/useWebSocket.test.ts
  • src/cli/commands/cadenza.ts
  • src/cli/commands/create-agent.ts
  • src/cli/commands/create-group.ts
  • src/cli/commands/create-ssh-remote.ts
  • src/cli/commands/director-notes-history.ts
  • src/cli/commands/director-notes-synopsis.ts
  • src/cli/commands/movement.ts
  • src/cli/commands/notify-flash.ts
  • src/cli/commands/notify-toast.ts
  • src/cli/commands/pianola-gate.ts
  • src/cli/commands/pianola-learn.ts
  • src/cli/commands/pianola-orchestrate.ts
  • src/cli/commands/pianola-profile.ts
  • src/cli/commands/pianola-supervise.ts
  • src/cli/commands/pianola.ts
  • src/cli/commands/profiling.ts
  • src/cli/commands/settings-agent.ts
  • src/cli/commands/settings-get.ts
  • src/cli/commands/settings-list.ts
  • src/cli/commands/settings-reset.ts
  • src/cli/commands/settings-set.ts
  • src/cli/commands/stats.ts
  • src/cli/commands/update-agent.ts
  • src/cli/commands/view-command.ts
  • src/cli/output/command-error.ts
  • src/cli/output/duration.ts
  • src/cli/output/formatter.ts
  • src/cli/services/agent-busy.ts
  • src/cli/services/agent-sessions.ts
  • src/cli/services/storage.ts
  • src/cli/utils/environment.ts
  • src/cli/utils/settings-error.ts
  • src/cli/utils/settings-value.ts
  • src/main/agents/capabilities.ts
  • src/main/agents/definitions.ts
  • src/main/agents/index.ts
  • src/main/agents/session-storage.ts
  • src/main/app-lifecycle/settings-watcher.ts
  • src/main/bmad-manager.ts
  • src/main/constants.ts
  • src/main/coworking/coworking-response-channel.ts
  • src/main/coworking/installers/claude-code.ts
  • src/main/coworking/installers/comment-json-config-store.ts
  • src/main/coworking/installers/factory-droid.ts
  • src/main/coworking/installers/opencode.ts
  • src/main/cue/config/cue-config-mutation-service.ts
  • src/main/cue/config/cue-config-repository.ts
  • src/main/cue/cue-engine.ts
  • src/main/cue/cue-fan-in-tracker.ts
  • src/main/cue/cue-query-service.ts
  • src/main/cue/cue-query-traversal.ts
  • src/main/cue/cue-run-manager.ts
  • src/main/cue/cue-self-destruct.ts
  • src/main/cue/cue-spawn-builder.ts
  • src/main/cue/cue-telemetry.ts
  • src/main/cue/cue-types.ts
  • src/main/cue/stats/AGENT-TOKEN-AUDIT.md
  • src/main/debug-package/index.ts
  • src/main/group-chat/group-chat-agent.ts
  • src/main/group-chat/group-chat-log.ts
  • src/main/group-chat/group-chat-moderator.ts
  • src/main/group-chat/group-chat-router.ts
  • src/main/group-chat/group-chat-storage.ts
  • src/main/group-chat/session-recovery.ts
  • src/main/group-chat/spawnGroupChatAgent.ts
  • src/main/index.ts
  • src/main/ipc/handlers/agent-run.ts
  • src/main/ipc/handlers/agentSessions.ts
  • src/main/ipc/handlers/attachments.ts
  • src/main/ipc/handlers/claude.ts
  • src/main/ipc/handlers/coworking.ts
  • src/main/ipc/handlers/cue.ts
  • src/main/ipc/handlers/director-notes.ts
  • src/main/ipc/handlers/feedback.ts
  • src/main/ipc/handlers/feedbackGithubContents.ts
  • src/main/ipc/handlers/filesystem.ts
  • src/main/ipc/handlers/git.ts
  • src/main/ipc/handlers/groupChat.ts
  • src/main/ipc/handlers/history.ts
  • src/main/ipc/handlers/index.ts
  • src/main/ipc/handlers/leaderboard.ts
  • src/main/ipc/handlers/memory.ts
  • src/main/ipc/handlers/playbooks.ts
  • src/main/ipc/handlers/process.ts
  • src/main/ipc/handlers/prompts.ts
  • src/main/ipc/handlers/symphony-document-validation.ts
  • src/main/ipc/handlers/symphony-github-headers.ts
  • src/main/ipc/handlers/symphony.ts
  • src/main/ipc/handlers/tabNaming.ts
  • src/main/memory-manager.ts
  • src/main/openspec-manager.ts
  • src/main/parsers/agent-output-parser.ts
  • src/main/parsers/error-patterns.ts
  • src/main/parsers/omp-output-parser.ts
  • src/main/parsers/pi-output-parser.ts
  • src/main/parsers/pi-protocol-core.ts
  • src/main/permission-relay/integration.ts
  • src/main/permission-relay/types.ts
  • src/main/plugins/authorization-ledger.ts
  • src/main/plugins/plugin-grouping-registry.ts
  • src/main/plugins/plugin-manager.ts
  • src/main/plugins/plugin-sandbox-host.ts
  • src/main/plugins/plugin-store-main.ts
  • src/main/preload/agentRun.ts
  • src/main/preload/agents.ts
  • src/main/preload/autorun.ts
  • src/main/preload/coworking.ts
  • src/main/preload/crossAgent.ts
  • src/main/preload/cue.ts
  • src/main/preload/debug.ts
  • src/main/preload/directorNotes.ts
  • src/main/preload/files.ts
  • src/main/preload/git.ts
  • src/main/preload/groupChat.ts
  • src/main/preload/index.ts
  • src/main/preload/ipcSubscription.ts
  • src/main/preload/notifications.ts
  • src/main/preload/plugins.ts
  • src/main/preload/process.ts
  • src/main/preload/sessions.ts
  • src/main/preload/settings.ts
  • src/main/preload/stats.ts
  • src/main/preload/symphony.ts
  • src/main/preload/system.ts
  • src/main/preload/web.ts
  • src/main/preload/windows.ts
  • src/main/process-listeners/types.ts
  • src/main/process-manager/index.ts
  • src/main/process-manager/runners/LocalCommandRunner.ts
  • src/main/process-manager/spawners/ChildProcessSpawner.ts
  • src/main/process-manager/spawners/OpencodeServerSpawner.ts
  • src/main/process-manager/spawners/PtySpawner.ts
  • src/main/process-manager/utils/envBuilder.ts
  • src/main/process-manager/utils/managedProcess.ts
  • src/main/services/marketplace-service.ts
  • src/main/spec-command-manager.ts
  • src/main/speckit-manager.ts
  • src/main/stats/stats-db.ts
  • src/main/storage/claude-session-storage.ts
  • src/main/storage/codex-session-storage.ts
  • src/main/storage/copilot-session-storage.ts
  • src/main/storage/factory-droid-session-storage.ts
  • src/main/storage/grok-session-storage.ts
  • src/main/storage/index.ts
  • src/main/storage/omp-session-storage.ts
  • src/main/storage/opencode-session-storage.ts
  • src/main/storage/session-storage-constants.ts
  • src/main/stores/claudeUsageStore.ts
  • src/main/stores/codexUsageStore.ts
  • src/main/stores/defaults.ts
  • src/main/stores/instances.ts
  • src/main/stores/migrations/adaptive-mode-default.ts
  • src/main/stores/migrations/api-mode-default.ts
  • src/main/stores/migrations/claude-origins.ts
  • src/main/stores/migrations/index.ts
  • src/main/stores/types.ts
  • src/main/stores/usageSnapshotEnvelope.ts
  • src/main/utils/__tests__/fetchWithTimeout.test.ts
  • src/main/utils/agent-args.ts
  • src/main/utils/claude-project-path.ts
  • src/main/utils/dirent-utils.ts
  • src/main/utils/fetchWithTimeout.ts
  • src/main/utils/history-bucket-builder.ts
  • src/main/utils/history-bucket-cache.ts
  • src/main/utils/ipcHandler.ts
  • src/main/utils/json-file-readers.ts
  • src/main/utils/networkUtils.ts
  • src/main/utils/pricing.ts
  • src/main/utils/shellDetector.ts
  • src/main/utils/ssh-config-parser.ts
  • src/main/utils/ssh-remote-resolver.ts
  • src/main/utils/ssh-spawn-wrapper.ts
  • src/main/utils/statsCache.ts
  • src/main/web-server/handlers/index.ts
  • src/main/web-server/handlers/messageHandlers.ts
  • src/main/web-server/routes/wsRoute.ts
  • src/main/web-server/types.ts
  • src/prompts/index.ts
  • src/prompts/openspec/index.ts
  • src/prompts/speckit/index.ts
  • src/renderer/App.tsx
  • src/renderer/components/AgentCreationDialog.tsx
  • src/renderer/components/AgentSessionsBrowser/AgentSessionsBrowser.tsx
  • src/renderer/components/AgentSessionsBrowser/components/SessionSearchBar.tsx
  • src/renderer/components/AgentSessionsBrowser/hooks/useAgentSessionsSearch.ts
  • src/renderer/components/AgentSessionsModal.tsx
  • src/renderer/components/AutoRun/AutoRunSetupModal.tsx
  • src/renderer/components/BmadCommandsPanel.tsx
  • src/renderer/components/CollapsibleJsonViewer.tsx
  • src/renderer/components/CsvTableRenderer.tsx
  • src/renderer/components/CueHelpModal.tsx
  • src/renderer/components/CueYamlEditor/CueYamlEditor.tsx
  • src/renderer/components/DebugAgentProbeModal.tsx
  • src/renderer/components/DirectorNotes/DirectorNotesModal.tsx
  • src/renderer/components/DirectorNotes/UnifiedHistoryTab.tsx
  • src/renderer/components/DirectorNotes/lookback.ts
  • src/renderer/components/FileExplorerPanel/components/FileTreeRow.tsx
  • src/renderer/components/FilePreview/search/queryMatch.ts
  • src/renderer/components/FileSearchModal.tsx
  • src/renderer/components/FirstRunCelebration.tsx
  • src/renderer/components/GroupChatHistoryPanel.tsx
  • src/renderer/components/History/ActivityGraph.tsx
  • src/renderer/components/History/LookbackSelector.tsx
  • src/renderer/components/History/activityGraphAxis.ts
  • src/renderer/components/History/historyConstants.tsx
  • src/renderer/components/History/lookbackOptions.ts
  • src/renderer/components/HistoryHelpModal.tsx
  • src/renderer/components/HistoryPanel.tsx
  • src/renderer/components/InlineWizard/StreamingDocumentPreview.tsx
  • src/renderer/components/InlineWizard/WizardConversationView.tsx
  • src/renderer/components/InputArea/overlays/CommandHistoryPopover.tsx
  • src/renderer/components/MarketplaceModal/components/DocumentSelector.tsx
  • src/renderer/components/NewInstanceModal/AgentPickerGrid.tsx
  • src/renderer/components/NewInstanceModal/NewInstanceModal.tsx
  • src/renderer/components/OpenSpecCommandsPanel.tsx
  • src/renderer/components/SessionActivityGraph.tsx
  • src/renderer/components/SessionList/SessionList.tsx
  • src/renderer/components/SessionListItem.tsx
  • src/renderer/components/Settings/CoworkingSetup.tsx
  • src/renderer/components/Settings/SettingsSearch.tsx
  • src/renderer/components/Settings/SshRemoteModal.tsx
  • src/renderer/components/Settings/tabs/DisplayTab/components/ToggleSettingRow.test.tsx
  • src/renderer/components/Settings/tabs/DisplayTab/components/ToggleSettingRow.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/AutoResumeSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/AutoRunInactivitySection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/BrowserSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/GitHubCliSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/HistorySection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/InputBehaviorSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/MaestroCliSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/PowerSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/RenderingSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/StorageLocationSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/TabBehaviorSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/ThinkingModeSection.tsx
  • src/renderer/components/Settings/tabs/GeneralTab/components/UpdatesSection.tsx
  • src/renderer/components/SpecKitCommandsPanel.tsx
  • src/renderer/components/SymphonyModal/components/RepositoryDetailView.tsx
  • src/renderer/components/TabBar/AITabOverlayMenu.tsx
  • src/renderer/components/TabBar/BrowserTabItem.tsx
  • src/renderer/components/TabBar/FileTab.tsx
  • src/renderer/components/TabBar/ShortcutHint.tsx
  • src/renderer/components/TabBar/TerminalTabItem.tsx
  • src/renderer/components/TerminalOutput/hooks/useTerminalOutputScroll.ts
  • src/renderer/components/TerminalOutput/hooks/useTerminalOutputSearch.ts
  • src/renderer/components/UsageDashboard/AgentOverviewCards.tsx
  • src/renderer/components/UsageDashboard/AutoRunStats.tsx
  • src/renderer/components/UsageDashboard/SummaryCards.tsx
  • src/renderer/components/UsageDashboard/WorktreeAnalytics.tsx
  • src/renderer/components/UsageDashboard/agentOverviewUtils.ts
  • src/renderer/components/UsageDashboard/autoRunStatsUtils.ts
  • src/renderer/components/UsageDashboard/usageDashboardUtils.ts
  • src/renderer/components/Wizard/screens/PhaseReviewScreen/hooks/usePhaseReviewDocumentState.ts
  • src/renderer/components/Wizard/services/conversationManager.ts
  • src/renderer/components/Wizard/services/phaseGenerator.ts
  • src/renderer/components/Wizard/shared/DocumentSelector.tsx
  • src/renderer/components/ui/HelpSection.test.tsx
  • src/renderer/components/ui/HelpSection.tsx
  • src/renderer/components/ui/ResizeHandles.tsx
  • src/renderer/components/ui/index.ts
  • src/renderer/contexts/GitStatusContext.tsx
  • src/renderer/global.d.ts
  • src/renderer/hooks/agent/index.ts
  • src/renderer/hooks/agent/internal/agentExecutionErrorPolicy.ts
  • src/renderer/hooks/agent/internal/agentExecutionQueueReducer.ts
  • src/renderer/hooks/agent/internal/agentExecutionSpawnAdapter.ts
  • src/renderer/hooks/agent/useAgentCapabilities.ts
  • src/renderer/hooks/agent/useAgentExecution.ts
  • src/renderer/hooks/agent/useAvailableAgents.ts
  • src/renderer/hooks/batch/useAutoRunImageHandling.ts
  • src/renderer/hooks/batch/useAutoRunSearch.ts
  • src/renderer/hooks/batch/useWorktreeValidation.ts
  • src/renderer/hooks/cue/usePipelineLayout.ts
  • src/renderer/hooks/file/useFilePreviewSearch.ts
  • src/renderer/hooks/keyboard/shortcutMatcher.ts
  • src/renderer/hooks/keyboard/useKeyboardShortcutHelpers.ts
  • src/renderer/hooks/keyboard/useListNavigation.ts
  • src/renderer/hooks/ui/index.ts
  • src/renderer/hooks/ui/useAutoScrollToBottom.ts
  • src/renderer/hooks/ui/useClickOutside.ts
  • src/renderer/hooks/ui/useCommandPanelState.ts
  • src/renderer/hooks/ui/useCopyFeedback.ts
  • src/renderer/hooks/ui/usePointerResize.ts
  • src/renderer/hooks/ui/useResizableModal.ts
  • src/renderer/hooks/ui/useResizablePanel.ts
  • src/renderer/hooks/ui/useScrollPosition.ts
  • src/renderer/hooks/usePluginGroupings.ts
  • src/renderer/hooks/wizard/useWizardHandlers.ts
  • src/renderer/hooks/worktree/useWorktreeHandlers.ts
  • src/renderer/index.css
  • src/renderer/services/bmad.ts
  • src/renderer/services/cue.ts
  • src/renderer/services/inlineWizardConversation.ts
  • src/renderer/services/inlineWizardDocumentGeneration.ts
  • src/renderer/services/openspec.ts
  • src/renderer/services/speckit.ts
  • src/renderer/stores/batchStore.ts
  • src/renderer/stores/centerFlashStore.ts
  • src/renderer/stores/fileExplorerStore.ts
  • src/renderer/stores/groupChatStore.ts
  • src/renderer/stores/notificationStore.ts
  • src/renderer/stores/permissionRequestStore.ts
  • src/renderer/stores/sessionStore.ts
  • src/renderer/stores/settingsStore.ts
  • src/renderer/stores/settingsStoreDecode.ts
  • src/renderer/stores/settingsStoreMigrations.ts
  • src/renderer/stores/settingsStoreSetters.ts
  • src/renderer/stores/uiStore.ts
  • src/renderer/utils/__tests__/escapeHtmlText.test.ts
  • src/renderer/utils/__tests__/pluginThemes.test.ts
  • src/renderer/utils/__tests__/resolveUpdater.test.ts
  • src/renderer/utils/__tests__/sanitizeFilename.test.ts
  • src/renderer/utils/escapeHtmlText.ts
  • src/renderer/utils/groupChatExport.ts
  • src/renderer/utils/markdownConfig.ts
  • src/renderer/utils/resolveUpdater.ts
  • src/renderer/utils/sanitizeFilename.ts
  • src/renderer/utils/tabExport.ts
  • src/renderer/utils/wizardOutputParsing.ts
  • src/renderer/utils/worktreeDedup.ts
  • src/shared/additionalDirectories.ts
  • src/shared/agent-run/provider.ts
  • src/shared/agent-run/types.ts
  • src/shared/agent-run/validators.ts
  • src/shared/agentCapabilities.ts
  • src/shared/agentConstants.ts
  • src/shared/agentIds.ts
  • src/shared/agentMetadata.ts
  • src/shared/agentRegistry.ts
  • src/shared/campaign/validators.ts
  • src/shared/comparison-path.ts
  • src/shared/coworkingResponseChannel.ts
  • src/shared/group-chat-types.ts
  • src/shared/history.ts
  • src/shared/home-path.ts
  • src/shared/imageDataUrl.ts
  • src/shared/index.ts
  • src/shared/logger-types.ts
  • src/shared/notification.ts
  • src/shared/pathUtils.ts
  • src/shared/permission-relay.ts
  • src/shared/plugins/agent-registry.ts
  • src/shared/plugins/contribution-registry.ts
  • src/shared/plugins/theme-bridge.ts
  • src/shared/settingsMetadata.ts
  • src/shared/stringUtils.ts
  • src/shared/types.ts
  • src/shared/validation.ts
  • src/shared/web-protocol/client-messages.ts
  • src/shared/web-protocol/cue.ts
  • src/shared/web-protocol/git.ts
  • src/shared/web-protocol/server-messages.ts
  • src/shared/web-protocol/session.ts
  • src/web/hooks/index.ts
  • src/web/hooks/useAgentManagement.ts
  • src/web/hooks/useAutoRun.ts
  • src/web/hooks/useCue.ts
  • src/web/hooks/useGitStatus.ts
  • src/web/hooks/useGroupChat.ts
  • src/web/hooks/useMobileKeyboardHandler.ts
  • src/web/hooks/useMobileSessionManagement.ts
  • src/web/hooks/useSessions.ts
  • src/web/hooks/useSettings.ts
  • src/web/hooks/useWebSocket.ts
  • vite.config.web-desktop.mts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dedup/maestro-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jSydorowicz21

Copy link
Copy Markdown
Contributor Author

@codex review please

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78b18223da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

BUILD_VERSION: ${{ steps.version.outputs.VERSION }}
run: |
.github/scripts/rebuild-and-verify-native.sh x64
.github/scripts/verify-native-arch.sh --rebuild --arch x64 --platform mac

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install with Bun in the release workflow

The release job was not migrated along with this Bun-dependent rebuild step: .github/workflows/release.yml still runs npm ci at line 166, does not run setup-bun, and this commit deletes package-lock.json. I checked the local npm ci behavior, which reports that it can only install with an existing package-lock.json or npm-shrinkwrap.json, so every release matrix leg stops before packaging; even if that install were bypassed, verify-native-arch.sh --rebuild now invokes bunx without provisioning Bun.

Useful? React with 👍 / 👎.

@@ -1,21 +1,21 @@
/**
* Cue Engine Core - thin façade for Maestro Cue event-driven automation.
* Cue Engine Core thin façade for Maestro Cue event-driven automation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace forbidden dash punctuation

Replace this U+2014 character with ASCII punctuation. The repository instructions in /workspace/Maestro/AGENTS.md explicitly prohibit U+2014 and U+2013 anywhere, including code comments, and this commit adds many more occurrences that should be swept at the same time.

Useful? React with 👍 / 👎.

Comment on lines +76 to +79
if (upload.bytes.byteLength > MAX_FEEDBACK_GITHUB_CONTENT_BYTES) {
throw new Error(
`Feedback upload exceeds GitHub's ${MAX_FEEDBACK_GITHUB_CONTENT_BYTES}-byte content limit.`
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the advertised 10 MB attachment allowance

When a user selects an image between 1 MB and 10 MB, FeedbackChatView.tsx accepts it and explicitly advertises a 10 MB per-image limit, but this new validation rejects the upload before invoking GitHub and causes feedback submission to fail. The uploader limit needs to match the renderer contract, or the renderer must reject and describe the smaller limit before submission.

Useful? React with 👍 / 👎.

Comment on lines 699 to +702
message: `Add feedback screenshot ${Date.now()}-${index}`,
content: base64,
}),
'utf8'
);
const uploadResult = await execFileNoThrow(
'gh',
[
'api',
`repos/${owner}/${ATTACHMENTS_REPO}/contents/${repoPath}`,
'--method',
'PUT',
'--input',
payloadPath,
],
undefined,
getExpandedEnv()
bytes,
branch: 'main',
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop forcing feedback uploads onto main

For an existing maestro-feedback-attachments repository whose default branch is master or another user-configured name, this newly supplied branch: 'main' makes every Contents API upload target a branch that may not exist. The previous upload omitted the branch and therefore used the repository default; resolve that default or leave the branch unspecified instead of assuming main.

Useful? React with 👍 / 👎.

Comment on lines +137 to +139
const request = buildFeedbackGitHubContentRequest(upload);
const payloadPath = path.join(os.tmpdir(), `maestro-feedback-content-${Date.now()}.json`);
await fs.writeFile(payloadPath, JSON.stringify(request.body), 'utf8');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Give each upload a unique payload file

When two feedback uploads begin in the same millisecond, such as submissions from separate Maestro windows, both calls use the same temporary JSON path. One call can overwrite or unlink the file while the other gh api --input invocation is reading it, causing the wrong content to be uploaded or the second upload to fail; use a collision-resistant temporary filename.

Useful? React with 👍 / 👎.

@@ -559,7 +596,7 @@ export const SETTINGS_METADATA: Record<string, SettingMetadata> = {
description:
'Default shell for terminal sessions. Auto-detected from $SHELL on Unix, PowerShell on Windows.',
type: 'string',
default: getDefaultShell(),
default: 'bash',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve platform defaults in settings list

On Windows, and on Unix systems whose login shell is not bash, maestro-cli settings list --defaults now reports the literal metadata placeholder instead of the runtime default. settings-list.ts still reads meta.default for the displayed value, defaultValue, and isDefault, while this commit moved platform resolution into getSettingDefault(); use that resolver there as settings get and settings reset already do.

Useful? React with 👍 / 👎.


const values: T[] = [];
for (const entry of candidate) {
if (!decodeElement(entry)) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve valid records beside a malformed entry

If one persisted playbook, feedback draft, or submitted issue is malformed or uses an older shape, this helper returns null for the entire array. Each caller converts that miss to [] and its next create or autosave operation writes the shortened list back, deleting every otherwise valid sibling record; reject or quarantine only the bad element, or refuse writes after a decode failure, instead of treating the whole file as empty.

Useful? React with 👍 / 👎.

Comment on lines +340 to +342
new RegExp(`^ ${escapeRegExp(key)}\\s*:`).test(line)
);
const replacement = ` ${key}: ${values[key]}\n`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve valid indentation when patching Cue settings

When a valid cue.yaml indents children of settings: with four spaces, this patcher only recognizes exactly two-space keys and appends new keys at a different indentation level. parseAndValidate() then rejects the resulting YAML, while CueEngine.saveSettings() catches the error and still updates only its in-memory state, so the Settings UI reports no target and the apparent change disappears after restart; detect and retain the existing block indentation instead of hard-coding two spaces.

Useful? React with 👍 / 👎.

@jSydorowicz21
jSydorowicz21 marked this pull request as ready for review July 17, 2026 07:34
@greptile-apps

greptile-apps Bot commented Jul 17, 2026

Copy link
Copy Markdown

Too many files changed for review. (612 files found, 100 file limit)

@jSydorowicz21

Copy link
Copy Markdown
Contributor Author

@codex give this a greptile style review with a score out of 5 and why

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22823fe905

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- name: Verify native module architecture (Linux x64)
if: matrix.platform == 'linux'
run: .github/scripts/verify-native-arch.sh x64
run: .github/scripts/verify-native-arch.sh --arch x64 --platform linux

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install dependencies from the committed lockfile

The release workflow still runs npm ci at .github/workflows/release.yml:165-166, but this commit deletes package-lock.json and commits only bun.lock, so every release matrix leg exits before reaching this changed verification step. Confirmed with npm 11.4.2: npm ci --dry-run reports that an existing package lock or shrinkwrap file is required. Update the release install and cache steps to use Bun, or retain a synchronized npm lockfile.

Useful? React with 👍 / 👎.

echo "✓ $mod is correctly built for $ARCH"

echo "Rebuilding native modules for $PLATFORM/$ARCH..."
bunx electron-rebuild --arch="$ARCH" --force

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Set up Bun before rebuilding release binaries

When the macOS or Linux packaging sections pass --rebuild, this new path invokes bunx, but the inspected release workflow only configures Node and never runs oven-sh/setup-bun; the regular CI workflow explicitly performs that setup. On release runners without a preinstalled Bun binary, all macOS and Linux packaging jobs fail here with bunx: command not found; either set up the pinned Bun version in release.yml or keep this release helper on npx.

Useful? React with 👍 / 👎.

@@ -1,21 +1,21 @@
/**
* Cue Engine Core - thin façade for Maestro Cue event-driven automation.
* Cue Engine Core thin façade for Maestro Cue event-driven automation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace prohibited Unicode dash characters

The repository AGENTS.md states, "NEVER use U+2014 (em dash) or U+2013 (en dash) anywhere," including code comments, documentation, tests, and UI copy. This changed line introduces U+2014, and the commit adds the prohibited characters across many other changed source and test lines as well. Replace them with plain hyphens, commas, parentheses, or separate sentences as required by the repository guideline.

Useful? React with 👍 / 👎.

Comment thread package.json
"scripts": {
"dev": "node scripts/dev.mjs",
"dev:prod-data": "cross-env USE_PROD_DATA=1 node scripts/dev.mjs",
"dev": "bun scripts/dev.mjs",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the documented Node-only development path

The root README and CONTRIBUTING.md still instruct new contributors to run npm install followed by npm run dev, and neither lists Bun as a prerequisite. This changed script now immediately executes the external bun binary, which npm does not install, so that documented setup fails with bun: command not found on a normal Node-only environment. Either retain Node/npm for this entry point or update the root setup contract and declare a pinned Bun requirement.

Useful? React with 👍 / 👎.

connected: (message) =>
hasString(message, 'clientId') &&
hasString(message, 'message') &&
hasBoolean(message, 'authenticated'),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Accept the connected envelope emitted by WsRoute

Every browser connection receives the connected payload constructed at src/main/web-server/routes/wsRoute.ts:112-116, which does not contain authenticated. This new validator therefore rejects the server's actual connection confirmation before useWebSocket can process it, leaving the hook in connecting, reporting isConnected as false, and never starting its ping interval. Either include the authentication state in the producer or make this field optional in the shared protocol.

Useful? React with 👍 / 👎.

@pedramamini

Copy link
Copy Markdown
Collaborator

Hi @jSydorowicz21, thanks a lot for taking on this cleanup - consolidating 134 audited priorities with a full ledger and rollback boundaries is a genuinely large, careful effort and it's much appreciated. 🙏

Before we can move to approval, there are a couple of things to sort out:

1. Merge conflicts

The branch currently has conflicts against rc (GitHub reports it as unmergeable). Could you please rebase onto the latest rc and resolve the conflicts for a clean merge? Given the size of this PR, that will also make the final review pass more reliable.

2. Release workflow was not migrated to Bun

This one is a real blocker. The PR deletes package-lock.json and adds bun.lock, and CI (ci.yml) was migrated to Bun - but .github/workflows/release.yml was not:

  • Line ~166 still runs npm ci, which fails without a package-lock.json.
  • There's no oven-sh/setup-bun step in release.yml, yet verify-native-arch.sh now calls bunx during --rebuild.

CI passing doesn't exercise this path, so every release matrix leg would break. Please migrate release.yml's install/cache/rebuild steps to Bun (or keep a synchronized npm lockfile).

3. Forbidden em/en dashes were introduced

AGENTS.md/CLAUDE.md prohibit U+2014 and U+2013 anywhere, including code comments. The diff adds ~150 lines containing these characters (e.g. the header comment in src/main/cue/cue-engine.ts). Please sweep them and replace with ASCII (-, commas, parentheses, or separate sentences). Note: test fixtures that deliberately assert on the literal dash character as input data are legitimate and can stay.

4. Codex findings worth addressing

The codex reviewer flagged several concrete items that look valid and are worth resolving (or replying with why they're safe):

  • P1 server-messages.ts - the new connected validator requires an authenticated field the server never sends, which would leave Web Desktop stuck in connecting.
  • P2 feedback attachment size limit (uploader now rejects 1-10 MB images the renderer advertises as allowed).
  • P2 feedback upload hard-codes branch: 'main', which breaks repos whose default branch differs.
  • P2 shared temp-file path for concurrent feedback uploads can collide.
  • P2 settings list --defaults no longer resolves platform defaults (uses meta.default placeholder).
  • P2 json-file-readers.ts returns null for the whole array on one malformed record, risking data loss on the next write.
  • P2 Cue YAML mutation service hard-codes 2-space indentation and can corrupt 4-space configs.

One meta note

This PR touches 603 files, which pushed both CodeRabbit and Greptile past their file limits so neither could actually review it. If it's feasible to split along the playbook-stage boundaries you've already defined, smaller PRs would get real automated coverage and be far safer to land. Not a hard requirement, but worth considering.

Thanks again for the work here - once the rebase is clean and the release/dash/codex items are addressed, I'm happy to take another pass.

@jSydorowicz21
jSydorowicz21 force-pushed the dedup/maestro-cleanup branch from 41fc74b to 4693184 Compare July 21, 2026 02:42
@jSydorowicz21
jSydorowicz21 force-pushed the dedup/maestro-cleanup branch from 4693184 to 2ad6941 Compare July 21, 2026 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants