You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds automatic update checking that notifies users when a new version is available on npm, with install-method-aware update commands.
- Zero-dependency npm registry check with 24h disk cache
- CLI startup banner with non-blocking async check
- API endpoint GET /api/update-check with auth + rate limiting
- Web UI dismissable update banner on session manager page
- Check for updates button with Copy in About modal
- 39 tests with deterministic mocking
- Security hardening (sanitizeVersion, response size limit, bounded regex)
- Install method detection (npm/npx/yarn/pnpm)
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
## Build, Test, and Lint
4
4
5
5
```bash
6
-
npm test# run all tests
6
+
npm test# run all tests (output buffered until done)
7
+
node --test test/*.test.js # run all tests with streaming output (preferred for dev/CI agents)
7
8
node --test test/auth.test.js # run a single test file
8
9
npm run test:coverage # tests + coverage (c8, 92% threshold)
9
10
npm run lint # syntax-check with node --check
@@ -12,11 +13,13 @@ npm run dev # start with auto-generated password
12
13
npm start # start with defaults
13
14
```
14
15
16
+
> **Agent note:** Prefer `node --test test/*.test.js` over `npm test` when you need streaming output. The `npm test` script wraps `node --test` in `execFileSync` which buffers all output until completion — this makes it look like tests are hanging when they're actually running fine. The direct command gives real-time feedback.
17
+
15
18
Pre-commit hooks (Husky + lint-staged) auto-format and syntax-check staged files.
16
19
17
20
### Testing Best Practices
18
21
19
-
**Suite overview:**464 tests, ~17s total. Tests run in parallel child processes via Node's built-in test runner. Most files run in <1s; `integration.test.js` (~17s) and `service.test.js` (~9s) are the slow outliers.
22
+
**Suite overview:**530+ tests, ~17s total. Tests run in parallel child processes via Node's built-in test runner. Most files run in <1s; `integration.test.js` (~17s) and `service.test.js` (~9s) are the slow outliers.
Copy file name to clipboardExpand all lines: docs/api.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -273,6 +273,33 @@ Get the server version.
273
273
{ "version": "1.0.0" }
274
274
```
275
275
276
+
#### `GET /api/update-check`
277
+
278
+
Check if a newer version of TermBeam is available on npm. Results are cached for 24 hours.
279
+
Requires authentication (session cookie or `Authorization: Bearer <password>`) when authentication is enabled. If the server is started with `--no-password`, this endpoint is accessible without authentication.
0 commit comments