@vibefield/rosetta-room 0.1.3 → 0.1.5

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.
@@ -45,8 +45,8 @@ import { UNASSIGNED_PROJECT_ID } from "../lib/model.js";
45
45
  import { createColdCorpus } from "./cold-import-corpus.js";
46
46
  import { ColdWireError, aborted, fetchOver } from "./cold-import-daemon.js";
47
47
  import { DISCOVERY_MS, SUBSCRIBER_QUEUE, planSchedule } from "./cold-import-schedule.js";
48
- /** The store's schema version, which /api/status reports (crates/store/src/schema.rs:12). */
49
- const SCHEMA_VERSION = 29;
48
+ /** The store's schema version, which /api/status reports (crates/store/src/schema.rs:17). */
49
+ const SCHEMA_VERSION = 30;
50
50
  /* ── synthetic transcripts ──────────────────────────────────────────────── */
51
51
  const PROVENANCE = { agent_version: null, src_cursor: null, src_offset: null };
52
52
  const NO_USAGE = {
@@ -5,10 +5,13 @@ export declare const SITTING_PAUSE_MS: number;
5
5
  * compact configuration group. Conversational prompts never use this rule. */
6
6
  export declare const PROMPT_CLUSTER_MS: number;
7
7
  /**
8
- * The viewer-local day a timestamp falls in, as `YYYY-MM-DD`. The same form
9
- * `lib/model.ts`'s `getCalendarDayKey` buckets the heatmap in — copied rather
10
- * than imported because that module pulls in JSX through the agent marks, and
11
- * this one must stay importable by a plain node test.
8
+ * The viewer-local day a timestamp falls in, as `YYYY-MM-DD`, by the offset the
9
+ * viewer's zone had at that moment. `lib/model.ts`'s `getCalendarDayKey` is a
10
+ * different key on purpose: it uses today's offset for every day, because the
11
+ * daemon buckets the heatmap by the one `offset_minutes` it is sent. A
12
+ * transcript is cut on the client alone, so its days are the stamps' own.
13
+ * Kept here rather than imported, because that module pulls in JSX through the
14
+ * agent marks, and this one must stay importable by a plain node test.
12
15
  */
13
16
  export declare function calendarDayKey(timestamp: number): string;
14
17
  /**
@@ -5,18 +5,24 @@ export const SITTING_PAUSE_MS = 15 * 60_000;
5
5
  * compact configuration group. Conversational prompts never use this rule. */
6
6
  export const PROMPT_CLUSTER_MS = 5 * 60_000;
7
7
  const MINUTES_TO_MS = 60_000;
8
- /** The viewer's offset, minutes east of UTC. */
9
- function viewerUtcOffsetMinutes() {
10
- return -new Date().getTimezoneOffset();
8
+ /**
9
+ * The viewer's offset AT `timestamp`, minutes east of UTC. A stamp on the other
10
+ * side of a daylight-saving change from today has its own offset, not today's.
11
+ */
12
+ function viewerUtcOffsetMinutes(timestamp) {
13
+ return -new Date(timestamp).getTimezoneOffset();
11
14
  }
12
15
  /**
13
- * The viewer-local day a timestamp falls in, as `YYYY-MM-DD`. The same form
14
- * `lib/model.ts`'s `getCalendarDayKey` buckets the heatmap in — copied rather
15
- * than imported because that module pulls in JSX through the agent marks, and
16
- * this one must stay importable by a plain node test.
16
+ * The viewer-local day a timestamp falls in, as `YYYY-MM-DD`, by the offset the
17
+ * viewer's zone had at that moment. `lib/model.ts`'s `getCalendarDayKey` is a
18
+ * different key on purpose: it uses today's offset for every day, because the
19
+ * daemon buckets the heatmap by the one `offset_minutes` it is sent. A
20
+ * transcript is cut on the client alone, so its days are the stamps' own.
21
+ * Kept here rather than imported, because that module pulls in JSX through the
22
+ * agent marks, and this one must stay importable by a plain node test.
17
23
  */
18
24
  export function calendarDayKey(timestamp) {
19
- const date = new Date(timestamp + viewerUtcOffsetMinutes() * MINUTES_TO_MS);
25
+ const date = new Date(timestamp + viewerUtcOffsetMinutes(timestamp) * MINUTES_TO_MS);
20
26
  const month = String(date.getUTCMonth() + 1).padStart(2, "0");
21
27
  const day = String(date.getUTCDate()).padStart(2, "0");
22
28
  return `${date.getUTCFullYear()}-${month}-${day}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibefield/rosetta-room",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "rosetta's History room as a package: the projects, sessions and worktree columns, the panels and charts, and the transcript, behind injected ports. It dials nothing.",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "@radix-ui/react-context-menu": "^2.3.7",
36
36
  "@radix-ui/react-dialog": "^1.1.23",
37
37
  "@radix-ui/react-tooltip": "^1.2.16",
38
- "@vibefield/rosetta-protocol": "^0.1.3",
38
+ "@vibefield/rosetta-protocol": "^0.1.5",
39
39
  "@tanstack/react-virtual": "^3.14.10",
40
40
  "@vibecook/mille": "^0.3.4",
41
41
  "@vibecook/mille-ui": "^0.3.4"