things-api 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -5
- package/dist/audit/schema.d.ts +7 -0
- package/dist/audit/schema.js.map +1 -1
- package/dist/cli/canonical-ref.d.ts +21 -0
- package/dist/cli/canonical-ref.js +23 -0
- package/dist/cli/canonical-ref.js.map +1 -0
- package/dist/cli/commands/area.d.ts +18 -11
- package/dist/cli/commands/area.js +81 -77
- package/dist/cli/commands/area.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts +1 -2
- package/dist/cli/commands/doctor.js +11 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/install-skill.d.ts +19 -4
- package/dist/cli/commands/install-skill.js +130 -52
- package/dist/cli/commands/install-skill.js.map +1 -1
- package/dist/cli/commands/mcp.js +21 -1
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/project.d.ts +1 -0
- package/dist/cli/commands/project.js +92 -48
- package/dist/cli/commands/project.js.map +1 -1
- package/dist/cli/commands/reads.d.ts +5 -1
- package/dist/cli/commands/reads.js +110 -31
- package/dist/cli/commands/reads.js.map +1 -1
- package/dist/cli/commands/setup.js +11 -4
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/show.js +75 -36
- package/dist/cli/commands/show.js.map +1 -1
- package/dist/cli/commands/todo.js +2 -2
- package/dist/cli/commands/todo.js.map +1 -1
- package/dist/cli/commands/writes.js +795 -144
- package/dist/cli/commands/writes.js.map +1 -1
- package/dist/cli/did-you-mean.d.ts +14 -3
- package/dist/cli/did-you-mean.js +44 -7
- package/dist/cli/did-you-mean.js.map +1 -1
- package/dist/cli/dry-run.d.ts +55 -0
- package/dist/cli/dry-run.js +92 -0
- package/dist/cli/dry-run.js.map +1 -0
- package/dist/cli/glyphs.d.ts +16 -2
- package/dist/cli/glyphs.js +60 -12
- package/dist/cli/glyphs.js.map +1 -1
- package/dist/cli/help.js +69 -13
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.js +8 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/move-hint.d.ts +3 -2
- package/dist/cli/move-hint.js +2 -2
- package/dist/cli/move-hint.js.map +1 -1
- package/dist/cli/read-driver.d.ts +53 -5
- package/dist/cli/read-driver.js +82 -15
- package/dist/cli/read-driver.js.map +1 -1
- package/dist/cli/ref-render.d.ts +14 -0
- package/dist/cli/ref-render.js +9 -0
- package/dist/cli/ref-render.js.map +1 -0
- package/dist/cli/render.d.ts +40 -14
- package/dist/cli/render.js +128 -55
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/resolve-invocation.d.ts +7 -5
- package/dist/cli/resolve-invocation.js +16 -7
- package/dist/cli/resolve-invocation.js.map +1 -1
- package/dist/cli/skill-check.d.ts +12 -6
- package/dist/cli/skill-check.js +31 -14
- package/dist/cli/skill-check.js.map +1 -1
- package/dist/cli/skill.d.ts +8 -0
- package/dist/cli/skill.js +10 -0
- package/dist/cli/skill.js.map +1 -1
- package/dist/cli/verb-hint.js +1 -1
- package/dist/cli/verb-hint.js.map +1 -1
- package/dist/client.d.ts +158 -26
- package/dist/client.js +254 -38
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +66 -2
- package/dist/config.js +120 -12
- package/dist/config.js.map +1 -1
- package/dist/contracts.d.ts +187 -28
- package/dist/contracts.js +22 -1
- package/dist/contracts.js.map +1 -1
- package/dist/db/baselines/db-v26.js +4 -1
- package/dist/db/baselines/db-v26.js.map +1 -1
- package/dist/diagnose.d.ts +34 -2
- package/dist/diagnose.js +36 -1
- package/dist/diagnose.js.map +1 -1
- package/dist/index.d.ts +21 -8
- package/dist/index.js +26 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts +9 -0
- package/dist/mcp/server.js +790 -322
- package/dist/mcp/server.js.map +1 -1
- package/dist/model/entities.d.ts +57 -4
- package/dist/model/entities.js.map +1 -1
- package/dist/model/mappers.d.ts +2 -0
- package/dist/model/mappers.js +44 -2
- package/dist/model/mappers.js.map +1 -1
- package/dist/model/recurrence.d.ts +8 -1
- package/dist/model/recurrence.js.map +1 -1
- package/dist/model/serialize.js +15 -3
- package/dist/model/serialize.js.map +1 -1
- package/dist/read/area-filter.d.ts +76 -0
- package/dist/read/area-filter.js +58 -0
- package/dist/read/area-filter.js.map +1 -0
- package/dist/read/area-view.d.ts +22 -11
- package/dist/read/area-view.js +54 -28
- package/dist/read/area-view.js.map +1 -1
- package/dist/read/detail.js +15 -8
- package/dist/read/detail.js.map +1 -1
- package/dist/read/predicates.d.ts +18 -0
- package/dist/read/predicates.js +19 -0
- package/dist/read/predicates.js.map +1 -1
- package/dist/read/project-view.d.ts +91 -15
- package/dist/read/project-view.js +135 -37
- package/dist/read/project-view.js.map +1 -1
- package/dist/read/pseudo-area.d.ts +29 -0
- package/dist/read/pseudo-area.js +27 -0
- package/dist/read/pseudo-area.js.map +1 -0
- package/dist/read/queries.d.ts +175 -19
- package/dist/read/queries.js +376 -32
- package/dist/read/queries.js.map +1 -1
- package/dist/read/scope.d.ts +126 -0
- package/dist/read/scope.js +161 -0
- package/dist/read/scope.js.map +1 -0
- package/dist/read/search-rank.d.ts +2 -5
- package/dist/read/shape.d.ts +181 -0
- package/dist/read/shape.js +737 -0
- package/dist/read/shape.js.map +1 -0
- package/dist/read/show-target.d.ts +9 -1
- package/dist/read/show-target.js +77 -17
- package/dist/read/show-target.js.map +1 -1
- package/dist/read/stage.d.ts +199 -0
- package/dist/read/stage.js +125 -0
- package/dist/read/stage.js.map +1 -0
- package/dist/read/truncation.d.ts +7 -12
- package/dist/read/truncation.js +56 -21
- package/dist/read/truncation.js.map +1 -1
- package/dist/read/views.d.ts +68 -16
- package/dist/read/views.js +206 -52
- package/dist/read/views.js.map +1 -1
- package/dist/surface-copy.d.ts +16 -0
- package/dist/surface-copy.js +16 -0
- package/dist/surface-copy.js.map +1 -1
- package/dist/write/batch.d.ts +49 -10
- package/dist/write/batch.js +423 -71
- package/dist/write/batch.js.map +1 -1
- package/dist/write/commands.js +268 -55
- package/dist/write/commands.js.map +1 -1
- package/dist/write/guards.d.ts +1 -1
- package/dist/write/guards.js +71 -10
- package/dist/write/guards.js.map +1 -1
- package/dist/write/heading.d.ts +10 -1
- package/dist/write/heading.js +35 -5
- package/dist/write/heading.js.map +1 -1
- package/dist/write/make-repeating-project.d.ts +2 -2
- package/dist/write/make-repeating-project.js +9 -9
- package/dist/write/make-repeating-project.js.map +1 -1
- package/dist/write/move.d.ts +134 -0
- package/dist/write/move.js +1874 -0
- package/dist/write/move.js.map +1 -0
- package/dist/write/operations.d.ts +105 -19
- package/dist/write/operations.js +56 -7
- package/dist/write/operations.js.map +1 -1
- package/dist/write/opid.d.ts +31 -0
- package/dist/write/opid.js +30 -0
- package/dist/write/opid.js.map +1 -0
- package/dist/write/pipeline.d.ts +70 -3
- package/dist/write/pipeline.js +198 -33
- package/dist/write/pipeline.js.map +1 -1
- package/dist/write/pre-state.d.ts +172 -8
- package/dist/write/pre-state.js +467 -25
- package/dist/write/pre-state.js.map +1 -1
- package/dist/write/reorder.d.ts +23 -3
- package/dist/write/reorder.js +2106 -86
- package/dist/write/reorder.js.map +1 -1
- package/dist/write/reversibility.js +19 -7
- package/dist/write/reversibility.js.map +1 -1
- package/dist/write/scope-guard.d.ts +31 -0
- package/dist/write/scope-guard.js +162 -0
- package/dist/write/scope-guard.js.map +1 -0
- package/dist/write/undo.js +120 -13
- package/dist/write/undo.js.map +1 -1
- package/dist/write/vectors/applescript.js +16 -7
- package/dist/write/vectors/applescript.js.map +1 -1
- package/dist/write/vectors/shortcuts.js +1 -1
- package/dist/write/vectors/shortcuts.js.map +1 -1
- package/dist/write/vectors/simulator.js +83 -27
- package/dist/write/vectors/simulator.js.map +1 -1
- package/dist/write/vectors/types.d.ts +11 -0
- package/dist/write/vectors/ui-certification.d.ts +3 -3
- package/dist/write/vectors/ui-certification.js +41 -5
- package/dist/write/vectors/ui-certification.js.map +1 -1
- package/dist/write/vectors/ui-drag.d.ts +21 -1
- package/dist/write/vectors/ui-drag.js +138 -27
- package/dist/write/vectors/ui-drag.js.map +1 -1
- package/dist/write/vectors/ui-recipes.d.ts +21 -1
- package/dist/write/vectors/ui-recipes.js +166 -7
- package/dist/write/vectors/ui-recipes.js.map +1 -1
- package/dist/write/vectors/ui.d.ts +25 -1
- package/dist/write/vectors/ui.js +142 -33
- package/dist/write/vectors/ui.js.map +1 -1
- package/dist/write/verify/delta.d.ts +17 -1
- package/dist/write/verify/delta.js +106 -29
- package/dist/write/verify/delta.js.map +1 -1
- package/package.json +7 -1
- package/schema/envelope.schema.json +397 -0
- package/skills/things-cli/SKILL.md +36 -17
- package/skills/things-cli/references/banner.md +35 -0
- package/skills/things-cli/references/contracts.md +32 -9
- package/skills/things-cli/references/errors.md +57 -0
- package/skills/things-cli/references/gui.md +1 -1
- package/skills/things-cli/references/model.md +18 -7
- package/skills/things-cli/references/ordering.md +88 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../src/read/shape.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiHG;AACH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAyB,MAAM,YAAY,CAAC;AAuB/F,yFAAyF;AACzF,MAAM,kBAAkB,GAAgB,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;AAEnE,0FAA0F;AAC1F,SAAS,OAAO,CAAC,CAAU;IACzB,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAQ,CAAS,CAAC,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;QAClF,OAAQ,CAAS,CAAC,MAAM,CAAW,CAAC;IACtC,CAAC;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CAAC,CAAE,CAAC,CAAC,OAAO,CAAY,CAAC,CAAC,CAAC,EAAE;KACpE,CAAC;IACF,4DAA4D;IAC5D,IAAI,IAAI,KAAK,OAAO;QAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IACtC,MAAM,IAAI,GAAG,uBAAuB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,IAAI,IAAI,KAAK,IAAI;QAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IACnC,MAAM,OAAO,GACX,uBAAuB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxF,IAAI,OAAO,KAAK,IAAI;QAAE,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;IAC5C,2EAA2E;IAC3E,8EAA8E;IAC9E,qEAAqE;IACrE,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC/E,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;QAClB,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,KAAK,SAAS;YAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;IAC1C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -16,10 +16,18 @@
|
|
|
16
16
|
* resolve up front via {@link resolveTaskUuidPrefix}.
|
|
17
17
|
*/
|
|
18
18
|
import type { DatabaseSync } from "node:sqlite";
|
|
19
|
+
import { type ResolvedScope } from "./scope.ts";
|
|
19
20
|
export interface ShowTarget {
|
|
20
21
|
kind: "to-do" | "project" | "area";
|
|
21
22
|
uuid: string;
|
|
22
23
|
/** True when the ref was a HEADING resolved to its project — strict noun commands reject these. */
|
|
23
24
|
viaHeading?: boolean;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Classify a loose show ref. Under an active container `scope`, every tier
|
|
28
|
+
* resolves scope-aware: an out-of-scope task/project/area is invisible, so it
|
|
29
|
+
* falls through to the SAME "no to-do, project, or area matches" not-found a
|
|
30
|
+
* nonexistent ref throws (no oracle). Under a PROJECT scope an area is never
|
|
31
|
+
* showable (broader than the jail), so area resolution is suppressed.
|
|
32
|
+
*/
|
|
33
|
+
export declare function classifyShowTarget(db: DatabaseSync, ref: string, scope?: ResolvedScope): ShowTarget;
|
package/dist/read/show-target.js
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { deadNameMatchHint, readProjectNameVerdict, ReferenceResolutionError, resolveNamedRef, resolveTaskUuidPrefix, stripThingsUri, trashDisclosureTail, } from "./queries.js";
|
|
2
|
+
import { candidateRef, CANDIDATE_CAP } from "./shape.js";
|
|
3
|
+
import { isLooseRef, LOOSE_REF } from "./pseudo-area.js";
|
|
4
|
+
import { namedAreaClause, namedProjectClause, taskMembershipClause, } from "./scope.js";
|
|
5
|
+
/**
|
|
6
|
+
* Classify a loose show ref. Under an active container `scope`, every tier
|
|
7
|
+
* resolves scope-aware: an out-of-scope task/project/area is invisible, so it
|
|
8
|
+
* falls through to the SAME "no to-do, project, or area matches" not-found a
|
|
9
|
+
* nonexistent ref throws (no oracle). Under a PROJECT scope an area is never
|
|
10
|
+
* showable (broader than the jail), so area resolution is suppressed.
|
|
11
|
+
*/
|
|
12
|
+
export function classifyShowTarget(db, ref, scope) {
|
|
3
13
|
const stripped = stripThingsUri(ref);
|
|
14
|
+
// The reserved `loose` ref resolves to the NULL-area pseudo-area (READ only),
|
|
15
|
+
// ALWAYS winning over a real area named "Loose". It lies outside any container
|
|
16
|
+
// jail, so under a scope it falls through to the normal not-found (parity).
|
|
17
|
+
// `uuid` carries the reserved word so `areaView` re-detects it downstream.
|
|
18
|
+
if (scope === undefined && isLooseRef(stripped))
|
|
19
|
+
return { kind: "area", uuid: LOOSE_REF };
|
|
20
|
+
const taskClause = scope !== undefined ? taskMembershipClause(scope) : undefined;
|
|
21
|
+
const projectClause = scope !== undefined ? namedProjectClause(scope) : undefined;
|
|
22
|
+
// Area scope → only the scope area; project scope → no area is showable.
|
|
23
|
+
const areaClause = scope === undefined
|
|
24
|
+
? undefined
|
|
25
|
+
: scope.kind === "area"
|
|
26
|
+
? namedAreaClause(scope)
|
|
27
|
+
: { where: "0", binds: [] };
|
|
4
28
|
try {
|
|
5
|
-
const uuid = resolveTaskUuidPrefix(db, stripped);
|
|
29
|
+
const uuid = resolveTaskUuidPrefix(db, stripped, "to-do", taskClause);
|
|
6
30
|
const row = db.prepare("SELECT type, project FROM TMTask WHERE uuid = ?").get(uuid);
|
|
7
31
|
if (row.type === 1)
|
|
8
32
|
return { kind: "project", uuid };
|
|
@@ -22,20 +46,56 @@ export function classifyShowTarget(db, ref) {
|
|
|
22
46
|
if (!(err instanceof RangeError))
|
|
23
47
|
throw err;
|
|
24
48
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
49
|
+
// NAME phase — resolve across AREAS and PROJECTS (live pools). Precedence for a
|
|
50
|
+
// UNIQUE winner is unchanged (uuid handled above → area → project). But when
|
|
51
|
+
// the subject is AMBIGUOUS at one kind while another kind ALSO carries live
|
|
52
|
+
// name matches, the refusal MERGES the live candidates across kinds: the
|
|
53
|
+
// bare-shorthand's namespace spans to-dos, areas, AND projects, so it must
|
|
54
|
+
// never show fewer options than the narrower namespaced command would.
|
|
55
|
+
const areaRes = resolveNamedRef(db, "TMArea", "1=1", [], stripped, {
|
|
56
|
+
prefixTier: false,
|
|
57
|
+
...(areaClause !== undefined && { scopeWhere: areaClause.where, scopeBinds: areaClause.binds }),
|
|
58
|
+
});
|
|
59
|
+
// An area that uniquely resolves wins outright (an area outranks a same-named
|
|
60
|
+
// project — the documented chain).
|
|
61
|
+
if (areaRes.resolved !== null)
|
|
62
|
+
return { kind: "area", uuid: areaRes.resolved.uuid };
|
|
63
|
+
const proj = readProjectNameVerdict(db, stripped, {
|
|
64
|
+
prefixTier: false,
|
|
65
|
+
...(projectClause !== undefined && {
|
|
66
|
+
scopeWhere: projectClause.where,
|
|
67
|
+
scopeBinds: projectClause.binds,
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
70
|
+
const areaRows = areaRes.matches > 1 ? (areaRes.candidates ?? []) : [];
|
|
71
|
+
// Area not ambiguous (zero live matches) → a UNIQUE project wins: a live twin,
|
|
72
|
+
// or the reads-only unique-dead fallback (the render discloses a trashed one
|
|
73
|
+
// via the card's own `(trashed)` marker / `stage: "trash"`).
|
|
74
|
+
if (areaRows.length === 0 && proj.resolved !== null)
|
|
75
|
+
return { kind: "project", uuid: proj.resolved.uuid };
|
|
76
|
+
// Neither kind yields a unique winner. If ANY live candidates exist across the
|
|
77
|
+
// two kinds, refuse with the merged list; a single kind reuses the per-kind
|
|
78
|
+
// ambiguity copy, both kinds name the split.
|
|
79
|
+
const areaN = areaRows.length;
|
|
80
|
+
const projN = proj.liveRows.length;
|
|
81
|
+
if (areaN + projN > 0) {
|
|
82
|
+
const merged = [
|
|
83
|
+
...areaRows.map((r) => candidateRef("area", r)),
|
|
84
|
+
...proj.liveRows.map((r) => candidateRef("project", r)),
|
|
85
|
+
];
|
|
86
|
+
const parts = [];
|
|
87
|
+
if (areaN > 0)
|
|
88
|
+
parts.push(`${areaN} area${areaN === 1 ? "" : "s"}`);
|
|
89
|
+
if (projN > 0)
|
|
90
|
+
parts.push(`${projN} project${projN === 1 ? "" : "s"}`);
|
|
91
|
+
const capTail = merged.length > CANDIDATE_CAP ? `; first ${CANDIDATE_CAP} shown` : "";
|
|
92
|
+
const disambig = areaN > 0 && projN > 0
|
|
93
|
+
? "use `things area show` / `things project show`, or a ref below"
|
|
94
|
+
: "use the exact name or a uuid";
|
|
95
|
+
throw new ReferenceResolutionError(`"${ref}" matches ${parts.join(" and ")}${capTail} — ${disambig}${trashDisclosureTail(proj.trashedMatches)}`, { code: "ambiguous", ref, candidates: merged.slice(0, CANDIDATE_CAP) });
|
|
39
96
|
}
|
|
97
|
+
// Nothing matched by name. When only DEAD project twins matched (several — a
|
|
98
|
+
// unique dead one resolves above), disclose them with the honest hint.
|
|
99
|
+
throw new ReferenceResolutionError(`no to-do, project, or area matches "${ref}" (tags and checklist items have no show view)${deadNameMatchHint({ trashed: proj.trashedMatches })}`, { code: "not-found", ref });
|
|
40
100
|
}
|
|
41
101
|
//# sourceMappingURL=show-target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"show-target.js","sourceRoot":"","sources":["../../src/read/show-target.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"show-target.js","sourceRoot":"","sources":["../../src/read/show-target.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GAErB,MAAM,YAAY,CAAC;AASpB;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAChC,EAAgB,EAChB,GAAW,EACX,KAAqB;IAErB,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACrC,8EAA8E;IAC9E,+EAA+E;IAC/E,4EAA4E;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,CAAC,IAAI,KAAK,GAAG,CAAC;YACpB,CAAC,CAAC,gEAAgE;YAClE,CAAC,CAAC,8BAA8B,CAAC;QACrC,MAAM,IAAI,wBAAwB,CAChC,IAAI,GAAG,aAAa,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,OAAO,MAAM,QAAQ,GAAG,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,EAC5G,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CACvE,CAAC;IACJ,CAAC;IACD,6EAA6E;IAC7E,uEAAuE;IACvE,MAAM,IAAI,wBAAwB,CAChC,uCAAuC,GAAG,iDAAiD,iBAAiB,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,EAAE,EAChJ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The R10 lifecycle taxonomy: ONE derived per-item field, `stage`, that replaces
|
|
3
|
+
* the three former wire fields `start` / `logged` / `trashed`. It names an item's
|
|
4
|
+
* primary lifecycle bucket in the same six words the sidebar and the view cards
|
|
5
|
+
* use, so a consumer reads one word instead of cross-referencing three.
|
|
6
|
+
*
|
|
7
|
+
* ## Why a pure function that REUSES the view predicates
|
|
8
|
+
* `deriveStage` is a PURE function over the already-materialized entity (its
|
|
9
|
+
* `logged` flag stamped by {@link markLogged} against the logbook boundary, its
|
|
10
|
+
* `trashed`/`start`/`startDate`/`repeating` read from the DB). It encodes the
|
|
11
|
+
* SAME membership rules the list views encode in SQL — inbox = `start=0`, someday
|
|
12
|
+
* = `start=2 ∧ undated`, upcoming = a `startDate` or a repeating template, the
|
|
13
|
+
* logbook-boundary rule that {@link markLogged} applies — so an item's `stage`
|
|
14
|
+
* can never disagree with the bucket a view (or a card sub-bucket) puts it in.
|
|
15
|
+
* The read surfaces bucket their card sections by calling this same function, and
|
|
16
|
+
* the emit boundary stamps the wire `stage` from it; there is exactly one
|
|
17
|
+
* derivation.
|
|
18
|
+
*
|
|
19
|
+
* ## Precedence (order matters)
|
|
20
|
+
* 1. `trashed` → `trash` — wins over EVERYTHING, including a logged row (a trashed
|
|
21
|
+
* item that was also completed reads `trash`, per the ratified ruling).
|
|
22
|
+
* 2. `logged` → `logbook` — the SAME logbook-boundary rule {@link markLogged}
|
|
23
|
+
* applies (completion ≠ logged; a closed row past the sweep boundary).
|
|
24
|
+
* A completed/canceled row NOT yet past the boundary has `logged=false` here,
|
|
25
|
+
* so it FALLS THROUGH and keeps its live stage below (Mike's explicit ruling).
|
|
26
|
+
* 2½. a DEADLINE-PULLED undated row (`today` marker set ∧ `startDate IS NULL`) →
|
|
27
|
+
* `anytime` — R13 (BANNER1 / BANNER1b, law L-A): a due-deadline pull re-files
|
|
28
|
+
* an undated Inbox/Someday row into ANYTIME (the GUI removes it from
|
|
29
|
+
* Someday/Inbox and adds it to Anytime at pull time, even while raw `start`
|
|
30
|
+
* still reads 0/2). It derives its DESTINATION, not its origin. Ordered ABOVE
|
|
31
|
+
* inbox so an inbox-origin pull is caught; templates never carry the marker.
|
|
32
|
+
* With this, EVERY Today member derives `anytime` (arrived via step 5, pulled
|
|
33
|
+
* here).
|
|
34
|
+
* 3. `start=inbox` → `inbox`.
|
|
35
|
+
* 4. a repeating TEMPLATE → `upcoming` — regardless of its projected next date;
|
|
36
|
+
* the `repeating` object stays the template discriminator.
|
|
37
|
+
* 5. a `startDate`, split by whether that When-date has ARRIVED:
|
|
38
|
+
* - STRICTLY FUTURE (`startDate > today`, i.e. NO `today` marker) → `upcoming`.
|
|
39
|
+
* GUI Upcoming membership is STRICTLY FUTURE — `groupKey =
|
|
40
|
+
* COALESCE(startDate, deadline) > today` (UPC1, GUI-verified,
|
|
41
|
+
* docs/lab/upcoming-research.md); only a future When-date is in Upcoming.
|
|
42
|
+
* - ARRIVED (`startDate <= today`, carrying the `today` marker) → `anytime`.
|
|
43
|
+
* An arrived-dated OPEN item is NOT in Upcoming — it is in Today (star) and
|
|
44
|
+
* Anytime. Its Today membership is carried by the separate `today` marker,
|
|
45
|
+
* never by `stage`. This holds for an active arrived row AND an arrived
|
|
46
|
+
* someday-scheduled row (`start=2`, `startDate <= today`) — both are Anytime
|
|
47
|
+
* members (ANYTIME_SELF, src/read/predicates.ts).
|
|
48
|
+
* The arrived/future split reads the `today` marker rather than re-comparing to
|
|
49
|
+
* a clock: for a dated non-inbox, non-template row the marker's scheduled arm is
|
|
50
|
+
* EXACTLY `startDate <= today` (mappers todayMarkers), computed with the same
|
|
51
|
+
* response clock — so `!today` on a dated row ⟺ `startDate > today`. Deriving
|
|
52
|
+
* from the marker also guarantees `stage` can never disagree with Today
|
|
53
|
+
* membership.
|
|
54
|
+
* 6. `start=someday` (undated, deferred) → `someday`.
|
|
55
|
+
* 7. otherwise (current/active, undated) → `anytime`.
|
|
56
|
+
*
|
|
57
|
+
* ## Today/evening are a SEPARATE axis, not a stage (see {@link isTodayMarked})
|
|
58
|
+
* There is deliberately no `today` stage — the Today view is a SUPERSET filter
|
|
59
|
+
* across the middle tier, so today membership is a separate presence-keyed marker.
|
|
60
|
+
* The two axes cross: an undated ACTIVE to-do whose DEADLINE is today reads
|
|
61
|
+
* `stage: "anytime"` AND `today: true` (F-DL pull; UPC1 2026-07-13, GUI-verified,
|
|
62
|
+
* docs/lab/upcoming-research.md, summarized in docs/things-app-oddities.md
|
|
63
|
+
* §8d–8e). A SOMEDAY or INBOX item with a due/overdue UNsuppressed deadline is
|
|
64
|
+
* PULLED into Today+Anytime, so it too reads `stage: "anytime"` AND `today: true`
|
|
65
|
+
* (R13 / BANNER1b — the GUI files a pulled row under Anytime, out of its origin
|
|
66
|
+
* bucket, §8s); the same item once its deadline is SUPPRESSED
|
|
67
|
+
* (`deadlineSuppressionDate` stamped — a side effect of rescheduling an
|
|
68
|
+
* overdue-deadline item, oddities §8e) is NOT pulled: no today marker, so it
|
|
69
|
+
* reads its ORIGIN stage (`someday` / `inbox`) with NO today marker. And after
|
|
70
|
+
* the user OKs the "new to-dos" banner (§8d) the app MUTATES
|
|
71
|
+
* such an item to `start=1` / `startDate := deadline` (= today, an ARRIVED
|
|
72
|
+
* When-date), so the SAME conceptual item legitimately reads `stage: "anytime"` +
|
|
73
|
+
* `today: true` post-acknowledgement — an arrived `startDate` is Anytime + Today,
|
|
74
|
+
* NOT Upcoming. Both DB states are real; this function reads the DB as it is and
|
|
75
|
+
* needs no special-casing.
|
|
76
|
+
*/
|
|
77
|
+
import type { IsoDate } from "../model/dates.ts";
|
|
78
|
+
import type { StartState } from "../model/entities.ts";
|
|
79
|
+
export type Stage = "inbox" | "upcoming" | "anytime" | "someday" | "logbook" | "trash";
|
|
80
|
+
/** The minimal materialized-entity shape {@link deriveStage} reads. */
|
|
81
|
+
export interface StageInput {
|
|
82
|
+
trashed: boolean;
|
|
83
|
+
/** The logbook-boundary-resolved flag (markLogged): closed AND past the sweep. */
|
|
84
|
+
logged: boolean;
|
|
85
|
+
start: StartState;
|
|
86
|
+
startDate: IsoDate | null;
|
|
87
|
+
repeating: {
|
|
88
|
+
isTemplate: boolean;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* The Today marker (mappers todayMarkers, presence-keyed on the entity). For a
|
|
92
|
+
* dated non-inbox, non-template row its scheduled arm is EXACTLY
|
|
93
|
+
* `startDate <= today` under the response clock, so it discriminates an ARRIVED
|
|
94
|
+
* When-date (marker present → `anytime`) from a strictly-FUTURE one (marker
|
|
95
|
+
* absent → `upcoming`). Absent/false on undated rows (their marker, if any, is
|
|
96
|
+
* deadline-driven and irrelevant to the startDate branch). Optional so a
|
|
97
|
+
* materialized entity (`today?: true`) is a structural {@link StageInput}.
|
|
98
|
+
*/
|
|
99
|
+
today?: boolean;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Derive an item's {@link Stage} from its materialized fields. Pure; see the
|
|
103
|
+
* module doc for the precedence and the GUI-verified corners it honors.
|
|
104
|
+
*/
|
|
105
|
+
export declare function deriveStage(item: StageInput): Stage;
|
|
106
|
+
/**
|
|
107
|
+
* An item's TIME-AXIS POSITION (R12) — a presence-keyed value complementary to
|
|
108
|
+
* {@link Stage}. The doctrine line: **`stage` enumerates the sidebar BUCKETS an
|
|
109
|
+
* item lives in; `when` enumerates its TIME POSITIONS (today | evening | a future
|
|
110
|
+
* date).** Someday is deliberately NOT a `when` value — it is a bucket, so it
|
|
111
|
+
* lives on the `stage` axis.
|
|
112
|
+
*
|
|
113
|
+
* - `"evening"` — the This-Evening sub-bucket of Today (implies today);
|
|
114
|
+
* - `"today"` — in the Today view by ANY arm (an arrived `startDate`, or a
|
|
115
|
+
* due/overdue undated deadline that is not suppressed — the same two-arm
|
|
116
|
+
* predicate {@link isTodayMarked} / mappers `todayMarkers` derive);
|
|
117
|
+
* - a FUTURE ISO date — a strictly-future scheduled row (`startDate > today`), or
|
|
118
|
+
* a repeating TEMPLATE's app-materialized next occurrence;
|
|
119
|
+
* - absent — unscheduled and not in Today (an unprojected template — paused /
|
|
120
|
+
* after-completion — has none, and neither does a logged/trashed item).
|
|
121
|
+
*/
|
|
122
|
+
export type When = "today" | "evening" | IsoDate;
|
|
123
|
+
/** The minimal shape {@link deriveWhen} reads (all fields off the materialized entity). */
|
|
124
|
+
export interface WhenInput {
|
|
125
|
+
/** The derived {@link Stage} — gates out logbook/trash (never time-axis members). */
|
|
126
|
+
stage: Stage;
|
|
127
|
+
/** The presence-keyed Today marker (mappers `todayMarkers`) — reused, never re-derived. */
|
|
128
|
+
today?: boolean;
|
|
129
|
+
/** The presence-keyed This-Evening marker (implies today). */
|
|
130
|
+
evening?: boolean;
|
|
131
|
+
startDate: IsoDate | null;
|
|
132
|
+
/** A template's projected next occurrence (a future date), if it has one. */
|
|
133
|
+
repeating: {
|
|
134
|
+
isTemplate: boolean;
|
|
135
|
+
nextOccurrence?: IsoDate | null;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Derive an item's {@link When} from its materialized fields. PURE, and it REUSES
|
|
140
|
+
* the Today markers rather than re-deriving membership — so `when` ∈
|
|
141
|
+
* {`"today"`, `"evening"`} can NEVER disagree with Today-view membership (the same
|
|
142
|
+
* fact the star renders). See the type doc for the four positions.
|
|
143
|
+
*/
|
|
144
|
+
export declare function deriveWhen(item: WhenInput): When | undefined;
|
|
145
|
+
/** The materialized-entity shape {@link entityWhen} reads (a superset of both inputs). */
|
|
146
|
+
export interface WhenStageInput extends StageInput {
|
|
147
|
+
/** The presence-keyed This-Evening marker (implies today). */
|
|
148
|
+
evening?: boolean;
|
|
149
|
+
repeating: {
|
|
150
|
+
isTemplate: boolean;
|
|
151
|
+
nextOccurrence?: IsoDate | null;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The ONE time-axis derivation for a materialized ENTITY — the SINGLE SOURCE the
|
|
156
|
+
* wire emit boundary (`shape.ts` `whenOf`) and the human/TTY renderers
|
|
157
|
+
* (`whenValue`, `todayMark`) share. Composes {@link deriveStage} → {@link
|
|
158
|
+
* deriveWhen} off the entity's own presence-keyed markers, so a TTY when/pip can
|
|
159
|
+
* NEVER disagree with the emitted `when` (never re-derived from `startBucket` /
|
|
160
|
+
* `todaySection`). Returns the same {@link When} the wire carries.
|
|
161
|
+
*/
|
|
162
|
+
export declare function entityWhen(item: WhenStageInput): When | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* The R13 provisional-marker LAW (BANNER1 L-B) — the ONE predicate the wire emit
|
|
165
|
+
* boundary (`shape.ts`) and the TTY pip (`render.ts` renderToday) share, so a
|
|
166
|
+
* rendered `•` can NEVER disagree with the emitted `provisional`. A Today member
|
|
167
|
+
* (a today/evening `when`) the app has not yet MATERIALIZED: `start != active OR
|
|
168
|
+
* startDate IS NULL`. A future/undated/someday row (no today/evening `when`) is
|
|
169
|
+
* never provisional; templates never carry a today/evening `when`, so they never
|
|
170
|
+
* qualify either. Takes the already-derived `when` so neither caller re-derives it.
|
|
171
|
+
*/
|
|
172
|
+
export declare function whenIsProvisional(when: When | undefined, start: StartState, startDate: IsoDate | null): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Entity-level {@link whenIsProvisional}: derives the entity's own
|
|
175
|
+
* {@link entityWhen} (the same value the wire emits), so the TTY provisional pip
|
|
176
|
+
* shares the wire's derivation end to end.
|
|
177
|
+
*/
|
|
178
|
+
export declare function entityProvisional(item: WhenStageInput): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* The §9n stale-reminder LAW — the ONE liveness predicate the read-emit boundary
|
|
181
|
+
* (its precomputed `reminderLive` marker, mappers) and the write-side reminder
|
|
182
|
+
* auto-preserve ({@link src/write/commands.ts} `effectiveReminder`) share, so a
|
|
183
|
+
* reminder is reported/preserved iff the GUI would still render its bell.
|
|
184
|
+
*
|
|
185
|
+
* A time-of-day reminder renders in the GUI ONLY while its row's `startDate` is
|
|
186
|
+
* the current day or FUTURE (a future-scheduled row's reminder is a live
|
|
187
|
+
* upcoming reminder; today's is live). Once `startDate` goes STRICTLY PAST the
|
|
188
|
+
* app hides the bell at the presentation layer while leaving the `reminderTime`
|
|
189
|
+
* byte in the DB forever — presentation-dead, never cleared (docs/lab/
|
|
190
|
+
* sit3-arrival-evening-lists.md REMSTALE, oddities §9n). A read keyed on the raw
|
|
191
|
+
* byte would over-report; a `when=` re-schedule that auto-preserved it would
|
|
192
|
+
* resurrect a reminder the user believes gone.
|
|
193
|
+
*
|
|
194
|
+
* A row with NO `startDate` keeps the byte live (a reminder cannot exist without
|
|
195
|
+
* a scheduled date in the app's model, so this arm is defensive — see the test).
|
|
196
|
+
* ISO `YYYY-MM-DD` strings order lexicographically == chronologically, so the
|
|
197
|
+
* bare `>=` is the calendar comparison.
|
|
198
|
+
*/
|
|
199
|
+
export declare function reminderIsLive(startDate: IsoDate | null, todayIso: IsoDate): boolean;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Derive an item's {@link Stage} from its materialized fields. Pure; see the
|
|
3
|
+
* module doc for the precedence and the GUI-verified corners it honors.
|
|
4
|
+
*/
|
|
5
|
+
export function deriveStage(item) {
|
|
6
|
+
if (item.trashed)
|
|
7
|
+
return "trash";
|
|
8
|
+
if (item.logged)
|
|
9
|
+
return "logbook";
|
|
10
|
+
// R13 (BANNER1 / BANNER1b, law L-A): a due-deadline PULL re-files an undated
|
|
11
|
+
// row (Inbox or Someday origin) into ANYTIME — the GUI removes it from the
|
|
12
|
+
// Someday/Inbox lists and adds it to the Anytime list at pull time, even while
|
|
13
|
+
// its raw `start` still reads 0/2 (Anytime ⊇ Today's to-dos). The row carries
|
|
14
|
+
// the Today marker via the deadline arm (mappers `todayMarkers`) with its
|
|
15
|
+
// startDate still NULL, so a Today-marked UNDATED row IS a deadline pull → it
|
|
16
|
+
// derives its DESTINATION bucket `anytime`, not its origin (inbox/someday).
|
|
17
|
+
// Consequence: EVERY Today member is now stage `anytime` (arrived → anytime
|
|
18
|
+
// via the arrived-startDate branch below; pulled → anytime here). Reuses the
|
|
19
|
+
// marker verbatim — no independent re-derivation. Ordered ABOVE the inbox
|
|
20
|
+
// branch so an inbox-origin pull is caught (templates never carry the marker).
|
|
21
|
+
if (item.today === true && item.startDate === null)
|
|
22
|
+
return "anytime";
|
|
23
|
+
if (item.start === "inbox")
|
|
24
|
+
return "inbox";
|
|
25
|
+
if (item.repeating.isTemplate)
|
|
26
|
+
return "upcoming";
|
|
27
|
+
// Upcoming is STRICTLY FUTURE (UPC1): a future When-date → `upcoming`; an
|
|
28
|
+
// ARRIVED one (the `today` marker) → `anytime` (Today star + Anytime, not
|
|
29
|
+
// Upcoming). Covers arrived active AND arrived someday-scheduled rows.
|
|
30
|
+
if (item.startDate !== null)
|
|
31
|
+
return item.today === true ? "anytime" : "upcoming";
|
|
32
|
+
if (item.start === "someday")
|
|
33
|
+
return "someday";
|
|
34
|
+
return "anytime";
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Derive an item's {@link When} from its materialized fields. PURE, and it REUSES
|
|
38
|
+
* the Today markers rather than re-deriving membership — so `when` ∈
|
|
39
|
+
* {`"today"`, `"evening"`} can NEVER disagree with Today-view membership (the same
|
|
40
|
+
* fact the star renders). See the type doc for the four positions.
|
|
41
|
+
*/
|
|
42
|
+
export function deriveWhen(item) {
|
|
43
|
+
// Out of the time axis: a logged/trashed item is never a Today member and is no
|
|
44
|
+
// longer scheduled-forward — no `when`. (This is the same gate that strips the
|
|
45
|
+
// raw materialize-time markers from a logbook/trash row at the emit boundary.)
|
|
46
|
+
if (item.stage === "logbook" || item.stage === "trash")
|
|
47
|
+
return undefined;
|
|
48
|
+
// Today membership rides the presence-keyed markers verbatim (evening ⊃ today).
|
|
49
|
+
if (item.evening === true)
|
|
50
|
+
return "evening";
|
|
51
|
+
if (item.today === true)
|
|
52
|
+
return "today";
|
|
53
|
+
// A repeating TEMPLATE sits at its projected next occurrence (a future date); an
|
|
54
|
+
// unprojected one (paused / after-completion) has none → absent.
|
|
55
|
+
if (item.repeating.isTemplate)
|
|
56
|
+
return item.repeating.nextOccurrence ?? undefined;
|
|
57
|
+
// A dated, NON-today-marked row is strictly future: the marker's scheduled arm is
|
|
58
|
+
// EXACTLY `startDate <= today`, so `!today` on a dated row ⟺ `startDate > today`.
|
|
59
|
+
// Arrived dates never reach here — they carried the `today` marker and returned
|
|
60
|
+
// above.
|
|
61
|
+
if (item.startDate !== null)
|
|
62
|
+
return item.startDate;
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The ONE time-axis derivation for a materialized ENTITY — the SINGLE SOURCE the
|
|
67
|
+
* wire emit boundary (`shape.ts` `whenOf`) and the human/TTY renderers
|
|
68
|
+
* (`whenValue`, `todayMark`) share. Composes {@link deriveStage} → {@link
|
|
69
|
+
* deriveWhen} off the entity's own presence-keyed markers, so a TTY when/pip can
|
|
70
|
+
* NEVER disagree with the emitted `when` (never re-derived from `startBucket` /
|
|
71
|
+
* `todaySection`). Returns the same {@link When} the wire carries.
|
|
72
|
+
*/
|
|
73
|
+
export function entityWhen(item) {
|
|
74
|
+
return deriveWhen({
|
|
75
|
+
stage: deriveStage(item),
|
|
76
|
+
...(item.today !== undefined && { today: item.today }),
|
|
77
|
+
...(item.evening !== undefined && { evening: item.evening }),
|
|
78
|
+
startDate: item.startDate,
|
|
79
|
+
repeating: item.repeating,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The R13 provisional-marker LAW (BANNER1 L-B) — the ONE predicate the wire emit
|
|
84
|
+
* boundary (`shape.ts`) and the TTY pip (`render.ts` renderToday) share, so a
|
|
85
|
+
* rendered `•` can NEVER disagree with the emitted `provisional`. A Today member
|
|
86
|
+
* (a today/evening `when`) the app has not yet MATERIALIZED: `start != active OR
|
|
87
|
+
* startDate IS NULL`. A future/undated/someday row (no today/evening `when`) is
|
|
88
|
+
* never provisional; templates never carry a today/evening `when`, so they never
|
|
89
|
+
* qualify either. Takes the already-derived `when` so neither caller re-derives it.
|
|
90
|
+
*/
|
|
91
|
+
export function whenIsProvisional(when, start, startDate) {
|
|
92
|
+
return (when === "today" || when === "evening") && (start !== "active" || startDate === null);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Entity-level {@link whenIsProvisional}: derives the entity's own
|
|
96
|
+
* {@link entityWhen} (the same value the wire emits), so the TTY provisional pip
|
|
97
|
+
* shares the wire's derivation end to end.
|
|
98
|
+
*/
|
|
99
|
+
export function entityProvisional(item) {
|
|
100
|
+
return whenIsProvisional(entityWhen(item), item.start, item.startDate);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The §9n stale-reminder LAW — the ONE liveness predicate the read-emit boundary
|
|
104
|
+
* (its precomputed `reminderLive` marker, mappers) and the write-side reminder
|
|
105
|
+
* auto-preserve ({@link src/write/commands.ts} `effectiveReminder`) share, so a
|
|
106
|
+
* reminder is reported/preserved iff the GUI would still render its bell.
|
|
107
|
+
*
|
|
108
|
+
* A time-of-day reminder renders in the GUI ONLY while its row's `startDate` is
|
|
109
|
+
* the current day or FUTURE (a future-scheduled row's reminder is a live
|
|
110
|
+
* upcoming reminder; today's is live). Once `startDate` goes STRICTLY PAST the
|
|
111
|
+
* app hides the bell at the presentation layer while leaving the `reminderTime`
|
|
112
|
+
* byte in the DB forever — presentation-dead, never cleared (docs/lab/
|
|
113
|
+
* sit3-arrival-evening-lists.md REMSTALE, oddities §9n). A read keyed on the raw
|
|
114
|
+
* byte would over-report; a `when=` re-schedule that auto-preserved it would
|
|
115
|
+
* resurrect a reminder the user believes gone.
|
|
116
|
+
*
|
|
117
|
+
* A row with NO `startDate` keeps the byte live (a reminder cannot exist without
|
|
118
|
+
* a scheduled date in the app's model, so this arm is defensive — see the test).
|
|
119
|
+
* ISO `YYYY-MM-DD` strings order lexicographically == chronologically, so the
|
|
120
|
+
* bare `>=` is the calendar comparison.
|
|
121
|
+
*/
|
|
122
|
+
export function reminderIsLive(startDate, todayIso) {
|
|
123
|
+
return startDate === null || startDate >= todayIso;
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage.js","sourceRoot":"","sources":["../../src/read/stage.ts"],"names":[],"mappings":"AAqGA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAgB;IAC1C,IAAI,IAAI,CAAC,OAAO;QAAE,OAAO,OAAO,CAAC;IACjC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAClC,6EAA6E;IAC7E,2EAA2E;IAC3E,+EAA+E;IAC/E,8EAA8E;IAC9E,0EAA0E;IAC1E,8EAA8E;IAC9E,4EAA4E;IAC5E,4EAA4E;IAC5E,6EAA6E;IAC7E,0EAA0E;IAC1E,+EAA+E;IAC/E,IAAI,IAAI,CAAC,KAA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AK,EAAE,WAAW,CAAC,IAAI,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;QACtD,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5D,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAsB,EACtB,KAAiB,EACjB,SAAyB;IAEzB,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI,CAAC,CAAC;AAChG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAoB;IACpD,OAAO,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,cAAc,CAAC,SAAyB,EAAE,QAAiB;IACzE,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,IAAI,QAAQ,CAAC;AACrD,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* entirely past the cut so no empty header survives. `limit === null` means
|
|
8
8
|
* "all rows" (the caller passed --all / all: true).
|
|
9
9
|
*/
|
|
10
|
-
import type {
|
|
10
|
+
import type { Truncation } from "../contracts.ts";
|
|
11
11
|
import { type AreaView } from "./area-view.ts";
|
|
12
12
|
import { AREA_PREVIEW_LIMIT, DEFAULT_LIST_LIMIT, PROJECT_PREVIEW_LIMIT } from "../surface-copy.ts";
|
|
13
13
|
import type { SidebarSection, TodayView } from "./views.ts";
|
|
@@ -19,13 +19,6 @@ export declare function truncateList<T>(items: T[], limit: number | null): {
|
|
|
19
19
|
data: T[];
|
|
20
20
|
truncation: Truncation;
|
|
21
21
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Today split: the cut runs across Today then This Evening in render order,
|
|
24
|
-
* so a limit smaller than the Today block trims Evening to nothing. The badge
|
|
25
|
-
* (a whole-view count summary) is preserved unchanged. The truncation carries
|
|
26
|
-
* a per-section (`today`/`evening`) shown/total breakdown so a renderer can
|
|
27
|
-
* keep This Evening honest under the single global cap without a pre-cap copy.
|
|
28
|
-
*/
|
|
29
22
|
export declare function truncateToday(view: TodayView, limit: number | null): {
|
|
30
23
|
data: TodayView;
|
|
31
24
|
truncation: Truncation;
|
|
@@ -40,7 +33,7 @@ export declare function truncateToday(view: TodayView, limit: number | null): {
|
|
|
40
33
|
*/
|
|
41
34
|
export declare function previewSections(sections: SidebarSection[], limits: GroupedLimits): {
|
|
42
35
|
data: SidebarSection[];
|
|
43
|
-
|
|
36
|
+
truncation: Truncation;
|
|
44
37
|
};
|
|
45
38
|
/**
|
|
46
39
|
* Someday preview: every group survives; `limits.area` (null = no cap)
|
|
@@ -51,7 +44,7 @@ export declare function previewSections(sections: SidebarSection[], limits: Grou
|
|
|
51
44
|
*/
|
|
52
45
|
export declare function previewSomedaySections(sections: SidebarSection[], limits: GroupedLimits): {
|
|
53
46
|
data: SidebarSection[];
|
|
54
|
-
|
|
47
|
+
truncation: Truncation;
|
|
55
48
|
};
|
|
56
49
|
/**
|
|
57
50
|
* Sectioned cap for the `area show` detail view: its sections are containers,
|
|
@@ -61,11 +54,13 @@ export declare function previewSomedaySections(sections: SidebarSection[], limit
|
|
|
61
54
|
* rows are capped, while its future-scheduled and someday project rows always
|
|
62
55
|
* survive (the card renders them under its uncapped Upcoming/Someday sections),
|
|
63
56
|
* so the human view derives entirely from this bounded shape. The toggled
|
|
64
|
-
* later
|
|
57
|
+
* later list passes through untouched (the area carries no logged/trashed
|
|
58
|
+
* buckets — the logbook is `things logbook --area`, trash is `things trash`).
|
|
59
|
+
* Counts ride
|
|
65
60
|
* the same grouped-block shape the sidebar catalogues emit (kind "projects" =
|
|
66
61
|
* the active project-rows section). `now` classifies the schedule split.
|
|
67
62
|
*/
|
|
68
63
|
export declare function capAreaSections(view: AreaView, limits: GroupedLimits, now?: Date, zone?: string): {
|
|
69
64
|
data: AreaView;
|
|
70
|
-
|
|
65
|
+
truncation: Truncation;
|
|
71
66
|
};
|