chore: remove unused desktop app, cloud deployment infra, and monitoring stack

Deletes desktop/ (Electron wrapper), deployments/ (Helm/Kustomize/
Terraform/CI for cloud deploy), and monitoring/ (Prometheus + Grafana
stack) along with DESKTOP.md, DEPLOYMENT.md, docker-compose.full.yml,
their npm scripts, and every dangling reference across README,
ARCHITECTURE, INSTALL, SETUP, docs/, and the repeated per-file
MODULE_GUIDE "Observability" boilerplate comment. The GET /api/metrics
endpoint itself is untouched — it's the dashboard's own route, not
part of the removed monitoring stack.
This commit is contained in:
2026-08-11 12:16:54 +07:00
parent f0ae876472
commit 7357070fb9
307 changed files with 23 additions and 31257 deletions
+9 -12
View File
@@ -34,14 +34,11 @@ const CLAUDE_DIR = getClaudeHome();
const PROJECTS_DIR = getProjectsDir();
// Max session files a directory sweep scans synchronously before it yields to
// the event loop. The desktop app hosts this Express server IN the Electron main
// process (see desktop/src/server-host.ts), so a long synchronous scan of a
// large ~/.claude/projects tree — one statSync + one getSession query per file —
// would freeze the whole app window, not just delay an API response. Yielding
// every N files keeps each synchronous burst short so a multi-thousand-session
// history never monopolizes the loop. Under `npm start` the server is its own
// process, so the same scan can't freeze the UI there — which is exactly why
// the issue only reproduces in the packaged app (#223).
// the event loop. A long synchronous scan of a large ~/.claude/projects tree —
// one statSync + one getSession query per file — would otherwise block every
// other request (including hook ingestion) on this single Node process.
// Yielding every N files keeps each synchronous burst short so a
// multi-thousand-session history never monopolizes the loop.
const SWEEP_YIELD_EVERY_FILES = 100;
/**
@@ -1900,10 +1897,10 @@ async function syncDefaultProjects(dbModule, options = {}) {
// Cooperative yield BEFORE the per-file work, so it covers the unchanged
// -file fast paths below (statSync + a getSession query) that otherwise
// never await. Without this, a cold-cache sweep of a large projects tree
// runs thousands of files back-to-back with no yield and freezes the
// desktop app's window (its server shares the Electron main event loop —
// see SWEEP_YIELD_EVERY_FILES). The heavy-parse path keeps its own yield
// further down; this one is what makes the common skip path cooperative.
// runs thousands of files back-to-back with no yield and blocks every
// other request on this process (see SWEEP_YIELD_EVERY_FILES). The
// heavy-parse path keeps its own yield further down; this one is what
// makes the common skip path cooperative.
if (scanned > 0 && scanned % SWEEP_YIELD_EVERY_FILES === 0) {
await new Promise((resolve) => setImmediate(resolve));
}