[PR #6457] [MERGED] fix: add day-by-day schedules and visible generation errors #7185

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6457
Author: @SpicyMarinara
Created: 9/20/2026
Status: ✅ Merged
Merged: 9/20/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/sept20-assigned-schedule-sweep


📝 Commits (10+)

  • c526ff6 chore: coordinate assigned schedule issue sweep
  • fcb7058 fix: expose schedule connections and generate weeks day by day
  • 491bec4 fix: reject unusable generated schedule time ranges
  • 83a472d refactor: reuse schedule generation busy state
  • 4aa0ee0 fix: discard cancelled day and summary generations
  • 5879003 Merge remote-tracking branch 'origin/staging' into codex/sept20-assigned-schedule-sweep
  • 88e598b Merge branch 'staging' into codex/sept20-assigned-schedule-sweep
  • 663624b fix: validate complete generated days and refresh week dates
  • b3459d3 Merge remote-tracking branch 'origin/codex/sept20-assigned-schedule-sweep' into codex/sept20-assigned-schedule-sweep
  • 09af90d Merge remote-tracking branch 'origin/staging' into codex/sept20-assigned-schedule-sweep

📊 Changes

7 files changed (+915 additions, -96 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
➕ e2e/schedule-generation.e2e.ts (+319 -0)
📝 packages/client/src/components/chat/CharacterScheduleEditorModal.tsx (+259 -50)
📝 packages/client/src/localization/locales/en.json (+14 -0)
📝 packages/server/src/routes/conversation.routes.ts (+37 -8)
📝 packages/server/src/services/conversation/schedule.service.ts (+84 -38)
➕ scripts/regressions/schedule-generation.regression.ts (+200 -0)

📄 Description

Linked issue

Closes #6449
Closes #6455

Why this change

Generating an entire week in one response can overwhelm smaller models. When generation failed, the schedule editor showed only a temporary toast and gave no indication of the connection it used.

What changed

  • The existing weekly editor offers one request for the entire week or seven sequential day requests. It reuses the single-day generator, respects Rewrite/Adjust/Vary/Repair and day guidance, and applies the new week only after every day succeeds. Closing the editor aborts requests synchronously and ignores late week/day/summary responses, including Escape, backdrop, and close-button dismissal.
  • A language connection selector shows its model and applies to week, day, and routine-summary generation. It inherits the chat/default connection and preserves random-pool behavior. Missing, quarantined, and media connections cannot silently substitute another provider.
  • Persistent errors keep the current draft intact. Malformed JSON, missing days, empty blocks, invalid times, gaps, and overlaps are rejected. Single-day regeneration refreshes the week date. Schedule prompts honor UI debug mode and DEBUG_AGENTS.

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

Automated checks run: pnpm check, pnpm regression:prompt, the new schedule-generation regression, and existing character schedule ownership/transfer regressions. All listed checks pass locally.

Nine Playwright cases pass on desktop Chromium, mobile Chromium, and iPhone WebKit. They exercise both themes, connection selection, persistent errors, partial failure without draft replacement, seven-day assembly, settings preservation, saving, closing mid-generation, character-card editing without any connections, and cancellation of day/summary requests without late draft updates or saves. Provider replies use deterministic fixtures; live model quality and physical devices are not claimed.

A local runtime container built with the compiled artifacts on the existing identical-dependency production base and returned a healthy /api/health. The required GitHub container check performs the full source build.

Manual verification notes

Browser screenshots were visually inspected. Human checklist items remain unchecked. Manually verify generation with your own provider and the installed mobile app.

Review follow-up: generated days must form a complete 24-hour cycle without gaps, overlaps, or duplicate ranges. Overnight blocks and full-day blocks starting at any hour remain accepted. Regenerating a single day applies the returned week date. The response-validation regression failed before the coverage fix and now passes; all nine browser cases pass again, including saving a regenerated day with a newer week date. The final browser proof also checks that Cancel aborts before its click handler returns, that close-button/Escape dismissal rejects late replies, and that equal-clock full-day ranges fill the timeline. These cases pass in both themes on all three browsers. External close and character changes abort the same request controller during layout cleanup.

Docs and release impact

Added canonical English UI strings and an Unreleased changelog entry. No dependency, version, or translated-document changes.

UI evidence

Before/after screenshot sheets contain synthetic fixtures only. No private chats or user screenshots were uploaded.

Summary by CodeRabbit

  • New Features

    • Added connection and model selection for AI schedule generation, including provider availability checks.
    • Added whole-week and day-by-day generation modes with per-day progress.
    • Added cancellation support while preserving saved and unsaved edits.
    • Added clearer generation status and error messages.
    • Manual schedule editing remains available when no connections are configured.
    • Added support for full-day schedule blocks and refreshed week dates after daily regeneration.
  • Bug Fixes

    • Invalid, empty, incomplete, overlapping, or unavailable generated schedules are now rejected.
    • Existing schedule drafts are preserved when generation requests fail.

Full-day timeline before/after screenshots cover desktop and mobile in both themes, with synthetic data only.

Final review follow-up: the existing schedule fieldset and tuning controls now disable for any active generation, preventing replies from overwriting day, talkativeness, or timing edits made during the request. pnpm check and the six day-by-day browser cases pass again across both themes and all three browsers; the cases assert day activity, talkativeness, and timing controls are disabled while requests are pending. The tuning-control regression failed before its fix and passes afterward.


🔄 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/6457 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/20/2026 **Status:** ✅ Merged **Merged:** 9/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept20-assigned-schedule-sweep` --- ### 📝 Commits (10+) - [`c526ff6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c526ff618fb34dc6e7929926a2250eece133425a) chore: coordinate assigned schedule issue sweep - [`fcb7058`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fcb705819234f91a6538146e7653e82ead85641f) fix: expose schedule connections and generate weeks day by day - [`491bec4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/491bec4ef09277af3cef1c231b19ed41f062c2fe) fix: reject unusable generated schedule time ranges - [`83a472d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/83a472de35f0e8a3599aaeb3480dee86046ed8b3) refactor: reuse schedule generation busy state - [`4aa0ee0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4aa0ee068a5737a4df28c5a4065aa1db3a538d5e) fix: discard cancelled day and summary generations - [`5879003`](https://github.com/Pasta-Devs/Marinara-Engine/commit/58790039b6bcfb0f74bb54d59312bee51553bcd9) Merge remote-tracking branch 'origin/staging' into codex/sept20-assigned-schedule-sweep - [`88e598b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/88e598ba576d4893f619131d3e70b4fac7fea8e5) Merge branch 'staging' into codex/sept20-assigned-schedule-sweep - [`663624b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/663624b5e5b78a9ec0276a87bd3d49fda28713d8) fix: validate complete generated days and refresh week dates - [`b3459d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b3459d3a7cfcd6eef64cc6e5e472c7cd10d8cd5e) Merge remote-tracking branch 'origin/codex/sept20-assigned-schedule-sweep' into codex/sept20-assigned-schedule-sweep - [`09af90d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/09af90d7e852b582f2b68335ebaccefb59a40636) Merge remote-tracking branch 'origin/staging' into codex/sept20-assigned-schedule-sweep ### 📊 Changes **7 files changed** (+915 additions, -96 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `e2e/schedule-generation.e2e.ts` (+319 -0) 📝 `packages/client/src/components/chat/CharacterScheduleEditorModal.tsx` (+259 -50) 📝 `packages/client/src/localization/locales/en.json` (+14 -0) 📝 `packages/server/src/routes/conversation.routes.ts` (+37 -8) 📝 `packages/server/src/services/conversation/schedule.service.ts` (+84 -38) ➕ `scripts/regressions/schedule-generation.regression.ts` (+200 -0) </details> ### 📄 Description ## Linked issue Closes #6449 Closes #6455 ## Why this change Generating an entire week in one response can overwhelm smaller models. When generation failed, the schedule editor showed only a temporary toast and gave no indication of the connection it used. ## What changed - The existing weekly editor offers one request for the entire week or seven sequential day requests. It reuses the single-day generator, respects Rewrite/Adjust/Vary/Repair and day guidance, and applies the new week only after every day succeeds. Closing the editor aborts requests synchronously and ignores late week/day/summary responses, including Escape, backdrop, and close-button dismissal. - A language connection selector shows its model and applies to week, day, and routine-summary generation. It inherits the chat/default connection and preserves random-pool behavior. Missing, quarantined, and media connections cannot silently substitute another provider. - Persistent errors keep the current draft intact. Malformed JSON, missing days, empty blocks, invalid times, gaps, and overlaps are rejected. Single-day regeneration refreshes the week date. Schedule prompts honor UI debug mode and DEBUG_AGENTS. ## 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` Automated checks run: `pnpm check`, `pnpm regression:prompt`, the new schedule-generation regression, and existing character schedule ownership/transfer regressions. All listed checks pass locally. Nine Playwright cases pass on desktop Chromium, mobile Chromium, and iPhone WebKit. They exercise both themes, connection selection, persistent errors, partial failure without draft replacement, seven-day assembly, settings preservation, saving, closing mid-generation, character-card editing without any connections, and cancellation of day/summary requests without late draft updates or saves. Provider replies use deterministic fixtures; live model quality and physical devices are not claimed. A local runtime container built with the compiled artifacts on the existing identical-dependency production base and returned a healthy `/api/health`. The required GitHub container check performs the full source build. ### Manual verification notes Browser screenshots were visually inspected. Human checklist items remain unchecked. Manually verify generation with your own provider and the installed mobile app. Review follow-up: generated days must form a complete 24-hour cycle without gaps, overlaps, or duplicate ranges. Overnight blocks and full-day blocks starting at any hour remain accepted. Regenerating a single day applies the returned week date. The response-validation regression failed before the coverage fix and now passes; all nine browser cases pass again, including saving a regenerated day with a newer week date. The final browser proof also checks that Cancel aborts before its click handler returns, that close-button/Escape dismissal rejects late replies, and that equal-clock full-day ranges fill the timeline. These cases pass in both themes on all three browsers. External close and character changes abort the same request controller during layout cleanup. ## Docs and release impact Added canonical English UI strings and an Unreleased changelog entry. No dependency, version, or translated-document changes. ## UI evidence [Before/after screenshot sheets](https://gist.github.com/SpicyMarinara/b13b2f050a6c8b9a8fdd93458d5d9d06) contain synthetic fixtures only. No private chats or user screenshots were uploaded. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added connection and model selection for AI schedule generation, including provider availability checks. * Added whole-week and day-by-day generation modes with per-day progress. * Added cancellation support while preserving saved and unsaved edits. * Added clearer generation status and error messages. * Manual schedule editing remains available when no connections are configured. * Added support for full-day schedule blocks and refreshed week dates after daily regeneration. * **Bug Fixes** * Invalid, empty, incomplete, overlapping, or unavailable generated schedules are now rejected. * Existing schedule drafts are preserved when generation requests fail. <!-- end of auto-generated comment: release notes by coderabbit.ai --> [Full-day timeline before/after screenshots](https://gist.github.com/SpicyMarinara/e24de8eff6132b2b8f13a18a8a095ad5) cover desktop and mobile in both themes, with synthetic data only. Final review follow-up: the existing schedule fieldset and tuning controls now disable for any active generation, preventing replies from overwriting day, talkativeness, or timing edits made during the request. `pnpm check` and the six day-by-day browser cases pass again across both themes and all three browsers; the cases assert day activity, talkativeness, and timing controls are disabled while requests are pending. The tuning-control regression failed before its fix and passes afterward. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:17:19 +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#7185
No description provided.