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: print working access URL on update + reorder boot banner
Adam Eivye4c6e2fa3f3c
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 9a8f4930dc..005d48e137 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -117,6 +117,8 @@- **The Chief of Staff 3D avatar no longer slowly zooms itself in until you reload.** The full-bleed background avatar keeps a constant apparent size by moving the camera back as the panel grows (`CoSBackgroundCamera` derives `camera.position.z` from the live-measured canvas height). But a transient *zero / pre-layout / hidden* size reading — which fires when the agent panel collapses and re-expands, when the EventLog mounts on the "working on task" transition, or from tab-occlusion ResizeObserver frames — collapsed the scale factor to its floor and slammed the camera to its closest (most zoomed-in) position, which `OrbitControls` then latched with no guaranteed correction. Over a busy night of state transitions the avatar ended up "zoomed way in," fixable only by a page reload. The camera-distance math is now a pure, unit-tested helper that returns `null` for any degenerate (non-finite or sub-pixel) measurement, so those frames leave the camera at its last good framing instead of yanking it in. (`client/src/components/cos/CoSBackgroundCamera.jsx`)+- **`./update.sh` now tells you where to open PortOS — and the boot banner stops pointing at a dead `:5555`.** When a Tailscale cert is present, the user-facing `:5555` speaks HTTPS only, so a plain `http://localhost:5555` (the URL muscle memory reaches for, and the one you're left guessing after an update) just fails to connect — and `update.sh`/`update.ps1` printed no URL at all, so you'd end up on the Vite dev server at `:5554` by accident. Both update scripts now print the working access URL on completion (via the same `print-access-url.js` banner `setup.sh` already uses), leading with the loopback HTTP mirror `http://localhost:5553` that works with no cert warning. The server's own startup banner is reordered to match — it now leads with the local mirror URL instead of burying it under the remote Tailscale lines — and it no longer advertises a bogus Tailscale hostname (e.g. `https://undefined.<tailnet>.ts.net:5555`, produced when a cert was provisioned while MagicDNS was down) as "trusted." (`update.sh`, `update.ps1`, `server/index.js`)+- **[issue-1361] A behind/legacy sync peer can no longer erase a series' style guide, reader map, ticking clock, style notes, or seasons.** `mergeSeriesFromSync` applied an incoming series payload wholesale via last-writer-wins on `updatedAt`, and `sanitizeSeries` flattens an *absent* key to the same `null`/`[]`/`""` as an explicit clear. So when a peer that never authored a field (an older install, or one that predates the field) pushed a series with a newer `updatedAt` but no `styleGuide`/`arc`/`styleNotes`/`seasons` key — or sent `arc` without its newer `readerMap`/`tickingClock` sub-keys — the receiver overwrote and wiped the locally-authored value. The merge now consults the **raw** remote payload to tell "key absent" from "key present-but-empty": an absent key preserves the local value (mirroring the existing `universeId` hierarchy guard, and applied uniformly across the additive fields plus the additive sub-fields nested in `arc`), while an explicit `null`/empty from an up-to-date peer is still honored as an intentional clear. Tombstones are skipped (a deleted record carries no content to protect). (`server/services/pipeline/series.js`, #1361)- **[issue-1359] A catalog image you generate now attaches even if you navigate away before it finishes.** When you used the catalog item editor's **Generate** button with a local or Codex image backend, the render is a queued job — and if you refreshed, switched to another item, or left the page before it completed, the finished image still landed in your media library but was never attached to the item, so it silently vanished from that item's Media panel. The attachment is now made server-side the moment the render completes, independent of whether that page is still open: the first image becomes the item's portrait, later ones attach as references — exactly as it would if you'd stayed on the page. (#1359)diff --git a/server/index.js b/server/index.jsindex 6c260ff2cd..05b0b5d4e2 100644--- a/server/index.js+++ b/server/index.js@@ -996,18 +996,26 @@ ensureSelf()// mirror that only spawns when HTTPS is active. See docs/PORTS.md.console.log(`🚀 PortOS listening on :${PORT} (${scheme})`);if (httpsEnabled) {+ const localHttpPort = Number(process.env.PORTOS_HTTP_PORT) || PORTS.API_LOCAL;+ // Lead with the URL that works from THIS machine with no cert warnings:+ // the loopback HTTP mirror. http://localhost:${PORT} does NOT work in+ // HTTPS mode (the :${PORT} socket speaks TLS only), so local users who+ // type it land on a dead port — point them here instead.+ console.log(` 👉 http://localhost:${localHttpPort} (open locally — no cert warnings)`);+ // Only advertise the Tailscale hostname when it's actually usable. A cert+ // provisioned while MagicDNS was down can carry a bogus host like+ // "undefined.<tailnet>.ts.net"; printing it as "trusted" just misleads.const selfHost = getSelfHost();- if (selfHost) console.log(` ✅ https://${selfHost}:${PORT} (trusted via Tailscale)`);- console.log(` 🔐 https://<tailscale-ip>:${PORT} (cert warning unless using the hostname above)`);+ if (selfHost && !/^(undefined|null)\b/i.test(selfHost)) {+ console.log(` ✅ https://${selfHost}:${PORT} (remote via Tailscale, trusted)`);+ }+ console.log(` 🔐 https://<tailscale-ip>:${PORT} (remote via Tailscale; cert warning unless using the hostname above)`);initCertRenewer(httpServer);- const localHttpPort = Number(process.env.PORTOS_HTTP_PORT) || PORTS.API_LOCAL;if (localHttpServer) {io.attach(localHttpServer);- localHttpServer.listen(localHttpPort, '127.0.0.1', () => {- console.log(` 🔓 http://localhost:${localHttpPort} (loopback HTTP mirror, no cert warnings)`);- });+ localHttpServer.listen(localHttpPort, '127.0.0.1');localHttpServer.on('error', (err) => {- console.warn(`⚠️ Loopback HTTP mirror on :${localHttpPort} failed: ${err.message} — HTTPS still active`);+ console.warn(`⚠️ Loopback HTTP mirror on :${localHttpPort} failed: ${err.message} — http://localhost:${localHttpPort} won't work; use https://...:${PORT}`);});}} else {diff --git a/update.ps1 b/update.ps1index 13a83ad0ba..8961ad53fe 100644--- a/update.ps1+++ b/update.ps1@@ -357,6 +357,18 @@ Write-SafeHost " ✅ Update Complete!" -ForegroundColor GreenWrite-SafeHost "===================================" -ForegroundColor GreenWrite-SafeHost ""+# Tell the user where to open PortOS — leads with the working local URL+# (http://localhost:5553 mirror in HTTPS mode, :5555 in plain-HTTP mode) so they+# don't land on a dead http://localhost:5555 when a Tailscale cert has forced+# :5555 into TLS-only. Mirrors setup.sh's print_access_url banner; gated on the+# same cert predicate the server uses, so we never advertise a URL it isn't serving.+$accessUrl = & node scripts/print-access-url.js 2>$null+$global:LASTEXITCODE = 0+if ($accessUrl) {+ $accessUrl | ForEach-Object { Write-SafeHost $_ -ForegroundColor Cyan }+ Write-SafeHost ""+}+if ($stashedForBranch) {Write-SafeHost "ℹ️ Your local changes from '$stashedForBranch' were stashed for the update." -ForegroundColor Cyanif ($stashedForBranch -eq "detached HEAD") {diff --git a/update.sh b/update.shindex bafb3ccd48..e304584367 100755--- a/update.sh+++ b/update.sh@@ -277,6 +277,17 @@ log " ✅ Update Complete!"log "==================================="log ""+# Tell the user where to open PortOS — leads with the working local URL+# (http://localhost:5553 mirror in HTTPS mode, :5555 in plain-HTTP mode) so they+# don't land on a dead http://localhost:5555 when a Tailscale cert has forced+# :5555 into TLS-only. Mirrors setup.sh's print_access_url banner; gated on the+# same cert predicate the server uses, so we never advertise a URL it isn't serving.+access_url=$(node scripts/print-access-url.js 2>/dev/null || true)+if [ -n "$access_url" ]; then+ log "$access_url"+ log ""+fi+if [ -n "$stashed_for_branch" ]; thenlog "ℹ️ Your local changes from '$stashed_for_branch' were stashed for the update."if [ "$stashed_for_branch" = "detached HEAD" ]; then