feat(sp28): claimAcks slice + useTailStream/useMergedTail dispatch

This commit is contained in:
Nora
2026-07-02 11:31:17 -06:00
parent a97f1d1350
commit c54b2c1867
8 changed files with 326 additions and 6 deletions
+15 -1
View File
@@ -27,7 +27,14 @@
import { useCallback, useEffect, useRef, useState } from "react";
import { streamTail, type TailResource } from "@/lib/tail-stream";
import { useTailStore } from "@/store/tail-store";
import type { Ack, Activity, Claim, Remittance, Ta1Ack } from "@/types";
import type {
Ack,
Activity,
Claim,
ClaimAck,
Remittance,
Ta1Ack,
} from "@/types";
export type TailStatus =
| "connecting"
@@ -85,6 +92,13 @@ function dispatch(resource: TailResource, data: unknown): void {
case "ta1_acks":
store.addTa1Ack(data as Ta1Ack);
break;
// SP28: the claim↔ack link slice. Both ClaimDrawer and AckDrawer
// mount this stream so a manual-match link made on one drawer
// shows up live on the other. The dispatch is the same
// first-write-wins pattern as the SP25 acks/ta1_acks branches.
case "claim-acks":
store.addClaimAck(data as ClaimAck);
break;
}
}