Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

issuePicks.ts

15 lines724 Bytes

1import { noIssuePicks } from "@t3tools/client-runtime/issue-selection";
2import type { IssueAssigneeCandidate, IssueLabelCandidate } from "@t3tools/contracts";
3import { Atom } from "effect/reactivity";
4​
5// Outside the sheets: a sheet is gone before its write lands, and one reopened in between must
6// build on those picks rather than on the issue as it was last read.
7const IDLE_TTL_MS = 60_000;
8​
9export const issueLabelPicksFamily = Atom.family((_issueKey: string) =>
10 Atom.make(noIssuePicks<IssueLabelCandidate>()).pipe(Atom.setIdleTTL(IDLE_TTL_MS)),
11);
12​
13export const issueAssigneePicksFamily = Atom.family((_issueKey: string) =>
14 Atom.make(noIssuePicks<IssueAssigneeCandidate>()).pipe(Atom.setIdleTTL(IDLE_TTL_MS)),
15);