spur-board 0.105.3 → 0.105.4
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/dist/daemon.mjs
CHANGED
|
@@ -18272,21 +18272,21 @@ async function ticket(trx, config, fact, at, source) {
|
|
|
18272
18272
|
}).where("id", "=", task.id).execute();
|
|
18273
18273
|
const previous = await trx.selectFrom("ticket_snapshot").selectAll().where("task_id", "=", task.id).executeTakeFirst();
|
|
18274
18274
|
const previousFact = previous === void 0 ? null : parseJson(ticketFactsSchema, previous.detail);
|
|
18275
|
-
|
|
18276
|
-
|
|
18277
|
-
|
|
18278
|
-
|
|
18279
|
-
|
|
18280
|
-
|
|
18281
|
-
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
|
|
18287
|
-
|
|
18288
|
-
|
|
18289
|
-
|
|
18275
|
+
await trx.insertInto("ticket_snapshot").values({
|
|
18276
|
+
task_id: task.id,
|
|
18277
|
+
status: fact.status,
|
|
18278
|
+
assignee: fact.assignee,
|
|
18279
|
+
detail: toJson(ticketFactsSchema, fact),
|
|
18280
|
+
source,
|
|
18281
|
+
observed_at: at
|
|
18282
|
+
}).onConflict((oc) => oc.column("task_id").doUpdateSet({
|
|
18283
|
+
status: fact.status,
|
|
18284
|
+
assignee: fact.assignee,
|
|
18285
|
+
detail: toJson(ticketFactsSchema, fact),
|
|
18286
|
+
source,
|
|
18287
|
+
observed_at: at
|
|
18288
|
+
})).execute();
|
|
18289
|
+
if (previousFact === null || comparableFacts(previousFact, "updatedAt") !== comparableFacts(fact, "updatedAt")) {
|
|
18290
18290
|
if (previousFact?.status !== fact.status) {
|
|
18291
18291
|
await emit(trx, "ticket_status_changed", project.id, task.id, at, {
|
|
18292
18292
|
from: previousFact?.status ?? null,
|
|
@@ -18296,7 +18296,7 @@ async function ticket(trx, config, fact, at, source) {
|
|
|
18296
18296
|
}
|
|
18297
18297
|
await emit(trx, "ticket_facts_changed", project.id, task.id, at, { facts: fact });
|
|
18298
18298
|
await trx.updateTable("task").set({ last_change_at: at }).where("id", "=", task.id).execute();
|
|
18299
|
-
}
|
|
18299
|
+
}
|
|
18300
18300
|
if (fact.inFilter && (task.membership === "out_of_filter" || task.archive_reason === "out_of_filter")) {
|
|
18301
18301
|
await trx.updateTable("task").set({
|
|
18302
18302
|
membership: "active",
|
|
@@ -18307,6 +18307,10 @@ async function ticket(trx, config, fact, at, source) {
|
|
|
18307
18307
|
}
|
|
18308
18308
|
if (previousKey !== fact.key || previousMembership === "archived") await reconcileTaskPrs(trx, config, task.id, at);
|
|
18309
18309
|
}
|
|
18310
|
+
/** Only these top-level refresh timestamps are immaterial to the journal. */
|
|
18311
|
+
function comparableFacts(facts, timestamp) {
|
|
18312
|
+
return JSON.stringify(Object.fromEntries(Object.entries(facts).filter(([key]) => key !== timestamp)));
|
|
18313
|
+
}
|
|
18310
18314
|
async function pr(trx, config, fact, at, source) {
|
|
18311
18315
|
await trx.deleteFrom("source_miss").where("source", "=", source).where("ref_key", "=", refKey({
|
|
18312
18316
|
kind: "pr",
|
|
@@ -18318,7 +18322,7 @@ async function pr(trx, config, fact, at, source) {
|
|
|
18318
18322
|
const recheckAt = fact.state === "closed" ? new Date(Date.parse(at) + 216e5).toISOString() : null;
|
|
18319
18323
|
if (old !== void 0 && previous !== null && old.source !== source) await savePrPolling(trx, old.source, previous, old.closed_recheck_at, true);
|
|
18320
18324
|
await savePrPolling(trx, source, fact, recheckAt);
|
|
18321
|
-
const changed = previous === null ||
|
|
18325
|
+
const changed = previous === null || comparableFacts(previous, "updatedAt") !== comparableFacts(fact, "updatedAt");
|
|
18322
18326
|
await trx.insertInto("pr_snapshot").values({
|
|
18323
18327
|
repo: old?.repo ?? fact.repo,
|
|
18324
18328
|
number: fact.number,
|
|
@@ -18478,7 +18482,7 @@ async function sessionTransition(trx, config, edge) {
|
|
|
18478
18482
|
async function session(trx, config, fact, at, source, ambiguousBranches, feedEnabled) {
|
|
18479
18483
|
const old = await trx.selectFrom("session_snapshot").selectAll().where("id", "=", fact.id).executeTakeFirst();
|
|
18480
18484
|
const previous = old === void 0 ? null : parseJson(sessionFactsSchema, old.detail);
|
|
18481
|
-
const changed = previous === null ||
|
|
18485
|
+
const changed = previous === null || comparableFacts(previous, "lastActivityAt") !== comparableFacts(fact, "lastActivityAt");
|
|
18482
18486
|
await trx.insertInto("session_snapshot").values({
|
|
18483
18487
|
id: fact.id,
|
|
18484
18488
|
spur_project: fact.spurProject,
|
package/package.json
CHANGED
|
@@ -91,14 +91,13 @@ its time; stream failures reconnect with capped backoff and show offline after f
|
|
|
91
91
|
attempts while continuing recovery. Reconnects retain valid SSE cursors, including ID-only
|
|
92
92
|
records, until the server clears them.
|
|
93
93
|
|
|
94
|
-
The
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
the daemon's version; it stays empty until the first status read.
|
|
94
|
+
The daemon serves the packaged SPA and streams `GET /v1/events` as server-sent events. `hello`
|
|
95
|
+
names the journal head and daemon instance. Each committed journal batch sends an `invalidate`
|
|
96
|
+
with affected projects and tasks; the screen rereads configuration and status for its chosen
|
|
97
|
+
project, and the inbox on every batch. `reset` requests a full reread after a cursor falls behind
|
|
98
|
+
or ahead of the journal. The first `hello`, or a changed head or instance, also rereads everything.
|
|
99
|
+
Timestamp-only changes to session `lastActivityAt`, PR `updatedAt` or ticket `updatedAt` refresh
|
|
100
|
+
the full snapshot without a facts event or task change time. A `status` frame every 30 seconds
|
|
101
|
+
carries source and transport health and triggers a full reread, including these quiet refreshes.
|
|
102
|
+
A comment every 15 seconds keeps proxies open. The status bar reads `daemon.version` from
|
|
103
|
+
`status.get` and stays empty until that first read.
|