Skip to content

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

Merge pull request #2458 from atomantic/claim/issue-2436

[._.]/ Adam Eivyfaac86b7f48c
diff --cc .changelog/NEXT.md
index 2e40ee1101,c53c8b2e36..2739b2621c
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -10,10 -8,10 +10,12 @@@
- **Shell page quick-command buttons trimmed to the interactive tools.** Dropped the four shell one-liner shortcuts (`git status`, `git pull`, `npm test`, `npm run dev`) that duplicated things you'd just type, renamed the `antigravity` button to its actual command `agy`, and added a `grok` button alongside the other coding-agent launchers.
+ - **Image and video generators now share one resolution control (#2436).** The image (`ImageGenControls`) and video (`VideoGen`) size pickers had diverged into two separate "preset dropdown + custom W×H" implementations over the same helper tables — and VideoGen rendered its Width/Height inputs twice. Both now consume a single `components/media/ResolutionField.jsx` (preset `<select>` + a "Custom…" sentinel that reveals gated Width/Height inputs with a blur-clamp), and `clampImageEdge` in `imageGenResolutions.js` is generalized to accept `{ min, max, step }` so video reuses it (clamping to 64–2048 and snapping to the multiple-of-64 grid the server floors to). The controls mirror their routes: the image edge inputs use `step=1` (its route accepts any integer edge, so a hand-typed 705 no longer trips the form's native step validation), while video keeps `step=64` and snaps on blur. Cleanup deferred from the custom-image-dimensions slice.
+
## Fixes
+- **Generated agent prompts (swarm, scheduled claim-work, other queued system tasks) no longer double-print their first line.** A task queued through the CoS improvement/claim-work path is persisted to `COS-TASKS.md` by moving its full multi-line prompt into `metadata.context` and keeping only the first line as `description` (so the markdown stays one-line-per-task). Coming back out, `context` therefore led with a verbatim copy of `description`, and every prompt-render path emitted both — so a swarm run opened with the header twice (`# ⚡ SWARM MODE …`, then `### Context`, then `# ⚡ SWARM MODE …` again, the whole body repeated). A new `reconcileSplitContext` step in `agentPromptBuilder.js` detects that exact split signature (context's first non-empty line equals `description`), folds the body back into `description`, and drops the redundant `metadata.context` — so the prompt renders once as one clean body with no spurious `### Context` wrapper. A genuinely-separate user-supplied context (whose first line differs from the description) is left untouched, and the stored task keeps its one-line description for the task-list UI. Pure code fix — reaches every install on update, no data or prompt-template migration.
+
- **The CoS agent briefing no longer prints a redundant "Target Application" heading for the PortOS default app on the api-prompt path (#2430).** The light/fallback prompt path already suppressed the target-app line for `portos-default` (the agent runs in the PortOS directory, so it adds nothing), but the editable `cos-agent-briefing` stage template still rendered the heading for any task carrying an app id. The template now gates the stock heading on a precomputed `targetAppLabel` (empty for the default app, the app id for managed apps) that `agentPromptBuilder.js` threads into the render context — mirroring `buildTaskBlock`'s predicate — while leaving `task.metadata.app` in the context untouched for any custom template references. Ships as stage-prompt migration 187 (hash-matched, cross-synced with 010's accepted-hash chain) so unmodified installs auto-upgrade and customized copies are left alone.
- **Layered Intelligence's outcome feedback loop now reconciles the `plan` (PLAN.md) tracker too (#2435).** After #2428 closed the loop for forge (gh/glab) and jira trackers, the `plan` tracker stayed excluded because `readIssues` mapped every `[lil-*]` PLAN.md item to `state: 'open'` regardless of its `- [ ]` / `- [x]` checkbox, so a completed proposal could never resolve. `extractPlanSlugs` now preserves each item's checkbox state — a checked `- [x]` reads `closed` (which `deriveOutcome` maps to *merged*) and an unchecked `- [ ]` (or a bare tag with no checkbox — absent ≠ done) reads `open` — so a checked item both reconciles as an outcome and falls out of the dedup window to become re-proposable, while open items stay suppressed as before. The `outcomesTrackerSupported()` gate now includes `plan`, so PLAN-tracked apps learn from their own merge rate like forge/jira apps.