fix(settings): retry cached ipc after failure#324
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
5ebdcaf to
eda737e
Compare
0b24314 to
56f432c
Compare
19d576b to
64e8650
Compare
56f432c to
d1d1046
Compare
Merge activity
|
|
Merged as part of the stack in #331. |

Plan 009: Make cached settings IPC retryable
Status
3ee5b79, 2026-06-13Why this matters
Some settings providers cache IPC promises at module scope. If the first call fails due to transient Tauri startup timing or OS failure, the rejected promise can be reused forever until app restart. Cache successes, not permanent transient failures.
Current state
Relevant files:
src/shared/lib/cachedPromise.ts— generic cache helper.src/features/settings/ShellPicker.tsxand nearby settings components — use cached IPC helpers for shell/font/sound-like data.Current excerpt:
cachedPromise.tsmemoizes a promise and does not clear it on rejection.Commands you will need
bun run test -- cachedPromisebun run test && ./node_modules/.bin/tsc --noEmit && bun run lint:checkScope
In scope:
cachedPromisebehavior and tests.Out of scope:
Git workflow
Branch
advisor/009-retryable-cached-settings-ipc; commitfix(settings): retry cached ipc after failure.Steps
Step 1: Add tests for rejection reset
Create/update
src/shared/lib/cachedPromise.test.tswith cases:Verify:
bun run test -- cachedPromise→ fails before implementation for rejection reset.Step 2: Clear cache on rejection
Update
cachedPromiseso rejected promises reset the stored promise/value. Preserve sharing of concurrent pending calls.Verify: focused test passes.
Step 3: Full frontend validation
Run full frontend checks.
Verify: all commands exit 0.
Done criteria
STOP conditions
Maintenance notes
Reviewers should ensure errors still surface to users; this only changes retry behavior.