Skip to content

refactor(renderer): relocate shortcut-registration store into stores - #3411

Merged
setchy merged 1 commit into
mainfrom
refactor/relocate-shortcut-registration-store
Oct 14, 2026
Merged

setchy merged 1 commit into
mainfrom
refactor/relocate-shortcut-registration-store

Conversation

@setchy

@setchy setchy commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Relocates the transient global-shortcut registration store from the hooks layer into the stores layer, so it matches the renderer's documented state-ownership rule (session client state belongs to stores).

  • Adds stores/useShortcutRegistrationStore.ts and mirrors its ShortcutRegistrationStore type in stores/types.ts; exports it from the stores barrel.
  • hooks/useShortcutRegistration.ts is now just the effect hook and imports the store from stores/.
  • Repoints the seven consumers (GlobalEffects, SystemSettings, and the test setup/helpers).

No behavior change: registration, revert-on-failure, and the surfaced error are identical.

Verification

  • tsc --noEmit — clean
  • pnpm check (format + lint) — clean
  • pnpm test — 186 files, 1884 tests passing

@setchy
setchy requested a review from afonsojramos as a code owner October 14, 2026 10:44
@github-actions github-actions Bot added the refactor Refactoring of existing feature label Oct 14, 2026
Move the transient global-shortcut registration Zustand store out of the
hooks layer into the stores layer, matching the documented state-ownership
rule for session client state.

- Add stores/useShortcutRegistrationStore.ts and mirror its
  ShortcutRegistrationStore type in stores/types.ts
- Export it from the stores barrel
- Trim hooks/useShortcutRegistration.ts to the effect hook, importing the
  store from the stores layer
- Repoint the seven consumers (GlobalEffects, SystemSettings, and the test
  setup/helpers) to the barrel

No behavior change: registration, revert-on-failure, and the surfaced error
are identical.
@setchy
setchy force-pushed the refactor/relocate-shortcut-registration-store branch from 458df2b to 9e08708 Compare October 14, 2026 10:48
@setchy
setchy merged commit f25d64f into main Oct 14, 2026
14 checks passed
@setchy
setchy deleted the refactor/relocate-shortcut-registration-store branch October 14, 2026 10:50
@github-actions github-actions Bot added this to the Release 7.10.0 milestone Oct 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in Gitify v7.10.0! 🎉

Downloads for macOS, Windows, and Linux are available on the release page.

Thanks for helping make Gitify better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of existing feature

Development

Successfully merging this pull request may close these issues.

1 participant