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
Merge pull request #1528 from atomantic/worktree-fix+manuscript-editor-act-warnings
[._.]/ Adam Eivy248e02b3ee4a
diff --cc .changelog/NEXT.mdindex b87a01bb66,c411609cf2..1cdd19ac20--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@@ -1,11 -1,8 +1,12 @@@# Unreleased+## Per-issue story generation++- **[issue-1511] Per-issue prose and comic-script generation now sees only the characters that issue involves.** Generating an issue used to load the entire series character bible into every prose and comic-script prompt — on a large-cast series that's tens of thousands of tokens of character detail (including one-off bit players from unrelated issues) re-sent on every issue and every stage. Generation now sends full character records only for the cast named in that issue's beats, synopsis, and source material, with a compact one-line roster of everyone else kept for continuity. This sharply cuts token cost on big-cast series and, on context-bounded providers, leaves more room for the actual draft. The series' lead/recurring characters stay in context for every issue, so the core cast is never dropped — generation just stops carrying the full record of every bit player from unrelated issues.+## Fixed+ - **Client test suite no longer floods CI with React "not wrapped in act(...)" warnings.** Across eight component/page suites, state updates were being driven outside `act()` — hand-fired mock-EventSource frames (`emit`/`fail`), raw DOM `.blur()` calls, manually-invoked tracker callbacks, and resolved in-flight gates whose follow-up `setState` landed after the test body returned (plus a few synchronous tests whose mount-time fetches resolved late). These surfaced only under CI's verbose reporter (the default reporter hides console output), so they were invisible locally. Each driving call is now wrapped in `act()` (or switched to `fireEvent`, which wraps internally), and synchronous tests that mount components with async effects now flush inside `act()`. The full client suite (2497 tests) runs clean with zero act warnings. (`PipelineManuscriptEditor`, `Layout`, `WidgetSuggestions`, `ApiAccessTab`, `PitchTuner`, `SongTraining`, `AudioStage`, `LocalLlmPlayground` test suites)- **Codex TUI CoS agents no longer get stuck in the sandbox.** The shipped Codex TUI provider pinned `--ask-for-approval never`, which silences approval prompts but leaves Codex's *sandbox* at its default (`workspace-write`) — so headless agents couldn't reach the network (`gh`/`npm`/`git fetch` failed) and could still hit surprise escalation prompts mid-run. Because an explicit `--ask-for-approval` flag also suppressed the auto-injected full-bypass, the shipped default actively defeated the headless posture the CLI codex path already uses. The default now ships `--dangerously-bypass-approvals-and-sandbox` (approvals off + sandbox off + network on), and migration 121 rewrites existing installs whose args still match the old default — custom Codex flags are left untouched.- AI provider context-window planning is now model-aware: known Claude model windows are used after explicit provider overrides and before local `num_ctx`, and the provider settings UI shows/edits the planning window so mixed-model providers no longer collapse to one blunt 128K budget.- **AI fixers can no longer take down the whole server with `pm2 kill`.** PortOS runs every managed app under one shared pm2 daemon, so `pm2 kill` / `pm2 delete all` stops *everything* — including PortOS itself. A "Fix with AI" / autofixer agent (which runs its CLI fully unrestricted) could be talked into running one while trying to "restart the app." Three layers now block this: (1) the shell-command allowlist (`validateCommand`) rejects `pm2 kill`/`startup`/`unstartup` and any `pm2 <verb> all` for the manual command runner and autonomous jobs; (2) spawned AI agents (CoS tasks, the autofixer app) get a guarded `pm2` shim prepended to their PATH that intercepts those same destructive subcommands before they reach the real pm2 — a hard guard that holds even under `--dangerously-skip-permissions`; (3) every agent prompt now states the shared-daemon rule and to only `pm2 restart <its-own-process>`. Scoped commands (`pm2 restart my-app`, `pm2 logs my-app`, `pm2 list`) still work.