Remove fleet lobby follow notifications

This commit is contained in:
2026-09-21 19:33:57 -04:00
parent e448457d58
commit f875260b7e
5 changed files with 10 additions and 123 deletions
+2 -18
View File
@@ -1,5 +1,5 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { currentRound, fleetIdentity, matchesFleet, watchSatisfied, type FleetServer, type FleetOperation } from '../../src/lib/fleet-overview.js';
import { currentRound, fleetIdentity, matchesFleet, type FleetServer, type FleetOperation } from '../../src/lib/fleet-overview.js';
import { gameEvent } from '../helpers/telemetry.js';
import { newFixture, type Fixture } from '../helpers/fixture.js';
@@ -54,22 +54,6 @@ describe('Fleet discovery and match freshness', () => {
});
});
describe('one-shot lobby watches', () => {
it('requires a fresh zero-player reading, never an absent server or unknown count', () => {
const watch = { id: 'empty', server: server.name, kind: 'empty' as const, href: '/' };
expect(watchSatisfied(watch, { ...server, last_players: 0 }, [], now)).toBe(true);
expect(watchSatisfied(watch, undefined, [], now)).toBe(false);
expect(watchSatisfied(watch, { ...server, last_players: null }, [], now)).toBe(false);
expect(watchSatisfied(watch, { ...server, last_players: 0, last_seen_at: iso(-46_000) }, [], now)).toBe(false);
});
it('only completes the watched operation on explicit success', () => {
const watch = { id: 'op', server: server.name, kind: 'operation' as const, operationKey: operation.key, href: '/' };
expect(watchSatisfied(watch, server, [], now)).toBe(false);
expect(watchSatisfied(watch, server, [{ ...operation, state: 'attention' }], now)).toBe(false);
expect(watchSatisfied(watch, server, [{ ...operation, key: 'different', state: 'done' }], now)).toBe(false);
expect(watchSatisfied(watch, undefined, [{ ...operation, state: 'done' }], now)).toBe(true);
});
});
describe('persisted Fleet operations', () => {
let fixture: Fixture;
@@ -95,7 +79,7 @@ describe('persisted Fleet operations', () => {
expect(fleetOperations(now)[0].state).toBe('done');
});
it('keeps lifecycle failures actionable until superseded and retains successful completions for watches', async () => {
it('keeps lifecycle failures actionable until superseded and retains successful completions', async () => {
const { db } = await import('../../src/lib/server/db/index.js');
const handle = db();
const insert = handle.prepare("INSERT INTO server_deployments (id, server, action, state, stage, started_at, finished_at, triggered_by) VALUES (?, ?, ?, ?, ?, ?, ?, 'test')");