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
docs([sweep-provider-type-tui-inline-checks-in-client]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivyb4f65bd6ffa8
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex e58f9e4dd3..5ef367ee18 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -2,6 +2,8 @@## Changed+- **[sweep-provider-type-tui-inline-checks-in-client] Adopt `isTuiProvider` + new `isCliProvider` / `isProcessProvider` helpers at the saved-provider chip sites.** Three inline `provider.type === 'tui'` / compound `'cli' || 'tui'` checks in `client/src/pages/AIProviders.jsx` (lines 262, 310, 396) and two in `client/src/components/cos/TaskAddForm.jsx` (lines 86, 88) now flow through `client/src/utils/providers.js`. Two new one-liner exports added there: `isCliProvider(provider)` and `isProcessProvider(provider)` (`isCliProvider || isTuiProvider` — the predicate for "shows a Command + args" config). `formData.type === ...` checks inside the AIProviders provider-edit form intentionally stay inline (PLAN scoped to saved-provider chips). New `client/src/utils/providers.test.js` covers all five helpers (10 assertions, including nullish edge cases). Two deferred follow-ups captured in PLAN.md: `[sweep-provider-type-api-inline-checks-in-client]` (sibling sweep across AIProviders, goals views, digital-twin tabs) and `[promote-provider-type-constants-to-shared-module]` (unify the partial `PROVIDER_TYPES` constant in `server/lib/aiToolkit/constants.js` and have the helpers read from it). 201/201 client tests pass.+- **[extract-usependinglistrows-hook] Unify pending-row buffers in `WardrobeSection` + `CharacterDetailEditor` behind a shared hook.** New `client/src/hooks/usePendingListRows.js` collapses the "list-of-rows where a new row is held client-side until a required column fills, then promoted to `onChange`" pattern that was inlined in `CanonCard.jsx#WardrobeSection` and `CharacterDetailEditor.jsx`'s per-LIST_SECTION block (each had grown slightly different id-handling: `wd-<uuid>` ids that round-trip verbatim vs `pending-<key>-<uuid>` client-only ids stripped at promotion). The hook accepts `idPrefix` + `stripIdOnPromote` so both conventions survive intact, and a new `ListSectionEditor` subcomponent inside `CharacterDetailEditor` owns one hook instance per section (hooks can't be called inside `LIST_SECTIONS.map`). Skipping the stale `[route-medialightbox-settings-drawer-through]` PLAN entry along the way — the drawer was removed in commit ed0e4859 so no migration target exists. Net 77 LOC removed across the two call sites; 11 new tests cover add/promote/remove/required-column gating and the `crypto.randomUUID` fallback path. 202/202 client tests pass; lint clean.- **[apicore-request-arraybuffer-response-type] `apiCore.request()` grows an `arraybuffer` `responseType` escape hatch; two TTS audition helpers stop bypassing the shared client.** `client/src/services/apiCore.js#request` now accepts `{ responseType: 'arraybuffer' }` — when set, the helper returns `response.arrayBuffer()` instead of parsing JSON, while still funneling the error path (server-shaped 4xx/5xx, network-unreachable toast, `err.code` / `err.status` / `err.context` forwarding) through the same code. `apiVoice.js#testTts` and `apiPipeline.js#previewPipelineTtsVoice` dropped their raw `fetch` paths and now call `request()` with `responseType: 'arraybuffer'` + `silent: true` (all three callers — `VoiceTab.handleTest`, `VoiceTab.handlePreviewVoice`, `VoicePicker.handleAudition` — already own their own catch-block toasts, so silent avoids double-toasting per the CLAUDE.md convention). Drops ~25 LOC of duplicated `if (!res.ok) parse + throw` shaping. Also pruned a stale PLAN.md entry ([extract-useswipenav-hook-lib-clipboard-js]) — both halves of that item already shipped (clipboard helpers in `client/src/lib/clipboard.js`, swipe in `client/src/hooks/useSwipeNav.js`; `MediaLightbox.jsx:122` has been calling `useSwipeNav` since PR #261). 163/163 client tests pass; lint clean.diff --git a/PLAN.md b/PLAN.mdindex 0d21645ae3..d6d8ff62dc 100644--- a/PLAN.md+++ b/PLAN.md@@ -14,7 +14,8 @@ _Nothing currently parked — pick the next item from the Backlog._- [ ] [route-medialightbox-settings-drawer-through] **Route `MediaLightbox` settings drawer through `components/Drawer.jsx`.** Reconcile `Drawer`'s flat Esc handler with the lightbox's layered Escape cascade.- [ ] [client-tests-for-deep-routing-drag-smoke-tests-for] **Client tests for deep routing + drag.** Smoke tests for `goToWorld(id)` URL transitions and chip-reorder ordering (mock `useSortable`).-- [ ] [sweep-provider-type-tui-inline-checks-in-client] **Sweep `provider.type === 'tui'` inline checks in client.** New `isTuiProvider` helper in `client/src/utils/providers.js` not yet adopted in `client/src/pages/AIProviders.jsx` (3 remaining inline checks at lines 262, 396, 421 of CONFIG-style chips) and `client/src/components/cos/TaskAddForm.jsx`. Low priority — these are visual chip predicates, not behavioral.+- [ ] [sweep-provider-type-api-inline-checks-in-client] **Sweep `provider.type === 'api'` inline checks in client.** Sibling of `[sweep-provider-type-tui-inline-checks-in-client]` (shipped 2026-05-20). Add `isApiProvider(provider)` to `client/src/utils/providers.js` and adopt at the saved-provider call sites: `client/src/pages/AIProviders.jsx:265` + `:399` (CONFIG-style chips showing the API endpoint), `client/src/components/goals/GoalsTreeView.jsx:14` (`API_PROVIDER_FILTER = p => p.enabled && p.type === 'api'`), `client/src/components/goals/GoalsListView.jsx:13` (same filter), and the `apiProviders` filter in `client/src/components/digital-twin/tabs/TasteTab.jsx`. Skip `formData.type === 'api'` in the AIProviders edit form (same exclusion convention as the TUI sweep — form-draft state, not saved providers). Low priority — visual / filter predicate consolidation.+- [ ] [promote-provider-type-constants-to-shared-module] **Promote `'tui'` / `'cli'` / `'api'` literals to a shared `PROVIDER_TYPES` constant.** `server/lib/aiToolkit/constants.js` already exports a partial `PROVIDER_TYPES = { CLI: 'cli', API: 'api' }` (missing `TUI`); the client helpers in `client/src/utils/providers.js` (`isTuiProvider`, `isCliProvider`, `isProcessProvider`) and the server-side `LIGHT_CONTEXT_PROVIDER_TYPES` set in `agentPromptBuilder.js` all re-encode the same string literals. Add `TUI: 'tui'` to the toolkit constants, mirror to client (or move to a neutral location), and migrate helpers + sets to read from the constant. Surfaced by /simplify quality agent during `[sweep-provider-type-tui-inline-checks-in-client]`; deferred to keep that PR scoped.- [ ] [consolidate-cert-path-constants] **Consolidate `CERT_DIR`/`CERT_PATH`/`KEY_PATH`/`META_PATH` constants.** Re-declared in `scripts/setup-cert.js`, `scripts/open-ui-in-browser.js`, `server/services/certProvisioner.js`, and `server/services/certRenewer.js` (4 sites). Surfaced by `/simplify` during the first-run HTTPS-auto-flip fix (2026-05-19); deferred to keep that PR scoped. Candidate home: `lib/certPaths.js` (alongside `lib/tailscale-https.js` so both runtime + bootstrap can import).- [ ] [imagegen-local-defer-module-load-side-effects] **Defer module-load side effects in `server/services/imageGen/local.js`.** Line 32 runs `IMAGE_MODELS = Object.fromEntries(getImageModels().map(...))` at module evaluation — `getImageModels()` calls `lib/mediaModels.js#loadMediaModels` which `mkdirSync`s `dirname(REGISTRY_FILE)` and `writeFileSync`s a default registry if missing. Any importer that loads via a mocked `PATHS.data` (e.g. `routes/pipeline.test.js` → `routes/pipeline.js` → `routes/universeBuilder.js` → `services/universeBuilderCollectionHook.js` → `services/imageGen/local.js`) fails on `mkdirSync('/mock/data')`. Worked around in 2026-05-19 by lazy-importing `readImageSidecar` in `universeBuilderCollectionHook.js`; real fix is to convert `IMAGE_MODELS` + sibling top-level constants to lazy getters and audit callers. Affects every consumer of `local.js` exports today.- [ ] [cleanplateprompt-migrate-to-rich-canon-fragments] **Migrate `client/src/lib/cleanPlatePrompt.js#composeCleanPlatePrompt` to `richCanonDescriptorFragments('place', setting)`.** Clean-plate prompt builder (Cluster A — A4 setting reference renders) hand-rolls `description + Palette + recurringDetails` extraction at `cleanPlatePrompt.js:26-30` and is missing `era` / `weather` for the same reason `[pipeline-visual-stages-setting-field-injection]` was missing them — both are visual prompts that benefit from period/atmosphere cues. Tightly scoped sibling change (one client file + one test file). Deferred from that PR because the PLAN item targeted storyboard+comic-panel specifically; clean plates are setting-reference renders, adjacent but distinct.