Skip to content

[codex] fix character cache churn#1168

Merged
cha1latte merged 1 commit into
refactorfrom
fix/refactor-pr-54-character-cache-churn
May 25, 2026
Merged

[codex] fix character cache churn#1168
cha1latte merged 1 commit into
refactorfrom
fix/refactor-pr-54-character-cache-churn

Conversation

@munimunigamer

@munimunigamer munimunigamer commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Migrated from Pasta-Devs/Marinara-Engine-Refactor#54: Pasta-Devs/Marinara-Engine-Refactor#54
Original author: @Promansis
Target base: Pasta-Devs/Marinara-Engine refactor
Source draft state: True
Verification after port: pnpm typecheck
Port note: source updates/ tracker/evidence files were omitted because the target refactor branch removed repo-local updates guidance.


Closes #39

Why this change

Character import and delete paths were refreshing the full character list even when the mutation response already contained enough data to patch the React Query cache. That caused avoidable refetch churn in the character UI.

What changed

  • Added small character-list cache helpers in the character feature hook owner.
  • Updated create, duplicate, delete, and import flows to patch the list cache directly when the response contains a usable character record.
  • Kept a single invalidation fallback when a successful import does not return enough data to patch the cache safely.
  • Recorded the issue ownership update in the local updates file.

Validation

  • pnpm typecheck
  • pnpm check
  • Ran pnpm tauri dev and tested the app path manually
  • Verified the affected feature in the right mode(s): imports/exports

Manual verification notes

Codex verification:

  • pnpm check passed on PR head in an isolated worktree.
  • A local no-commit merge of current upstream/refactor into the PR head merged cleanly.
  • pnpm check passed after that local merge proof.
  • GitHub CI is green.
  • CodeRabbit status is green with no actionable inline review threads.

Manual follow-up:

  • Live desktop smoke for import/delete refetch observation has not been run.

Docs impact

  • No docs changes needed

UI evidence

N/A. Cache behavior change; no reviewer-visible UI screenshot captured.

@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

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: fd32d50a-a6dc-4ebc-8710-7e83863d068a

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/refactor-pr-54-character-cache-churn

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 and usage tips.

@github-actions github-actions Bot added the bugfix Bug fix label May 24, 2026
@cha1latte cha1latte self-assigned this May 25, 2026
@cha1latte cha1latte marked this pull request as ready for review May 25, 2026 20:24
@cha1latte cha1latte merged commit 949e1cc into refactor May 25, 2026
8 checks passed
@cha1latte cha1latte deleted the fix/refactor-pr-54-character-cache-churn branch May 25, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants