Skip to content

Remove detect/quarantine fs ops from client#38

Merged
dimitriosGX merged 5 commits into
mainfrom
dk-rem-fb
Jul 18, 2026
Merged

Remove detect/quarantine fs ops from client#38
dimitriosGX merged 5 commits into
mainfrom
dk-rem-fb

Conversation

@dimitriosGX

@dimitriosGX dimitriosGX commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary by cubic

Moved all file-system detection and quarantine logic out of the Electron client. The detectord daemon now owns discovery, hook install, and quarantine; the client only reads status and routes submissions via the daemon. Also fixed multi-server dedup and credential template forwarding (including empty submissions).

  • Refactors

    • Always use the daemon for discovery and submit; removed mode gating and default to primary.
    • Removed client-side watchers and managers: hook health monitor, MCP config monitor, quarantine manager (and tests), plus VS Code workspace task injection code.
    • Simplified hookInjection to report status only.
    • Pruned UI and IPC: removed “Run Quarantine” debug action, tray status lines, mcp:injectHooks/mcp:removeHooks, and mcp:injectVsCodeWorkspaceHook/mcp:removeVsCodeWorkspaceHook; ClientsView now just refreshes status.
    • Fixed multi-server dedup and forwarded credential template edits to the daemon via submit_config; handled empty template submits; SSE handler optional-safe.
    • Removed chokidar dependency.
  • Migration

    • Remove any calls to window.api.mcp.injectHooks(), window.api.mcp.removeHooks(), window.api.mcp.injectVsCodeWorkspaceHook(), and window.api.mcp.removeVsCodeWorkspaceHook().
    • Use getHookStatus() to display current state; installation is daemon-managed.
    • Ensure the daemon is installed/running; client now always relies on it (the EW_DETECTORD_PRIMARY toggle is removed).

Written for commit 8e4ed2e. Summary will update on new commits.

Review in cubic

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 21 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/main/ipc/ipcHandlersMcpSubmit.ts">

<violation number="1" location="src/main/ipc/ipcHandlersMcpSubmit.ts:339">
P2: Already registered or pending servers will no longer be represented as `alreadyOnBackend`; an idempotent daemon acknowledgement is counted as a fresh submission, while a backend conflict becomes a rename failure. Preserving the backend-status classification in the daemon response or retaining an equivalent preflight would keep onboarding results and follow-up actions correct.</violation>
</file>

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread src/main/discovery/mcpDiscovery.ts
Comment thread src/main/ipc/ipcHandlersMcpSubmit.ts Outdated
Comment thread src/main/runtime/hookInjection.ts
Comment thread src/main/ipc/ipcHandlersMcpSubmit.ts Outdated
Comment thread src/main/ipc/ipcHandlersMcpSubmit.ts Outdated
};
// The daemon owns submit and auto-templatizes detected secrets, so the
// manual template overrides don't apply; route through the daemon.
const summary = await submitServersViaDetectord(servers);

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: Already registered or pending servers will no longer be represented as alreadyOnBackend; an idempotent daemon acknowledgement is counted as a fresh submission, while a backend conflict becomes a rename failure. Preserving the backend-status classification in the daemon response or retaining an equivalent preflight would keep onboarding results and follow-up actions correct.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/main/ipc/ipcHandlersMcpSubmit.ts, line 339:

<comment>Already registered or pending servers will no longer be represented as `alreadyOnBackend`; an idempotent daemon acknowledgement is counted as a fresh submission, while a backend conflict becomes a rename failure. Preserving the backend-status classification in the daemon response or retaining an equivalent preflight would keep onboarding results and follow-up actions correct.</comment>

<file context>
@@ -428,123 +323,22 @@ export function registerMcpSubmitHandlers(): void {
-    };
+    // The daemon owns submit and auto-templatizes detected secrets, so the
+    // manual template overrides don't apply; route through the daemon.
+    const summary = await submitServersViaDetectord(servers);
+    console.log(`[detectord] onboarding submit (templates ignored; daemon auto-templatizes): ${summary.submitted} submitted, ${summary.failures.length} failed`);
+    return summary;
</file context>

Comment thread src/main/ipc/ipcHandlersMcpSubmit.ts Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 9 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/main/detectord/submit.ts Outdated
@dimitriosGX
dimitriosGX merged commit 13ece1c into main Jul 18, 2026
5 checks passed
@dimitriosGX
dimitriosGX deleted the dk-rem-fb branch July 18, 2026 13:06
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.

1 participant