spur-board 0.105.2 → 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
- if (previousFact === null || JSON.stringify(previousFact) !== JSON.stringify(fact)) {
18276
- await trx.insertInto("ticket_snapshot").values({
18277
- task_id: task.id,
18278
- status: fact.status,
18279
- assignee: fact.assignee,
18280
- detail: toJson(ticketFactsSchema, fact),
18281
- source,
18282
- observed_at: at
18283
- }).onConflict((oc) => oc.column("task_id").doUpdateSet({
18284
- status: fact.status,
18285
- assignee: fact.assignee,
18286
- detail: toJson(ticketFactsSchema, fact),
18287
- source,
18288
- observed_at: at
18289
- })).execute();
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
- } else await trx.updateTable("ticket_snapshot").set({ observed_at: at }).where("task_id", "=", task.id).execute();
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 || JSON.stringify(previous) !== JSON.stringify(fact);
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 || JSON.stringify(previous) !== JSON.stringify(fact);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.105.2",
3
+ "version": "0.105.4",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"
@@ -11,7 +11,8 @@ shadow mode, use keyed `board submit <task> <sha>`.
11
11
  Unseen heads answer `pending`: that submit is final; do not resubmit or raise a
12
12
  block. Confirm timeout: `projects[].dispatcher.submitConfirmMs`.
13
13
 
14
- A new head closes taken turns outside Dev; taken Dev turns survive pushes.
14
+ A new head closes taken turns outside Dev and Done; taken Dev turns and Done
15
+ wrap-up turns survive pushes, and a wrap-up turn closes when its holder ends.
15
16
  Right of Dev, red CI, a draft, a conflict, an external comment or an unresolved
16
17
  thread where required returns the task to Dev at once, unless a turn is taken; then after its submit or return.
17
18
  The Dev turn hands the comments, beside a return's `code` block.
@@ -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 configured daemon web listener serves the packaged SPA and its local assets, and streams
95
- live updates from `GET /v1/events` as server-sent events. The stream opens with `hello` (journal
96
- head and daemon instance), then sends one `invalidate` per committed batch of journal events,
97
- naming the projects and task keys it touched; the screen rereads configuration and status when
98
- the chosen project is named, and the inbox on every batch. A `reset` asks for a full reread:
99
- after a client fell behind, or when its last event ID is ahead of the journal. A `status` frame
100
- every 30 seconds carries source and transport health and also triggers a full reread; a comment
101
- line every 15 seconds keeps proxies from closing the stream. The first `hello`, and a later one
102
- with a changed head or a new instance after a daemon restart, make the screen reread everything.
103
- The status bar version is `daemon.version` from `status.get`, so a stale bundle never claims
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.