mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5636] Secret Plot Run Interval can silently drop an edit committed right after a previous commit #3119
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3119
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Aug 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5636
Originally assigned to: @kolacheee on GitHub.
What happens
A CI run on PR #5635 (touching nothing near this surface) caught the Secret Plot "Run Interval" field dropping a commit: after a previous value was committed with Enter, the next edit — committed by clicking/tabbing away — never reached the server. The smoke test
core-flows.e2e.ts:13575("Secret Plot run interval stays editable across repeated commits") polled the chat metadata for 10 seconds and it stayed at the previous value.The exact sequence from the failed run (each step's expectation is the server-side
narrativeDirectorSecretPlotRunIntervalread back viaGET /api/chats/:id):3, blur → server reads3✅11, Enter → server reads11✅0, blur → expected the clamp to commit1— server stayed11for the full 10-second poll ❌So this is not a slow save — the third commit apparently never fired.
Why this looks like a real UI bug, not test timing
The suspicious shape is "an edit typed shortly after an Enter-commit is lost on blur." The likely mechanism: the Enter commit triggers the metadata save and a query invalidation; the Chat Settings drawer re-renders the director card with the refetched state, and if the interval input's node or local draft state is replaced during that refetch, the
0typed into the old node is gone before blur can commit it — the field silently shows/keeps the last saved value. A real user hits the same window by typing a value, pressing Enter, then immediately correcting it and clicking away: the correction vanishes with no error.An alternative (or contributing) suspect is the clamp path itself: step 3 is the only step going through invalid-input clamping (
0→1), so the loss might be specific to "commit an out-of-range value via blur right after a refetch."Where to look
packages/client/src/components/chat/ChatSettingsDrawer.tsx(theRun Intervallabeled input;narrativeDirectorSecretPlotRunIntervalis also referenced fromAgentAddSetupFields.tsx).Try it yourself
(It passes most runs — the failure needs the refetch to land inside the type-then-blur window, which CI's slower runners hit more often.) Manual: Roleplay chat → Chat Settings → Agents → Narrative Director → type an interval, press Enter, then immediately type another value and click away; check whether the second value survives a reopen.
Evidence: PR #5635's first matrix run, job
desktop-chromium 3/3(run 33256941753) — failure text and call log in the job log. Related: the sticky-header overlap flake from the same run is tracked in the #5635 PR comments as a wave-3 stabilization candidate; this one is split out because it may be a product bug rather than test noise.@kolacheee commented on GitHub (Aug 29, 2026):
Taking this one: fix up as draft PR #5640 (kolacheee + Claude agent). Root cause is in the shared DraftNumberInput component, not the Secret Plot field specifically — details in the PR.