fix: handle terminal startup failures and degraded session watchers#279
fix: handle terminal startup failures and degraded session watchers#279danshapiro merged 5 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0ef18bbe2
ℹ️ 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".
server/coding-cli/session-indexer.ts
Outdated
| this.needsFullScan = true | ||
| this.scheduleRefresh() |
There was a problem hiding this comment.
Avoid debouncing away every fallback full scan
The fallback loop schedules a refresh every rootFallbackScanIntervalMs using scheduleRefresh(), but scheduleRefresh() always clears any pending timer before creating a new one. With the defaults in this commit (rootFallbackScanIntervalMs = 1000, debounceMs = 2000), each fallback tick cancels the prior refresh before it can fire, so no full scan runs while fallback mode is active. In degraded watcher or missing-root scenarios, this prevents the intended recovery behavior and sessions may not appear until some unrelated trigger/full-scan interval occurs.
Useful? React with 👍 / 👎.
Summary
Testing
npm run test:vitest -- test/unit/client/components/TerminalView.lifecycle.test.tsxnpm run test:vitest -- --config vitest.server.config.ts test/server/ws-edge-cases.test.ts test/unit/server/terminal-registry.test.ts test/unit/server/coding-cli/session-indexer.test.tsnpm test