[PR #5455] [CLOSED] feat: add Story Bundles with one-click launch - self-contained and shareable #6775

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5455
Author: @Kranael
Created: 8/23/2026
Status: ❌ Closed

Base: staging ← Head: main


📝 Commits (10+)

  • d360cee feat(shared): add Story Bundle type and Zod schemas
  • fe574b1 feat(server): add story_bundles table, storage and REST routes
  • d9dbecc feat(client): add story bundle query hooks, ui store surface and gradient
  • 54a71f9 feat(client): add Story Bundles panel, editor and navigation wiring
  • fc689e2 feat(client): add Story Bundles localization keys to English catalog
  • ba58fba docs: add story-bundle.md documenting the Story Bundle object
  • 1fe5f42 docs: add story-bundle.agent.md architecture context for agents
  • d550f00 fix(server): register story_bundles in FILE_BACKED_TABLES
  • 3ee1ea7 feat(client): add data-testid to topbar panel buttons
  • dbe52cc feat(client): ask for title via prompt dialog when creating a story bundle

📊 Changes

142 files changed (+15977 additions, -187 deletions)

View changed files

📝 .gitignore (+15 -0)
📝 AGENTS.md (+4 -1)
📝 CHANGELOG.md (+30 -0)
📝 docs/chats/managing-chats.md (+5 -0)
➕ docs/chats/story-bundles.md (+121 -0)
➕ docs/development/general-fixes.md (+142 -0)
➕ docs/development/windows-fixes.md (+217 -0)
📝 docs/roleplay/getting-started.md (+4 -0)
📝 package.json (+2 -0)
📝 packages/client/src/components/agents/AgentCatalogView.tsx (+4 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+61 -4)
📝 packages/client/src/components/characters/ConvoProfileFields.tsx (+11 -0)
📝 packages/client/src/components/chat/AgentSettingsControls.tsx (+3 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+8 -2)
📝 packages/client/src/components/chat/ChatCommonOverlays.tsx (+19 -0)
📝 packages/client/src/components/chat/ChatConversationSurface.tsx (+5 -0)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+4 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+9 -1)
📝 packages/client/src/components/layout/AppShell.tsx (+6 -0)
📝 packages/client/src/components/layout/ChatSidebar.tsx (+35 -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

Related to #4364
Implements the Story Bundle proposal from #4364.

Why this change

Story Bundle provides a reusable, launchable configuration for a complete story.

Marinara's modular architecture is powerful, but starting an established story currently requires manually assembling the same Characters, Persona, Preset, Lorebooks, Agents and other configuration each time.

Presets help preserve parts of a chat configuration, but they do not provide a single story-level container for all of these components, multiple characters or lorebooks, agents, and alternative story introductions.

Story Bundles group these existing modular components into a single unit that can be configured once and launched as a complete story, while keeping the underlying components reusable and independent.

This PR implements the Story Bundle concept originally proposed in #4364, while keeping Marinara's existing modular component architecture intact.

What changed

Development

  • Added Story Bundles as a reusable, launchable story configuration.
  • Added a dedicated Story Bundle panel with create, import, export, play, and delete actions.
  • Added a full Story Bundle editor with Metadata, Description, Characters, Personas, Lorebooks, Presets, Agents, and Intros tabs.
  • Added Story Bundle metadata including name, creator, comment, tags, version, and bundle image.
  • Added HTML descriptions with live preview.
  • Added support for assigning multiple Characters and Lorebooks, plus a single Persona and Preset.
  • Added support for installing and assigning Agents to Story Bundles.
  • Added inline Intros with multiple selectable starting scenarios.
  • Added a complete Story Bundle Play flow that creates a new chat with the configured Characters, Persona, Preset, Lorebooks, Agents, and selected Intro.
  • Added support for configurable Preset variables during Story Bundle startup.
  • Added self-contained Story Bundle import/export, including embedded content and associated binary assets.
  • Added automatic detection and optional installation of missing Agents during Story Bundle import.
  • Added Story Bundle artwork to chats started from a Story Bundle.
  • Reused existing Marinara UI components and functionality wherever possible, including avatar upload/cropping, modals, buttons, preset selection, pickers, and other shared interactions, rather than introducing Story Bundle-specific implementations.
  • Kept Story Bundles integrated with the existing UI and component architecture instead of creating parallel implementations for functionality that already exists in Marinara.

QA

  • Added 111 automated tests covering Story Bundle functionality.
  • The suite is intentionally split by feature and responsibility rather than concentrated in a single large test file. Page Objects, fixtures, test data, and API helpers are shared across the individual test suites.
  • Added a full browser-based Golden Path E2E test covering the complete Story Bundle workflow without mocks. This test starts from an empty state and exercises the complete user flow from creating the required components through launching the resulting Story Bundle.

Windows fixes

  • Fixed Windows-specific issues discovered during Story Bundle development and validation:
    • Fixed launcher data snapshot/restore failures caused by runtime-created symlinks.
    • Fixed the dev server and Playwright webServer failing to start with standalone Windows pnpm installations.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue. Podman production build passed successfully. Full build log
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed
  • Read and followed CONTRIBUTING.md
  • Verified the Story Bundle workflow on Windows.

Manual verification notes

Story Bundle Flow

  • Created a Character and uploaded an avatar.
  • Imported an existing Character.
  • Created a Persona.
  • Created a Preset.
  • Created a Lorebook.
  • Installed and configured four Agents.
  • Created a Story Bundle and configured its metadata, image, tags, and HTML description.
  • Added the Characters, Persona, Preset, Lorebook, and Agents to the Story Bundle.
  • Added multiple Intro scenarios and verified Intro selection during Play.
  • Saved and played the Story Bundle.
  • Verified that the resulting chat contains the expected Story Bundle configuration.
  • Verified the Story Bundle artwork in the resulting chat.
  • Verified the complete flow in a real browser without mocks.

Export/Import Flow

  • Exported a Story Bundle.
  • Deleted a Character used by the Story Bundle.
  • Deleted a Lorebook used by the Story Bundle.
  • Uninstalled two Agents used by the Story Bundle.
  • Deleted the exported Story Bundle.
  • Imported the deleted Story Bundle.
  • Verified the import modal.
  • Verified that the used Characters and Lorebooks were imported.
  • Verified that the two Agents were detected and could be installed through the Story Bundle import modal.

Architecture

The implementation intentionally builds on existing Marinara components and patterns wherever possible. Story Bundle-specific code primarily composes existing functionality rather than duplicating it. This includes shared modal, button, picker, preset-selection, avatar-upload/cropping, and other UI functionality.

The Playwright coverage follows the same principle: shared Page Objects, fixtures, API helpers, and test data are separated from feature-specific test cases to keep the suite isolated and maintainable.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed.

Documentation is provided in the following files:

  • story-bundle.md — user-facing documentation

  • story-bundle.technical.md — technical documentation, including APIs

  • story-bundle.agent.md — quick introduction for agents to get context about the feature

  • changelog.md

  • 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)

UI evidence (if applicable)

Manual verification screenshots covering the complete Story Bundle flow are attached as a ZIP archive.
story-bundle-ui.zip

23-08-2026_19-51-55-0022 23-08-2026_19-53-06-0020 23-08-2026_19-52-44-0021 23-08-2026_20-00-17-0005 23-08-2026_20-03-28-0002 23-08-2026_19-57-02-0016 23-08-2026_19-57-15-0015 23-08-2026_19-57-22-0014

Summary by CodeRabbit

  • New Features

    • Added Story Bundles for saving reusable roleplay setups with characters, personas, lorebooks, presets, agents, descriptions, images, tags, and intros.
    • Create, edit, preview, play, delete, import, and export self-contained .marinara.json bundles.
    • Import embedded content selectively and install missing compatible agents when available.
    • Story Bundle imagery now appears on associated chats.
  • Bug Fixes

    • Improved profile imports containing gallery metadata and .native asset markers.
    • Improved Windows crash recovery, launcher updates, and package startup reliability.
  • Documentation

    • Added guides for creating, managing, importing, exporting, and playing Story Bundles.

🔄 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/5455 **Author:** [@Kranael](https://github.com/Kranael) **Created:** 8/23/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `main` --- ### 📝 Commits (10+) - [`d360cee`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d360cee2f6cd7220965c381410e303f45e7aade7) feat(shared): add Story Bundle type and Zod schemas - [`fe574b1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fe574b133ed9eb0db3039c380f832835ede16160) feat(server): add story_bundles table, storage and REST routes - [`d9dbecc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9dbecc8949ad88f3237c2797ebc1fbc176c74aa) feat(client): add story bundle query hooks, ui store surface and gradient - [`54a71f9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/54a71f9dc167ee14dfb390a837b9fdedc91d8354) feat(client): add Story Bundles panel, editor and navigation wiring - [`fc689e2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc689e20867dcbb02c58d35203b9f13606dc30ef) feat(client): add Story Bundles localization keys to English catalog - [`ba58fba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ba58fbafc97880a3df4b3565813db984c5c7278b) docs: add story-bundle.md documenting the Story Bundle object - [`1fe5f42`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1fe5f4239baff10d2a049d1329bc41e7ae62f788) docs: add story-bundle.agent.md architecture context for agents - [`d550f00`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d550f0080554ddef049b59a18ecd0d321deaa02c) fix(server): register story_bundles in FILE_BACKED_TABLES - [`3ee1ea7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3ee1ea7eaa123e89f08b02da1f566bd45dac09bc) feat(client): add data-testid to topbar panel buttons - [`dbe52cc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dbe52ccac8f46a215571d050261eea614540c3e4) feat(client): ask for title via prompt dialog when creating a story bundle ### 📊 Changes **142 files changed** (+15977 additions, -187 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+15 -0) 📝 `AGENTS.md` (+4 -1) 📝 `CHANGELOG.md` (+30 -0) 📝 `docs/chats/managing-chats.md` (+5 -0) ➕ `docs/chats/story-bundles.md` (+121 -0) ➕ `docs/development/general-fixes.md` (+142 -0) ➕ `docs/development/windows-fixes.md` (+217 -0) 📝 `docs/roleplay/getting-started.md` (+4 -0) 📝 `package.json` (+2 -0) 📝 `packages/client/src/components/agents/AgentCatalogView.tsx` (+4 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+61 -4) 📝 `packages/client/src/components/characters/ConvoProfileFields.tsx` (+11 -0) 📝 `packages/client/src/components/chat/AgentSettingsControls.tsx` (+3 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+8 -2) 📝 `packages/client/src/components/chat/ChatCommonOverlays.tsx` (+19 -0) 📝 `packages/client/src/components/chat/ChatConversationSurface.tsx` (+5 -0) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+4 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+9 -1) 📝 `packages/client/src/components/layout/AppShell.tsx` (+6 -0) 📝 `packages/client/src/components/layout/ChatSidebar.tsx` (+35 -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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Related to #4364 Implements the Story Bundle proposal from #4364. ## Why this change Story Bundle provides a reusable, launchable configuration for a complete story. Marinara's modular architecture is powerful, but starting an established story currently requires manually assembling the same Characters, Persona, Preset, Lorebooks, Agents and other configuration each time. Presets help preserve parts of a chat configuration, but they do not provide a single story-level container for all of these components, multiple characters or lorebooks, agents, and alternative story introductions. Story Bundles group these existing modular components into a single unit that can be configured once and launched as a complete story, while keeping the underlying components reusable and independent. This PR implements the Story Bundle concept originally proposed in #4364, while keeping Marinara's existing modular component architecture intact. ## What changed ### Development - Added Story Bundles as a reusable, launchable story configuration. - Added a dedicated Story Bundle panel with create, import, export, play, and delete actions. - Added a full Story Bundle editor with Metadata, Description, Characters, Personas, Lorebooks, Presets, Agents, and Intros tabs. - Added Story Bundle metadata including name, creator, comment, tags, version, and bundle image. - Added HTML descriptions with live preview. - Added support for assigning multiple Characters and Lorebooks, plus a single Persona and Preset. - Added support for installing and assigning Agents to Story Bundles. - Added inline Intros with multiple selectable starting scenarios. - Added a complete Story Bundle Play flow that creates a new chat with the configured Characters, Persona, Preset, Lorebooks, Agents, and selected Intro. - Added support for configurable Preset variables during Story Bundle startup. - Added self-contained Story Bundle import/export, including embedded content and associated binary assets. - Added automatic detection and optional installation of missing Agents during Story Bundle import. - Added Story Bundle artwork to chats started from a Story Bundle. - Reused existing Marinara UI components and functionality wherever possible, including avatar upload/cropping, modals, buttons, preset selection, pickers, and other shared interactions, rather than introducing Story Bundle-specific implementations. - Kept Story Bundles integrated with the existing UI and component architecture instead of creating parallel implementations for functionality that already exists in Marinara. ### QA - Added 111 automated tests covering Story Bundle functionality. - The suite is intentionally split by feature and responsibility rather than concentrated in a single large test file. Page Objects, fixtures, test data, and API helpers are shared across the individual test suites. - Added a full browser-based Golden Path E2E test covering the complete Story Bundle workflow without mocks. This test starts from an empty state and exercises the complete user flow from creating the required components through launching the resulting Story Bundle. ### Windows fixes - Fixed Windows-specific issues discovered during Story Bundle development and validation: - Fixed launcher data snapshot/restore failures caused by runtime-created symlinks. - Fixed the dev server and Playwright webServer failing to start with standalone Windows pnpm installations. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue. Podman production build passed successfully. [Full build log](https://github.com/user-attachments/files/31352143/podman-pr-log.txt) - [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 - [x] Read and followed `CONTRIBUTING.md` - [x] Verified the Story Bundle workflow on Windows. ### Manual verification notes #### Story Bundle Flow - Created a Character and uploaded an avatar. - Imported an existing Character. - Created a Persona. - Created a Preset. - Created a Lorebook. - Installed and configured four Agents. - Created a Story Bundle and configured its metadata, image, tags, and HTML description. - Added the Characters, Persona, Preset, Lorebook, and Agents to the Story Bundle. - Added multiple Intro scenarios and verified Intro selection during Play. - Saved and played the Story Bundle. - Verified that the resulting chat contains the expected Story Bundle configuration. - Verified the Story Bundle artwork in the resulting chat. - Verified the complete flow in a real browser without mocks. #### Export/Import Flow - Exported a Story Bundle. - Deleted a Character used by the Story Bundle. - Deleted a Lorebook used by the Story Bundle. - Uninstalled two Agents used by the Story Bundle. - Deleted the exported Story Bundle. - Imported the deleted Story Bundle. - Verified the import modal. - Verified that the used Characters and Lorebooks were imported. - Verified that the two Agents were detected and could be installed through the Story Bundle import modal. ### Architecture The implementation intentionally builds on existing Marinara components and patterns wherever possible. Story Bundle-specific code primarily composes existing functionality rather than duplicating it. This includes shared modal, button, picker, preset-selection, avatar-upload/cropping, and other UI functionality. The Playwright coverage follows the same principle: shared Page Objects, fixtures, API helpers, and test data are separated from feature-specific test cases to keep the suite isolated and maintainable. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed. Documentation is provided in the following files: - `story-bundle.md` — user-facing documentation - `story-bundle.technical.md` — technical documentation, including APIs - `story-bundle.agent.md` — quick introduction for agents to get context about the feature - `changelog.md` - [ ] 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) ## UI evidence (if applicable) Manual verification screenshots covering the complete Story Bundle flow are attached as a ZIP archive. [story-bundle-ui.zip](https://github.com/user-attachments/files/31352592/story-bundle-ui.zip) <!-- Add before/after screenshots or recordings for UI changes --> <img width="311" height="250" alt="23-08-2026_19-51-55-0022" src="https://github.com/user-attachments/assets/118c9fd0-131b-4de8-a476-610aa92bd203" /> <img width="1920" height="954" alt="23-08-2026_19-53-06-0020" src="https://github.com/user-attachments/assets/986c5f10-3b9c-4724-9135-e58660c56ced" /> <img width="1920" height="954" alt="23-08-2026_19-52-44-0021" src="https://github.com/user-attachments/assets/4c4d0ca1-19e6-4da2-874f-fe8e0a005c00" /> <img width="1920" height="954" alt="23-08-2026_20-00-17-0005" src="https://github.com/user-attachments/assets/2e24f6f3-9369-451c-b867-122d9e6f445a" /> <img width="1920" height="954" alt="23-08-2026_20-03-28-0002" src="https://github.com/user-attachments/assets/75128b68-29a6-4c20-9ce2-890886bf526d" /> <img width="1920" height="954" alt="23-08-2026_19-57-02-0016" src="https://github.com/user-attachments/assets/e990adb1-180c-47fd-a4b2-7f365e2afe6f" /> <img width="1920" height="954" alt="23-08-2026_19-57-15-0015" src="https://github.com/user-attachments/assets/3e8dbf3b-a4c9-4745-bcdc-146b99aaf4d4" /> <img width="1920" height="954" alt="23-08-2026_19-57-22-0014" src="https://github.com/user-attachments/assets/9a7a7761-043d-4e3d-bb2b-f924f09269e0" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added Story Bundles for saving reusable roleplay setups with characters, personas, lorebooks, presets, agents, descriptions, images, tags, and intros. - Create, edit, preview, play, delete, import, and export self-contained `.marinara.json` bundles. - Import embedded content selectively and install missing compatible agents when available. - Story Bundle imagery now appears on associated chats. - **Bug Fixes** - Improved profile imports containing gallery metadata and `.native` asset markers. - Improved Windows crash recovery, launcher updates, and package startup reliability. - **Documentation** - Added guides for creating, managing, importing, exporting, and playing Story Bundles. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:13:36 +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#6775
No description provided.