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
fix([migrate-two-remaining-local-formatters]): address codex+gemini review — tolerate null options arg
Adam Eivy99452ec5581b
diff --git a/PLAN.md b/PLAN.mdindex 9a6be3aed5..f267f36ab7 100644--- a/PLAN.md+++ b/PLAN.md@@ -5,6 +5,7 @@ For project goals, see [GOALS.md](./GOALS.md). For completed work, see [.changel## Next Up- [ ] [codex5-onboarding-capability-map] **[P2][ONBOARDING]** Capability map of connected systems. One page showing each integration's status: Providers (per-provider configured/available/throttled), Calendar, Brain/memory embeddings, Voice (mic + TTS), Tailscale + HTTPS, Genome/health imports, Telegram/messages, App registry/PM2. Each row links to the relevant settings page. Doubles as a setup checklist and a runtime health overview.+- [ ] [migrate-taskitem-formatattachmentsize-to-formatbytes] **Migrate `TaskItem.jsx`'s local `formatAttachmentSize` to shared `formatBytes`.** `client/src/components/cos/tabs/TaskItem.jsx` still defines a local `formatAttachmentSize(bytes)` (B/KB/MB with `.toFixed(1)`) that duplicates `formatBytes` in `client/src/utils/formatters.js`. Surfaced by gemini review during the `[migrate-two-remaining-local-formatters]` claim 2026-05-24; deferred as out-of-scope for that item (which named only `formatDateTime` + `formatDurationMin`). Note the edge-case semantics differ: the local helper returns `''` for falsy/0 size (used inside an attachment `title` like `(1.5 KB)`), while `formatBytes(0)` returns `'0 B'` — preserve the empty-on-missing behavior with a guard (`att.size ? formatBytes(att.size) : ''`) so the title doesn't render `(0 B)` for sizeless attachments.- [ ] [optimize-voice-ui-index-text-payload-lazy-only-run] **Optimize `voice:ui:index` text payload.** Lazy: only run `extractVisibleText` when server requests via `voice:ui:read-request`. Keep current behavior as fallback.- [ ] [voice-agent-explicit-long-term-memory-routing-on] **Voice agent — explicit long-term memory routing.** On retrieval-shaped voice turns, inject top-N relevant memories into the system prompt via `brain_search`.- [ ] [flux2-multi-reference-python-runner] **FLUX.2 multi-reference Python runner.** The UI + server contract for multi-reference editing shipped 2026-05-17 (slug `multi-reference-image-editing-for-flux-2-ui`); the Python runner (`scripts/flux2_macos.py`) currently ignores the `--reference-images`/`--reference-strengths` args that `local.js` now passes. Wire diffusers' multi-reference API in the runner and swap `server/lib/mediaModels.js#flux2-klein-9b` `tokenizerRepo` to `FLUX.2-klein-9B-kv` (gated repo — requires the user to accept the license on HF). Validate end-to-end with 2–4 uploaded refs.diff --git a/client/src/utils/formatters.js b/client/src/utils/formatters.jsindex adb167d9d3..7dd1ad7301 100644--- a/client/src/utils/formatters.js+++ b/client/src/utils/formatters.js@@ -245,8 +245,9 @@ export function formatDurationMs(ms) {* to signal an estimate (e.g., "~1h 30m") for predicted/averaged durations.* @returns {string} Formatted duration (e.g., "30m", "1h 30m", "2h", "~2h")*/-export function formatDurationMin(minutes, { approximate = false } = {}) {+export function formatDurationMin(minutes, options = {}) {if (minutes == null) return '';+ const { approximate = false } = options ?? {};const prefix = approximate ? '~' : '';if (minutes >= 60) {const h = Math.floor(minutes / 60);@@ -267,8 +268,9 @@ export function formatDurationMin(minutes, { approximate = false } = {}) {* @param {boolean} [options.allDay=false] - Render date-only (all-day event).* @returns {string} Formatted event date/time, or '' for missing/invalid input*/-export function formatEventDateTime(dateStr, { allDay = false } = {}) {+export function formatEventDateTime(dateStr, options = {}) {if (!dateStr) return '';+ const { allDay = false } = options ?? {};const date = new Date(dateStr);if (Number.isNaN(date.getTime())) return '';// All-day events render exactly like `formatDateFull` (full weekday + year).diff --git a/client/src/utils/formatters.test.js b/client/src/utils/formatters.test.jsindex ac1be1bfd3..19f4c055d1 100644--- a/client/src/utils/formatters.test.js+++ b/client/src/utils/formatters.test.js@@ -24,6 +24,10 @@ describe('formatDurationMin', () => {expect(formatDurationMin(60, { approximate: true })).toBe('~1h');expect(formatDurationMin(210, { approximate: true })).toBe('~3h 30m');});++ it('tolerates a null options argument', () => {+ expect(formatDurationMin(90, null)).toBe('1h 30m');+ });});describe('formatEventDateTime', () => {@@ -52,4 +56,8 @@ describe('formatEventDateTime', () => {it('all-day and timed renderings differ', () => {expect(formatEventDateTime(sample, { allDay: true })).not.toBe(formatEventDateTime(sample));});++ it('tolerates a null options argument', () => {+ expect(formatEventDateTime(sample, null)).toBe(formatEventDateTime(sample));+ });});