[PR #1149] [MERGED] feat(slurp2): 0.3.6 — measured speed fixes, AI budget for world work only, Slurp Support tools, Stir/Pages fixes #1317

Closed
opened 2026-10-21 05:08:32 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1149
Author: @Gunterlie
Created: 9/29/2026
Status: ✅ Merged
Merged: 9/29/2026
Merged by: @Gunterlie

Base: staging ← Head: slurp2-speed-budget-0.3.9


📝 Commits (7)

  • 677ec4a feat(slurp2): 0.3.9 — speed, AI budget for world work only, Stir and Support fixes
  • 2539783 fix(slurp2): 0.3.9 review fixes — persona gate, draw-all for post jumps, page reader
  • 92cc189 feat(slurp2): Slurp Support photo tools, post references, photo demand, glitter bubbles
  • 1f6da38 style(slurp2): format spice regression
  • 8d547fd feat(slurp2): ship as 0.3.6; Support pictures load, staff-console menu, no glitter
  • 191677c fix(slurp2): CodeRabbit review — drawn-count key, stale Stir previews, fold focus retry, pick case
  • 0b35e1a fix(slurp2): photo verification follows what Support asked to see

📊 Changes

106 files changed (+2147 additions, -1182 deletions)

View changed files

➕ artifacts/slurp2-0.3.6.zip (+0 -0)
📝 catalog/catalog.json (+30 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+30 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+30 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/slurp2/CHANGELOG.md (+9 -0)
📝 packages/slurp2/client.js (+105 -92)
📝 packages/slurp2/manifest.json (+27 -5)
📝 packages/slurp2/server.mjs (+311 -311)
📝 packages/slurp2/src/engine/packages/client/src/slp/app/backstage/slp-backstage-controller.ts (+1 -1)
📝 packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpHomeHelpers.tsx (+8 -6)
📝 packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpProfilePostCards.tsx (+4 -1)
📝 packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpScreenHub.tsx (+4 -2)
📝 packages/slurp2/src/engine/packages/client/src/slp/base/chrome/SlpChrome.tsx (+20 -8)
📝 packages/slurp2/src/engine/packages/client/src/slp/base/media/slp-media-src.ts (+2 -1)
➕ packages/slurp2/src/engine/packages/client/src/slp/base/ui/slp-drawn-count.ts (+41 -0)
📝 packages/slurp2/src/engine/packages/client/src/slp/features/ads/slp-ads-backstage-contract.ts (+0 -3)
📝 packages/slurp2/src/engine/packages/client/src/slp/features/ads/slp-ads-hooks.ts (+0 -6)

...and 80 more files

📄 Description

Linked issue

Closes #1150

Why this change

Player feedback on Slurp 0.3.5 in production:

  • Slurp felt slow: the Home/Hub load, the Settings load and switching tabs. On phones, a fast scroll showed half-black pages.
  • In Stir, every "Do it" button was greyed out.
  • The Support "console" in Messages looked wrong.
  • The AI budget also charged the player's own actions, and the limits page was confusing.
  • The page builder had no connection of its own.
  • Creator-designed Pages failed or lost their blocks.

Every speed change here was measured, not guessed. I used a headless Chromium on the production instance: a phone-sized, 4x-throttled CPU profile with timeline traces and CPU profiles, plus a desktop A/B check.

Action Longest main-thread task before After
Fast scroll (phone) 792 ms ~155 ms
Switch back to Hub (phone) 1,311 ms ~400 ms
Open a profile (phone) 644 ms 292 ms
Desktop scroll: total restyle time 4.0 s ~1.3–1.6 s

What changed

  • Affected package: slurp2 0.3.5 → 0.3.6 (manifest, client.js, server.mjs, artifacts/slurp2-0.3.6.zip, catalogs rebuilt).

Speed

  • Nav hide: hiding the nav set an inherited --slp-nav-live on the scroll root, so every flick restyled the whole feed (752 ms). Now only the bottom bars that follow the nav restyle (.slp-nav-live).
  • Framer layout: feed rows no longer carry a framer layout node. SlurpAccessTransition keeps its layout animation only for cards that mount locked (mayReveal).
  • Progressive drawing: Hub and profile lists draw progressively (base/ui/slp-drawn-count.ts), with a shimmer placeholder. Each batch doubles, and the count resets when the list changes. A jump to a post that is not drawn yet draws the whole list first.
  • Image load marks are batched into one read-then-write per frame.
  • Earlier image loading: pictures start loading two screens ahead. The 160 px thumbnail gets its WebP copy instead of the original.
  • content-visibility on feed cards is back, for desktop only (1024 px and wider). On phones it showed black gaps. On desktop it cuts restyle time by about 3×.
  • Fewer polls: the full feed now polls every 180 s. The cheap unseen-count poll (30 s) refreshes it when new posts arrive. Pulse polls fast only while work runs.
  • Server caches: the active Creator count and the stage profiles are cached per table write generation.
  • Settings: Backstage queries only the open page, and the unused ad-pool query is gone. The Fans & Money sections are lazy folds (SlpLazyFold), and search can still open them.
  • Languages: de/ko/pl UI catalogs ship as package assets (contributions.assets) and load on demand. client.js shrank from 5.1 MB to 4.3 MB.
  • Pictures on disk: new generated post pictures are stored as WebP (q90, same size). The stored PNGs averaged 2.3 MB.

AI budget

  • Player actions are free: only autonomous world work spends the budget or is gated by it. The player's own actions no longer spend it, and mode "Off" no longer blocks them. This covers Write/Improve, Stir plans, refresh buttons, "Draft voice", schedule refresh, asked-for storylines, "Let Creator design it", replies to the player's own messages, and pictures the player asks for.
  • What stays on the budget: Mari's tool calls, and every scheduler, tick and world path.
  • Persona gate unchanged: player taps use a separate playerAsked flag. A foreground admission would also open the persona gate, so they do not use one.
  • New AI limits page:
    • A World AI switch: Off / On / On + upkeep.
    • One "World calls per day" slider.
    • Per-area toggles.
    • Per-job limits under "Advanced limits".
    • Manual-only jobs have no rows (SLURP_WORLD_JOB_KINDS).
  • New Connections › Creator Pages picker (pageConnectionId).

Fixes

  • Stir: the Support desk tools (category: "desk") are Stir plays again, so "Do it" is no longer greyed out. An empty preview now says why.
  • Support threads:
    • The grey console background covers the whole thread.
    • The "Writing as" chip and the "Staff" pill are removed.
    • A Support thread has no switch back to the persona.
  • Creator Pages reader:
    • Unknown fields are stripped instead of dropping the block.
    • It accepts a model's own names for the same fields and kinds.
    • A pick written as the word is matched to its side, ignoring case.
    • Unknown layouts and styles fall back to their defaults.
    • Reasoning is stripped up to the last </think>, and the output limit rises to 4,000 tokens.
    • The log carries only the answer's shape, never its words.
    • On production, Creators now design 5–7-block Pages. Before, they kept 1 block.

Package and security impact

  • Affected package IDs: slurp2
  • Engine compatibility impact: none (engine.min unchanged; contributions.assets needs Capability API 1.10, Slurp declares 1.31)
  • New or changed permissions/entrypoints: none; the manifest gains contributions.assets (three locale JSON files)
  • Restart, storage, update, or uninstall impact: normal package update and restart; a new optional setting pageConnectionId (defaults to null)

Validation (run by the author; please verify)

  • npm run check equivalents: Prettier check (whole repo) passes. ESLint on the changed files shows 0 errors (warnings only; the files had them before).
  • node scripts/test-catalog-lanes.mjs, validate-package-locales.mjs, validate-catalog.mjs, tests/catalog-release-notes.regression.mjs pass.
  • node scripts/typecheck-packages.mjs slurp2 and tests/slurp2-architecture.regression.ts pass.
  • All slurp/slurp2/noodle regression files were compared per file against a clean staging worktree:
    • No file that passes on staging fails here. slurp2-vocabulary-shape failed once in the full run and passes when run alone.
    • slurp2-typecheck-modules now passes.
    • The other files that fail on staging still fail.
  • Built with MARINARA_ENGINE_ROOT pointing at an Engine checkout. Sideloaded to the maintainer's production instance, where each fix was checked. The Engine is 2.4.6.

Security-sensitive notes:

  • Manifest: it gains contributions.assets with three JSON locale paths (src/engine/packages/client/src/slp/locales/{de,ko,pl}.json). The Engine serves them through its verified asset route: path normalization, files[] membership, the passive-JSON content type, and a hash re-check on every read. It needs Capability API 1.10, and Slurp declares 1.31.
  • Permissions and archive handling: no permission changes, and no archive-handling changes.
  • Page schema: block schemas now strip unknown keys instead of rejecting. The outer page schema stays .strict(), and every text field keeps its length limit.

Release notes: one 0.3.6 entry in packages/slurp2/CHANGELOG.md; only artifacts/slurp2-0.3.6.zip is added.

Test plan (human)

  • Phone: fast scroll on Hub, switch Hub ↔ Discover/Stir, open a profile. No black gaps, and no long freeze.
  • Desktop: scroll the Hub. No jitter.
  • Stir: open a Support desk tool and use "Do it".
  • Support thread: grey background across the whole chat, no chip, no Staff pill.
  • AI budget "Off": Write, Stir plan and "Let Creator design it" still work, and world activity stops.
  • Connections › Creator Pages picker saves, and "Let Creator design it" produces a multi-block Page.
  • German/Korean/Polish UI loads after switching language.

Also in this PR (after review)

  • Slurp Support tools in Support threads: attach an image, order a studio image (only what is described, never the persona), link one of the Creator's posts or Stories, and photo verification (the Creator must answer with a free picture taken now; a fallback prompt covers a model that forgets it).
  • Support threads: no Commissions entry or strip. The Support "+" menu reads like a staff console.
  • Fix: pictures in Support threads 404'd, because the message media route only knew the persona's own thread. Every persona of the player can read them now.
  • Review fix: player taps keep their pictures off the budget with playerAsked, not a foreground admission. A foreground admission would also open the persona gate, so the AI could post as the player.

🔄 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-Agents/pull/1149 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 9/29/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `slurp2-speed-budget-0.3.9` --- ### 📝 Commits (7) - [`677ec4a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/677ec4ac2b921b3b0343b4f8db82d5b83b6134e4) feat(slurp2): 0.3.9 — speed, AI budget for world work only, Stir and Support fixes - [`2539783`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2539783c0519118fc485e277253d6ee62298ae40) fix(slurp2): 0.3.9 review fixes — persona gate, draw-all for post jumps, page reader - [`92cc189`](https://github.com/Pasta-Devs/Marinara-Agents/commit/92cc189c10474543c9b585ae2cfb6e6d6b1a1d84) feat(slurp2): Slurp Support photo tools, post references, photo demand, glitter bubbles - [`1f6da38`](https://github.com/Pasta-Devs/Marinara-Agents/commit/1f6da389e29a6a2e40fbf6bbb2447d87e3e492d5) style(slurp2): format spice regression - [`8d547fd`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8d547fdb0890c5ee06c58e92914296d23d258172) feat(slurp2): ship as 0.3.6; Support pictures load, staff-console menu, no glitter - [`191677c`](https://github.com/Pasta-Devs/Marinara-Agents/commit/191677ca5b0e1a6f2df0274e9cc16f0de422bdc6) fix(slurp2): CodeRabbit review — drawn-count key, stale Stir previews, fold focus retry, pick case - [`0b35e1a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/0b35e1aa29a5d1c4ee18f703846006f7f3818d11) fix(slurp2): photo verification follows what Support asked to see ### 📊 Changes **106 files changed** (+2147 additions, -1182 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/slurp2-0.3.6.zip` (+0 -0) 📝 `catalog/catalog.json` (+30 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+30 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+30 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/slurp2/CHANGELOG.md` (+9 -0) 📝 `packages/slurp2/client.js` (+105 -92) 📝 `packages/slurp2/manifest.json` (+27 -5) 📝 `packages/slurp2/server.mjs` (+311 -311) 📝 `packages/slurp2/src/engine/packages/client/src/slp/app/backstage/slp-backstage-controller.ts` (+1 -1) 📝 `packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpHomeHelpers.tsx` (+8 -6) 📝 `packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpProfilePostCards.tsx` (+4 -1) 📝 `packages/slurp2/src/engine/packages/client/src/slp/app/screens/SlpScreenHub.tsx` (+4 -2) 📝 `packages/slurp2/src/engine/packages/client/src/slp/base/chrome/SlpChrome.tsx` (+20 -8) 📝 `packages/slurp2/src/engine/packages/client/src/slp/base/media/slp-media-src.ts` (+2 -1) ➕ `packages/slurp2/src/engine/packages/client/src/slp/base/ui/slp-drawn-count.ts` (+41 -0) 📝 `packages/slurp2/src/engine/packages/client/src/slp/features/ads/slp-ads-backstage-contract.ts` (+0 -3) 📝 `packages/slurp2/src/engine/packages/client/src/slp/features/ads/slp-ads-hooks.ts` (+0 -6) _...and 80 more files_ </details> ### 📄 Description ## Linked issue Closes #1150 ## Why this change Player feedback on Slurp 0.3.5 in production: - Slurp felt slow: the Home/Hub load, the Settings load and switching tabs. On phones, a fast scroll showed half-black pages. - In Stir, every "Do it" button was greyed out. - The Support "console" in Messages looked wrong. - The AI budget also charged the player's own actions, and the limits page was confusing. - The page builder had no connection of its own. - Creator-designed Pages failed or lost their blocks. Every speed change here was **measured, not guessed**. I used a headless Chromium on the production instance: a phone-sized, 4x-throttled CPU profile with timeline traces and CPU profiles, plus a desktop A/B check. | Action | Longest main-thread task before | After | |---|---|---| | Fast scroll (phone) | 792 ms | ~155 ms | | Switch back to Hub (phone) | 1,311 ms | ~400 ms | | Open a profile (phone) | 644 ms | 292 ms | | Desktop scroll: total restyle time | 4.0 s | ~1.3–1.6 s | ## What changed - Affected package: `slurp2` 0.3.5 → 0.3.6 (manifest, `client.js`, `server.mjs`, `artifacts/slurp2-0.3.6.zip`, catalogs rebuilt). ### Speed - **Nav hide:** hiding the nav set an inherited `--slp-nav-live` on the scroll root, so every flick restyled the whole feed (752 ms). Now only the bottom bars that follow the nav restyle (`.slp-nav-live`). - **Framer layout:** feed rows no longer carry a framer `layout` node. `SlurpAccessTransition` keeps its layout animation only for cards that mount locked (`mayReveal`). - **Progressive drawing:** Hub and profile lists draw progressively (`base/ui/slp-drawn-count.ts`), with a shimmer placeholder. Each batch doubles, and the count resets when the list changes. A jump to a post that is not drawn yet draws the whole list first. - **Image load marks** are batched into one read-then-write per frame. - **Earlier image loading:** pictures start loading two screens ahead. The 160 px thumbnail gets its WebP copy instead of the original. - **`content-visibility`** on feed cards is back, for desktop only (1024 px and wider). On phones it showed black gaps. On desktop it cuts restyle time by about 3×. - **Fewer polls:** the full feed now polls every 180 s. The cheap unseen-count poll (30 s) refreshes it when new posts arrive. Pulse polls fast only while work runs. - **Server caches:** the active Creator count and the stage profiles are cached per table write generation. - **Settings:** Backstage queries only the open page, and the unused ad-pool query is gone. The Fans & Money sections are lazy folds (`SlpLazyFold`), and search can still open them. - **Languages:** de/ko/pl UI catalogs ship as package assets (`contributions.assets`) and load on demand. `client.js` shrank from 5.1 MB to 4.3 MB. - **Pictures on disk:** new generated post pictures are stored as WebP (q90, same size). The stored PNGs averaged 2.3 MB. ### AI budget - **Player actions are free:** only autonomous world work spends the budget or is gated by it. The player's own actions no longer spend it, and mode "Off" no longer blocks them. This covers Write/Improve, Stir plans, refresh buttons, "Draft voice", schedule refresh, asked-for storylines, "Let Creator design it", replies to the player's own messages, and pictures the player asks for. - **What stays on the budget:** Mari's tool calls, and every scheduler, tick and world path. - **Persona gate unchanged:** player taps use a separate `playerAsked` flag. A foreground admission would also open the persona gate, so they do not use one. - **New AI limits page:** - A World AI switch: Off / On / On + upkeep. - One "World calls per day" slider. - Per-area toggles. - Per-job limits under "Advanced limits". - Manual-only jobs have no rows (`SLURP_WORLD_JOB_KINDS`). - **New Connections › Creator Pages picker** (`pageConnectionId`). ### Fixes - **Stir:** the Support desk tools (`category: "desk"`) are Stir plays again, so "Do it" is no longer greyed out. An empty preview now says why. - **Support threads:** - The grey console background covers the whole thread. - The "Writing as" chip and the "Staff" pill are removed. - A Support thread has no switch back to the persona. - **Creator Pages reader:** - Unknown fields are stripped instead of dropping the block. - It accepts a model's own names for the same fields and kinds. - A pick written as the word is matched to its side, ignoring case. - Unknown layouts and styles fall back to their defaults. - Reasoning is stripped up to the last `</think>`, and the output limit rises to 4,000 tokens. - The log carries only the answer's shape, never its words. - On production, Creators now design 5–7-block Pages. Before, they kept 1 block. ## Package and security impact - Affected package IDs: `slurp2` - Engine compatibility impact: none (engine.min unchanged; `contributions.assets` needs Capability API 1.10, Slurp declares 1.31) - New or changed permissions/entrypoints: none; the manifest gains `contributions.assets` (three locale JSON files) - Restart, storage, update, or uninstall impact: normal package update and restart; a new optional setting `pageConnectionId` (defaults to null) ## Validation (run by the author; please verify) - `npm run check` equivalents: Prettier check (whole repo) passes. ESLint on the changed files shows 0 errors (warnings only; the files had them before). - `node scripts/test-catalog-lanes.mjs`, `validate-package-locales.mjs`, `validate-catalog.mjs`, `tests/catalog-release-notes.regression.mjs` pass. - `node scripts/typecheck-packages.mjs slurp2` and `tests/slurp2-architecture.regression.ts` pass. - All slurp/slurp2/noodle regression files were compared **per file** against a clean `staging` worktree: - No file that passes on staging fails here. `slurp2-vocabulary-shape` failed once in the full run and passes when run alone. - `slurp2-typecheck-modules` now passes. - The other files that fail on `staging` still fail. - Built with `MARINARA_ENGINE_ROOT` pointing at an Engine checkout. Sideloaded to the maintainer's production instance, where each fix was checked. The Engine is 2.4.6. **Security-sensitive notes:** - **Manifest:** it gains `contributions.assets` with three JSON locale paths (`src/engine/packages/client/src/slp/locales/{de,ko,pl}.json`). The Engine serves them through its verified asset route: path normalization, `files[]` membership, the passive-JSON content type, and a hash re-check on every read. It needs Capability API 1.10, and Slurp declares 1.31. - **Permissions and archive handling:** no permission changes, and no archive-handling changes. - **Page schema:** block schemas now strip unknown keys instead of rejecting. The outer page schema stays `.strict()`, and every text field keeps its length limit. Release notes: one 0.3.6 entry in `packages/slurp2/CHANGELOG.md`; only `artifacts/slurp2-0.3.6.zip` is added. ## Test plan (human) - [ ] Phone: fast scroll on Hub, switch Hub ↔ Discover/Stir, open a profile. No black gaps, and no long freeze. - [ ] Desktop: scroll the Hub. No jitter. - [ ] Stir: open a Support desk tool and use "Do it". - [ ] Support thread: grey background across the whole chat, no chip, no Staff pill. - [ ] AI budget "Off": Write, Stir plan and "Let Creator design it" still work, and world activity stops. - [ ] Connections › Creator Pages picker saves, and "Let Creator design it" produces a multi-block Page. - [ ] German/Korean/Polish UI loads after switching language. ### Also in this PR (after review) - Slurp Support tools in Support threads: attach an image, order a studio image (only what is described, never the persona), link one of the Creator's posts or Stories, and photo verification (the Creator must answer with a free picture taken now; a fallback prompt covers a model that forgets it). - Support threads: no Commissions entry or strip. The Support "+" menu reads like a staff console. - Fix: pictures in Support threads 404'd, because the message media route only knew the persona's own thread. Every persona of the player can read them now. - Review fix: player taps keep their pictures off the budget with `playerAsked`, not a foreground admission. A foreground admission would also open the persona gate, so the AI could post as the player. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:08:32 +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-Agents#1317
No description provided.