mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2000] [Issue]: Native prompt preset import leaves section and group order IDs stale #980
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#980
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 @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2000
Originally assigned to: @cha1latte on GitHub.
Summary
Native
marinara_presetimport recreates prompt groups and sections with new IDs, but the imported preset root can keep exportedsectionOrderandgroupOrderarrays that still point at the old child IDs.Expected behavior
When importing a native prompt preset,
sectionOrderandgroupOrdershould be remapped from exported child IDs to the newly created child IDs, matching legacy behavior and current prompt preset duplicate behavior.Actual behavior
src-tauri/src/commands/storage/imports/marinara.rscreates the new preset, groups, sections, and variables, but does not patch the preset root order arrays after child ID remap. The preset editor builds ordered sections frompreset.sectionOrder, so imported sections can be hidden from the editor order when the array contains old IDs.Steps to reproduce
sectionOrder/groupOrder.marinara_presetenvelope into another profile or a fresh profile.prompt-sections/prompt-groupsrow IDs with the imported preset rootsectionOrder/groupOrdervalues.Impact area
Environment
origin/refactorat805ab939Logs, screenshots, or video
No runtime logs or screenshots. Evidence is static code comparison against legacy 1.6.1 behavior.
Regression notes
Legacy native preset import remapped old section and group order IDs to newly created IDs before saving the imported preset root. Refactor duplicate logic also has an ID remap helper for prompt preset children, but the native import path does not apply equivalent order remapping.
Evidence:
src-tauri/src/commands/storage/imports/marinara.rs, but nosectionOrder/groupOrderremap patch is present after child creation.preset.sectionOrderwhen buildingorderedSectionsinsrc/features/catalog/presets/components/PresetEditor.tsx.sectionOrderandgroupOrderinpackages/server/src/services/import/marinara.importer.ts.src-tauri/src/commands/storage/prompts.rs.Additional context
Found during target 8 presets and prompt settings parityscan for #1904. Existing closed #1784 covered prompt preset duplicate/delete, runtime precedence, and chat-settings preset import/export; this native prompt preset import order gap appears separate.
Suggested repair: collect old-to-new group, section, and variable ID maps during native preset import, then patch the created preset with remapped
groupOrder,sectionOrder, andvariableOrderarrays, falling back to created child order when exported arrays are missing or stale.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: