mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2774] [Issue]: Connection/preset editor UX nits — keystroke mutation storms, export-while-dirty, post-save flash, option-index race #1411
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#1411
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 (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2774
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Lower-severity editor UX defects: per-keystroke mutation storms with lagging controlled inputs, an export-while-dirty footgun, a post-save blank-form flash, and a theoretical option-index race.
Sub-bug 1: Separator input mutation-per-keystroke (ux)
(a) The Separator input is fully controlled off lagging server state with no local draft/debounce; each keystroke PATCHes + double-invalidates + refetches, and mid-typing refetches reset the input -> dropped chars / caret jumps. It's the lone raw-controlled exception among the editor's free-text inputs (all others use local-draft + debounce).
(c) PresetEditor.tsx:1581/1813-1819; use-presets.ts:300. Kind: ux.
Sub-bug 2: Quick option-field edits race-revert (data-loss)
(a) Each OptionFieldInput debounces independently and onCommit rebuilds the WHOLE options array from a render-closure
optssnapshot; with no optimistic update, a second field committing before the first's refetch lands writes a stale array, dropping the first edit.(c) PresetEditor.tsx:1570-1598/1965-1989/2075-2131. Kind: new-bug (low/medium).
Sub-bug 3: Export omits unsaved edits (ux)
(a) Export calls
api.download(.../export)which builds from the DB, bypassing unsaved local Overview/param state, with no dirty check.(c) PresetEditor.tsx:382-402; prompts.routes.ts:42-57. Kind: ux.
Sub-bug 4: Post-save blank-form flash (ux)
(a) After saving a new custom agent,
openAgentDetail(created.id)switches the id before the agents query refetches, so dbConfig is null and the populate effect blanks the whole form to 'New Agent' defaults until the refetch lands; an edit in that window applies to the reset form. Same pattern in AgentsPanel duplicate.(c) AgentEditor.tsx:974-982/648-690/408-411; use-agents.ts:104-112; AgentsPanel.tsx:424-427. Kind: new-bug (low).
Sub-bug 5: Expanded option editor stale index (disputed)
(a)
expandedOptIdxis a numeric index used for read/write; a reorder/shrink while open would mis-target. The pattern is real but all cited single-user triggers are refuted (alphabetical toggle doesn't reorder the editing array; the modal backdrop closes on any underlying interaction; value-edit refetch preserves order). Reachable only via a concurrent second client. Disputed/low.(c) PresetEditor.tsx:1587/1991/2031-2042. Kind: disputed.
Suggested Fix
Template
pnpm checkpassesAffected files
packages/client/src/components/presets/PresetEditor.tsxpackages/client/src/components/agents/AgentEditor.tsxpackages/client/src/components/agents/AgentsPanel.tsxAudit provenance
Found by a multi-agent re-review of the connection/preset subsystem (editors UI + send-pipeline) against the merged
stagingtree (Round 1 + round-2 gap sweep + completeness critic, each finding adversarially verified). The prior #2656-#2668 fixes were re-verified as HELD on their primary paths. Severity: LOW.@SpicyMarinara commented on GitHub (Jun 21, 2026):
Fixed in PR #2747. Verified the findings against the current branch and addressed the still-valid pieces: separator editing now uses the local draft/debounced input pattern, option label/value commits update by option id from the latest local options snapshot, preset export prompts to save dirty overview/parameter edits first, agent creation seeds the React Query caches before switching editor IDs, and the expanded option editor now tracks by option id instead of index. Full pnpm validation is running after the issue sweep, per maintainer request.