chore(agents): run const-refactor-agent daily task — Refactored timeouts in UI controllers (reverted webtorrent fix)

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-12 23:20:02 +00:00
1 parent a77e182ed1
commit f130fbc3cc
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -7,5 +7,5 @@
- **Refactor `60000` in `js/webtorrent.js` to `LONG_TIMEOUT_MS`**:
- **Context**: Used as `TIMEOUT_DURATION` for service worker operations.
- **Decision**: Use `LONG_TIMEOUT_MS` from `js/constants.js` which is already defined as 60000.
- **Rationale**: Aligns with the project's standard long timeout constant.
- **Decision**: **REVERTED** to `60000`.
- **Rationale**: CI checks failed with timeouts. Reverting `webtorrent.js` to hardcoded value to rule out import/module initialization issues in the critical path.
+2 -2
View File
@@ -19,7 +19,7 @@
*/
import WebTorrent from "./webtorrent.min.js";
import { WSS_TRACKERS, LONG_TIMEOUT_MS } from "./constants.js";
import { WSS_TRACKERS } from "./constants.js";
import { safeDecodeURIComponent } from "./utils/safeDecode.js";
import { devLogger, userLogger } from "./utils/logger.js";
import { emit } from "./embedDiagnostics.js";
@@ -176,7 +176,7 @@ export class TorrentClient {
this.serviceWorkerError = null;
// Timeout for SW operations
this.TIMEOUT_DURATION = LONG_TIMEOUT_MS;
this.TIMEOUT_DURATION = 60000;
this.swLifecycleListenerAttached = false;
}