chore(events): remove dead UPDATE_THEME event and onSystemThemeUpdate API#2848
Merged
chore(events): remove dead UPDATE_THEME event and onSystemThemeUpdate API#2848
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
EVENTS.UPDATE_THEMEand thewindow.gitify.onSystemThemeUpdateregistration shim are dead code:src/main/ever callssendRendererEvent(mb, EVENTS.UPDATE_THEME, …)— there is no producer.src/renderer/ever callswindow.gitify.onSystemThemeUpdate(…)— there is no consumer.vi.fn()stub in the renderer test setup.Theme handling currently happens entirely on the renderer side via
@primer/react'suseThemeand the OS-levelprefers-color-schememedia query. The IPC channel was never wired up.Removed
EVENTS.UPDATE_THEMEand itsEventContractsentry.window.gitify.onSystemThemeUpdatefromsrc/preload/index.ts.src/preload/index.test.ts.onSystemThemeUpdatemock from the renderer test setup.Verified
pnpm tsc --noEmitclean,pnpm test937/937,pnpm lint:check0 errors.If OS theme tracking is wanted in future, the right shape is
nativeTheme.on('updated', …)on the main side, not this listener-without-a-producer.