feat(sp28): claimAcks slice + useTailStream/useMergedTail dispatch
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user