[PR #2130] [MERGED] feat(otome-forge): tell the next main chapter what's on your mind from Home (0.8.12) #2131

Closed
opened 2026-11-07 16:39:45 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/2130
Author: @SpicyMarinara
Created: 11/6/2026
Status: ✅ Merged
Merged: 11/6/2026
Merged by: @SpicyMarinara

Base: staging ← Head: feat/otome-your-thoughts


📝 Commits (6)

  • 4496cf8 feat(otome-forge): tell the next main chapter what's on your mind from Home (0.8.12)
  • 4aac46b fix(otome-forge): word the thoughts' plan line as possibilities, not a checklist (0.8.12)
  • 876a350 fix(otome-forge): quote Your thoughts… as one string in the prompts (0.8.12)
  • de5c782 fix(otome-forge): Your thoughts… opens only once Home has answered (0.8.12)
  • ef40934 Merge remote-tracking branch 'origin/staging' into feat/otome-your-thoughts
  • e464537 test(otome-forge): fix the Your thoughts… e2e description check, and leave the memory poll out of 'no request' steps (0.8.12)

📊 Changes

31 files changed (+1173 additions, -450 deletions)

View changed files

➕ artifacts/otome-forge-0.8.12.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/otome-forge/CHANGELOG.md (+4 -0)
📝 packages/otome-forge/README.md (+4 -1)
📝 packages/otome-forge/client.js (+224 -221)
📝 packages/otome-forge/manifest.json (+5 -5)
📝 packages/otome-forge/server.mjs (+146 -145)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json (+9 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/home/HomeScreen.tsx (+56 -6)
➕ packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/home/ThoughtsSheet.tsx (+127 -0)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts (+25 -1)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/home.ts (+9 -3)
📝 packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts (+3 -0)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/prompts.ts (+48 -1)
📝 packages/otome-forge/src/engine/packages/server/src/services/otome-forge/routes/home.ts (+23 -1)

...and 11 more files

📄 Description

Pull request

Important

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

Linked issue

Closes #2127

Why this change

After a story-heavy chapter, players had no way to tell the story what their protagonist is thinking or planning. They might want to look into something, or not be able to forget what a love interest did, or wish for a hug on a bad day. The maintainer asked for a Your thoughts… button on Home, beside the calendar. It opens a small window with a free-text box. What is sent is used for the next main story chapter only, then dropped, and the player can come back with new thoughts any time.

What changed

  • otome-forge 0.8.12 (rebuilt client.js, server.mjs, manifest, artifact and catalog entries).
  • Client:
    • screens/home/HomeScreen.tsx: a round thought-bubble button after Remind Me in Home's rail row, same size as the calendar button. The bubble is an inline SVG on lucide's 24×24 grid, since lucide has none. A dot shows while thoughts wait.
    • New screens/home/ThoughtsSheet.tsx: a Dialog with one textarea (up to 1000 characters), prefilled with any thoughts still waiting.
      • Buttons: Send, Clear and Close.
      • Enter adds a new line; only Send sends.
    • 9 new ui.otomeForge.home.thought* keys.
  • Server:
    • RunState.thoughts ({ text, at } | null), read by normalizeState.
    • GET /runs/:run/home returns it. New POST /runs/:run/home/thoughts { text } trims and saves it; empty text clears it. It calls no model; 400 over the limit, 404 for a missing run.
    • story/chapters.ts: the next main chapter's plan reads the waiting thoughts inside its queued step and gets them after its cached part.
      • The chapter keeps a hidden copy (Chapter.thoughts, stripped by toChapterView).
      • The waiting slot is cleared in the write that registers the chapter, only if it still holds the same thoughts, so thoughts sent during planning wait for the following chapter.
      • A failed, cancelled or refused plan keeps them.
    • prompts.ts thoughtsLines: in P5, and in the uncached tail of that main chapter's scenes, Confrontation and Closer.
      • The words are quoted as the protagonist's private thoughts: not events, never undoing what was played.
      • A love interest knows only what the protagonist says or does.
      • Without thoughts every prompt is byte-identical. Route, repair, date and story chapters never carry them.
  • Tests:
    • Regressions: the Home route, state round-trip, seven chapter-plan cases, and the scene tails.
    • The home and remind e2e specs: rail counts, order and Tab path updated; the new route stubbed; a test that writes, sends, reopens, clears and closes.
  • Docs and release:
    • README: a Home bullet, the "never call a model" list, where data lives, and what leaves your device.
    • CHANGELOG 0.8.12.

Package and security impact

  • Affected package IDs: otome-forge
  • Engine compatibility impact: none (Engine 2.5.1+, capability API 1.386). Built against the same Engine commit as 0.8.10.
  • New or changed permissions/entrypoints: one route under the existing Home routes, POST /runs/:run/home/thoughts. No new permissions.
  • Restart, storage, update, or uninstall impact: a new thoughts field in the run's state document (null for older stories), and a hidden thoughts copy on the main chapter that used them. Deleting the story removes both.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Manually verify on a phone and on desktop that the thought-bubble button sits beside Remind Me, reads as a thought bubble, and doesn't cover the note or the love interest.
  • Manually verify: write thoughts, Send, and check that the dot appears and that reopening shows them for editing.
  • Manually verify that the next main chapter, with Debug mode on, carries THE PROTAGONIST'S THOUGHTS in its plan and scenes, and that the dot is gone afterwards.
  • Manually verify that a route chapter or date played in between doesn't use them.

Agent-run checks:

  • npm run test:otome-forge: 683 + 13 pass, 0 fail. Two checks were confirmed by breaking the code on purpose: dropping the at comparison fails the chapters test, and dropping the main-chapter check fails the beats test.
  • After a wording fix to the plan line: the chapters and beats regressions (60) and the server-bundle route list (5) pass again.
  • Strict package typecheck: 0 errors.
  • npm run check: Prettier clean, ESLint 0 errors.
  • validate-catalog.mjs (44 packages, v2=44, v3=44), validate-package-locales, validate-package-locale-keys, test-catalog-lanes, catalog-release-notes, ui-translation-retention, git diff --check: pass.
  • The updated Playwright specs were not run locally; CI runs them.
  • Local CodeRabbit: 1 finding (trivial): the thoughts sat between plain quote marks in the prompt, so a typed quote could end them early. Fixed in 876a350f4: they are JSON-quoted, as the notebook's words are, with a regression assertion. After it: test:otome-forge 683 + 13 pass, strict typecheck clean.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

🤖 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-Agents/pull/2130 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 11/6/2026 **Status:** ✅ Merged **Merged:** 11/6/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `feat/otome-your-thoughts` --- ### 📝 Commits (6) - [`4496cf8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4496cf8d91e11e29664f42f2333c5c7acabc77f1) feat(otome-forge): tell the next main chapter what's on your mind from Home (0.8.12) - [`4aac46b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4aac46b1edabc2431fd3ee92eba4fbabe6f2f1da) fix(otome-forge): word the thoughts' plan line as possibilities, not a checklist (0.8.12) - [`876a350`](https://github.com/Pasta-Devs/Marinara-Agents/commit/876a350f4092a6cb2945bc5cec20c6f39d20d1e0) fix(otome-forge): quote Your thoughts… as one string in the prompts (0.8.12) - [`de5c782`](https://github.com/Pasta-Devs/Marinara-Agents/commit/de5c78220de557d2bc08549642eaf64c836f4cba) fix(otome-forge): Your thoughts… opens only once Home has answered (0.8.12) - [`ef40934`](https://github.com/Pasta-Devs/Marinara-Agents/commit/ef40934c7c46c703446c1acf867636c25fe0517b) Merge remote-tracking branch 'origin/staging' into feat/otome-your-thoughts - [`e464537`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e464537e6563d799a4051707317f74131a3a44cd) test(otome-forge): fix the Your thoughts… e2e description check, and leave the memory poll out of 'no request' steps (0.8.12) ### 📊 Changes **31 files changed** (+1173 additions, -450 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/otome-forge-0.8.12.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/otome-forge/CHANGELOG.md` (+4 -0) 📝 `packages/otome-forge/README.md` (+4 -1) 📝 `packages/otome-forge/client.js` (+224 -221) 📝 `packages/otome-forge/manifest.json` (+5 -5) 📝 `packages/otome-forge/server.mjs` (+146 -145) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/locales/en.json` (+9 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/home/HomeScreen.tsx` (+56 -6) ➕ `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/screens/home/ThoughtsSheet.tsx` (+127 -0) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/api-types.ts` (+25 -1) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/shared/home.ts` (+9 -3) 📝 `packages/otome-forge/src/engine/packages/client/src/features/otome-forge/theme/styles.ts` (+3 -0) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/prompts.ts` (+48 -1) 📝 `packages/otome-forge/src/engine/packages/server/src/services/otome-forge/routes/home.ts` (+23 -1) _...and 11 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #2127 ## Why this change After a story-heavy chapter, players had no way to tell the story what their protagonist is thinking or planning. They might want to look into something, or not be able to forget what a love interest did, or wish for a hug on a bad day. The maintainer asked for a **Your thoughts…** button on Home, beside the calendar. It opens a small window with a free-text box. What is sent is used for the next main story chapter only, then dropped, and the player can come back with new thoughts any time. ## What changed - **otome-forge 0.8.12** (rebuilt `client.js`, `server.mjs`, manifest, artifact and catalog entries). - **Client:** - `screens/home/HomeScreen.tsx`: a round thought-bubble button after **Remind Me** in Home's rail row, same size as the calendar button. The bubble is an inline SVG on lucide's 24×24 grid, since lucide has none. A dot shows while thoughts wait. - New `screens/home/ThoughtsSheet.tsx`: a Dialog with one textarea (up to 1000 characters), prefilled with any thoughts still waiting. - Buttons: **Send**, **Clear** and **Close**. - Enter adds a new line; only Send sends. - 9 new `ui.otomeForge.home.thought*` keys. - **Server:** - `RunState.thoughts` (`{ text, at } | null`), read by `normalizeState`. - `GET /runs/:run/home` returns it. New `POST /runs/:run/home/thoughts { text }` trims and saves it; empty text clears it. It calls no model; 400 over the limit, 404 for a missing run. - `story/chapters.ts`: the next main chapter's plan reads the waiting thoughts inside its queued step and gets them after its cached part. - The chapter keeps a hidden copy (`Chapter.thoughts`, stripped by `toChapterView`). - The waiting slot is cleared in the write that registers the chapter, only if it still holds the same thoughts, so thoughts sent during planning wait for the following chapter. - A failed, cancelled or refused plan keeps them. - `prompts.ts` `thoughtsLines`: in P5, and in the uncached tail of that main chapter's scenes, Confrontation and Closer. - The words are quoted as the protagonist's private thoughts: not events, never undoing what was played. - A love interest knows only what the protagonist says or does. - Without thoughts every prompt is byte-identical. Route, repair, date and story chapters never carry them. - **Tests:** - Regressions: the Home route, state round-trip, seven chapter-plan cases, and the scene tails. - The home and remind e2e specs: rail counts, order and Tab path updated; the new route stubbed; a test that writes, sends, reopens, clears and closes. - **Docs and release:** - README: a Home bullet, the "never call a model" list, where data lives, and what leaves your device. - CHANGELOG 0.8.12. ## Package and security impact - Affected package IDs: `otome-forge` - Engine compatibility impact: none (Engine 2.5.1+, capability API 1.386). Built against the same Engine commit as 0.8.10. - New or changed permissions/entrypoints: one route under the existing Home routes, `POST /runs/:run/home/thoughts`. No new permissions. - Restart, storage, update, or uninstall impact: a new `thoughts` field in the run's state document (null for older stories), and a hidden `thoughts` copy on the main chapter that used them. Deleting the story removes both. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Manually verify on a phone and on desktop that the thought-bubble button sits beside **Remind Me**, reads as a thought bubble, and doesn't cover the note or the love interest. - Manually verify: write thoughts, **Send**, and check that the dot appears and that reopening shows them for editing. - Manually verify that the next main chapter, with Debug mode on, carries `THE PROTAGONIST'S THOUGHTS` in its plan and scenes, and that the dot is gone afterwards. - Manually verify that a route chapter or date played in between doesn't use them. Agent-run checks: - `npm run test:otome-forge`: 683 + 13 pass, 0 fail. Two checks were confirmed by breaking the code on purpose: dropping the `at` comparison fails the chapters test, and dropping the main-chapter check fails the beats test. - After a wording fix to the plan line: the chapters and beats regressions (60) and the server-bundle route list (5) pass again. - Strict package typecheck: 0 errors. - `npm run check`: Prettier clean, ESLint 0 errors. - `validate-catalog.mjs` (44 packages, v2=44, v3=44), `validate-package-locales`, `validate-package-locale-keys`, `test-catalog-lanes`, `catalog-release-notes`, `ui-translation-retention`, `git diff --check`: pass. - The updated Playwright specs were not run locally; CI runs them. - Local CodeRabbit: 1 finding (trivial): the thoughts sat between plain quote marks in the prompt, so a typed quote could end them early. Fixed in `876a350f4`: they are JSON-quoted, as the notebook's words are, with a regression assertion. After it: `test:otome-forge` 683 + 13 pass, strict typecheck clean. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation 🤖 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-11-07 16:39:45 +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#2131
No description provided.