Preserve deleted server history

Retain historical server identities, results, and evidence after deletion. Mark archived entries as Deleted and prevent old work from targeting servers that reuse the same name.

Fixes #16.
This commit is contained in:
2026-09-27 21:48:55 -04:00
parent 53b29f726c
commit 981fb27c1c
61 changed files with 929 additions and 223 deletions
@@ -0,0 +1,13 @@
import { expect, it } from 'vitest';
import { render } from 'svelte/server';
import HistoricalServerIdentity from '../../src/lib/ui/components/HistoricalServerIdentity.svelte';
it('retains deleted identities without linking to a replacement using the same server name', () => {
const props = { name: 't5_zombie_theater_1', href: '/servers/t5_zombie_theater_1' };
const live = render(HistoricalServerIdentity, { props }).body;
expect(live).toContain('href="/servers/t5_zombie_theater_1"');
const deleted = render(HistoricalServerIdentity, { props: { ...props, deletedAt: '2026-09-27T12:00:00Z' } }).body;
expect(deleted).toContain('t5_zombie_theater_1');
expect(deleted).toContain('Deleted');
expect(deleted).not.toContain('href=');
});