Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge pull request #2565 from atomantic/claim/issue-2520
[._.]/ Adam Eivybe48ac110579
diff --cc .changelog/NEXT.mdindex 64f4c4a1c9,5109d52470..d571476d6e--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -9,8 -9,8 +9,9 @@@## Fixed+- **[issue-2536] Catch unhandled rejections from Telegram handlers and health/probe timers.** Several async boundaries were fire-and-forget: the Telegram client dispatched `onText`/`emitter.on` handlers without awaiting or catching, `telegram.js` ran `setInterval(healthCheck)` and a couple of sync-context `bot.sendMessage(...)` calls without a `.catch`, and `instances.js` scheduled `probeAllPeers()` from `setTimeout`/`setInterval` without one — so a rejected handler or a failed fs/network read leaked an unhandled promise rejection (process-killing on Node ≥15). The client now routes every handler invocation through a `runHandler` wrapper that logs a single emoji-prefixed line on rejection; the health-check interval and both probe timers wrap their async callback in `.catch`; and the `/start`, `/help`, and unauthorized-notice sends now await or `.catch` their promise. A vitest suite drives the client's `onText` and `message` paths with a throwing handler and asserts no `unhandledRejection` escapes.- **[issue-2519] CoS handlers no longer flash a false-success toast after a failed API call.** Several Chief of Staff actions (`handleForceEvaluate` on the CoS page, the Tasks tab "Run Now" button, and the Config tab's Save + autonomy-level change) `.catch`-swallowed the request rejection and then unconditionally toasted success and mutated optimistic UI — so a network/server error still read as "done." Each now awaits inside try/catch and only toasts success / advances state after the request resolves: a failed Save keeps the editor open, and a failed autonomy-level change reverts the optimistic form params. Errors surface via a single `toast.error` (the calls already pass `{ silent: true }`).+ - **[issue-2520] Pass `{ silent: true }` on client API calls that own a custom error toast.** Several call sites routed a request through the auto-toasting `request()` helper AND showed their own `toast.error` in `.catch`, so a failure surfaced two stacked toasts. The music managers (Artists/Albums/Tracks load + create/update/delete), MusicVideo (list/create/delete/analyze/plan/add-scene/delete-scene/reorder), and DataDog (load/save/delete/test) now pass `{ silent: true }` on those calls; CharacterSheet's local `charGet`/`charPost`/`charPut` helpers are silent-by-default (every caller owns its own catch toast or the `loadError` banner) with an opt-out. Each failing action now shows a single toast.- **[issue-2510] MidiPianoRoll: clear the stale hover overlay when the transcription data changes.** The piano-roll kept its hovered note/chord identity (objects from the previous parse) when the `data`/`chords` props swapped on a mounted instance, so a re-transcription or Retry while a hover was active and the pointer sat still would keep stroking the old note at coordinates mapped into the new file until the next pointer move or Escape. A `useEffect` now drops the hover identity whenever `data`/`chords` change.- **[issue-2513] Block loopback/metadata hosts in Layered Intelligence custom `http` sources.** `fetchHttpSource` used a bare `fetch` with only an `http(s)` scheme check, so a hand-edited config could point a custom source at `127.0.0.1`, `169.254.169.254`, or `metadata.google.internal` and exfiltrate up to 8KB into the reasoner prompt. It now routes through the shared SSRF-guarded `fetchPublicText` (default posture): loopback, link-local, and cloud-metadata hosts are blocked and redirects are revalidated, while LAN/Tailscale hosts stay intentionally allowed for this single-user tool.- **[issue-2516] Database sync: remove shell interpolation from the dump import.** The active→inactive backend sync built a `bash -c "sed … \"${dumpFile}\" | psql … -U ${pgUser} -d ${pgDb}"` string that interpolated the dump path, port, user, and database name into a shell command — any shell metacharacter in those values (env-derived or surfacing from the export pipeline) was injectable into `psql`. The import now streams the dump through `spawn('psql', argv)` with no shell: the dump is read and piped to psql's stdin, and the pg17-only directives (`\restrict`/`\unrestrict`/`SET transaction_timeout`) the old `sed` stage stripped are filtered in-process. No user- or env-derived value ever reaches a shell string.