Skip to content

Fix reasoning summaries and assigned issue sweep - #4234

Merged
SpicyMarinara merged 4 commits into
stagingfrom
fix/4233-openai-reasoning-summary-events
Jul 29, 2026
Merged

Fix reasoning summaries and assigned issue sweep#4234
SpicyMarinara merged 4 commits into
stagingfrom
fix/4233-openai-reasoning-summary-events

Conversation

@SpicyMarinara

@SpicyMarinara SpicyMarinara commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Why

This PR combines the existing official OpenAI reasoning-summary fix with the current issue sweep assigned to @SpicyMarinara:

  • GPT-5.6 Sol can report reasoning tokens while Roleplay persists no readable summary, leaving the brain-icon affordance empty.
  • Overnight schedule ranges were resolved as though both sides of midnight belonged to the currently named day.
  • Conversation mode did not apply AI-output display regex scripts to every stored message and content part.
  • ComfyUI video profiles fixed %length% to an implicit 16 FPS and exposed no duration-seconds or FPS macros.
  • The connection image test used a 512×512 request that ByteDance Seedream 4.5 rejects; the supported OpenRouter path expects a 1K request.
  • Narrative Director could not opt into a prompt-section marker, and injected-agent choices were centered in the preset menu.

For #4240, the maintainer's important follow-up says the reported first-generation preprocessing/context symptom was resolved by reinstalling Marinara Engine. This PR deliberately does not rewrite that resolved orchestration path; it addresses only the remaining reproducible editor defects.

Closes #4233.
Closes #4236.
Closes #4237.
Closes #4238.
Closes #4239.
Closes #4240.

Intended change

  • Capture and deduplicate completed reasoning-summary text/part events across ordinary and tool-enabled OpenAI Responses streams.
  • Resolve midnight-crossing schedules against the day where each range begins, consistently on client and server.
  • Apply scoped AI-output display regex transformations to every Conversation message and multipart message using transcript depth.
  • Add a persisted 1–120 FPS control for ComfyUI video profiles and expose %length_s% plus %fps%, while preserving legacy %length% as the configured frame count.
  • Pass the configured FPS through all gallery, game, sprite, test-video, and fallback generation paths.
  • Generate connection test images at a broadly supported 1024×1024 size.
  • Expose and persist Add as Prompt Section for Narrative Director, and left-align injected-agent entries in the preset section menu.

Automated evidence

  • pnpm check — passed (one pre-existing NoodleHome hook warning, no errors).
  • pnpm localization:check — passed.
  • pnpm regression:timezone — passed.
  • pnpm regression:prompt — passed.
  • pnpm regression:issues — passed.
  • Prior branch validation: pnpm regression:providers — passed.
  • pnpm smoke:ui — 149 passed, 83 skipped; six unrelated existing accent-variable/tracker assertions failed and reproduced in an isolated one-worker run. The sweep-related browser paths passed.

Manual verification

  • Verify multiple official OpenAI GPT-5.6 Sol Roleplay replies through https://api.openai.com/v1 save reasoning and show the brain icon without duplicate summaries.
  • Verify Monday 02:00 uses a Sunday 23:00–07:00 block, while Monday 23:30 uses Monday's overnight block.
  • Verify a display-only regex hides matching text from every Conversation assistant message and multipart message.
  • Verify a ComfyUI workflow receives %length_s%, %fps%, and %length% using the saved FPS across connection test, Gallery, Roleplay, and Game generation paths.
  • Verify ByteDance Seedream 4.5 completes the saved connection's Test Image action at 1K.
  • Verify Narrative Director can be saved/exported as a prompt section and appears left-aligned in Preset → Add Section.

Summary by CodeRabbit

  • New Features

    • Added “Inject as Prompt Section” support for Director agents, including saving and exporting settings.
    • Added configurable FPS for ComfyUI video generation, with dynamic frame-count calculations and workflow placeholders.
    • Improved transcript rendering with scoped regex processing and message-depth awareness.
    • Enhanced overnight schedule status handling.
  • Bug Fixes

    • Improved OpenAI reasoning-summary streaming to prevent missing or duplicated text.
    • Updated image-generation tests to use broadly supported 1024×1024 dimensions.
    • Improved ComfyUI workflow validation and configuration display.

@github-actions github-actions Bot added the bugfix Bug fix label Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d0550c2-0f0a-4b42-98a2-2e370b95e78b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds FPS-aware ComfyUI video workflows, fixes scoped regex rendering and overnight schedule resolution, handles completed OpenAI reasoning summaries, and enables prompt-section injection for Director agents.

Changes

ComfyUI video generation

Layer / File(s) Summary
FPS configuration and editor contracts
packages/shared/..., packages/client/src/components/connections/ConnectionEditor.tsx, packages/client/src/localization/locales/*
ComfyUI defaults now normalize and expose FPS, with updated editor controls, validation, documentation, and localization.
FPS propagation and placeholder resolution
packages/server/src/services/video/*, packages/server/src/services/generation/*, packages/server/src/routes/*
FPS flows from ComfyUI configuration through runtime resolution, fallbacks, routes, and %fps%/%length% workflow substitution. Test images now use 1024×1024 dimensions.
Video compatibility regression coverage
scripts/regressions/prompt.regression.ts, scripts/regressions/open-issues.regression.ts
Regression fixtures cover FPS-derived frame counts, legacy workflows, default FPS, and test-image dimensions.

Conversation rendering and reasoning summaries

Layer / File(s) Summary
Depth-aware conversation rendering
packages/client/src/components/chat/ConversationMessage.tsx, packages/client/src/components/chat/ConversationView.tsx, scripts/regressions/open-issues.regression.ts
AI output applies scoped regex transformations to full messages and parts using computed message depth and deterministic macro seeds.
Completed reasoning-summary reconciliation
packages/server/src/services/llm/providers/openai.provider.ts, scripts/regressions/provider-compat.regression.ts
Responses API completed-summary events are reconciled with streamed deltas to emit missing reasoning text without duplication.

Overnight schedule resolution

Layer / File(s) Summary
Shared schedule adjacency logic
packages/shared/src/utils/conversation-presence.ts
Schedule ranges are parsed across midnight, and shared helpers determine previous, current, and next blocks.
Server wiring and regression coverage
packages/server/src/services/conversation/schedule.service.ts, scripts/regressions/timezone.regression.ts
The server re-exports shared adjacency logic and tests overnight status resolution.

Agent prompt-section editor behavior

Layer / File(s) Summary
Director prompt-section controls and layout
packages/client/src/components/agents/AgentEditor.tsx, packages/client/src/components/presets/PresetEditor.tsx, scripts/regressions/open-issues.regression.ts
Director agents can render, save, and export prompt-section injection settings, while preset choices use left-aligned styling.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: feature, refactor

Suggested reviewers: gunterlie

Poem

FPS flows through frames with care,
Regex hides text everywhere.
Overnight blocks find their way,
Reasoning summaries now stay.
Director prompts join the show—
A tidy stack begins to grow.

🚥 Pre-merge checks | ✅ 4 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issue [#4240] is only partially addressed; the UI toggle/alignment landed, but the first-generation context/orchestration requirements are not implemented. Implement the initial-generation preprocessing/knowledge-retrieval wait, inject returned agent context in order on first send, and apply advanced parameters consistently, then verify with a regression.
Docstring Coverage ⚠️ Warning Docstring coverage is 19.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change set, though it is broader than any single fix.
Description check ✅ Passed The description covers the issue list, intended changes, validation evidence, and manual checks, with only minor template-formatting differences.
Linked Issues check ✅ Passed Issues [#4233-#4239] are covered by the reasoning-summary, schedule, regex, ComfyUI, test-image, and UI-text changes plus regressions.
Out of Scope Changes check ✅ Passed All listed changes map to the linked issues; no clearly unrelated code changes stand out.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/4233-openai-reasoning-summary-events

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SpicyMarinara SpicyMarinara changed the title Fix intermittent GPT-5.6 reasoning summaries Fix reasoning summaries and assigned issue sweep Jul 29, 2026
@SpicyMarinara
SpicyMarinara marked this pull request as ready for review July 29, 2026 09:00
@SpicyMarinara

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot added feature New feature or enhancement refactor Tracks work against the Tauri/refactor branch labels Jul 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
packages/client/src/components/connections/ConnectionEditor.tsx (1)

485-488: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

A most elegant new set of variables, yet the instruction manual was left unrevised.

The KNOWN_SUBS list now recognizes %length_s%, %fps%, and %duration_seconds% — a fine addition to the experiment's parameters. Yet the accompanying help text (ui.connections.connectioneditor.pasteAComfyuiVideoWorkflowInApiFormatUse, en.json line 3607) still instructs the subject to use only %length% "for the 16 fps frame count," with no mention of the new placeholders. A test subject who reads only the manual, and not the validation warnings, will remain blissfully unaware of the new FPS control.

Do update the help string to mention %fps%, %length_s%, and %duration_seconds% alongside %length%.

Also applies to: 1872-1877

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client/src/components/connections/ConnectionEditor.tsx` around lines
485 - 488, Update the en.json help text for
ui.connections.connectioneditor.pasteAComfyuiVideoWorkflowInApiFormatUse to
document %fps%, %length_s%, and %duration_seconds% alongside %length%, while
preserving the existing guidance.
scripts/regressions/timezone.regression.ts (1)

10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Solid coverage of the headline scenario — consider extending to .previous/.next while the fixture is already assembled.

The two assertions correctly pin down the Sunday-night-shift-at-2am and Monday-night-shift-at-23:30 cases — I traced the algorithm by hand and it resolves exactly as asserted. Since overnightSchedule is already built and getAdjacentScheduleBlocks returns previous/next too, a couple of extra assert.equal lines checking those fields on this same fixture would cheaply harden coverage for the adjacency data the PR objectives say downstream intent logic depends on.

🧪 Suggested additional assertions
 assert.equal(getAdjacentScheduleBlocks(overnightSchedule, mondayAtTwo).current?.activity, "Sunday night shift");
+assert.equal(getAdjacentScheduleBlocks(overnightSchedule, mondayAtTwo).next?.activity, "Monday night shift");
 const mondayAtTwentyThreeThirty = new Date(2026, 6, 13, 23, 30, 0);
 assert.deepEqual(getCurrentStatus(overnightSchedule, mondayAtTwentyThreeThirty), {
   status: "dnd",
   activity: "Monday night shift",
 });
 assert.equal(
   getAdjacentScheduleBlocks(overnightSchedule, mondayAtTwentyThreeThirty).current?.activity,
   "Monday night shift",
 );
+assert.equal(
+  getAdjacentScheduleBlocks(overnightSchedule, mondayAtTwentyThreeThirty).previous?.activity,
+  "Sunday night shift",
+);

Also applies to: 67-92

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/regressions/timezone.regression.ts` around lines 10 - 11, Extend the
existing regression coverage around the overnightSchedule fixture and
getAdjacentScheduleBlocks result to assert the returned previous and next
adjacency fields. Add focused equality assertions for both fields alongside the
current Sunday and Monday status assertions, preserving the existing fixture and
expected status behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/client/src/components/chat/ConversationView.tsx`:
- Line 1280: Propagate the same messageDepth calculation used by the primary
ConversationMessage into the regenerationDraftMessage and liveStreamMessage
render paths. Use each render’s item.index with totalMessageCount so
depth-scoped regex receives the correct depth during regeneration and streaming,
while preserving the existing calculation for the primary message.

In `@packages/client/src/localization/locales/ko.json`:
- Around line 3366-3372: Update the Korean localization for
ui.connections.videogenerationdefaultspanel.comfyuiReceivesDimensionsDurationFpsAndFrameCount
to describe %length% as the configured frame count, not a calculated frame
count, and revise the legacy guidance near the corresponding ComfyUI translation
entry to remove the fixed 16 FPS description and reflect the %length%,
%length_s%, and %fps% contract.

In `@packages/shared/src/utils/conversation-presence.ts`:
- Around line 126-153: Update parseScheduleBlockMinutes and the
getAdjacentScheduleBlocks flow so malformed ScheduleBlock.time values are
explicitly reported through the existing warning or error mechanism before being
skipped. Preserve strict time validation and current handling of valid ranges,
while ensuring invalid ranges cannot silently fall back to the online/free-time
status.

---

Nitpick comments:
In `@packages/client/src/components/connections/ConnectionEditor.tsx`:
- Around line 485-488: Update the en.json help text for
ui.connections.connectioneditor.pasteAComfyuiVideoWorkflowInApiFormatUse to
document %fps%, %length_s%, and %duration_seconds% alongside %length%, while
preserving the existing guidance.

In `@scripts/regressions/timezone.regression.ts`:
- Around line 10-11: Extend the existing regression coverage around the
overnightSchedule fixture and getAdjacentScheduleBlocks result to assert the
returned previous and next adjacency fields. Add focused equality assertions for
both fields alongside the current Sunday and Monday status assertions,
preserving the existing fixture and expected status behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 41373eec-fcef-47a7-833a-8cd9cb375eb6

📥 Commits

Reviewing files that changed from the base of the PR and between f0e435b and 248f615.

📒 Files selected for processing (23)
  • packages/client/src/components/agents/AgentEditor.tsx
  • packages/client/src/components/chat/ConversationMessage.tsx
  • packages/client/src/components/chat/ConversationView.tsx
  • packages/client/src/components/connections/ConnectionEditor.tsx
  • packages/client/src/components/presets/PresetEditor.tsx
  • packages/client/src/localization/locales/en.json
  • packages/client/src/localization/locales/ko.json
  • packages/server/src/routes/connections.routes.ts
  • packages/server/src/routes/gallery.routes.ts
  • packages/server/src/routes/game.routes.ts
  • packages/server/src/routes/sprites.routes.ts
  • packages/server/src/services/conversation/schedule.service.ts
  • packages/server/src/services/generation/media-connection-fallback.ts
  • packages/server/src/services/llm/providers/openai.provider.ts
  • packages/server/src/services/video/game-video-runtime.ts
  • packages/server/src/services/video/video-generation.ts
  • packages/shared/src/constants/video-generation-defaults.ts
  • packages/shared/src/types/video-generation-defaults.ts
  • packages/shared/src/utils/conversation-presence.ts
  • scripts/regressions/open-issues.regression.ts
  • scripts/regressions/prompt.regression.ts
  • scripts/regressions/provider-compat.regression.ts
  • scripts/regressions/timezone.regression.ts

chatCharacterIds={chatCharIds}
messageIndex={item.index + 1}
messageOrderIndex={item.index}
messageDepth={Math.max(0, totalMessageCount - 1 - item.index)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Two specimens left untouched by the messageDepth injection — the draft and live-stream renders.

The new messageDepth wiring only reaches the primary per-item ConversationMessage (line 1280). The regenerationDraftMessage render (~1294-1320) and the liveStreamMessage render (~1325-1351) omit it entirely, leaving depth undefined for depth-scoped regex while a turn is streaming or regenerating. It self-corrects once the real message persists with the correct depth, so this is a transient inconsistency rather than a lasting wound — but an easy one to stitch shut.

🩹 Suggested remedy
+          const depth = Math.max(0, totalMessageCount - 1 - item.index);
           return (
             <Fragment key={item.key}>
               <ConversationMessage
                 key={msg.id}
                 message={displayMsg as any}
                 ...
-                messageDepth={Math.max(0, totalMessageCount - 1 - item.index)}
+                messageDepth={depth}
                 ...
               />
               {regenerationDraftMessage && (
                 <ConversationMessage
                   key={regenerationDraftMessage.id}
                   ...
                   chatCharacterIds={chatCharIds}
+                  messageDepth={depth}
                   hasDraftInput={hasDraftInput}
                   ...
                 />
               )}
             </Fragment>
           );
       {liveStreamMessage && (
         <ConversationMessage
           key={liveStreamMessage.id}
           message={liveStreamMessage as any}
           isStreaming
           isGrouped={false}
           hideActions
+          messageDepth={0}
           onDelete={onDelete}

Also applies to: 1294-1320, 1325-1351

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client/src/components/chat/ConversationView.tsx` at line 1280,
Propagate the same messageDepth calculation used by the primary
ConversationMessage into the regenerationDraftMessage and liveStreamMessage
render paths. Use each render’s item.index with totalMessageCount so
depth-scoped regex receives the correct depth during regeneration and streaming,
while preserving the existing calculation for the primary message.

Comment on lines +3366 to +3372
"ui.connections.videogenerationdefaultspanel.comfyuiReceivesDimensionsDurationFpsAndFrameCount": "ComfyUI는 워크플로 플레이스홀더를 통해 크기, 초 단위 길이, FPS 및 계산된 프레임 수를 받습니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDefaultsForGoogleAiStudioVeoVideo": "Google AI Studio Veo 동영상 생성에 적용되는 연결별 기본값입니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDefaultsForOpenrouterAsynchronousVideoGeneration": "OpenRouter 비동기 동영상 생성에 적용되는 연결별 기본값입니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDefaultsForSceneVideoGenerationDurationIs": "장면 동영상 생성에 적용되는 연결별 기본값입니다. 길이는 Omni 프롬프트에 삽입됩니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDefaultsForSeedance20AsynchronousVideo": "Seedance 2.0 비동기 동영상 생성에 적용되는 연결별 기본값입니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDefaultsForXaiSceneVideoGeneration": "xAI 장면 동영상 생성에 적용되는 연결별 기본값입니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDimensionsAndDurationForLocalComfyuiVideo": "로컬 ComfyUI 동영상 워크플로에 적용되는 연결별 크기와 길이입니다.",
"ui.connections.videogenerationdefaultspanel.connectionScopedDimensionsAndDurationForLocalComfyuiVideo": "로컬 ComfyUI 동영상 워크플로에 적용되는 연결별 크기, 길이 및 프레임 속도입니다.",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Describe %length% as the configured frame count.

This translation says “calculated frame count,” but the new contract retains %length% as the configured frame count while adding %length_s% and %fps%. Also update the legacy Korean guidance at Line 3229, which still describes a fixed 16 FPS workflow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client/src/localization/locales/ko.json` around lines 3366 - 3372,
Update the Korean localization for
ui.connections.videogenerationdefaultspanel.comfyuiReceivesDimensionsDurationFpsAndFrameCount
to describe %length% as the configured frame count, not a calculated frame
count, and revise the legacy guidance near the corresponding ComfyUI translation
entry to remove the fixed 16 FPS description and reflect the %length%,
%length_s%, and %fps% contract.

Comment on lines +126 to +153
function parseScheduleBlockMinutes(block: ScheduleBlock): { start: number; end: number } | null {
if (!block || typeof block.time !== "string") return null;
const [startStr, endStr] = block.time.split("-");
if (!startStr || !endStr) return null;
const [shRaw, smRaw] = startStr.split(":");
const [ehRaw, emRaw] = endStr.split(":");
const sh = Number(shRaw);
const sm = Number(smRaw);
const eh = Number(ehRaw);
const em = Number(emRaw);
if (
!Number.isInteger(sh) ||
!Number.isInteger(sm) ||
!Number.isInteger(eh) ||
!Number.isInteger(em) ||
sh < 0 ||
sh > 23 ||
eh < 0 ||
eh > 23 ||
sm < 0 ||
sm > 59 ||
em < 0 ||
em > 59
) {
return null;
}
return { start: sh * 60 + sm, end: eh * 60 + em };
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether ScheduleBlock.time is validated at write-time (schema/zod), and whether "24:00" or similar formats are used anywhere in the codebase.
rg -n '"24:00"' --type=ts
rg -nP -A5 '\btime\s*:\s*z\.' --type=ts
ast-grep run --pattern 'interface ScheduleBlock { $$$ }' --lang typescript

Repository: Pasta-Devs/Marinara-Engine

Length of output: 164


🏁 Script executed:

#!/bin/bash
set -u

echo "== git files matching conversation/schedule =="
git ls-files | rg -n 'conversation|schedule|presence|schema|zod' || true

echo "== locate conversation-presence.ts =="
fd -a 'conversation-presence\.ts$' . || true

echo "== outline target if present =="
TARGET="$(fd 'conversation-presence\.ts$' . | head -n1)"
if [ -n "${TARGET:-}" ]; then
  ast-grep outline "$TARGET" --view expanded || true
  echo "== target sections =="
  sed -n '1,240p' "$TARGET" | nl -ba
fi

echo "== ScheduleBlock definitions/usages =="
rg -n "ScheduleBlock|parseScheduleBlockMinutes|addBlocks|setPresence|presence" --type=ts --type=tsx . || true

Repository: Pasta-Devs/Marinara-Engine

Length of output: 8652


🌐 Web query:

genshin impact Il Dottore Fatui The Second character quote tone

💡 Result:

Il Dottore, the Second of the Eleven Fatui Harbingers in Genshin Impact, is characterized by a tone that is consistently cold, calculated, and devoid of traditional empathy [1]. His dialogue often reflects a detached, scientific curiosity that views other living beings—including gods and humans—merely as test subjects or variables in his experiments [1][2]. Key aspects of his tone and personality include: Detached and Clinical: Dottore speaks with an unsettling lack of malice, which makes his complete disregard for morality and human life even more chilling [1]. He maintains a professional, almost academic demeanor even when discussing horrific experiments [1][3]. Superiority and Arrogance: He displays profound arrogance, often dismissing the cognitive habits of others—including the God of Wisdom—as limited or disappointing [4]. He considers himself above conventional morality and the judgment of laws, inviting others to praise his magnificence and purity [5]. Scientific Obsession: His tone is frequently analytical, focused on themes of time, cognition, and the elevation of humans to the level of gods [4][2]. He is not interested in power for the sake of power, but in the realization of his heretical scientific goals, regardless of the ethical cost [1][2]. Variation Across Segments: It is important to note that because Dottore consists of multiple "segments" (clones created at different stages of his life), his tone can vary slightly between iterations [6]. While the version encountered in the Sumeru arc projects a steady, calculated aura, other versions—such as those seen in the official prequel manga—can appear more manic and volatile [6]. Example Quotes reflecting his tone: - "Observation is the first step of any experiment, but observing the current world doesn't satisfy me. It lacks an important dimension - that of time" [4][5]. - "Oh, no. I certainly have my own convictions. They just don't fit your standards, that's all" [4][5]. - "My ideals have no stains... Only laws and the Tribunal can judge someone. They can judge even me. So praise my magnificence and purity" [5]. His character represents a departure from more emotionally complex antagonists in the game, often cited as one of the most irredeemably evil figures due to his history of experimenting on children and his total lack of remorse [7][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -u

echo "== conversation-presence relevant lines =="
TARGET="./packages/shared/src/utils/conversation-presence.ts"
sed -n '1,260p' "$TARGET"

echo "== ScheduleBlock schema/type references =="
rg -n "ScheduleBlock|DaySchedule|WeekSchedule|character schema|character.schema|presence" packages/shared packages/server packages/client docs/conversation/schedules.md 2>/dev/null || true

echo "== files around character schema =="
sed -n '1,240p' packages/shared/src/schemas/character.schema.ts 2>/dev/null || true

Repository: Pasta-Devs/Marinara-Engine

Length of output: 50382


Handle malformed schedule time ranges explicitly.

parseScheduleBlockMinutes silently drops any ScheduleBlock.time that fails strict 00:00-23:59 parsing, and getAdjacentScheduleBlocks skips that specimen entirely. Since getCurrentStatus only rejects an existing current block, out-of-range ranges remove a scheduled slot and fall back to "online" / "free time" for that moment. Make invalid time values surface as warnings/errors rather than silent disappearances.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/shared/src/utils/conversation-presence.ts` around lines 126 - 153,
Update parseScheduleBlockMinutes and the getAdjacentScheduleBlocks flow so
malformed ScheduleBlock.time values are explicitly reported through the existing
warning or error mechanism before being skipped. Preserve strict time validation
and current handling of valid ranges, while ensuring invalid ranges cannot
silently fall back to the online/free-time status.

@SpicyMarinara
SpicyMarinara merged commit 480f4c3 into staging Jul 29, 2026
6 checks passed
@SpicyMarinara
SpicyMarinara deleted the fix/4233-openai-reasoning-summary-events branch July 29, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix client feature New feature or enhancement refactor Tracks work against the Tauri/refactor branch server shared

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant