[PR #4415] [MERGED] Add character schedule export and import #6367

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4415
Author: @SpicyMarinara
Created: 8/1/2026
Status: ✅ Merged
Merged: 8/1/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/4414-character-schedule-transfer


📝 Commits (3)

  • d992c5f feat: add character schedule transfer
  • b769981 test: cover character schedule transfers
  • 4fbb2ab fix: align schedule transfer icons

📊 Changes

8 files changed (+493 additions, -11 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/conversation/schedules.md (+6 -0)
📝 e2e/core-flows.e2e.ts (+160 -0)
📝 package.json (+1 -0)
📝 packages/client/src/components/chat/CharacterScheduleEditorModal.tsx (+85 -11)
➕ packages/client/src/lib/character-schedule-transfer.ts (+171 -0)
📝 packages/client/src/localization/locales/en.json (+7 -0)
➕ scripts/regressions/character-schedule-transfer.regression.ts (+62 -0)

📄 Description

Closes #4414.

Why

Character schedules could only be copied by hand, which made it difficult to move a routine to another character or restore it on another installation.

What changed

  • add versioned JSON export for the schedule editor's current draft
  • validate imports before replacing the editor draft
  • accept raw saved schedule objects as a compatibility path
  • move imported schedules to the current week so restored routines are not immediately stale
  • keep imports unsaved until Save schedule is chosen, so Cancel leaves stored metadata unchanged
  • document the transfer flow and add focused regression coverage

Automated verification

  • pnpm check
  • pnpm regression:character-schedule-transfer
  • pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --grep "character schedules export the live draft and import safely" (desktop and mobile)

Manual verification

  • Manually export a schedule from the editor and inspect the downloaded JSON.
  • Manually import the export into another character, save it, and verify every block and tuning value persists.
  • Manually import malformed, oversized, and future-version files and verify the existing draft remains unchanged.
  • Manually import a valid schedule and choose Cancel, then verify the stored schedule remains unchanged.
  • Manually verify the footer controls at desktop and mobile widths.

Summary by CodeRabbit

  • New Features

    • Added JSON export and import for character schedules.
    • Imported schedules are validated, restored as unsaved drafts, and moved to the current week.
    • Users can save or cancel imported drafts without changing existing schedules.
    • Added schedule transfer between characters or installations.
    • Added clear success and error messages for transfer actions.
  • Documentation

    • Documented schedule transfer, import, export, saving, and cancellation workflows.
  • Bug Fixes

    • Added validation for invalid, oversized, unsupported, and legacy schedule files.

🔄 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/4415 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/1/2026 **Status:** ✅ Merged **Merged:** 8/1/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/4414-character-schedule-transfer` --- ### 📝 Commits (3) - [`d992c5f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d992c5fac47144d4cb95b9572dfb5e768325e8fe) feat: add character schedule transfer - [`b769981`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b7699810467291a7e64537fce458ce69259fea95) test: cover character schedule transfers - [`4fbb2ab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4fbb2ab8024f2d2f80c2167db575297340d2dc18) fix: align schedule transfer icons ### 📊 Changes **8 files changed** (+493 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/conversation/schedules.md` (+6 -0) 📝 `e2e/core-flows.e2e.ts` (+160 -0) 📝 `package.json` (+1 -0) 📝 `packages/client/src/components/chat/CharacterScheduleEditorModal.tsx` (+85 -11) ➕ `packages/client/src/lib/character-schedule-transfer.ts` (+171 -0) 📝 `packages/client/src/localization/locales/en.json` (+7 -0) ➕ `scripts/regressions/character-schedule-transfer.regression.ts` (+62 -0) </details> ### 📄 Description Closes #4414. ## Why Character schedules could only be copied by hand, which made it difficult to move a routine to another character or restore it on another installation. ## What changed - add versioned JSON export for the schedule editor's current draft - validate imports before replacing the editor draft - accept raw saved schedule objects as a compatibility path - move imported schedules to the current week so restored routines are not immediately stale - keep imports unsaved until **Save schedule** is chosen, so **Cancel** leaves stored metadata unchanged - document the transfer flow and add focused regression coverage ## Automated verification - `pnpm check` - `pnpm regression:character-schedule-transfer` - `pnpm exec playwright test -c playwright.config.ts e2e/core-flows.e2e.ts --grep "character schedules export the live draft and import safely"` (desktop and mobile) ## Manual verification - [ ] Manually export a schedule from the editor and inspect the downloaded JSON. - [ ] Manually import the export into another character, save it, and verify every block and tuning value persists. - [ ] Manually import malformed, oversized, and future-version files and verify the existing draft remains unchanged. - [ ] Manually import a valid schedule and choose Cancel, then verify the stored schedule remains unchanged. - [ ] Manually verify the footer controls at desktop and mobile widths. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added JSON export and import for character schedules. * Imported schedules are validated, restored as unsaved drafts, and moved to the current week. * Users can save or cancel imported drafts without changing existing schedules. * Added schedule transfer between characters or installations. * Added clear success and error messages for transfer actions. * **Documentation** * Documented schedule transfer, import, export, saving, and cancellation workflows. * **Bug Fixes** * Added validation for invalid, oversized, unsupported, and legacy schedule files. <!-- 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:09:44 +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#6367
No description provided.