refactor: replace magic number 5000 with SHORT_TIMEOUT_MS in js/subscriptions.js

Also updates perf/constants-refactor/candidates.json and adds completion log.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-19 17:54:44 +00:00
1 parent 8181588f50
commit 15d28cdf35
4 files changed
+26 -8

No files matched your search

@@ -0,0 +1,15 @@
# Daily Task: const-refactor-agent
**Date:** 2026-02-19
**Agent:** const-refactor-agent
**Status:** Completed
## Actions Taken
- Identified `5000` usage in `js/subscriptions.js` as a candidate for `SHORT_TIMEOUT_MS`.
- Verified `SHORT_TIMEOUT_MS` exists in `js/constants.js` (value: 5000).
- Updated `perf/constants-refactor/candidates.json` with the new finding.
- Refactored `js/subscriptions.js` to import `SHORT_TIMEOUT_MS` and use it for `nip07DecryptTimeoutMs` fallback.
- Verified changes with `npm run lint` and `npm run test:unit`.
## Findings
- `js/subscriptions.js` uses `12000` for interactive timeout, while `js/userBlocks.js` uses `15000`. This inconsistency remains but the silent fallback is now canonicalized to `SHORT_TIMEOUT_MS` in `subscriptions.js`.