[GH-ISSUE #1423] [Issue]: Untitled lorebook entries from an imported lorebook can't be edited — content edits and flag toggles fail to autosave #707

Closed
opened 2026-10-20 17:32:08 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @GetBeholder on GitHub (May 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1423

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Lorebook entries that are untitled (no name) and came from an imported lorebook
cannot have their contents edited or their flags changed. Autosave fails when
editing the content (e.g. typing "test modification") and equally when toggling any
flag on/off. Example: the single untitled entry in an imported "Genshin Impact
Ultimate Lorebook."

Expected behavior

An untitled imported lorebook entry should be editable like any other entry —
content edits and flag toggles should autosave successfully.

Actual behavior

Autosave fails for these entries; neither content edits nor flag toggles persist.

Steps to reproduce

  1. Import a lorebook that contains an untitled entry (e.g. "Genshin Impact Ultimate
    Lorebook" with one untitled entry).
  2. Open that entry in the lorebook editor.
  3. Edit the content (e.g. type "test modification") and/or toggle a flag on/off.
  4. Observe autosave fails — the change does not persist.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: not provided
  • Run mode: not specified
  • OS + version: not specified
  • Node + pnpm versions: not provided
  • Rust version, if relevant: not provided
  • Remote Runtime URL configured? not specified
  • Provider, model, or integration, if relevant: not relevant. Source lorebook: "Genshin Impact Ultimate Lorebook" (imported).

Logs, screenshots, or video

The reporter referenced an example/screenshot showing the autosave failure ("As can
be seen"). It was not provided here as a file or URL, so it is not attached. The
screenshot would show the exact autosave-failed indicator/error.

Regression notes

Not provided.

Additional context

Source: forum report by The Lord of the Backdoor [MANA] (3-Star), 7:18 PM. The
example is the single untitled entry from an imported "Genshin Impact Ultimate
Lorebook."

Triage pointer (from a scan, not from the reporter): lorebook entry edits autosave
(850ms) via LorebookEntryRow → patch() → useUpdateLorebookEntry →
storageApi.update("lorebook-entries", entry.id, ...)
(src/features/catalog/lorebooks/components/LorebookEntryRow.tsx ~L244;
src/features/catalog/lorebooks/hooks/use-lorebooks.ts ~L263-267). Because the
update targets entry.id, an autosave failure specific to untitled imported
entries points at the imported entry's persisted shape — most likely a
missing/invalid id (or a field the update path requires) produced during import,
so storageApi.update cannot resolve/persist the entry. Lorebook import handling
lives in src/features/catalog/lorebooks/components/ImportLorebookModal.tsx and the
Rust import path (src-tauri/src/commands/storage/imports/ — e.g. st_preset.rs,
bulk_imports.rs, normalization.rs). Recommend checking the imported untitled
entry's stored id and the result of the autosave update call (does it error or
no-op?). Note also that the entry name field rejects empty names on commit
(LorebookEntryRow ~L285-292), so confirm whether an empty/untitled name path also
blocks content/flag updates.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @GetBeholder on GitHub (May 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1423 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Lorebook entries that are untitled (no name) and came from an imported lorebook cannot have their contents edited or their flags changed. Autosave fails when editing the content (e.g. typing "test modification") and equally when toggling any flag on/off. Example: the single untitled entry in an imported "Genshin Impact Ultimate Lorebook." ## Expected behavior An untitled imported lorebook entry should be editable like any other entry — content edits and flag toggles should autosave successfully. ## Actual behavior Autosave fails for these entries; neither content edits nor flag toggles persist. ## Steps to reproduce 1. Import a lorebook that contains an untitled entry (e.g. "Genshin Impact Ultimate Lorebook" with one untitled entry). 2. Open that entry in the lorebook editor. 3. Edit the content (e.g. type "test modification") and/or toggle a flag on/off. 4. Observe autosave fails — the change does not persist. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: not provided - Run mode: not specified - OS + version: not specified - Node + pnpm versions: not provided - Rust version, if relevant: not provided - Remote Runtime URL configured? not specified - Provider, model, or integration, if relevant: not relevant. Source lorebook: "Genshin Impact Ultimate Lorebook" (imported). ## Logs, screenshots, or video The reporter referenced an example/screenshot showing the autosave failure ("As can be seen"). It was not provided here as a file or URL, so it is not attached. The screenshot would show the exact autosave-failed indicator/error. ## Regression notes Not provided. ## Additional context Source: forum report by The Lord of the Backdoor [MANA] (3-Star), 7:18 PM. The example is the single untitled entry from an imported "Genshin Impact Ultimate Lorebook." Triage pointer (from a scan, not from the reporter): lorebook entry edits autosave (850ms) via `LorebookEntryRow` → `patch()` → `useUpdateLorebookEntry` → `storageApi.update("lorebook-entries", entry.id, ...)` (`src/features/catalog/lorebooks/components/LorebookEntryRow.tsx` ~L244; `src/features/catalog/lorebooks/hooks/use-lorebooks.ts` ~L263-267). Because the update targets `entry.id`, an autosave failure specific to untitled imported entries points at the imported entry's persisted shape — most likely a missing/invalid `id` (or a field the update path requires) produced during import, so `storageApi.update` cannot resolve/persist the entry. Lorebook import handling lives in `src/features/catalog/lorebooks/components/ImportLorebookModal.tsx` and the Rust import path (`src-tauri/src/commands/storage/imports/` — e.g. `st_preset.rs`, `bulk_imports.rs`, `normalization.rs`). Recommend checking the imported untitled entry's stored `id` and the result of the autosave `update` call (does it error or no-op?). Note also that the entry name field rejects empty names on commit (`LorebookEntryRow` ~L285-292), so confirm whether an empty/untitled name path also blocks content/flag updates. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:32:08 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

On it.

<!-- gh-comment-id:4557426215 --> @SpicyMarinara commented on GitHub (May 27, 2026): On it.
Author
Owner

@SpicyMarinara commented on GitHub (May 27, 2026):

Implemented on refactor.

What changed:

  • Lorebook entry autosave no longer sends an empty name field when the local form is blank.
  • Untitled imported entries can now persist content edits and flag toggles without the blank-name validation rejecting the whole update.

Verification:

  • git diff --check
  • pnpm typecheck
  • pnpm lint
  • pnpm check:architecture
  • pnpm build
  • graphify update .
<!-- gh-comment-id:4557653720 --> @SpicyMarinara commented on GitHub (May 27, 2026): Implemented on `refactor`. What changed: - Lorebook entry autosave no longer sends an empty `name` field when the local form is blank. - Untitled imported entries can now persist content edits and flag toggles without the blank-name validation rejecting the whole update. Verification: - `git diff --check` - `pnpm typecheck` - `pnpm lint` - `pnpm check:architecture` - `pnpm build` - `graphify update .`
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#707
No description provided.