fix: export notifyTeamWatchScopeChanged so the committed build resolves
TeamProvisioningService imports notifyTeamWatchScopeChanged (added with the setAliveRunId/deleteAliveRunId helpers) but the export was missing, so a clean checkout of the branch failed to typecheck. Add the export plus a test; the call-site wiring stays as in-progress work.
This commit is contained in:
parent
ccea3e015d
commit
d0c64fabb8
2 changed files with 12 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ export function setTeamWatchScopeChangeListener(listener: (() => void) | null):
|
|||
scopeChangeListener = listener;
|
||||
}
|
||||
|
||||
export function notifyTeamWatchScopeChanged(): void {
|
||||
scopeChangeListener?.();
|
||||
}
|
||||
|
||||
function collectAliveTeams(scope: Set<string>): void {
|
||||
if (!aliveTeamsProvider) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { afterEach, describe, expect, it, vi } from 'vitest';
|
|||
import {
|
||||
computeTeamWatchScope,
|
||||
markTeamEngaged,
|
||||
notifyTeamWatchScopeChanged,
|
||||
resetTeamWatchScopeForTests,
|
||||
setAliveTeamsProvider,
|
||||
setTeamWatchScopeChangeListener,
|
||||
|
|
@ -53,6 +54,13 @@ describe('teamWatchScope', () => {
|
|||
expect(listener).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('can notify after alive team scope changes outside engagement', () => {
|
||||
const listener = vi.fn();
|
||||
setTeamWatchScopeChangeListener(listener);
|
||||
notifyTeamWatchScopeChanged();
|
||||
expect(listener).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('survives a throwing alive provider (watcher falls back safely)', () => {
|
||||
setAliveTeamsProvider(() => {
|
||||
throw new Error('boom');
|
||||
|
|
|
|||
Loading…
Reference in a new issue