Skip to content

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

docs: capture 2 un-fixed code-review follow-ups (ui_describe_visually gesture/correlation + voice-tool edge hardening)

Adam Eivy5f687f401bfd
diff --git a/PLAN.md b/PLAN.md
index fe2bc4f9fe..89a25c2cde 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -11,6 +11,8 @@ _Batch-cleared 2026-05-25: 23 Next Up items shipped together via parallel sub-ag
- [ ] [peer-sync-per-category-version-gate] **Generalize the cross-install schema version gate from whole-payload to per-category.** Surfaced by code review during the batch-clear of `[peer-sync-video-collection-metadata-sync]` (2026-05-25). `compareSchemaVersions` (`server/lib/schemaVersions.js`) walks the UNION of category keys, and the three gate sites (`dataSync.js` `applyRemote`, `peerSync.js` push, `importer.js` import) reject the ENTIRE payload on any `ahead.length > 0`. So introducing a brand-new category key — or bumping one category — makes every not-yet-upgraded peer reject ALL categories (universe, pipeline, …), severing sync across a federation that upgrades on independent schedules. `videoHistory` sidestepped this by deliberately staying OUT of `PORTOS_SCHEMA_VERSIONS` (see the comment there), but `mediaCollections: 1` has the same latent property. Fix: scope the ahead-check to the category (for `applyRemote`/import) or the record's kind→category (for push) actually being transferred, so a newer sender's unknown/bumped category gates only THAT category's transfer, not unrelated ones. Keep the union-walk for diagnostics/UI. Needs new cross-key test coverage (today's tests only exercise same-category gaps).
- [ ] [voice-weather-settings-location] **Wire a real `settings.location { lat, lon }` field so `weather_now` can use a configured location.** Surfaced during the batch-clear review of `[voice-cos-tool-expansion]` (2026-05-25). The `weather_now` voice tool already reads `settings?.location?.{lat,lon}` (forward-compatible, guarded) but no Settings UI or Zod slice ever sets it, so with no `lat`/`lon` args it always falls back to the default location. Add a `location` settings field (Settings UI + a Zod slice in `server/lib/validation.js`), then the existing tool path lights up. Small.
- [ ] [mediacard-use-mediaimage-for-syncing-assets] **`MediaCard.jsx` grid thumbnails still use a raw `<img src={previewUrl}>`.** Same peer-sync placeholder/live-swap gap that `[peer-sync-medialightbox-use-mediaimage-for-syncing-assets]` fixed for the lightbox — `client/src/components/media/MediaCard.jsx` (~line 42) doesn't get the "Syncing" placeholder or the `peerSync:asset-arrived` atomic swap. Swap the raw `<img>` for `MediaImage`. Surfaced by that item's cross-check during the batch-clear (2026-05-25); was outside its stated scope.
+- [ ] [voice-ui-describe-visually-gesture-and-correlation] **`ui_describe_visually` likely can't capture under default browser policy + screenshot waiters lack request correlation.** From the xhigh code-review (2026-05-25). (1) `captureScreenForVision` (`client/src/services/voiceClient.js`) calls `getDisplayMedia` from a *server-initiated* socket event (`voice:screenshot:request`), not a transient user gesture — browsers (Chrome/FF/Safari) require user activation for screen capture, so the call typically rejects with `NotAllowedError` and the feature degrades to "I couldn't capture the screen." Rethink the trigger: a click-to-grant affordance in `VoiceWidget`, a one-time captured `MediaStream` the user pre-authorizes, or document the gesture requirement. (2) `screenshotWaiters` (`server/sockets/voice.js`) is a bare array bulk-resolved with no `requestId` correlation (unlike the `uiTextWaiters` Map) — a late result from a prior/interrupted turn can satisfy a new turn's waiter, describing a stale tab. Mirror the `uiTextWaiters` requestId-keyed pattern. Until (1) is solved the feature is effectively non-functional.
+- [ ] [voice-tool-edge-hardening] **Edge-case hardening for the new voice tools (all low-severity, from the xhigh code-review 2026-05-25).** (a) `calendar_today` samples the TZ offset at "now" (`getUtcOffsetMs(new Date(), tz)`) then applies it to the target day's midnight → window drifts ~1h on DST-transition days; sample the offset at the target midnight instead. (b) `calendar_next`'s in-memory filter requires `start >= now` while the server-side `getEvents` keeps `endTime >= now`, so a currently-in-progress meeting is skipped from "what's next?" — decide intended semantics (current+next vs strictly-future) and align the two layers. (c) `timer_set` is a bare in-memory `setTimeout` with no persistence (lost silently on restart) and no dedup across tool-loop iterations (LLM re-issue → double notification). Also minor: `dataSync.js` per-`(category,forPeerId)` `checksumCache` keys are never evicted (unbounded for cycling peer ids; negligible for a home federation), and `resolveExcludeSet` runs on every `getChecksum` even on a cache hit (extra subs-file read on the 60s poll — hoist below the cache-hit check).
## Deferred Architecture (human-led planning)