Skip to content

fix: guard sparse preset async state - #3572

Merged
nwparker merged 1 commit into
mainfrom
nwparker/guard-sparse-preset-async-state
May 30, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/guard-sparse-preset-async-state

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

  • Add a tiny mounted-ref hook for components that need to skip post-await local state after unmount.
  • Guard sparse preset save completion in both the checkout selector and repo settings editor.

Merge risk assessment

Risk: LOW (risk:low)

Why low:

  • Scope is limited to local sparse preset editor/selector state after existing save calls resolve.
  • Save behavior, sparse preset parsing, store actions, IPC contracts, and SSH behavior are unchanged.
  • The new hook only tracks component mount state and is used by this PR's two guarded call sites.

Validation

  • pnpm exec oxlint src/renderer/src/hooks/useMountedRef.ts src/renderer/src/components/sparse/SparseCheckoutPresetSelect.tsx src/renderer/src/components/settings/SparsePresetSettingsSection.tsx
  • pnpm typecheck (fails on existing missing deps: @tiptap/extension-details, react-colorful)

@nwparker nwparker added the risk:low Low risk change label May 30, 2026
@nwparker
nwparker merged commit b7a625e into main May 30, 2026
2 checks passed
@nwparker
nwparker deleted the nwparker/guard-sparse-preset-async-state branch May 30, 2026 09:29
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:low Low risk change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant