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([brain-bucket-chip-reorder]): remove from PLAN.md and log to changelog
[._.]/ Adam Eivya1b1ff974ec6
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 7f48a71945..d32131ea2c 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -6,6 +6,7 @@- **[conflict-journal-media-collections] Media collection name/description/cover edits are now protected when two machines change the same collection.** If a peer's edit to a collection's name, description, or cover image would overwrite a change you made independently, your version is archived to Sharing → Conflicts so you can review and restore it — the same safety net universes and series already had. Images filed into the collection were never at risk (both sides' images are always kept); only the collection's text/cover fields could silently lose an edit, and now they don't.- **[story-builder-issue-llm-seeding] Story Builder can now generate issues straight from the arc.** The issues step gains a "Generate issues from arc" button that breaks every season of your plot arc into episodes and creates one issue per episode — seeded with each episode's logline and synopsis — without leaving the builder for the Pipeline. Locked or empty seasons are skipped and reported rather than blocking the rest, and you can still plan issues in the Pipeline as before.+- **[brain-bucket-chip-reorder] Reorder bookmarks within a bucket by dragging.** On the Brain Links bucket board you can now drag a chip to a new spot inside its own bucket — a marker shows where it will land as you drag — instead of only being able to move chips between buckets or reorder the buckets themselves.- **[local-llm-large-narrative-models] Local LLM install picker now suggests a large narrative / long-context tier.** Added Mistral Large 2 123B, Command R+ 104B, Llama 3.3 70B, Qwen3 30B-A3B, and Google Gemma 4 (31B dense + 26B-A4B MoE, both 256K context, vision) to the curated catalog — workstation-class (64–128GB unified memory) models suited to whole-manuscript editorial review where prose quality and a long context window matter most. Verified Ollama pull ids and sizes; the Gemma 4 builds also ship MLX variants (`gemma4:31b-mlx` / `gemma4:26b-mlx`) for faster inference on Apple Silicon. Qwen3 235B is intentionally omitted (142GB won't fit 128GB).- **[context-aware-editorial-budgeting] Manuscript editorial passes now scale to the target model's context window — whole-manuscript when it fits, chunked when it doesn't.** A new `contextBudget` helper plus a `contextWindow` provider field (inferred large for frontier CLI/cloud providers, from `numCtx` for local Ollama) drive all three passes: the completeness pass ("Finish the draft"), manuscript-fix ("Generate fix"), and per-issue editorial analysis. Big-context models (Claude 4.8 ~1M, GPT 5.5) now receive the entire manuscript in one call instead of being capped at the old hardcoded 200K/48K-char limits; models too small to hold the book chunk by issue — completeness feeds each chunk a digest of prior-chunk findings for cross-chapter continuity and merges with first-wins dedupe, manuscript-fix concatenates per-chunk edits — instead of silently truncating. The completeness/fix API responses now report `chunked` + `chunkCount`, and the Manuscript Editor shows a "Reviewed in N chunks" badge (with an explanatory tooltip) when a review had to chunk. Design record: `docs/plans/2026-05-31-context-aware-manuscript-editorial.md`.diff --git a/PLAN.md b/PLAN.mdindex 3580544a8e..852a89d3e6 100644--- a/PLAN.md+++ b/PLAN.md@@ -42,7 +42,6 @@ Claimable, well-specified, no decision needed — `/claim`-able. Unordered.- [ ] [llm-playground-shared-target-key] **The `${backend}\n${modelId}` compare-target key is hand-inlined ~5×.** It appears in `LocalLlmTab.jsx` (compareTargetKeys, toggleCompareTarget, the delete-prune, the checkbox `checked`) and is re-implemented as `targetKey()` in `LocalLlmPlayground.jsx`. Extract a single `localLlmTargetKey({backend, modelId})` helper both files import, so the URL round-trip can't desync on a delimiter change. Deferred only because a new `client/src/lib` module triggers the barrel + README maintenance rule; fold it in next time either file is touched. (local-review SQ, 2026-05-31).- [ ] [runs-route-fallback-model-tests] **Add a route-level test harness for `POST /api/runs` fallback-model execution.** `server/lib/aiToolkit/routes/runs.js` now derives `runModel` from `runData.usedFallback`/`fallbackModel` so an API/TUI/CLI fallback runs the fallback's model rather than leaking the primary's request model. There is currently no route-test harness anywhere in the repo (no supertest, no httpMocks), so this path is only covered transitively via the `createRun`/`getFallbackProvider` unit tests. Stand up a minimal route harness (fake `runnerService` with spied `createRun`/`executeApiRun`/`executeCliRun`/`executeTuiRun`) and assert: (a) non-fallback runs pass the request `model` unchanged for all three types; (b) a fallback swap with a configured `fallbackModel` runs that model on API (3rd arg), TUI (cloned `defaultModel`), and CLI (cloned `defaultModel`); (c) a fallback swap with no pin runs the fallback provider's own `defaultModel`, never the primary's model id. Skipped here to avoid building a route harness from scratch inside a bugfix PR.- [ ] [consolidate-client-url-normalize] **Consolidate client-side URL normalization.** Three components prepend `https://` to a bare URL with near-identical logic: `normalizeUrl` in `client/src/components/brain/tabs/LinksTab.jsx`, the inline block in `client/src/components/QuickBrainCapture.jsx` (~line 34, with `URL_PATTERN`/`DOMAIN_PATTERN` regexes), and `client/src/components/brain/tabs/FeedsTab.jsx` (~line 50, no `git@` handling). Extract one `normalizeUrl`/`isUrl` pair to a shared `client/src/utils/` helper and migrate all three. Must preserve each one's subtly different behavior (FeedsTab ignores `git@`; QuickBrainCapture splits detection from normalization).-- [ ] [brain-bucket-chip-reorder] **Drag-to-reorder chips *within* a bucket.** The Brain → Links bucket board (`client/src/components/brain/links/BucketBoard.jsx` + `BucketCard.jsx`) supports dragging a chip *between* buckets and reordering buckets, but not repositioning a chip within its own bucket — `bucketOrder` is only ever appended (max+1) on assign. Add intra-bucket position-aware drop (compute target index from the drop location, renumber `bucketOrder`, persist via `updateBrainLink`).- [ ] [hidream-qwen-loras-runner-consumers] **Wire HIDREAM/QWEN through `client/src/pages/Loras.jsx`.** `imageGenResolutions.js` was extended on 2026-05-28 (`compatibilityKey` now returns HIDREAM/QWEN as their own keys). Still pending: `client/src/pages/Loras.jsx` `RUNNER_LABELS` / `RUNNER_BG_COLORS` / Top-LoRA section list omit HIDREAM/QWEN so the LoRA picker shows them as unlabeled / no badge color.- [ ] [wan22-hunyuan-setup-pin-shas] **Pin Wan22 / HunyuanVideo MLX clones to known-good commit SHAs.** `scripts/setup-image-video.sh` defaults `WAN22_PIN="${WAN22_PIN:-main}"` and `HUNYUAN_PIN="${HUNYUAN_PIN:-main}"`. Floating `main` on two community-maintained ports means every new install gets whatever HEAD is on those repos that day. Replace the default with a tested SHA for each; let users override via the env var.- [ ] [memory-mgmt-new-endpoint-tests] **Add tests for the 5 new memory-management routes.** `/api/local-llm/loaded`, `/api/local-llm/unload`, `/api/voice/whisper`, `/api/voice/tts/status`, `/api/voice/tts/unload` have no test coverage. Add focused happy-path + validation-rejection tests so future regressions in the schema-parity fixes (or the `unloadModel` residency check) surface as test failures.