Files
clash-verge-rev/src/services/bus/index.ts
T
Tunglies 43cf001e68 feat(events): route all backend events through a single event bus and store
Adds src/services/bus (the only listen/emit site: one handler per contract
event plus the frontend-internal test-all event) and the React
context/reducer app store. Migrates the five scattered subscriptions
(layout events, pending failures, proxy refresh, profile update/timer,
test-all), deletes the old glue (events.ts, use-listen, use-layout-events,
LoadingCacheProvider), moves run state into the store, and adds an
architecture gate script wired into CI. Behavior is unchanged; the
run-state query's poll/focus safety net is preserved by the store
provider.
2026-10-01 14:34:17 +08:00

11 lines
279 B
TypeScript

import { emit } from '@tauri-apps/api/event'
import { TEST_ALL_EVENT } from './create-bus-handlers'
export { useEventBus } from './use-event-bus'
/** The only emitter of the frontend-internal test-all event. */
export const emitTestAll = () => {
void emit(TEST_ALL_EVENT)
}