[PR #6625] [CLOSED] feat: engine foundations: request-traced logs, prompt caching fixes, opt-in robustness, feature switches, background jobs, Ctrl+K palette #7257

Closed
opened 2026-10-23 04:18:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6625
Author: @SirAdoni
Created: 9/24/2026
Status: ❌ Closed

Base: staging ← Head: contrib/engine-foundations


📝 Commits (10+)

  • 71afb1b test: isolate each regression file's storage and .env in the runner
  • f7863b3 feat(server): request id trail, startup timeline and one line per failure in logs
  • dd5d63c perf(server): stable lorebook group winners and compact stored lorebook scans (both opt-in)
  • a5e9939 fix(server): opt-in robustness settings for storage writes, Windows boot, shutdown and provider retry, plus runtime diagnostics
  • 46720c2 fix(server): hold early internal inject() calls until startup registration ends
  • 417405b docs: explain the developer foundations contribution
  • d3f5d51 feat(tools): add a Dev MCP for inspecting a local Marinara engine
  • fa7be48 feat: feature switches in Settings > Advanced > Features
  • 899a1bd feat(server): keep media generations running when the tab closes (generationJobTracking, off)
  • 14a0acd feat(client): generation jobs viewer and reattach for generationJobTracking

📊 Changes

332 files changed (+31757 additions, -1557 deletions)

View changed files

📝 .dockerignore (+3 -0)
📝 .env.example (+37 -0)
📝 .gitattributes (+1 -0)
📝 .gitignore (+2 -0)
📝 CHANGELOG.md (+50 -0)
📝 CONTRIBUTING.md (+12 -0)
📝 docs/CONFIGURATION.md (+52 -0)
➕ docs/configuration/features.md (+110 -0)
➕ docs/contrib/ISSUE-dev-foundations.md (+38 -0)
➕ docs/contrib/PR-dev-foundations.md (+54 -0)
➕ docs/contrib/engine-foundations-overview.md (+558 -0)
➕ docs/development/generation-jobs.md (+85 -0)
➕ docs/development/logging.md (+109 -0)
📝 docs/prompts/generation-parameters.md (+8 -0)
📝 docs/settings/settings-overview.md (+2 -2)
📝 packages/client/src/components/chat/ChatMessage.tsx (+10 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+1 -0)
📝 packages/client/src/components/chat/HomeNewChatLauncher.tsx (+17 -5)
📝 packages/client/src/components/chat/PeekPromptModal.tsx (+3 -1)
📝 packages/client/src/components/chat/chat-area.types.ts (+2 -0)

...and 80 more files

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6624

Why this change

The details are in the issue. In short:

  • Prompt caching breaks more often than it has to. I measured 61% cached on a 520k-token Opus 5.5 prompt.
  • Opus 5.5 can't run on the subscription provider with the locked SDK.
  • Log lines can't be traced to their request.
  • Stored lorebook scans took my data to 1.5 GB and about 4.1 GB of server memory.
  • A startup timing issue can leave packages permanently marked "error".
  • Long image and video generations die with the tab.
  • There's no quick way to jump around the app.

This PR builds on the existing logger, regression runner, storage design, shutdown, rate-limit handling and Settings layout. It doesn't rename or rewrite any of them. Every switch defaults off, so with an unchanged setup the app behaves as it does today; the few default-on changes are listed below.

What changed

38 commits on staging 5d9917fb0, grouped by area, oldest first. Each has its own regression filter, and the full per-commit list is in docs/contrib/engine-foundations-overview.md.

Foundations

  • 71afb1b04 test: isolate each regression file's storage and .env in the runner.
  • f7863b389 feat(server): request id trail, startup timeline and one line per failure. The logger export, LOG_LEVEL and LOG_DISABLE_REQUEST_LOGGING are unchanged. Adds docs/development/logging.md, linked from CONTRIBUTING.md.
  • fa7be48ba feat: feature switches in Settings > Advanced > Features. One registry (isFeatureEnabled, useFeatureEnabled, GET/PUT /api/app-settings/features). Env variables still win. Switches: stableLorebookGroupPicks, providerRetry, cacheFriendlyPromptLayout, backgroundCallCap (+ calls per hour, 600), generationJobTracking, consoleTray. All off.

Prompt caching

  • ec8519617 fix(server): keep the Claude subscription history cache marker when the prompt ends with injections after the user's turn. It only acts on requests marked by the layout switch.
  • b5c26d4fc chore(deps): Claude Agent SDK 0.3.280, so Opus 5.5 runs on the subscription provider. Only the Agent SDK is exempted from the 24 h minimum release age.
  • 94513896a perf(server): cache-friendly prompt layout for subscription providers, behind cacheFriendlyPromptLayout. Full lore goes first in one fixed <lore> block, and dynamic entries and per-turn blocks go next to the current turn. Off is byte-identical to today: I compared the exact request the Agent SDK receives before and after.
  • c83d249ac feat(server): ChatGPT cache session (session-id header and prompt_cache_key) for full-lore requests, under the same switch.
  • dd5d63ca1 perf(server): stable lorebook group winners, seeded per chat (stableLorebookGroupPicks), and compact stored lorebook scans (LOREBOOK_COMPACT_STORED_SCANS), with a one-time compaction script that backs up first and refuses to run while the engine is listening.
  • c8e01df64 feat: an optional per-chat warning before a send whose predicted cache share is under a threshold (default 80%). Off unless a chat turns it on.
  • 5d9d0d924 feat: cache diagnostics (hashes and counts only), a next-turn Peek Prompt preview, and "N% cached" in the token usage label.

Robustness and performance

  • a5e99399e fix(server): opt-in settings for storage writes, Windows boot id caching, shutdown and provider retry (up to two retries for refused connections and 502/503 before any output), plus a read-only privileged GET /api/admin/runtime-diagnostics.
  • f96585b14 feat(server): an hourly cap on background model calls (backgroundCallCap). Live turns are never counted.
  • 6f4e27ea7 feat(server): runtime memory telemetry: heap, external memory, event-loop p99 and worker gauges, logged once per pressure episode.
  • 509b9170c feat(server): optional prompt debug files under logs/prompt-debug (LOG_PROMPT_DEBUG_FILES, off, because it writes prompt text to disk).

Bug fixes (always on)

  • 46720c28f fix(server): hold early internal inject() calls until startup registration ends. A package that calls an internal route during activate() or selfCheck() gets InjectDuringRegistrationError at once instead of hanging.
  • 463c2b4c3 feat(server): check that the running build matches its sources. The build fails on a missing compiled module, startup warns ME_BUILD_STALE, and the updater no longer reports a false success. It costs about 60 ms at startup for 613 modules.
  • 706040216 fix(server): retry once without "reasoning off" when a model always reasons. Only requests that fail today are affected.
  • a04f4c465, cbed620fa, fb60c163e, 84f0ce289: reviewed server fixes in three groups, plus logged best-effort helpers for deliberately swallowed failures. Each batch has its own server-hunt-b<N> regression (56/56 pass). Highlights: SSRF reserved-address checks, IP allowlist CIDR and IPv6, a crash flushes pending writes, per-route rate limits, importers, storage recovery and writer lease, sidecar downloads, and deleted built-in regex scripts staying deleted.
  • 0c6eee459 fix(shared): mark the new chat metadata prefixes as engine-owned, so GM verbs can't write them.

Background generation jobs (off by default)

  • 899a1bd21 feat(server): eight media generations run as server-side jobs that survive a closed tab: gallery image, selfie video, scene video, scene background, avatar and sheet drafts, sprite sheet and animated expressions. A restart marks unfinished jobs interrupted and never re-runs them. Records hold ids, codes and timings only, never prompts or keys, and are kept 7 days (at most 300).
  • 14a0acd45 feat(client): a jobs viewer and a "finished while you were away" toast.
  • 2d8242f2c feat(client): "Open generation jobs" in the palette while the switch is on.
  • With generationJobTracking off, routes run inline exactly as today and the job routes answer 404.

Command palette

  • 43295d937 feat(client): Ctrl+K (Cmd+K on Mac), or a top-bar button on touch screens. It searches chats, characters, personas, lorebooks, presets, the Settings tabs and common actions (new chat of each mode, open any panel, theme, and more). Recent items come first, and search is typo- and accent-tolerant. It never opens over another dialog. The regression pins an exact allowlist of actions.
  • 62fd8ccf6 feat(client): a "?" overlay listing the shortcuts that really exist, each one checked against its source by the regression.
  • b896b6993 fix(client): focus returns to whatever opened the palette when it closes.
  • 58c63cbe9 fix(client): "Open generation jobs" is a 36px touch target on phones.

Tools and launchers

  • 299a7cc97 feat(server): minimize the Windows console to the system tray (consoleTray, off; MARINARA_CONSOLE_TRAY). It does nothing on other platforms.
  • ede18b58f fix(launcher): back up untracked source files before the launchers' git clean -fd -- packages/*/src.
  • b9c0ad448 fix(launcher): open the browser once /api/health answers, instead of after a fixed 4 s.
  • d3f5d5171 feat(tools): a Dev MCP in tools/dev-mcp, outside the pnpm workspace and the Docker image. Drop this one commit to leave it out; nothing depends on it.

Docs and style

  • 417405b4e, 8b6e80325, a447d3397: docs. f6973d728 and ea6dcc3c8: formatting only (the last one follows staging's move to Prettier 3.9).

Default-on changes, listed for review:

  • In request logs, the field reqId is now requestId, and request lines drop query strings.
  • A Client aborted request line at info.
  • A boot step over 15 s logs at warn.
  • windowsHide on the Windows probes.
  • Named shutdown stages are logged.
  • Previously silent catches now log through the best-effort helpers.
  • The regression runner overrides the three storage variables per file.
  • The startup inject gate.
  • The build integrity check.
  • The reasoning-off retry.
  • The reviewed server fixes.
  • The Ctrl+K palette and the "?" overlay.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Ticked by me after checking the results below. pnpm check is left unticked for the two pre-existing failures noted. Everything below ran on the final tip ea6dcc3c8 unless noted.

Check Result
tsc --noEmit (shared, server, client) clean
pnpm check every step passes except impeccable:check (the local .agents/skills/impeccable skill isn't installed) and credits:check (contributor list stale). Both fail identically on plain staging.
Full regression suite, Linux (WSL Ubuntu 24.04, Node 24.21, pnpm 10.34.5) 455 / 455 (plain staging 5d9917fb0 on the same setup: 369 / 369; the 86 added regression files all pass)
Full regression suite, Windows 11 450 / 455 (plain staging: 364 / 369). The 5 that fail here (decision-sidecar-runtime, gallery-previews, request-timeouts, server-signal-shutdown, storage-writer-lock) fail identically on plain staging on the same machine and all pass on Linux.
Docker (on the tip before the last rebase onto staging, which changed only CHANGELOG and formatting) Image built from the branch; run with an empty volume. /api/health 200, the app page loads, /api/app-settings/features reports every switch off, and there are no error-level log lines.
UI check (Playwright Chromium, touch on phone and tablet) 36 / 36. Six surfaces: the palette, its top-bar button, the "?" overlay, Settings > Advanced > Features, the jobs viewer and the low-cache warning. Each at 390x844, 820x1180 and 1440x900, light and dark. Checked: nothing clipped, no horizontal scroll, touch targets of 36px or more on phones, Escape closes and focus returns, and no page errors.
  • Every switch has a regression that checks the off path is unchanged and the on path works.
  • server-hunt-b3.slow-regression.ts takes about 50 s, over the runner's 30 s limit, so the runner doesn't pick it up. It passes when run directly.
  • All UI checks and screenshots used invented data and a dummy connection. No model was called.

Manual verification notes

  • Ran this code on my own long campaigns for several days before rebasing it onto the current staging.
  • Caching: 61% cached on a 520k-token Opus 5.5 prompt before the marker fix. The after figure on this branch is not measured yet.
  • Compaction: messages and swipes went from 1,502 MB to 213 MB, and server private memory 70 s after start from about 4.1 GB to about 1.4 GB. The backup was written first and the store reopened cleanly.
  • Startup: with the inject gate, three packages that had been marked "error" activated normally, and the engine was ready in about 20 s.
  • Followed a failed request from the error toast's errorId to its full request trail in the logs.
  • Checked that the palette and overlays don't swallow Enter: with "Send on Enter" on, Enter sends in roleplay and conversation chats exactly as on plain staging.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

The PR adds:

  • CHANGELOG entries under [Unreleased]
  • docs/development/logging.md and docs/development/generation-jobs.md
  • docs/configuration/features.md, plus docs/CONFIGURATION.md entries for every setting
  • docs/contrib/engine-foundations-overview.md

CONTRIBUTING.md gains one link in its Logging section. A [docs-i18n] follow-up issue is needed for the translated guides.

UI evidence (if applicable)

Screenshots from a test instance with invented data:

Settings > Advanced > Features

Settings > Advanced > Features

Ctrl+K palette with results

Ctrl+K palette with results

Palette on a phone (390x844)

Palette on a phone (390x844)

"?" keyboard shortcuts overlay

"?" keyboard shortcuts overlay

Generation jobs viewer

Generation jobs viewer

Low-cache send warning

Low-cache send warning

Open points

  • This is a stacked series. It can be split, but the logging commit, the runner isolation and the feature switch commit would need to land first, since the later commits use them.

  • Left out on purpose, as fork-only or dependent on excluded work:

    • ChatGPT history replay and the Game-specific cache layout parts;
    • global chat search (Ctrl+Shift+F);
    • palette entries for tools that don't exist upstream;
    • generation jobs for Game Mode and TTS.

    Each can follow as its own PR if wanted.

  • After the server is listening, a package activated from the UI that adds a route the running server lacks now stays installed and activates on the next start, instead of rolling back. If you'd rather keep the old rollback there, the new handling can be limited to startup.

  • Regression isolation has no opt-out. I can add one if it's wanted.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/6625 **Author:** [@SirAdoni](https://github.com/SirAdoni) **Created:** 9/24/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `contrib/engine-foundations` --- ### 📝 Commits (10+) - [`71afb1b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/71afb1b04aa8c3f3260feb76b7c795d4fe9831fe) test: isolate each regression file's storage and .env in the runner - [`f7863b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f7863b3898566861f8bc2a338be920fa02762821) feat(server): request id trail, startup timeline and one line per failure in logs - [`dd5d63c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dd5d63ca1afe56aabc1dbb7409554bd6bdb58757) perf(server): stable lorebook group winners and compact stored lorebook scans (both opt-in) - [`a5e9939`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a5e99399ea48494ebfbf7122a4b379ec36dbab2f) fix(server): opt-in robustness settings for storage writes, Windows boot, shutdown and provider retry, plus runtime diagnostics - [`46720c2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/46720c28ffb553ec7922904f4dc3d0320dc39c47) fix(server): hold early internal inject() calls until startup registration ends - [`417405b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/417405b4e2fff3586bddcb0baa92979d8a64494d) docs: explain the developer foundations contribution - [`d3f5d51`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d3f5d5171d9af90c91c6c1f8f027adc5b413a14d) feat(tools): add a Dev MCP for inspecting a local Marinara engine - [`fa7be48`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fa7be48ba448e945bbe6fdce8462c30863ecd8a4) feat: feature switches in Settings > Advanced > Features - [`899a1bd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/899a1bd2135c332a3eebd7a04a9cd51dcc3c61d2) feat(server): keep media generations running when the tab closes (generationJobTracking, off) - [`14a0acd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/14a0acd450d04b22c2b0408ef5e59468bab3884e) feat(client): generation jobs viewer and reattach for generationJobTracking ### 📊 Changes **332 files changed** (+31757 additions, -1557 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+3 -0) 📝 `.env.example` (+37 -0) 📝 `.gitattributes` (+1 -0) 📝 `.gitignore` (+2 -0) 📝 `CHANGELOG.md` (+50 -0) 📝 `CONTRIBUTING.md` (+12 -0) 📝 `docs/CONFIGURATION.md` (+52 -0) ➕ `docs/configuration/features.md` (+110 -0) ➕ `docs/contrib/ISSUE-dev-foundations.md` (+38 -0) ➕ `docs/contrib/PR-dev-foundations.md` (+54 -0) ➕ `docs/contrib/engine-foundations-overview.md` (+558 -0) ➕ `docs/development/generation-jobs.md` (+85 -0) ➕ `docs/development/logging.md` (+109 -0) 📝 `docs/prompts/generation-parameters.md` (+8 -0) 📝 `docs/settings/settings-overview.md` (+2 -2) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+10 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+1 -0) 📝 `packages/client/src/components/chat/HomeNewChatLauncher.tsx` (+17 -5) 📝 `packages/client/src/components/chat/PeekPromptModal.tsx` (+3 -1) 📝 `packages/client/src/components/chat/chat-area.types.ts` (+2 -0) _...and 80 more files_ </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #6624 ## Why this change The details are in the issue. In short: - Prompt caching breaks more often than it has to. I measured 61% cached on a 520k-token Opus 5.5 prompt. - Opus 5.5 can't run on the subscription provider with the locked SDK. - Log lines can't be traced to their request. - Stored lorebook scans took my data to 1.5 GB and about 4.1 GB of server memory. - A startup timing issue can leave packages permanently marked `"error"`. - Long image and video generations die with the tab. - There's no quick way to jump around the app. This PR builds on the existing logger, regression runner, storage design, shutdown, rate-limit handling and Settings layout. It doesn't rename or rewrite any of them. **Every switch defaults off**, so with an unchanged setup the app behaves as it does today; the few default-on changes are listed below. ## What changed 38 commits on `staging` `5d9917fb0`, grouped by area, oldest first. Each has its own regression filter, and the full per-commit list is in `docs/contrib/engine-foundations-overview.md`. **Foundations** - `71afb1b04` test: isolate each regression file's storage and `.env` in the runner. - `f7863b389` feat(server): request id trail, startup timeline and one line per failure. The `logger` export, `LOG_LEVEL` and `LOG_DISABLE_REQUEST_LOGGING` are unchanged. Adds `docs/development/logging.md`, linked from `CONTRIBUTING.md`. - `fa7be48ba` feat: feature switches in Settings > Advanced > Features. One registry (`isFeatureEnabled`, `useFeatureEnabled`, `GET/PUT /api/app-settings/features`). Env variables still win. Switches: `stableLorebookGroupPicks`, `providerRetry`, `cacheFriendlyPromptLayout`, `backgroundCallCap` (+ calls per hour, 600), `generationJobTracking`, `consoleTray`. All off. **Prompt caching** - `ec8519617` fix(server): keep the Claude subscription history cache marker when the prompt ends with injections after the user's turn. It only acts on requests marked by the layout switch. - `b5c26d4fc` chore(deps): Claude Agent SDK 0.3.280, so Opus 5.5 runs on the subscription provider. Only the Agent SDK is exempted from the 24 h minimum release age. - `94513896a` perf(server): cache-friendly prompt layout for subscription providers, behind `cacheFriendlyPromptLayout`. Full lore goes first in one fixed `<lore>` block, and dynamic entries and per-turn blocks go next to the current turn. **Off is byte-identical to today:** I compared the exact request the Agent SDK receives before and after. - `c83d249ac` feat(server): ChatGPT cache session (`session-id` header and `prompt_cache_key`) for full-lore requests, under the same switch. - `dd5d63ca1` perf(server): stable lorebook group winners, seeded per chat (`stableLorebookGroupPicks`), and compact stored lorebook scans (`LOREBOOK_COMPACT_STORED_SCANS`), with a one-time compaction script that backs up first and refuses to run while the engine is listening. - `c8e01df64` feat: an optional per-chat warning before a send whose predicted cache share is under a threshold (default 80%). Off unless a chat turns it on. - `5d9d0d924` feat: cache diagnostics (hashes and counts only), a next-turn Peek Prompt preview, and "N% cached" in the token usage label. **Robustness and performance** - `a5e99399e` fix(server): opt-in settings for storage writes, Windows boot id caching, shutdown and provider retry (up to two retries for refused connections and 502/503 before any output), plus a read-only privileged `GET /api/admin/runtime-diagnostics`. - `f96585b14` feat(server): an hourly cap on background model calls (`backgroundCallCap`). Live turns are never counted. - `6f4e27ea7` feat(server): runtime memory telemetry: heap, external memory, event-loop p99 and worker gauges, logged once per pressure episode. - `509b9170c` feat(server): optional prompt debug files under `logs/prompt-debug` (`LOG_PROMPT_DEBUG_FILES`, off, because it writes prompt text to disk). **Bug fixes (always on)** - `46720c28f` fix(server): hold early internal `inject()` calls until startup registration ends. A package that calls an internal route during `activate()` or `selfCheck()` gets `InjectDuringRegistrationError` at once instead of hanging. - `463c2b4c3` feat(server): check that the running build matches its sources. The build fails on a missing compiled module, startup warns `ME_BUILD_STALE`, and the updater no longer reports a false success. It costs about 60 ms at startup for 613 modules. - `706040216` fix(server): retry once without "reasoning off" when a model always reasons. Only requests that fail today are affected. - `a04f4c465`, `cbed620fa`, `fb60c163e`, `84f0ce289`: reviewed server fixes in three groups, plus logged best-effort helpers for deliberately swallowed failures. Each batch has its own `server-hunt-b<N>` regression (56/56 pass). Highlights: SSRF reserved-address checks, IP allowlist CIDR and IPv6, a crash flushes pending writes, per-route rate limits, importers, storage recovery and writer lease, sidecar downloads, and deleted built-in regex scripts staying deleted. - `0c6eee459` fix(shared): mark the new chat metadata prefixes as engine-owned, so GM verbs can't write them. **Background generation jobs (off by default)** - `899a1bd21` feat(server): eight media generations run as server-side jobs that survive a closed tab: gallery image, selfie video, scene video, scene background, avatar and sheet drafts, sprite sheet and animated expressions. A restart marks unfinished jobs interrupted and never re-runs them. Records hold ids, codes and timings only, never prompts or keys, and are kept 7 days (at most 300). - `14a0acd45` feat(client): a jobs viewer and a "finished while you were away" toast. - `2d8242f2c` feat(client): "Open generation jobs" in the palette while the switch is on. - With `generationJobTracking` off, routes run inline exactly as today and the job routes answer 404. **Command palette** - `43295d937` feat(client): **Ctrl+K** (Cmd+K on Mac), or a top-bar button on touch screens. It searches chats, characters, personas, lorebooks, presets, the Settings tabs and common actions (new chat of each mode, open any panel, theme, and more). Recent items come first, and search is typo- and accent-tolerant. It never opens over another dialog. The regression pins an exact allowlist of actions. - `62fd8ccf6` feat(client): a **"?"** overlay listing the shortcuts that really exist, each one checked against its source by the regression. - `b896b6993` fix(client): focus returns to whatever opened the palette when it closes. - `58c63cbe9` fix(client): "Open generation jobs" is a 36px touch target on phones. **Tools and launchers** - `299a7cc97` feat(server): minimize the Windows console to the system tray (`consoleTray`, off; `MARINARA_CONSOLE_TRAY`). It does nothing on other platforms. - `ede18b58f` fix(launcher): back up untracked source files before the launchers' `git clean -fd -- packages/*/src`. - `b9c0ad448` fix(launcher): open the browser once `/api/health` answers, instead of after a fixed 4 s. - `d3f5d5171` feat(tools): a Dev MCP in `tools/dev-mcp`, outside the pnpm workspace and the Docker image. Drop this one commit to leave it out; nothing depends on it. **Docs and style** - `417405b4e`, `8b6e80325`, `a447d3397`: docs. `f6973d728` and `ea6dcc3c8`: formatting only (the last one follows staging's move to Prettier 3.9). **Default-on changes, listed for review:** - In request logs, the field `reqId` is now `requestId`, and request lines drop query strings. - A `Client aborted request` line at info. - A boot step over 15 s logs at warn. - `windowsHide` on the Windows probes. - Named shutdown stages are logged. - Previously silent catches now log through the best-effort helpers. - The regression runner overrides the three storage variables per file. - The startup inject gate. - The build integrity check. - The reasoning-off retry. - The reviewed server fixes. - The Ctrl+K palette and the "?" overlay. ## Validation - [ ] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` Ticked by me after checking the results below. `pnpm check` is left unticked for the two pre-existing failures noted. Everything below ran on the final tip `ea6dcc3c8` unless noted. | Check | Result | |---|---| | `tsc --noEmit` (shared, server, client) | clean | | `pnpm check` | every step passes except `impeccable:check` (the local `.agents/skills/impeccable` skill isn't installed) and `credits:check` (contributor list stale). Both fail identically on plain `staging`. | | Full regression suite, **Linux** (WSL Ubuntu 24.04, Node 24.21, pnpm 10.34.5) | **455 / 455** (plain `staging` `5d9917fb0` on the same setup: 369 / 369; the 86 added regression files all pass) | | Full regression suite, Windows 11 | 450 / 455 (plain `staging`: 364 / 369). The 5 that fail here (`decision-sidecar-runtime`, `gallery-previews`, `request-timeouts`, `server-signal-shutdown`, `storage-writer-lock`) fail identically on plain `staging` on the same machine and all pass on Linux. | | **Docker** (on the tip before the last rebase onto staging, which changed only CHANGELOG and formatting) | Image built from the branch; run with an empty volume. `/api/health` 200, the app page loads, `/api/app-settings/features` reports every switch off, and there are no error-level log lines. | | **UI check** (Playwright Chromium, touch on phone and tablet) | **36 / 36.** Six surfaces: the palette, its top-bar button, the "?" overlay, Settings > Advanced > Features, the jobs viewer and the low-cache warning. Each at 390x844, 820x1180 and 1440x900, light and dark. Checked: nothing clipped, no horizontal scroll, touch targets of 36px or more on phones, Escape closes and focus returns, and no page errors. | - Every switch has a regression that checks the off path is unchanged and the on path works. - `server-hunt-b3.slow-regression.ts` takes about 50 s, over the runner's 30 s limit, so the runner doesn't pick it up. It passes when run directly. - All UI checks and screenshots used invented data and a dummy connection. No model was called. ### Manual verification notes - Ran this code on my own long campaigns for several days before rebasing it onto the current `staging`. - Caching: 61% cached on a 520k-token Opus 5.5 prompt before the marker fix. The after figure on this branch is not measured yet. - Compaction: messages and swipes went from 1,502 MB to 213 MB, and server private memory 70 s after start from about 4.1 GB to about 1.4 GB. The backup was written first and the store reopened cleanly. - Startup: with the inject gate, three packages that had been marked `"error"` activated normally, and the engine was ready in about 20 s. - Followed a failed request from the error toast's `errorId` to its full request trail in the logs. - Checked that the palette and overlays don't swallow Enter: with "Send on Enter" on, Enter sends in roleplay and conversation chats exactly as on plain `staging`. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) The PR adds: - CHANGELOG entries under `[Unreleased]` - `docs/development/logging.md` and `docs/development/generation-jobs.md` - `docs/configuration/features.md`, plus `docs/CONFIGURATION.md` entries for every setting - `docs/contrib/engine-foundations-overview.md` `CONTRIBUTING.md` gains one link in its Logging section. A `[docs-i18n]` follow-up issue is needed for the translated guides. ## UI evidence (if applicable) Screenshots from a test instance with invented data: **Settings > Advanced > Features** ![Settings > Advanced > Features](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/features-page_desktop-light_v1.0.png) **Ctrl+K palette with results** ![Ctrl+K palette with results](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/command-palette-results_desktop-light_v1.0.png) **Palette on a phone (390x844)** ![Palette on a phone (390x844)](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/command-palette_phone-light_v1.0.png) **"?" keyboard shortcuts overlay** !["?" keyboard shortcuts overlay](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/keyboard-shortcuts-overlay_desktop-light_v1.0.png) **Generation jobs viewer** ![Generation jobs viewer](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/generation-jobs-viewer_desktop-light_v1.0.png) **Low-cache send warning** ![Low-cache send warning](https://raw.githubusercontent.com/SirAdoni/Marinara-Engine-contrib/04e08885b87570f572d64a319730ff2f84095af6/low-cache-warning_desktop-light_v1.0.png) ## Open points - This is a stacked series. It can be split, but the logging commit, the runner isolation and the feature switch commit would need to land first, since the later commits use them. - Left out on purpose, as fork-only or dependent on excluded work: - ChatGPT history replay and the Game-specific cache layout parts; - global chat search (Ctrl+Shift+F); - palette entries for tools that don't exist upstream; - generation jobs for Game Mode and TTS. Each can follow as its own PR if wanted. - After the server is listening, a package activated from the UI that adds a route the running server lacks now stays installed and activates on the next start, instead of rolling back. If you'd rather keep the old rollback there, the new handling can be limited to startup. - Regression isolation has no opt-out. I can add one if it's wanted. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7257
No description provided.