paneful 0.9.6 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ export class ClaudeMonitor {
14
14
  resume() {
15
15
  if (this.destroyed || this.pollTimer)
16
16
  return;
17
- this.pollTimer = setInterval(() => this.poll(), 3000);
17
+ this.pollTimer = setInterval(() => this.poll(), 5000);
18
18
  }
19
19
  pause() {
20
20
  if (this.pollTimer) {
@@ -16,7 +16,7 @@ export class GitMonitor {
16
16
  if (this.destroyed || this.pollTimer)
17
17
  return;
18
18
  this.poll();
19
- this.pollTimer = setInterval(() => this.poll(), 10_000);
19
+ this.pollTimer = setInterval(() => this.poll(), 15_000);
20
20
  }
21
21
  pause() {
22
22
  if (this.pollTimer) {
@@ -7,6 +7,7 @@ export class PortMonitor {
7
7
  terminals = new Map();
8
8
  alivePorts = new Map(); // projectId → alive ports
9
9
  pollTimer = null;
10
+ immediatePollTimer = null;
10
11
  onChange;
11
12
  destroyed = false;
12
13
  polling = false;
@@ -18,7 +19,7 @@ export class PortMonitor {
18
19
  if (this.destroyed || !this.paused)
19
20
  return;
20
21
  this.paused = false;
21
- this.pollTimer = setInterval(() => this.poll(), 5000);
22
+ this.pollTimer = setInterval(() => this.poll(), 10_000);
22
23
  }
23
24
  pause() {
24
25
  this.paused = true;
@@ -26,6 +27,10 @@ export class PortMonitor {
26
27
  clearInterval(this.pollTimer);
27
28
  this.pollTimer = null;
28
29
  }
30
+ if (this.immediatePollTimer) {
31
+ clearTimeout(this.immediatePollTimer);
32
+ this.immediatePollTimer = null;
33
+ }
29
34
  }
30
35
  getPortStatus() {
31
36
  const result = {};
@@ -77,7 +82,9 @@ export class PortMonitor {
77
82
  }
78
83
  }
79
84
  if (found && !this.paused) {
80
- this.poll();
85
+ if (this.immediatePollTimer)
86
+ clearTimeout(this.immediatePollTimer);
87
+ this.immediatePollTimer = setTimeout(() => this.poll(), 500);
81
88
  }
82
89
  }
83
90
  removeTerminal(terminalId) {
@@ -105,6 +112,10 @@ export class PortMonitor {
105
112
  clearInterval(this.pollTimer);
106
113
  this.pollTimer = null;
107
114
  }
115
+ if (this.immediatePollTimer) {
116
+ clearTimeout(this.immediatePollTimer);
117
+ this.immediatePollTimer = null;
118
+ }
108
119
  this.terminals.clear();
109
120
  this.alivePorts.clear();
110
121
  }