Commit graph

64 commits

Author SHA1 Message Date
777genius
9ed1988346 fix: refresh watch scope on provider fallback 2026-05-30 17:34:05 +03:00
777genius
06036460e9 fix: keep watch scope safe on provider errors 2026-05-30 17:11:31 +03:00
777genius
d0c64fabb8 fix: export notifyTeamWatchScopeChanged so the committed build resolves
TeamProvisioningService imports notifyTeamWatchScopeChanged (added with the
setAliveRunId/deleteAliveRunId helpers) but the export was missing, so a clean
checkout of the branch failed to typecheck. Add the export plus a test; the
call-site wiring stays as in-progress work.
2026-05-30 12:33:57 +03:00
777genius
8b3cec8013 perf: update team watcher incrementally instead of full rebuild
A team launch repeatedly changes the watched target set (new dirs appear), and each
change tore down the chokidar watcher and recreated it over the full target set.
On macOS chokidar uses kqueue with one fd per watched file, so every rebuild
re-opened an fd for EVERY watched file (the large always-watched inbox set plus
scoped dirs). Profiling a 6-member mixed launch showed ~54k open() syscalls dominated
by these rebuilds.

Keep one persistent watcher and apply target-set changes with add()/unwatch() on the
delta only, so a reconcile opens fds for just the newly added dirs. The initial
watcher still uses ignoreInitial for a silent startup baseline, and
emitExistingFilesForNewTargets still backfills files already present in newly added
dirs, so the emitted event surface is unchanged. Because the watcher is no longer
recreated per reconcile, the stale-old-generation and close-throws-during-rebuild
failure modes are gone; their tests are replaced with incremental add/unwatch and
persistent-watcher coverage. All 69 watcher tests pass.
2026-05-30 12:05:23 +03:00
777genius
aa9a1bba8c perf: debounce team watcher rebuilds during dir-event bursts
A team launch creates many directories/files in quick succession (worktrees,
inboxes, session logs), and each addDir/unlinkDir event triggered a full
TeamTaskWatchRegistry reconcile that tore down and recreated the entire chokidar
watcher (re-opening a kqueue fd per watched file on macOS). Profiling a 6-member
mixed-team launch showed kqueue churn (kevent) as a top native cost and watcher
rebuild as the top remaining main-thread JS cost after the transcript fix.

Debounce the event-driven reconcile (250ms) so a burst collapses into one rebuild.
collectTargets re-reads the current directory state and emitExistingFilesForNewTargets
backfills files created before the rebuild, so no change is missed; requestReconcile,
startup, and the periodic 30s reconcile stay immediate. Adds a test asserting a
burst of addDir events yields a single rebuild.
2026-05-30 09:46:16 +03:00
777genius
5d63ecfe32 perf: scope team file watching to active and engaged teams
The main process watched every team directory under ~/.claude/teams (one shallow
chokidar target per team root, per team inboxes, and per task dir). On macOS this
falls back to kqueue, which needs one fd per watched file, so a workspace with
many teams kept ~1600 descriptors open and made startup and reconcile work scale
with the number of teams on disk.

Scope the team-root and task watching to teams that are running or currently
engaged in the UI. The teams root and every team's inboxes are still watched for
all teams, so cross-team message delivery, the lead inbox->stdin relay, and
notifications are unchanged. Idle teams are static, so dropping their team-root/
task watches is safe; opening a team (getData) or launching it re-adds it via an
immediate watch-scope refresh. The provider falls back to watching every team
when unset, and the EMFILE polling fallback is intentionally left unscoped so a
scope change can never look like a deletion.

Measured on a 162-team workspace: open team fds 1600 -> 730, with team-root
watching restored the moment a team is opened or goes live.
2026-05-30 00:25:55 +03:00
777genius
4640e1eea4 fix(startup): ignore stale opencode probe results 2026-05-26 10:39:50 +03:00
777genius
a8ac52b6f3 perf(startup): dedupe opencode version probes 2026-05-26 10:32:46 +03:00
777genius
0d4e6f5047 perf(startup): avoid provider refresh version probe 2026-05-25 23:37:12 +03:00
777genius
33463d3479 perf(startup): skip deferred cli version probe 2026-05-25 23:25:21 +03:00
777genius
a6dd0061a8 perf(startup): defer heavy startup work 2026-05-25 23:14:59 +03:00
777genius
e64fff8af0 fix(watcher): baseline large existing jsonl files 2026-05-25 22:26:55 +03:00
777genius
91b153459a feat: add resilient cross-platform file watching
Share watcher fallback behavior across project, todo, team, and task file monitoring. Add polling fallback coverage for watcher-limit and startup failure cases so Linux EMFILE conditions degrade instead of amplifying renderer crashes.
2026-05-24 00:22:48 +03:00
777genius
34a1b86b21 perf(startup): defer noncritical startup probes 2026-05-23 15:04:05 +03:00
777genius
a4861fa77d perf(startup): defer provider status checks 2026-05-23 14:23:57 +03:00
777genius
b5ca3eed68 fix(cli): prevent stale status hydration 2026-05-22 00:18:59 +03:00
777genius
3c427ac617 feat(runtime): support anthropic compatible endpoints 2026-05-22 00:16:52 +03:00
777genius
6fd75c6704 chore: commit remaining workspace updates 2026-05-21 16:43:00 +03:00
777genius
420ace3c15 fix(file-watcher): avoid recursive team task watching 2026-05-21 16:41:06 +03:00
777genius
ec7b1dbd18 fix(opencode): detect nvm runtime installs 2026-05-21 13:38:40 +03:00
777genius
e3ff8e1df5 fix(opencode): preserve hydrated model lists 2026-05-20 15:38:46 +03:00
777genius
d5894c029d feat(team): improve runtime bootstrap controls 2026-05-19 22:39:13 +03:00
777genius
e5ace8c7cb chore(release): lock runtime 0.0.37 2026-05-18 22:28:24 +03:00
777genius
5e0d552cb9 fix(opencode): improve runtime preflight diagnostics 2026-05-18 11:11:45 +03:00
777genius
4a8cec9dc2 chore: checkpoint frontend workspace updates 2026-05-18 01:57:16 +03:00
777genius
b88b2db365 fix: harden provider management and updater flows 2026-05-16 23:23:27 +03:00
infiniti
d29f3a23d4
fix: harden Windows frontend stability (#125) 2026-05-16 19:57:11 +03:00
777genius
20c3194160 feat(runtime): improve provider delivery visibility 2026-05-12 23:33:08 +03:00
777genius
3f2b807bbc feat(opencode): improve runtime delivery diagnostics 2026-05-12 13:26:33 +03:00
777genius
08ab7c6b6d fix(team): harden process bootstrap and codex auth 2026-05-08 09:28:28 +03:00
777genius
24d96b5bec fix(ci): handle windows-only test behavior 2026-05-04 09:37:58 +03:00
777genius
d0341e58af fix(team): retain launch status and clarify notifications 2026-05-03 13:18:53 +03:00
777genius
4385b0c679 perf(team): cache team data reads safely 2026-05-02 20:24:46 +03:00
777genius
19b6937446 feat(opencode): harden delivery and provider UI 2026-04-25 14:30:10 +03:00
777genius
3fe9a24e41 feat(team): harden launch liveness and recovery 2026-04-24 22:34:08 +03:00
777genius
267a192329 fix(notifications): recover corrupted history writes 2026-04-24 12:24:21 +03:00
777genius
1c07e0fdb6 feat(team): expand opencode review and release support 2026-04-24 12:05:54 +03:00
777genius
6a9f281eca fix(opencode): preserve loading state during runtime hydration 2026-04-21 23:24:09 +03:00
777genius
5e31bd1c06 feat(opencode): add team runtime integration 2026-04-21 20:28:22 +03:00
777genius
19e7ea995e fix(ci): stabilize workspace test suite 2026-04-20 20:38:12 +03:00
777genius
5683973c04 feat(codex): add app-server account management and polish native UX 2026-04-20 20:18:21 +03:00
777genius
51376e2620 chore(merge): sync dev into spike/team-snapshot-split-plan 2026-04-18 11:32:29 +03:00
SardorBek Sattarov
a42ab3096f
feat(team): auto-resume rate-limited teams when the limit resets 2026-04-18 10:21:23 +03:00
777genius
da9cb93e93 test(ci): stabilize file watcher first-read timing 2026-04-17 23:12:01 +03:00
777genius
18d9f2b4a4 fix(ci): restore workspace checks 2026-04-17 22:45:19 +03:00
777genius
bb60bbb0ec fix(ci): restore workspace validation 2026-04-16 22:52:56 +03:00
777genius
ac1c99ac1f feat(cliInstaller): add model verification for providers
- Introduced CLI_INSTALLER_VERIFY_PROVIDER_MODELS IPC channel for on-demand model verification.
- Implemented handler for verifying provider models in the CliInstallerService.
- Enhanced CLI installation status management with model verification state and availability.
- Updated related components to support model verification feedback in the UI.
2026-04-16 19:41:23 +03:00
777genius
07682eca37 feat(graph-controls): add team page and task creation buttons, improve toolbar button styles 2026-04-13 18:36:44 +03:00
777genius
fb21b982c6 fix(ci): restore green workspace checks 2026-04-12 00:02:59 +03:00
777genius
4869bb35da feat(agent-teams): harden dev bootstrap and task tooling 2026-04-11 21:57:59 +03:00