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([client-tests-for-deep-routing-drag-smoke-tests-for]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivy5500923c1b1e
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 5ef367ee18..8d6cd23be6 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -20,6 +20,8 @@## Added+- **[client-tests-for-deep-routing-drag-smoke-tests-for] Client tests for deep routing + chip drag-reorder.** Two new smoke-test surfaces. (1) `client/src/hooks/useUniverseNav.test.jsx` — extracts `goToWorld` from `UniverseBuilder.jsx` (~14 lines + an unused `useNavigate` import) into a new `client/src/hooks/useUniverseNav.js` hook so URL transitions can be exercised via `renderHook` + `MemoryRouter` + a sibling `useLocation()` probe. 12 tests pin id encoding (reserved characters), `location.search` preservation across both forward and back-to-index navigation, prefixed mounts (`/media/universe-builder/...`), id-for-id swap, and the basePath regex (a `universeBuilderBasePath` named export). The hook gets a barrel entry + README row per the `client/src/hooks/` maintenance rule. (2) `client/src/components/universeBuilder/InfluenceChipsInput.test.jsx` — `vi.mock`s `@dnd-kit/core`'s `DndContext` so the test captures `onDragEnd` via a hoisted ref and fires it directly, and stubs `useSortable` to a no-op while keeping `arrayMove` real. 8 tests cover forward + backward chip reorder ordering, three no-op drag guards (same chip, drop off-list, stale active id), the X-button remove path, and readOnly-mode chrome. 211/211 client tests pass.+- **[med-tests-no-tests-for-server-lib-ansistrip-js] Tests for `server/lib/ansiStrip.js` and `server/lib/tuiHandshake.js`.** New `ansiStrip.test.js` covers `stripAnsi` one-shot behavior and the `createStreamingAnsiStripper` chunk-boundary buffering (CSI/OSC split across chunks, bare `\x1B` at chunk end resolved as either single-byte or CSI on the next chunk, OSC body leak when terminator never arrives within the 4096-byte window, older unterminated bytes past the window). New `tuiHandshake.test.js` pins every paste-timing constant both production paths (`tuiPromptRunner.js`, `agentTuiSpawning.js`) depend on, plus `PASTE_MARKER_PATTERN`, `inferTuiCommand`, `applyCommandDefaults` (codex `--ask-for-approval never` injection), `buildTuiInvocation` (model-flag baked-in suppression for `--model X`, `--model=X`, `-m X`, `-m=X`, and the codex sentinel), and `detectMissingTuiBinary`. A latent OSC-stripping bug surfaced during the write — `ANSI_PATTERN`'s OSC alternative is dead code because the single-byte alternative `[@-Z\\-_]` matches `\x1B]` first, so OSC bodies leak into the cleaned stream; tests document the current behavior and the issue is logged as [ansistrip-osc-alternative-unreachable] in PLAN.md for a separate fix.- **Network Exposure dashboard widget.** New widget surfaces how PortOS is actually exposed on the network: HTTPS vs HTTP, bind address + audience (loopback-only / all-interfaces / specific-interface), cert mode (Tailscale-trusted hostname vs self-signed), the loopback HTTP mirror port when HTTPS is on, and a mic-availability hint computed from the browser origin (HTTPS or loopback ⇒ available; HTTP on a Tailscale IP ⇒ blocked by the browser's secure-context rule). Renders a warning banner when bound on all interfaces over plain HTTP. Seeded into the `default` (Everything) and `ops` built-in dashboard layouts so the security posture is visible product UX, not a docs-only invariant. Backed by `GET /api/network-exposure/status`.diff --git a/PLAN.md b/PLAN.mdindex d6d8ff62dc..3360d4f56d 100644--- a/PLAN.md+++ b/PLAN.md@@ -13,7 +13,6 @@ _Nothing currently parked — pick the next item from the Backlog._### Code quality / dedup (from `/simplify` passes)- [ ] [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-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).