Remove Activity and the notification system

This commit is contained in:
2026-10-05 17:25:39 -04:00
parent 193383ddd5
commit b62fb5db30
11 changed files with 32 additions and 216 deletions
+6 -4
View File
@@ -7,7 +7,6 @@
import { timeFormat } from '$ui/stores/time-zone.js';
import { pollVisible } from '$ui/poll.js';
import { serverTitle } from '$ui/server-labels.js';
import { toast } from '$ui/toast.js';
import { createProvisioningRefresh, type ProvisioningRefreshState } from '$ui/provisioning-refresh.js';
import { elapsedTime, isProvisioningDetail, provisioningOutcome, provisioningReturn } from '$ui/provisioning-presentation.js';
import SectionHeader from '$ui/components/primitives/SectionHeader.svelte';
@@ -30,6 +29,7 @@
});
let now = $state(Date.parse(initial.generatedAt));
let launchOpen = $state(false);
let copyStatus = $state('');
const controller = createProvisioningRefresh<ProvisioningDetail>({ validate: isProvisioningDetail, onChange: value => { view = value; } });
const detail = $derived(view.detail);
const deployment = $derived(detail?.deployment);
@@ -48,6 +48,7 @@
const snapshot = data.detail;
untrack(() => {
launchOpen = false;
copyStatus = '';
now = Date.parse(snapshot.generatedAt);
controller.setOperation(snapshot.deployment.id, snapshot, snapshot.generatedAt);
});
@@ -56,12 +57,13 @@
onDestroy(() => controller.dispose());
function fmt(value: string | null | undefined) { return value ? $timeFormat.dateTime(value) : 'Not recorded'; }
async function copyLink() {
copyStatus = '';
try {
const url = new URL($page.url);
url.search = ''; url.hash = '';
await navigator.clipboard.writeText(url.toString());
toast('Operation link copied.', { variant: 'success' });
} catch { toast('Copy unavailable. Copy this page’s address from your browser.', { variant: 'warning' }); }
copyStatus = 'Operation link copied.';
} catch { copyStatus = 'Copy unavailable. Copy this page’s address from your browser.'; }
}
</script>
@@ -74,7 +76,7 @@
</SectionHeader>
<div class="identity-row">
{#if deployment}<div class="operation-id"><span>Operation</span><CopyValue value={deployment.id} label="operation ID" /></div>{/if}
<div class="identity-links"><a href={returnTo.href}>← {returnTo.label}</a><Button size="sm" variant="ghost" onclick={copyLink}>Copy link</Button></div>
<div class="identity-links"><a href={returnTo.href}>← {returnTo.label}</a><Button size="sm" variant="ghost" onclick={copyLink}>Copy link</Button>{#if copyStatus}<span role="status">{copyStatus}</span>{/if}</div>
</div>
{#if view.loadError}<div class="refresh-error" role="alert"><div><strong>Refresh unavailable</strong><p>{view.loadError} {detail ? 'Showing the last successfully loaded record.' : ''}</p></div><Button size="sm" disabled={view.refreshing || !!view.busy} onclick={() => controller.forceRefresh()}>Retry refresh</Button></div>{/if}