# Unreleased Changes

## Added

- **[codex5-client-error-reporter] Browser-side errors and unhandled promise rejections surface in Review Hub.** Crashes that used to vanish into the browser console now land as Review Hub alerts so they can be triaged alongside server errors and CoS work. Repeats of the same error within a day aggregate into a single entry, and bursty render storms are throttled so the hub stays readable.
- **[codex5-dashboard-intent-layouts] Dashboard layouts for Deep Work, Health, and Agent Watch — plus a time-window "morning default."** Three new built-in layouts ship alongside Everything / Focus / Morning Review / Ops, picked for task-focus, health framing, and CoS monitoring respectively. Any layout can now carry an auto-activate window (e.g. 06:00–11:00) — when the dashboard opens during that window it loads with the matching layout selected, unless you manually picked something else today. The layout editor adds a one-click "Set as morning default" toggle and a custom time-window picker. The dashboard also surfaces inline "Add &lt;Widget&gt;?" suggestion chips when a layout omits a widget whose data is populated (e.g. Quick Stats shows up once you have apps registered).
- **[versioning-diff-view-per-stage-persist-last-n] Pipeline text stages now keep a version history.** Each regenerate snapshots the prior draft (up to five back) and a new "History" button on the Idea / Prose / Comic Script / Teleplay editors opens a side-by-side word diff against the current version with one-click restore.

## Changed

- **GOALS.md now reflects the full app.** Added two missing core goals — **Creative Production Suite** (Writers Room, Universe Builder, Series Pipeline, Creative Director, Image/Video Gen, Timeline, LoRAs, Importer, Sharing) and **Cognitive Training & Lifelong Learning** (POST, Morse, Rapid Reader, Wiki). Reframed Purpose and tagline around "everything app," "create more than consume," and "interface with the world and with myself." Updated Status table and Secondary Goals (music/audio production, mood board, sketch canvas, federated sharing, cross-domain insights).
- **[cover-prose-input-idea-input-in-canonusage-corpus] Universe canon cross-reference test suite now pins every stage the per-issue search reads** — a regression that silently drops a stage from the search now fails the test suite immediately.
- **[extract-shared-requiretoolkit-helper] Internal: consolidated three duplicated AI toolkit accessors into one shared module.** No behavior change; cuts ~30 lines and makes future toolkit-state changes one-touch.
- **[backport-pre-023-migrations-to-_lib] Internal: collapsed seven settled prompt-update migrations onto the shared `_lib.js` helper.** Drops ~465 lines of duplicated migration scaffolding so future prompt-replace migrations are easier to read and review. The shared helper now also handles the rename/retire case migration 003 needed for the long-renamed `pipeline-tv-script.md` template — older installs that still carry that file get it removed cleanly on next startup.
- **[codex5-bundle-lazy-routes] Dashboard widgets load on demand.** A dashboard layout now only downloads the widgets it actually uses — the first paint of a slimmed-down layout no longer drags in every widget in the registry, and slow widgets render their own placeholder while loading instead of blocking sibling cells. Also adds an `npm run build:analyze` script for inspecting bundle composition during development.
- **[strip-stage-runhistory-from-list-payloads] Pipeline list views stay lean as version history grows.** The sidebar's recent-issues list and the per-series issue list no longer ship each stage's full draft history on every read — the History button on an issue's detail page still shows the full set, but list responses can no longer balloon to many megabytes once a series has many issues with deep histories.
- **GOALS.md is now purely strategic; CoS runtime guidance lives in `docs/GOALS_OPERATIONAL.md`.** The per-domain operational goals, task-generation priorities, and core principles that the autonomous agent reads have been split out of GOALS.md so each file has a single concern. No behavior change — the Goal Progress dashboard still reads the same goals; only the file path moved.
- **[codex5-polling-consolidation] PortOS pages stop polling the server while the tab is hidden.** Twenty pages and widgets (Brain, Digital Twin, Chief of Staff, CyberCity, Image Gen, Loops, Browser, the apps Processes/Update tabs, the cos Insights/Summary/Agent panels, the meatspace Overview, the media render queue, the pipeline Episode Video stage, the Creative Director detail, the brain Links tab, the System Health page, the agents process list, and the city HUD) used to fire their refresh requests on a fixed timer regardless of tab visibility; now they pause while the tab is in the background and refresh once when it comes back. Effect: less background network and battery drain, no perceptible change while a tab is actually in use.

## Fixed

- **[universebuilder-collection-hook-flaky-batch-enrich] Universe Builder batch-enrich test no longer flakes under full-suite load** — internal test stability fix; production behavior unchanged.
- **[feeds-ssrf-ipv6-bracket-hostname-gap] RSS feed subscriptions now reliably reject IPv6 loopback, link-local, and unique-local addresses** — previously the loopback `http://[::1]/feed` case was blocked only incidentally by DNS errors; subscribing to feeds at literal private IPv6 addresses is now refused outright, including IPv4-mapped variants like `[::ffff:192.168.1.1]`.
- **[feeds-ssrf-aaaa-record-blindness] RSS feed subscriptions now check the IPv6 address family too** — a hostname that pointed to a public IPv4 address but a private IPv6 one used to slip past the SSRF guard because only the IPv4 records were checked; now both families are resolved together, any private address in either family rejects the feed, and IPv6-only hostnames (which used to fail outright) are accepted when they resolve to a public address.
- **[legacy-series-canon-orphan-universe-leak-on-throw] Retrying a failed peer-share import no longer leaves empty "(auto-migrated)" universes behind** — when a transient disk error interrupted importing a peer's series, each retry used to mint a fresh empty universe; the importer now reuses the same one across retries so the import either lands cleanly or is harmless to retry.
- **[ansistrip-osc-alternative-unreachable] TUI output no longer leaks window-title and hyperlink escape bodies** — terminal OSC sequences (the ones CLIs use to set window titles or emit clickable links) are now stripped in full instead of leaving fragments like `0;title␇` visible in agent/TUI transcripts, prompt-runner logs, and arc-planner output.
- **Migration 003 no longer crashes `update.sh` when a stage prompt was renamed upstream.** `pipeline-tv-script.md` was renamed to `pipeline-teleplay.md` in a later commit, leaving older installs unable to run migration 003 (ENOENT on the missing sample file). The migration now treats a sample-side rename/retirement as a soft delete: unmodified copies of the old file are removed cleanly, customized copies emit a warning so edits can be merged into the replacement manually.
- **[agent-spawn-widen-try-finally-guard] A failed agent spawn no longer permanently blocks the task that triggered it.** Previously, when an agent failed to start due to a transient I/O or disk error mid-setup, the autonomous task scheduler could enter a state where that specific task was treated as "already spawning" forever and was silently skipped until the server restarted. Now any such failure releases the in-flight guard immediately so the next scheduler tick can retry the task.

## Removed
