sessiongraph 1.0.14 → 1.0.16
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/PRIVACY.md +15 -61
- package/README.md +35 -55
- package/bin/sessiongraph.mjs +14 -8
- package/dist/assets/index-C0jATzD9.css +1 -0
- package/dist/assets/{index-D4P4hbvc.js → index-CFlNwG9H.js} +1 -1
- package/dist/assets/index-D24Hz9MJ.js +180 -0
- package/dist/assets/{index-Kotmn42s.js → index-D7udGrT1.js} +1 -1
- package/dist/assets/{index-BLM-0yG6.js → index-U9QGDl1t.js} +1 -1
- package/dist/assets/katagami-sans-DMv8PCo8.woff2 +0 -0
- package/dist/assets/licenses/hugeicons.txt +21 -0
- package/dist/assets/licenses/katagami.txt +93 -0
- package/dist/assets/public-viewer-CyDoUT6s.css +1 -0
- package/dist/assets/public-viewer-iQBchlbq.js +24 -0
- package/dist/assets/scene-DmT4K5Nj.js +248 -0
- package/dist/assets/share-DrezE0sG.js +7 -0
- package/dist/assets/{three-D_1Qt16u.js → three-DDiuFd7k.js} +21 -21
- package/dist/assets/{worker-C10U_apJ.js → worker-B9mWJfQ6.js} +1 -1
- package/dist/index.html +2 -2
- package/dist-server/cli.mjs +50326 -17640
- package/dist-server/install-cli.mjs +204 -0
- package/dist-server/server.mjs +1089 -379
- package/docs/cli.md +293 -190
- package/docs/guide.md +16 -9
- package/docs/import-coverage.md +73 -5
- package/docs/performance.md +164 -0
- package/docs/releases.md +6 -0
- package/package.json +18 -10
- package/dist/assets/external-links-BmBkCsrt.js +0 -1
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/index-B1kyvo41.js +0 -175
- package/dist/assets/index-Du0_nVjH.css +0 -1
- package/dist/assets/publishing-CEvQPkO1.css +0 -1
- package/dist/assets/publishing-D9CqkbeB.js +0 -23
- package/dist/assets/scene-CTHyYtma.js +0 -139
- package/dist/assets/share-Cw1E-ED9.js +0 -7
- package/docs/importer-comparison.md +0 -48
- package/docs/session-artifacts-audit.md +0 -176
package/docs/guide.md
CHANGED
|
@@ -19,6 +19,10 @@ pnpm desktop:build
|
|
|
19
19
|
|
|
20
20
|
Installers appear in `src-tauri/target/release/bundle/`. On macOS, open `macos/SessionGraph.app` or install using the DMG. `pnpm desktop:dev` builds and runs the native shell locally. The Rust toolchain is pinned in `rust-toolchain.toml`.
|
|
21
21
|
|
|
22
|
+
On first launch, desktop releases install the `sessiongraph` and `ssg` commands
|
|
23
|
+
and register their directory in your user PATH. Restart your terminal.
|
|
24
|
+
See the [CLI installation reference](cli.md#install) for paths and shell support.
|
|
25
|
+
|
|
22
26
|
### npm launcher
|
|
23
27
|
|
|
24
28
|
Install and open the public npm launcher with Node 24+:
|
|
@@ -31,6 +35,9 @@ npx sessiongraph --browser
|
|
|
31
35
|
|
|
32
36
|
The default command opens the native desktop app from your matching OS/architecture package. `--browser` instead starts a local authenticated server and opens the explorer in your default browser; keep the terminal open and press Ctrl+C to stop it. Both modes share the same saved SQLite library.
|
|
33
37
|
|
|
38
|
+
`npm install --global sessiongraph` registers both `sessiongraph` and `ssg`
|
|
39
|
+
in npm's global executable directory.
|
|
40
|
+
|
|
34
41
|
### Desktop updates
|
|
35
42
|
|
|
36
43
|
The desktop app checks GitHub Releases in the background. An unobtrusive **Update** pill appears in the lower-left corner when a newer version is available. Clicking it downloads and verifies the signed package; **Restart** installs it and relaunches the app. Failed downloads or installs can be retried. Offline checks stay quiet. Browser mode is updated by installing a newer launcher package.
|
|
@@ -64,11 +71,11 @@ pnpm start
|
|
|
64
71
|
|
|
65
72
|
On first launch, choose the apps to import. Change that selection in **Settings → Sources** or **Manage sources** next to the source filter, then click **Import selected sources** / **Import updates**. The compact options show each app's icon, detection status, and saved count; hover for source details. **Refresh sessions** imports updates from your selected sources.
|
|
66
73
|
|
|
67
|
-
**Auto-import sessions**
|
|
74
|
+
Turn on **Auto-import sessions** in **Settings → Sources** to check all selected sources on startup, when returning to the app, and every minute while the app is visible. It is off unless you enable it; manual refresh still works. Checks pause while hidden or a dialog is open, share a 30-second cooldown with recent imports, and never overlap an active import. Unchanged libraries do not rebuild the graph. Both manual and automatic refresh preserve your camera, zoom, playback, and selection. Existing layout positions stay stable as new history arrives; **Fit view (F)** recalculates the overview when you want to reframe it. Automatic imports do not select new sources for you.
|
|
68
75
|
|
|
69
76
|
The auto-import choice is saved in the local SQLite library, so it survives desktop restarts and is shared by browser and desktop instances using that library. Turning it off stops future automatic checks; an import already running can finish. Manual Refresh remains available. There is no background service after the app closes. OpenCode's local service must still be running to import its new history.
|
|
70
77
|
|
|
71
|
-
Time presets and custom date ranges, source/project/directory filters, the archived and child-session toggles,
|
|
78
|
+
Time presets and custom date ranges, source/project/directory filters, the archived and child-session toggles, and Settings preferences are also saved in the library. They are restored before the first graph is shown, including when the desktop app starts on a different local port. Existing browser appearance preferences migrate to the library on first use.
|
|
72
79
|
|
|
73
80
|
Onboarding closes automatically after a successful import and library refresh. Import failures remain visible with retry controls.
|
|
74
81
|
|
|
@@ -86,7 +93,7 @@ Onboarding closes automatically after a successful import and library refresh. I
|
|
|
86
93
|
| OpenCode | Official authenticated local service discovery and V2 GET API | Explicit forks and child IDs; authoritative snapshot paths where available. OpenCode must be running for an import, but not to browse saved data. Remote endpoints are rejected. |
|
|
87
94
|
| Claude Code | SDK conversation-chain parsing with read-only local transcript discovery; legacy `~/.claude/transcripts/` envelopes | CLI and VS Code extension sessions, including IDE-prefixed prompts omitted by the SDK listing. Project transcripts take precedence over overlapping legacy exports. Preserves recorded message times and explicit subagent metadata. SDK-visible history can omit pre-compaction text. No inferred fork ancestry. File evidence requires a successful matching edit-tool result. |
|
|
88
95
|
| Codex | Bounded streaming reads of active/archived JSONL, zstd/gzip archives, and suffixed rollout copies | Native session IDs deduplicate copies; active uncompressed rollouts take precedence. Explicit recorded fork/parent fields; completed file-change events. Mirrored event text is not imported twice. Store-only/cloud-only history and ordinary ChatGPT desktop/web chats are not imported. |
|
|
89
|
-
| T3 Code | Private read-only snapshot of the local server's `~/.t3/userdata/statev2.sqlite`; legacy `state.sqlite` fallback | T3 app threads retain their own titles, messages, ordered activity, recorded forks/children, and worktree paths. Strong recorded provider-thread IDs group uniquely linked Codex, Claude Code, and OpenCode histories under one T3 map entry once user messages are imported, including partial histories. The inspector opens each linked provider's saved messages separately. Empty, pending, or ambiguous bindings retain separate entries. Legacy V1 provides partial text history. Attachments and checkpoint file snapshots are omitted. |
|
|
96
|
+
| T3 Code | Private read-only snapshot of the local server's `~/.t3/userdata/statev2.sqlite`; legacy `state.sqlite` fallback | T3 app threads retain their own titles, messages, ordered activity, recorded forks/children, and worktree paths. Strong recorded provider-thread IDs group uniquely linked Codex, Claude Code, and OpenCode histories under one T3 map entry once user messages are imported, including partial histories. The inspector opens each linked provider's saved messages separately and shows explicit PR links recorded by T3, not PR mentions in conversation. Empty, pending, or ambiguous bindings retain separate entries. Legacy V1 provides partial text history. Attachments and checkpoint file snapshots are omitted. |
|
|
90
97
|
| Cursor | IDE JSONL transcripts, CLI/ACP stores, and legacy Composer `state.vscdb` databases in application `User/globalStorage` and `User/workspaceStorage` | Inline conversations, conversation maps, and separate bubble records preserve native creation dates. Modern representations take precedence while retaining Composer's original start date. Missing bubble times stay unknown. Older `.txt` transcripts, cloud-only and SDK-only history are excluded. |
|
|
91
98
|
| Gemini CLI | `~/.gemini/tmp/*/chats/` JSON/JSONL; sandbox cache equivalent | Reconstructs append-only patches and rewinds. Explicit subagent directories form parent links. Workspace identity comes from `.project_root`; unknown directories stay unknown. |
|
|
92
99
|
| Qwen Code | `~/.qwen/projects/*/chats/*.jsonl` | Recorded forks and parent sessions remain distinct. Tool results retain call IDs and recorded execution status. Daemon-only histories are excluded. |
|
|
@@ -142,7 +149,7 @@ See the [harness data matrix](import-coverage.md#imported-data-by-harness) for v
|
|
|
142
149
|
|
|
143
150
|
## Local storage and privacy
|
|
144
151
|
|
|
145
|
-
**Your session content stays on this computer during import, search, and exploration.** No account
|
|
152
|
+
**Your session content stays on this computer during import, search, and exploration.** No account is needed for local use. See [Privacy and local data](../PRIVACY.md) for what stays local and what optional publishing shares.
|
|
146
153
|
|
|
147
154
|
SessionGraph's own SQLite database stores source selection, the auto-import preference, session metadata, normalized messages and timeline events, evidence-linked commit history, file evidence, import revisions, and bounded search checkpoints. New installations use:
|
|
148
155
|
|
|
@@ -151,7 +158,7 @@ SessionGraph's own SQLite database stores source selection, the auto-import pref
|
|
|
151
158
|
- Windows: `%LOCALAPPDATA%/SessionGraph/sessiongraph.sqlite`
|
|
152
159
|
- Override with `SESSIONGRAPH_DATA_DIR`.
|
|
153
160
|
|
|
154
|
-
Existing installations reuse
|
|
161
|
+
Existing installations reuse libraries from earlier app versions in place, including saved sessions, source selection, search checkpoints, WAL files, and import locks. A current `sessiongraph.sqlite` library takes precedence if one already exists. Explicit data-directory overrides search only that directory. Previous environment settings remain supported as aliases; `SESSIONGRAPH_*` settings take precedence. Browser preferences and the last launch target also accept their previous storage keys when using the same origin.
|
|
155
162
|
|
|
156
163
|
All parsing, deduplication, indexing, and visualization run on this computer. No telemetry, embeddings service, model inference, uploads, or remote fonts are used. Source histories are read-only. OpenCode uses its authenticated API; Cursor databases are parsed only from temporary private copies. The native app binds its backend to `127.0.0.1` on a random port with an ephemeral authentication cookie; imports from other origins are rejected. Source credentials stay in the backend.
|
|
157
164
|
|
|
@@ -166,11 +173,11 @@ Desktop update checks and downloads contact GitHub without session content; npm
|
|
|
166
173
|
- Selecting a session dims surrounding nodes, halos, and trails. Click or tap empty map space to clear selection and restore the full map brightness without moving the camera. Drags and right-clicks keep the selection; **Settings → Graphics → Focus dimming** controls the dimming effect.
|
|
167
174
|
- Time runs left to right. Each session orb appears at creation and travels with the playback frontier, leaving a tapered shooting-star trail and a subtle spiral particle wake. The trail ends at the latest saved message timestamp; the sphere sits just beyond it so message dots stay visible. Missing message timestamps leave the endpoint at creation; metadata update times are not substituted. Full directory paths share one colored stream across harnesses; unknown directories fall back to harness-scoped project IDs. Distinct directories and worktrees stay separate. Curved fork and child links retain recorded ancestry and attachment times. Date filters use session creation; the list and histogram follow session endpoints.
|
|
168
175
|
- Click a session for a close-up of its orb; click a message dot for a tighter close-up of that message. Focus preserves your current viewing side and angle; zoom and pinch remain unrestricted. All saved timed conversation markers load on selection, including the final message. File history scans automatically in cancellable batches. Bright white message dots follow the same subtle spiral as the comet trail, retaining their recorded X/time positions; small icons distinguish user and assistant messages. Icons are collision-culled and bounded to 64; all plotted dots remain interactive. Untimed and out-of-lifetime messages remain available in the message explorer, which loads message bodies on demand.
|
|
169
|
-
- Hover a marker to preview its message. Click to focus that marker and open message details below the session card, keeping the map interactive. **Previous / Next** and **← / → / ↑ / ↓** step through user and assistant messages and focus their recorded positions. Untimed messages remain readable without inventing a map location. Escape closes message details first; arrow keys on session cards or the map navigate sessions when message details are closed. Form controls
|
|
176
|
+
- Hover a marker to preview its message. Click to focus that marker and open message details below the session card, keeping the map interactive. **Previous / Next** and **← / → / ↑ / ↓** step through user and assistant messages and focus their recorded positions. Untimed messages remain readable without inventing a map location. Escape closes message details first; arrow keys on session cards or the map navigate sessions when message details are closed. Form controls retain their own arrow-key behavior.
|
|
170
177
|
- **Browse messages** opens 60-message pages of the conversation. Details include message text, recorded time, and source provenance. Tool calls, reasoning, and other detailed events are excluded from the dots and message browser. Underlying imported history and file evidence remain saved. Source order is preserved even without timestamps. Nearby markers can overlap; step through them with the navigation controls.
|
|
171
|
-
-
|
|
178
|
+
- When upgrading an older library, events reconstructed from saved messages are marked partial. **Refresh sessions** can add structured events from the original sources. The explorer asks you to reload if an import changes the history you’re viewing.
|
|
172
179
|
- Click a session for changed-file satellites and source evidence. File details load in 120-message batches; the map displays at most 80 files. Evidence describes historical edits, not today's Git diff.
|
|
173
|
-
- **Play** follows
|
|
180
|
+
- **Play** follows new sessions as they appear and ends with an overview. Dragging, zooming, scrubbing, fitting, or opening a dialog pauses playback. Reduced motion keeps the camera still.
|
|
174
181
|
- Playback hides the other panels and controls, leaving a borderless timeline, a compact approximate date, large **Sessions** and **Burnt tokens** counters, and a prominent **Share SessionGraph** button. The date shows month and year for histories spanning at least 90 days, and includes the day for shorter ranges; shared animations use the same date. Session counts include every filtered session as its orb appears, regardless of token coverage. Pausing or pressing **Esc** restores the panels immediately. Recorded token totals from OpenCode and Continue accumulate when each session reaches its latest saved message; cache is included where reported. Token counts skip missing/unsupported usage and include totals without message timestamps only at the end. Missing usage displays **—**; no usage is estimated between messages.
|
|
175
182
|
- **Share SessionGraph** has two options: **Publish** for an explicitly confirmed public snapshot, and **Video** for a private MP4 rendered locally. GitHub sign-in opens your browser; confirm the matching code to connect the app. If opening fails, copy the browser link from the dialog. Signing in does not upload your history.
|
|
176
183
|
- **Video** renders at 960×600 and 30 fps: 15 seconds of playback, a 5-second overview orbit, and a 1-second ending hold (630 frames). MP4 uses H.264 with fixed frame timestamps and requires WebCodecs encoding support. Each directory stream gets a unique random two-word alias such as **Project Cosmic Wombat**. A separate export model excludes original names, paths, session titles, native IDs, messages, and file details. Previews and saved videos contain the map, aliases, timeline, date, session count, and known burnt-token totals. Closing the dialog or switching to Publish cancels unfinished rendering and releases its resources.
|
|
@@ -183,7 +190,7 @@ Desktop update checks and downloads contact GitHub without session content; npm
|
|
|
183
190
|
|
|
184
191
|
Open **Settings** using the gear button. Changes apply live and persist on this device:
|
|
185
192
|
|
|
186
|
-
- **Interface:**
|
|
193
|
+
- **Interface:** system/on/off motion, list density, archived-session visibility, and panel transparency.
|
|
187
194
|
- **Sound:** procedural interaction tones, volume, chime preview, and mute. Only control interactions produce sound; there is no ambient audio. The speaker button mutes feedback quickly; no audio is downloaded.
|
|
188
195
|
- **Graphics:** performance/balanced/high rendering, glow, node size, stars, labels, and focus dimming. Balanced and high retain antialiasing and bloom with bounded high-DPI buffers; the soft bloom pyramid uses a lower resolution to reduce GPU work.
|
|
189
196
|
- **Trails & playback:** all/selected/hidden lifetime trails, brightness, decorative flow and speed, relationship links, message dots, and 0.25×–3× playback. Flow respects reduced motion and never changes message timestamps or saved trail endpoints.
|
package/docs/import-coverage.md
CHANGED
|
@@ -75,7 +75,7 @@ Session identity, title, source, recorded creation/update dates, and available m
|
|
|
75
75
|
|
|
76
76
|
| Harness | Native evidence available | Current treatment |
|
|
77
77
|
| --- | --- | --- |
|
|
78
|
-
| OpenCode V2 | ✅ shell input/result, optional exit/truncation metadata and explicit workdir; ✅ location-switch events | Preserve execution metadata and index conservative confirmed Git operations. Directory moves
|
|
78
|
+
| OpenCode V2 | ✅ shell input/result, optional exit/truncation metadata and explicit workdir; ✅ location-switch events | Preserve execution metadata and index conservative confirmed Git operations. Directory moves are retained as events and normalized location details. |
|
|
79
79
|
| Claude Code | ✅ Bash calls/results and envelope cwd; ⚠️ SDK declares `gitOperation.commit`; ⚠️ recorded `gitBranch` | Correlate calls/results across the full import. Enrich the SDK-visible UUID chain from raw envelopes; accept validated native commit results when present. Native Git persistence is contract/fixture-tested, not confirmed by the small audited live sample. Branch observations are not indexed. |
|
|
80
80
|
| Codex | ✅ tool calls/results; ⚠️ turn cwd; ⚠️ header `git.commit_hash`, branch and repository URL | Preserve execution cwd and parse recognized result envelopes. Starting HEAD is never creation evidence; header Git observations are not indexed. |
|
|
81
81
|
| T3 Code | ✅ V2 command input/output/status; ⚠️ exit code/native call ID/per-call cwd; ✅ thread branch/worktree and separate checkpoint records | Preserve execution metadata. Commands need explicit execution context or absolute `cd` / `git -C`; the thread's latest directory is not substituted. Branch/checkpoint data remains outside this lean index. |
|
|
@@ -86,6 +86,72 @@ The index stores only **created**, **amended**, and **cherry-picked** actions wi
|
|
|
86
86
|
|
|
87
87
|
`session.commits` reports `pending`, `indexed`, `partial`, or `unavailable`, extraction version, recorded count (nullable), and explanatory coverage. `indexed` means the supported extraction completed on the available records—not a complete audit of all real-world commits. Upgraded libraries start pending and refresh even when source revisions are unchanged. Failed refreshes retain the previous index. T3 and linked provider histories keep separate attribution; they are not summed or silently merged. See [commit history](guide.md#recorded-commit-history) for the UI/API and [CLI reference](cli.md).
|
|
88
88
|
|
|
89
|
+
## Recorded usage and metadata audit
|
|
90
|
+
|
|
91
|
+
Audit date: **2026-11-27**. This is a code/schema and synthetic-fixture audit, not a claim that every installed harness version has been tested against live history. References are the pinned [Tokscale format parsers](https://github.com/junhoyeo/tokscale/tree/8d9b509c4d719f3385e3c2464b770dc5257cb354/crates/tokscale-core/src/sessions), the [OpenCode V2 API](https://opencode.ai/docs/api), and its [OpenAPI schema](https://opencode.ai/docs/openapi.json).
|
|
92
|
+
|
|
93
|
+
### Usage now retained
|
|
94
|
+
|
|
95
|
+
Recorded totals are available to playback and node sizing for **every source**, not an OpenCode/Continue allowlist. Availability still depends on the actual input:
|
|
96
|
+
|
|
97
|
+
| Input family | Decoded usage | Important limits |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| OpenCode V2 | Session and assistant input/output/cache/reasoning and native cost | Uses the authenticated read API only. Reasoning is not added twice. |
|
|
100
|
+
| Claude Code | Raw assistant-envelope usage, including retained records outside the SDK-visible chain | Native response IDs deduplicate repeated envelopes. Separately attributed subagents are excluded from the parent. No USD cost is calculated from pricing tables. |
|
|
101
|
+
| Codex | Latest recorded cumulative `total_token_usage`, plus response usage when present | Cumulative snapshots are not summed. Usage-only clocks do not extend conversation activity. Earlier totals are marked partial if the latest parsed snapshot has only a breakdown. |
|
|
102
|
+
| Gemini / Qwen | Recorded native totals, cached input, thoughts/reasoning and tool-token counters | Late Gemini patches are retained. Qwen zero-total placeholders remain unknown; provider-dependent overlaps are not guessed. |
|
|
103
|
+
| Pi and Pi-compatible sources | Assistant input/output/cache and native totals; saved cost with estimate provenance | Includes Prime, Oh My Pi, Senpi, Kimchi, Gajae, OpenClaw exports and Pi-format Proma. |
|
|
104
|
+
| Claude-envelope clients | Recognized structured assistant usage | Droid, Cherry Studio agent mode, Command Code, ZCode legacy, CodeBuddy, WorkBuddy, Aside and legacy Proma; this does not add unsupported databases or log variants. |
|
|
105
|
+
| Cline extension / CLI-SDK | UI request billing rows or SDK message metrics | UI rows remain session aggregates, not extra turns. SDK gross input already includes caches. |
|
|
106
|
+
| Roo / Kilo extensions | UI request breakdowns and cost; explicit totals or unambiguous zero-cache totals | Historical nonzero-cache overlap is ambiguous. Such breakdowns are retained without inventing a total. |
|
|
107
|
+
| Continue | Session prompt/completion breakdown and recorded cost; recognized message usage | Session totals take precedence over message sums. |
|
|
108
|
+
| Copilot Chat | Saved request prompt/output counts and resolved model | Separate Copilot CLI billing/telemetry reconciliation is not implemented. |
|
|
109
|
+
| Amp / Jcode | Structured per-message usage | Amp credits are not USD; the usage ledger is not merged. Jcode journals replace repeated native message IDs with their corrected records. |
|
|
110
|
+
| Hermes | Per-model aggregates, falling back to session counters; native or estimated cost | Per-model and session totals are never added together. Available session cost can fill absent per-model cost. Per-model identity breakdowns are not exposed separately. |
|
|
111
|
+
| Goose / Vibe | Accumulated lifetime counters or saved session statistics | Goose current-context counters are a partial fallback, not extra lifetime usage. |
|
|
112
|
+
| Zed | Cumulative thread usage, with request-usage fallback | Remains session-level; message clocks are not manufactured. |
|
|
113
|
+
| Unsloth | Message `contextUsage` and response-specific model/provider | Content-free API usage and training metrics are excluded. |
|
|
114
|
+
| Kilo CLI / MiMo Code / MiMo desktop | Structured native message tokens and cost | Separate extension Kilo data is not combined. Part-only usage variants are not reconstructed. |
|
|
115
|
+
| Mux / Fx | Session usage sidecar or snapshot | Sidecar-only changes trigger refresh. Fx still has no conversation messages. |
|
|
116
|
+
| Cursor / T3 and other generic message readers | Recognized structured usage on imported message bodies, when present | Not a guarantee of native usage support. Cursor Composer's text projection and T3 provider bindings do not supply missing counters. Linked provider totals are not copied into T3. |
|
|
117
|
+
|
|
118
|
+
`Session.usage` retains a breakdown, source (`session`, `messages`, or `unavailable`), partial flag, and reported/missing-message counts. Session aggregates have no message attribution; their message counts are zero. API-facing saved messages retain their own usage and bounded metadata.
|
|
119
|
+
|
|
120
|
+
- Missing or invalid counters stay `null`; real zero stays zero. Totals must be nonnegative safe integers; overflow remains unknown.
|
|
121
|
+
- Cache and reasoning buckets may overlap input/output. Consumers must use `total`, not blindly add all fields. Native totals take precedence.
|
|
122
|
+
- Message-based totals with missing reports or partial history are labeled partial. A native session total can be available even when conversation history is incomplete. A complete total does not imply a complete breakdown or complete cost coverage.
|
|
123
|
+
- Usage deduplicates only within one session using recorded API/message identities, never equal text. Forked, child, and linked-provider histories retain separate attribution; this is not an account-level billing ledger.
|
|
124
|
+
- Costs are imported, not recomputed. Known harness estimates are labeled; “recorded cost” is not a verified invoice amount. Incomplete cost sums remain unknown unless a session cost is available.
|
|
125
|
+
- The importer metadata version forces a one-time re-read of unchanged selected sources on their next refresh. Usage, messages, events, coverage and search invalidation commit together. A failed refresh retains the previous saved snapshot.
|
|
126
|
+
|
|
127
|
+
### Other dropped data recovered in this change
|
|
128
|
+
|
|
129
|
+
- Bounded per-message model/provider/agent, stop/native-finish reason, recorded cwd, and explicit or recorded-clock duration/first-token timing where the adapter supplies them. Session-latest cwd/model is not backfilled into earlier messages.
|
|
130
|
+
- Gemini late token/model/thought/timestamp patches and tool-result status updates.
|
|
131
|
+
- OpenCode recorded directory changes in session details, in addition to their timeline events.
|
|
132
|
+
- OpenClaw SQLite non-message events, including retained compaction summaries and native event-parent links. Those links do not establish session ancestry.
|
|
133
|
+
|
|
134
|
+
These new private metadata fields are not added to anonymous graph or video payloads. They are deliberately allowlisted; importing a whole raw metadata envelope could copy credentials or large binary payloads.
|
|
135
|
+
|
|
136
|
+
### Remaining completeness gaps
|
|
137
|
+
|
|
138
|
+
The following are importer limitations or unresolved schema questions, **not** proof the harness lacks the data. They are not closed by adding usage:
|
|
139
|
+
|
|
140
|
+
| Priority / area | What is still missing | Safe follow-up |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| High: conversation trees | Claude conversation text still follows the SDK-visible chain; alternate retained chains are not exposed. Compacted/deleted context cannot always be recovered. Pi retains its tree as events, not a branch-switching UI. | Preserve native message-parent edges and explicitly represent alternate chains; do not flatten them into invented sequential turns. |
|
|
143
|
+
| High: native tool variants | Cursor Composer imports text/thoughts, not full tool executions. ACP, Junie, Augment, Kiro and several IR/block variants retain only partial event content. | Add versioned fixtures for native calls, results, errors and cancellation; correlate by call IDs, not proximity. |
|
|
144
|
+
| High: attachments | Images, audio, documents, attachment references, MIME/size metadata and embedded resources lack a shared attachment model. Unsupported blocks may have only a placeholder. | Import bounded descriptors first; keep payloads lazy and local. Do not follow remote URLs, fetch linked files, or include them in sharing by default. |
|
|
145
|
+
| High: file evidence | Most extra harnesses have no confirmed-change extraction. Even supported sources usually keep paths/step counts, not full diffs, rename/delete semantics, line statistics, or before/after content. | Decode authoritative snapshots or successful native results, preserving origin and partial coverage. Never turn reads or proposed edits into changes. |
|
|
146
|
+
| High: usage side channels | Amp ledger-only calls; Kimi wire usage; Copilot CLI telemetry/billing; Antigravity usage cache counters; billing-only DeepSeek/OpenCodeReview records and other captured ledgers remain unnormalized. | Establish native request/session keys and overlap rules first. Keep credits, context-size estimates, and USD separate; do not synthesize messages or apportion totals over turns. |
|
|
147
|
+
| Medium: execution context | Permissions, sandbox/approval mode, context windows, model settings, per-turn environment, tool timing and retries are not normalized consistently. | Add explicit bounded fields with recorded provenance. Do not import credentials, environment dumps, or assume the final cwd applies throughout. |
|
|
148
|
+
| Medium: outcomes and workflow | Native interruption/error/completion events often survive only as timeline events. Session outcome, plans/todos, approvals and checkpoints lack a common model across adapters. | Normalize only explicit native state and keep checkpoint state distinct from user-created Git commits. |
|
|
149
|
+
| Medium: Git observations | Branch/repository/start-HEAD observations and richer Git metadata remain outside the conservative commit index. Most harnesses have no validated commit extractor. | Retain observations separately from commit-creation evidence; extend confirmed execution fixtures. |
|
|
150
|
+
| Medium: alternate stores | Kimi Work desktop; WorkBuddy SQLite; CodeBuddy extension logs; ZCode v2 usage DB; legacy Kiro IDE snapshots; Proma index/journal reconciliation; opaque Antigravity protobuf conversation bodies remain unsupported. | Add read-only, bounded native adapters with explicit representation precedence, rather than silently mixing stale exports. |
|
|
151
|
+
| Ongoing: schema drift and bounds | Historical producer versions, unknown blocks, missing timestamps, encrypted reasoning and records above import limits can remain incomplete. | Keep omissions visible, add real redacted regression fixtures, and bump the import metadata version whenever normalized extraction changes. |
|
|
152
|
+
|
|
153
|
+
Coverage is tested in `tests/usage.test.ts` alongside the per-adapter, import-retention, timeline, and privacy suites. No live user library is refreshed by those fixtures.
|
|
154
|
+
|
|
89
155
|
## Local conversation formats
|
|
90
156
|
|
|
91
157
|
Paths below use `~` for the user's home. XDG data/config locations respect their environment overrides. Application-data paths use Application Support on macOS, APPDATA on Windows, and XDG config on Linux unless noted.
|
|
@@ -97,7 +163,7 @@ Paths below use `~` for the user's home. XDG data/config locations respect their
|
|
|
97
163
|
| `senpi` / Senpi / OmO Native | `~/.senpi/agent/sessions/`, `~/.omo/agent/sessions/` | Pi-format entries. Project-local task children need an explicit history directory override. |
|
|
98
164
|
| `kimchi` / Kimchi | `~/.config/kimchi/harness/sessions/` | Pi-format entries. |
|
|
99
165
|
| `gajae` / Gajae-Code | `~/.gjc/agent/sessions/`, XDG `gjc/sessions/` | Pi-format entries. |
|
|
100
|
-
| `openclaw` / OpenClaw | `~/.openclaw/agents/*/{sessions/,agent/openclaw-agent.sqlite}`; `.clawdbot`, `.moltbot`, `.moldbot` equivalents | SQLite transcript events take precedence over overlapping JSONL/zstd exports. Rollover and event-parent links do not imply ancestry.
|
|
166
|
+
| `openclaw` / OpenClaw | `~/.openclaw/agents/*/{sessions/,agent/openclaw-agent.sqlite}`; `.clawdbot`, `.moltbot`, `.moldbot` equivalents | SQLite transcript events take precedence over overlapping JSONL/zstd exports. Non-message events and summaries are retained. Rollover and event-parent links do not imply ancestry. |
|
|
101
167
|
| `hermes` / Hermes Agent | `~/.hermes/state.db`, `profiles/*/state.db` | Native messages and retained summaries. Structured content uses Hermes's explicit NUL + `json:` marker; ordinary JSON-looking text stays text. Only `source=subagent` establishes a child link; `_branched_from` establishes a fork. Compression/reset parents are not ancestry. |
|
|
102
168
|
| `amp` / Amp | XDG `amp/threads/`, Tokscale `amp-cache/threads/` | Local/exported thread messages. No sync is invoked. Usage-ledger times are not assigned to prompts. |
|
|
103
169
|
| `droid` / Factory Droid | `~/.factory/sessions/` | Saved conversation envelopes; excludes usage apportionment. |
|
|
@@ -124,7 +190,7 @@ Paths below use `~` for the user's home. XDG data/config locations respect their
|
|
|
124
190
|
| `mimo-code`, `mimo-desktop` / MiMo Code, Xiaomi MiMo AI | XDG `mimocode/mimocode.db` | Native session/message/part tables. `session.version` starting `desktop-` selects desktop; shared records count once. |
|
|
125
191
|
| `unsloth` / Unsloth Studio | `~/.unsloth/studio/studio.db` | Chat threads and content, including explicit thread forks. Content-free API usage and training metrics are excluded. |
|
|
126
192
|
| `kiro` / Kiro | `~/.kiro/sessions/`; application/XDG `kiro-cli/data.sqlite3` | CLI header/JSONL, IDE `sess_*/session.json` plus messages, and `conversations_v2` tagged turns. Legacy IDE execution/chat snapshots are not yet decoded. |
|
|
127
|
-
| `mux` / Mux | `~/.mux/sessions/*/{chat-archive.jsonl,chat.jsonl}` | Durable archive followed by active chat, deduplicated by message ID. In-flight partials and workspace ancestry are unavailable. |
|
|
193
|
+
| `mux` / Mux | `~/.mux/sessions/*/{chat-archive.jsonl,chat.jsonl,session-usage.json}` | Durable archive followed by active chat, deduplicated by message ID, plus session usage. In-flight partials and workspace ancestry are unavailable. |
|
|
128
194
|
| `minimax-code` / MiniMax Code | Tokscale `headless/mcode/*.jsonl` | Previously captured messages with one explicit session identity. Capture-only usage without message content is not imported. No harness command is executed. |
|
|
129
195
|
|
|
130
196
|
## Partial event and metadata formats
|
|
@@ -149,8 +215,10 @@ Every additional source accepts `SESSIONGRAPH_<SOURCE_ID_UPPERCASE_WITH_UNDERSCO
|
|
|
149
215
|
|
|
150
216
|
Defaults also honor the implemented native home variables: `HERMES_HOME`, `OPENCLAW_STATE_DIR`, `FACTORY_HOME`, `KIMI_HOME`, `KIMI_CODE_HOME`, `GROK_HOME`, `JCODE_HOME`, `DSH_HOME`, `VIBE_HOME`, `MUX_ROOT`, `UNSLOTH_STUDIO_HOME`, `GOOSE_PATH_ROOT`, `CRUSH_GLOBAL_DATA`, `CODEBUFF_DATA_DIR`, `FREEBUFF_DATA_DIR`, Pi-family home/session overrides, `GEMINI_CLI_HOME`, `TOKSCALE_CONFIG_DIR`, and `TOKSCALE_HEADLESS_DIR`. Nothing reads or executes source configuration or credentials.
|
|
151
217
|
|
|
152
|
-
File imports are bounded to 32 MB combined expanded data and 50,000 messages. SQLite
|
|
218
|
+
File imports are bounded to 32 MB combined expanded data and 50,000 messages. Generic SQLite readers query private DB/WAL copies (8 GB maximum per database or WAL), with 32 MB fields and 64 MB aggregate query output. Nested queries and expanded blobs share a 64 MB / 50,000-record session budget. Oversized or unsupported sessions retain previously saved history. Database revisions include WAL changes; source changes during copying abort the snapshot. At most two private copies are retained and cleaned on eviction/exit. Failed authoritative database representations block fallback to stale exports.
|
|
219
|
+
|
|
220
|
+
T3 Code has no fixed database/WAL size or thread-count limit. It prefers copy-on-write clones; where unavailable, a full temporary copy requires enough free space and runs asynchronously. History pages stay on the verified discovery snapshot while the live server continues writing. The T3 adapter still caps individual item payloads at 256,000 characters and PR links at 100 per thread, and does not copy attachments or checkpoint file snapshots. The shared importer allows up to 75,000 records, 24 million text characters, or 3,000 pages per session, subject to lower limits in some adapters. The saved timeline is bounded to 300,000 events or 48 MB. These are retention limits, not date filters or UI pagination. Sessions marked as capped by the previous shared limits are retried on source refresh.
|
|
153
221
|
|
|
154
222
|
Missing message timestamps remain unknown. Native dates place database sessions; undated database histories are skipped with a warning. File histories can fall back to file dates and disclose this. Unsupported message blocks, binary attachments, missing tools, and absent snapshots remain partial. Token counts are never estimated from text; usage aggregates are not converted into conversations. No new harness is enabled automatically, and continuing a session remains an explicit user action through supported launch destinations.
|
|
155
223
|
|
|
156
|
-
Fixture tests cover
|
|
224
|
+
Fixture tests cover duplicate representations, compressed archives, SQLite snapshot consistency, partial events, and saved-history retention.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Rendering and sharing performance
|
|
2
|
+
|
|
3
|
+
## Recorded comparison
|
|
4
|
+
|
|
5
|
+
Baseline: `0f1de0115d203dec40dc9e4643989407047ea804`. Measured November 27, 2026 on an Apple M3 Pro, Node 24.22.1, Chromium 159.0.8154.6 with ANGLE Metal. Both versions use the same synthetic inputs and balanced rendering settings.
|
|
6
|
+
|
|
7
|
+
The browser benchmark uses 2,400 sessions, a 1440 × 1000 viewport at 1× device scale, reduced motion, and five fresh browser processes. The publishing benchmark uses an in-memory SQLite library with 1,200 sessions and 300,000 events, each with a 2,186-byte invented payload; seven timed runs follow one warmup.
|
|
8
|
+
|
|
9
|
+
| Operation | Baseline median | Optimized median | Improvement |
|
|
10
|
+
| --- | ---: | ---: | ---: |
|
|
11
|
+
| First session cards inserted | 361 ms | 184 ms | 49% less time |
|
|
12
|
+
| Reach the oldest session | 3,001 ms | 24 ms | 99% less time |
|
|
13
|
+
| Mounted cards at the oldest session | 2,400 | 8 | Bounded visible window |
|
|
14
|
+
| Search scroll main-thread work | 197 ms | 42 ms | 79% less work |
|
|
15
|
+
| Search scroll layout work | 30.8 ms | 0.41 ms | 99% less work |
|
|
16
|
+
| Search rows inserted during small scrolls | 780 | 0 | Existing rows reused |
|
|
17
|
+
| Fit view handler | 31.9 ms | 2.0 ms | 94% less time |
|
|
18
|
+
| Rebuild picking index (CPU) | 1.0 ms | 0.5 ms | 50% less time |
|
|
19
|
+
| Node-buffer rebuilds for 23 uniform-only redraws | 23 | 0 | No unnecessary uploads |
|
|
20
|
+
| Prepare publishing snapshot in SQLite | 366 ms | 72 ms | 80% less time (5.1× faster) |
|
|
21
|
+
| Open publishing viewer, mocked API | 315 ms | 252 ms | 20% less time |
|
|
22
|
+
| Change publishing details, mocked API | 231 ms | 110 ms | 53% less time |
|
|
23
|
+
|
|
24
|
+
The recorded summaries and tail timings are in `benchmarks/performance.json`. Raw run outputs go to ignored `tmp/performance/`.
|
|
25
|
+
|
|
26
|
+
### Interpretation
|
|
27
|
+
|
|
28
|
+
- Oldest-session access measures the same destination: the old UI expands every “Show more” page, while the virtual list jumps directly to the last row. The benchmark verifies the destination ID.
|
|
29
|
+
- Search scrolls 2 pixels per frame for 60 frames. It measures CDP `TaskDuration` / `LayoutDuration` deltas and observes DOM insertions. It pauses conversation indexing first.
|
|
30
|
+
- Scene microbenchmarks isolate CPU preparation with GPU submission disabled after the real app has rendered. These numbers are **not GPU frame times or FPS claims**. Node animation itself remains approximately 0.6 ms in both versions.
|
|
31
|
+
- First-card insertion is navigation-to-DOM readiness, not a paint measurement. Cold shader/driver initialization creates substantial startup variance; the baseline p95 was 3,984 ms. Rendering now starts after the session list has a chance to paint.
|
|
32
|
+
- Browser preview measurements use an invented public API response. Database preparation is measured separately against real SQLite queries. They have different library sizes and should not be added together.
|
|
33
|
+
- SQLite schema v7 builds the message-time index once. Index construction and fixture creation are outside the per-preview measurements.
|
|
34
|
+
- These are local synthetic measurements, not production latency guarantees. Compare repeated runs on the same machine, without other builds or tests running.
|
|
35
|
+
|
|
36
|
+
## Navigation: orbit, pan, and zoom
|
|
37
|
+
|
|
38
|
+
The navigation benchmark submits real rendering work, using the same 2,400-session fixture, 1440 × 1000 viewport, balanced quality, and ANGLE Metal GPU. Three fresh browser runs each measure 120 frames per gesture after 30 warmup frames. GPU elapsed queries are collected asynchronously with `EXT_disjoint_timer_query_webgl2`; disjoint results are rejected. Summaries pool the measured frames across runs.
|
|
39
|
+
|
|
40
|
+
| Gesture | Before GPU median / p95 | After GPU median / p95 | Median reduction |
|
|
41
|
+
| --- | ---: | ---: | ---: |
|
|
42
|
+
| Orbit | 25.75 / 33.05 ms | 5.17 / 8.48 ms | 80% |
|
|
43
|
+
| Pan | 25.14 / 32.37 ms | 5.80 / 8.39 ms | 77% |
|
|
44
|
+
| Zoom | 25.10 / 32.24 ms | 5.75 / 8.54 ms | 77% |
|
|
45
|
+
|
|
46
|
+
Main-thread submission medians fell from 1.4–1.5 ms to 0.8–0.9 ms. Animation-frame interval p95 fell from about 33.4 ms to 16.7–16.8 ms. GPU elapsed time and headless animation-frame cadence are separate measurements; neither is a physical-display FPS guarantee.
|
|
47
|
+
|
|
48
|
+
The expensive work was fullscreen postprocessing, especially bloom. The new pipeline resolves geometry MSAA once into single-sample effect buffers and removes unnecessary canvas antialiasing and effect depth buffers. **Balanced mode temporarily defers bloom and SMAA while the camera moves**, retaining geometry MSAA, supersampling, and node halos. It restores those passes 150 ms after the last camera movement, including a final redraw when ambient motion is off. High quality, timeline playback, and manual video capture retain their configured effects.
|
|
49
|
+
|
|
50
|
+
Wheel zoom also exposed a correctness bug: OrbitControls changed the camera inside its event handler, but the subsequent `update()` returned false and the scene skipped drawing. The scene now tracks the controls' `change` event, refreshing the frame, camera-facing geometry, and picking together.
|
|
51
|
+
|
|
52
|
+
- The baseline is the original Git revision's `scene.ts` with the current surrounding app. Baseline zoom frames are explicitly invalidated so the timing comparison measures rendered zoom in both versions; a separate unforced probe records the original zero-draw bug. Optimized zoom uses normal invalidation.
|
|
53
|
+
- Every measured navigation frame must submit geometry. The benchmark cancels the app's automatic render loop and advances controls/rendering once per animation frame.
|
|
54
|
+
- `test:navigation` checks wheel redraws with damping on/off, idle refinement, quality changes, disabled bloom, and manual capture. Settled pixel comparisons against the original pipeline have mean RGB channel error below 0.001 on a 0–255 scale across all three quality settings.
|
|
55
|
+
- The renderer is now 3D-only following integration with `main`; the benchmark exercises orbit, pan, and zoom.
|
|
56
|
+
|
|
57
|
+
## Repeat the measurements
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
pnpm install --frozen-lockfile
|
|
61
|
+
pnpm exec playwright install chromium
|
|
62
|
+
|
|
63
|
+
# Original frontend source is loaded from Git during the benchmark build.
|
|
64
|
+
# The current checkout and saved session history are never replaced.
|
|
65
|
+
PERF_BASELINE=0f1de0115d203dec40dc9e4643989407047ea804 \
|
|
66
|
+
pnpm benchmark:rendering tmp/performance/rendering-before.json
|
|
67
|
+
pnpm benchmark:rendering tmp/performance/rendering-after.json
|
|
68
|
+
|
|
69
|
+
# Original preparation code and pre-index schema, in a synthetic database.
|
|
70
|
+
PERF_BASELINE=0f1de0115d203dec40dc9e4643989407047ea804 \
|
|
71
|
+
pnpm benchmark:publishing tmp/performance/publishing-before.json
|
|
72
|
+
pnpm benchmark:publishing tmp/performance/publishing-after.json
|
|
73
|
+
|
|
74
|
+
# Actual navigation with GPU submission and asynchronous GPU timing.
|
|
75
|
+
PERF_SCENE=0f1de0115d203dec40dc9e4643989407047ea804 \
|
|
76
|
+
pnpm benchmark:navigation tmp/performance/navigation-before.json
|
|
77
|
+
pnpm benchmark:navigation tmp/performance/navigation-after.json
|
|
78
|
+
|
|
79
|
+
# Browser correctness checks plus the benchmark.
|
|
80
|
+
pnpm test:rendering
|
|
81
|
+
pnpm test:navigation
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`PERF_RUNS` and `PERF_PER_LANE` control browser repetitions and session counts (six lanes). `PERF_SESSIONS` and `PERF_EVENTS` control the SQLite fixture. On macOS the runner explicitly uses Metal; other platforms record their chosen renderer in the output.
|
|
85
|
+
|
|
86
|
+
Navigation additionally accepts `PERF_FRAMES`, `PERF_QUALITY`, and `PERF_MOTION`. `PERF_BREAKDOWN=1` compares normal navigation, forced full effects, and individually disabled effects; `PERF_VARIANTS` selects a comma-separated subset. Diagnostic variants override adaptive effects only in the benchmark.
|
|
87
|
+
|
|
88
|
+
The runner builds production assets without the local API plugin. Every API request is intercepted with synthetic data. The scene hook exists only in this benchmark build. Browser tests cover measured row heights, viewport coverage, keyboard navigation beyond the original first page, focus retention, density changes, resize/hide/show, empty filters, 3D picking, geometry invalidation, preview context reuse, and renderer disposal.
|
|
89
|
+
|
|
90
|
+
## Implementation
|
|
91
|
+
|
|
92
|
+
- `packages/core/src/virtual-list.ts`: shared variable-height virtual list for the local sidebar and public viewer; logarithmic offset lookup and height updates, bounded DOM, keyed measurement reuse, scroll anchoring, and retained keyboard focus.
|
|
93
|
+
- `src/search/ui.ts`: reuse visible results, coalesce scrolling to animation frames, and reuse the date formatter.
|
|
94
|
+
- `src/main.ts`: paint sessions before graphics initialization; fit the camera without rebuilding the graph and list.
|
|
95
|
+
- `packages/core/src/scene.ts`: update transforms only when their inputs change; derive picking coordinates from the drawn instance matrices.
|
|
96
|
+
- `packages/core/src/scene-render-pass.ts` / `packages/core/src/scene.ts`: isolate geometry MSAA, retain immediate control changes, and refine balanced navigation after settling.
|
|
97
|
+
- `server/event-store.ts` / `server/store.ts`: additive partial index for conversation counts and ordered timestamps, with migration coverage.
|
|
98
|
+
- `server/publishing.ts`: reuse metadata queries, combine coverage reads, and stop fetching timestamps once the budget is exhausted.
|
|
99
|
+
- `src/publishing.ts` / `packages/core/src/public-viewer.ts`: update the existing preview renderer and virtualized session list, and cancel superseded preview requests.
|
|
100
|
+
|
|
101
|
+
Timing thresholds are deliberately kept out of unit tests. Structural assertions catch regressions reliably; use repeated benchmark comparisons to evaluate latency changes.
|
|
102
|
+
|
|
103
|
+
## Public pages
|
|
104
|
+
|
|
105
|
+
Measured November 27, 2026. Public production GETs only; no changes to the hosted site. Three fresh Chromium contexts per route, 1440×1000, DPR 2, unthrottled from this workstation. These are lab samples, not field Core Web Vitals or percentile guarantees.
|
|
106
|
+
|
|
107
|
+
### Live baseline
|
|
108
|
+
|
|
109
|
+
| Measurement | Median |
|
|
110
|
+
| --- | ---: |
|
|
111
|
+
| Landing page FCP / LCP | 632 / 632 ms |
|
|
112
|
+
| Explore listings usable | 2,282 ms |
|
|
113
|
+
| Explore LCP | 3,124 ms |
|
|
114
|
+
| Sample public profile canvas ready | 2,907 ms |
|
|
115
|
+
| Explore HTML, warm HTTP connection | 93 ms |
|
|
116
|
+
| Gallery API complete response | 1,200 ms |
|
|
117
|
+
| Sample profile API complete response | 1,273 ms |
|
|
118
|
+
| Sample thumbnail API complete response | 965 ms |
|
|
119
|
+
|
|
120
|
+
The static HTML returned `x-vercel-cache: HIT`. Every sampled public JSON/SVG response returned `MISS` and `Cache-Control: no-store`. The gallery fetched data only after JavaScript loaded; thumbnails then made another uncached request. One thumbnail failed to load in two of the three browser runs. The measurements do not establish the failure's cause.
|
|
121
|
+
|
|
122
|
+
Previews were already inert SVGs, bounded to about 600 visible nodes, not live WebGL canvases. The waste was server work: gallery reads decompressed every selected graph for totals, and thumbnail reads decompressed and laid out the graph again. The sample profile response was about 2 MB decoded; its renderer download started only after that response.
|
|
123
|
+
|
|
124
|
+
### Local before/after
|
|
125
|
+
|
|
126
|
+
Seven API repetitions against the same local PostgreSQL fixture: 18 synthetic publications with 4,000–4,850 sessions each. Baseline API code comes from `547db1f`; the shared graph implementation and database are held constant. These results include the handler/rate limiter and response consumption, but not WAN latency or Vercel's CDN.
|
|
127
|
+
|
|
128
|
+
| API | Before median | After median |
|
|
129
|
+
| --- | ---: | ---: |
|
|
130
|
+
| Gallery, twelve cards | 113.9 ms | 14.5 ms |
|
|
131
|
+
| One SVG thumbnail | 69.3 ms | 9.5 ms |
|
|
132
|
+
|
|
133
|
+
One production-asset browser run loaded the populated local Explore page in 189 ms. This is a localhost observation, **not** an estimate of deployed page speed. Real CDN hit latency, cache eviction, and cold function behavior must be measured after deployment.
|
|
134
|
+
|
|
135
|
+
### Changes
|
|
136
|
+
|
|
137
|
+
- Precompute summary metadata and bounded SVGs during publication; store them separately from compressed graphs and replace both atomically.
|
|
138
|
+
- Render the first Explore page as complete HTML and cache it at Vercel's CDN, with no React hydration or bootstrap data request.
|
|
139
|
+
- Keep a small progressively enhanced client: username substring search, sorting by recorded tokens/session count/recent update, server-side pagination, and cancellation.
|
|
140
|
+
- Cache public JSON/SVG responses too. ETags support revalidation; tagged foreground deletion covers publication edits, removal, and old/new GitHub usernames. Browser caches must revalidate, and revoked content has no SWR grace period.
|
|
141
|
+
- Download the profile renderer and graph concurrently; give content-hashed static assets a one-year immutable browser lifetime.
|
|
142
|
+
- Retain the distributed rate limit while removing explicit BEGIN/COMMIT round trips around its single atomic UPSERT. Attach the database pool to Vercel's Fluid lifecycle.
|
|
143
|
+
|
|
144
|
+
This is on-demand rendering plus CDN caching, with the same warm-path benefit sought from ISR. Build-time SSG for all usernames/searches would require rebuilding for publications and deletions; the cache-tag approach handles those changes directly. The existing Vite/static architecture remains lightweight.
|
|
145
|
+
|
|
146
|
+
### Vercel domain-search research
|
|
147
|
+
|
|
148
|
+
Vercel's [domain-search launch](https://vercel.com/changelog/vercel-domains-at-cost-pricing-and-the-fastest-on-the-web) explicitly describes streaming results, structured concurrency, layered caching, Bloom filters, and partitioned batching. The transferable ideas here are doing expensive work ahead of reads, layering caches, and overlapping independent work. Domain-availability Bloom filters and registrar batching address a different workload; this gallery can use an indexed database query over compact publication metadata.
|
|
149
|
+
|
|
150
|
+
Implementation references: [Vercel cache headers](https://vercel.com/docs/caching/cache-control-headers) and [Function cache-tag eviction/pool lifecycle APIs](https://vercel.com/docs/functions/functions-api-reference/vercel-functions-package).
|
|
151
|
+
|
|
152
|
+
### Rerun
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
# Read-only live-page measurements. Output contains timings/resource paths only.
|
|
156
|
+
SITE_PATHS='/,/explore,/@username' PERF_RUNS=3 \
|
|
157
|
+
node scripts/benchmark-public-site.mjs
|
|
158
|
+
|
|
159
|
+
# Local synthetic API comparison and browser correctness.
|
|
160
|
+
TEST_DATABASE_URL=postgresql://sessiongraph@127.0.0.1:55439/sessiongraph_test \
|
|
161
|
+
PERF_BASELINE=547db1f pnpm --filter sessiongraph-site test:browser
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The local checks cover usable HTML without JavaScript, no gallery WebGL download, no initial API waterfall, cross-page username search, global sorting, null token totals, stable ties, pagination, search cancellation, and narrow screens. API tests also cover ETags, changed/revoked publications, metadata-only reads, additive backfill, and cache invalidation arguments. Rollout requires the additive schema migration and backfill described in the [website README](../packages/site/README.md#existing-publication-migration).
|
package/docs/releases.md
CHANGED
|
@@ -10,6 +10,12 @@ Every push to `main` runs `.github/workflows/release.yml`:
|
|
|
10
10
|
|
|
11
11
|
The unscoped `sessiongraph` launcher and `sessiongraph-app-*` platform packages are configured for public publication.
|
|
12
12
|
|
|
13
|
+
The npm launcher exposes `sessiongraph` and `ssg`. Desktop bundles include the CLI
|
|
14
|
+
and install per-user commands and PATH registration on first launch. CLI payloads
|
|
15
|
+
and runtimes are versioned outside the app bundle for portable AppImage support.
|
|
16
|
+
Debug builds skip registration.
|
|
17
|
+
Each native build host tests npm aliases and desktop CLI setup before packaging.
|
|
18
|
+
|
|
13
19
|
## Desktop updates
|
|
14
20
|
|
|
15
21
|
`tauri.release.conf.json` enables updater archives. `collect-release.mjs` signs macOS app archives, Windows installers, and Linux AppImage/DEB/RPM with the exact release version. `updater-manifest.mjs` rejects incomplete or stale signatures and maps both architecture and installed package format. URLs in the manifest are pinned to the release tag; installer filenames stay stable for README `/latest/download/` links. Runtime verification is enforced by the official Tauri updater with `requireSignedVersion`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sessiongraph",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"bin": {
|
|
16
|
-
"sessiongraph": "bin/sessiongraph.mjs"
|
|
16
|
+
"sessiongraph": "bin/sessiongraph.mjs",
|
|
17
|
+
"ssg": "bin/sessiongraph.mjs"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|
|
19
20
|
"bin/",
|
|
@@ -25,11 +26,11 @@
|
|
|
25
26
|
"README.md"
|
|
26
27
|
],
|
|
27
28
|
"optionalDependencies": {
|
|
28
|
-
"sessiongraph-app-darwin-arm64": "1.0.
|
|
29
|
-
"sessiongraph-app-darwin-x64": "1.0.
|
|
30
|
-
"sessiongraph-app-linux-arm64": "1.0.
|
|
31
|
-
"sessiongraph-app-linux-x64": "1.0.
|
|
32
|
-
"sessiongraph-app-win32-x64": "1.0.
|
|
29
|
+
"sessiongraph-app-darwin-arm64": "1.0.16",
|
|
30
|
+
"sessiongraph-app-darwin-x64": "1.0.16",
|
|
31
|
+
"sessiongraph-app-linux-arm64": "1.0.16",
|
|
32
|
+
"sessiongraph-app-linux-x64": "1.0.16",
|
|
33
|
+
"sessiongraph-app-win32-x64": "1.0.16"
|
|
33
34
|
},
|
|
34
35
|
"type": "module",
|
|
35
36
|
"engines": {
|
|
@@ -39,6 +40,11 @@
|
|
|
39
40
|
"dev": "vite",
|
|
40
41
|
"typecheck": "tsc --noEmit",
|
|
41
42
|
"test": "tsx --test tests/*.test.ts",
|
|
43
|
+
"benchmark:rendering": "node scripts/benchmark-rendering.mjs",
|
|
44
|
+
"benchmark:navigation": "node scripts/benchmark-navigation.mjs",
|
|
45
|
+
"benchmark:publishing": "tsx scripts/benchmark-publishing.ts",
|
|
46
|
+
"test:rendering": "node scripts/benchmark-rendering.mjs --verify",
|
|
47
|
+
"test:navigation": "node scripts/benchmark-navigation.mjs --verify",
|
|
42
48
|
"build": "tsc --noEmit && vite build && node scripts/build-server.mjs",
|
|
43
49
|
"desktop:dev": "tauri dev",
|
|
44
50
|
"desktop:build": "tauri build",
|
|
@@ -51,6 +57,7 @@
|
|
|
51
57
|
"@anthropic-ai/claude-agent-sdk": "^0.3.312",
|
|
52
58
|
"@fontsource-variable/geist": "^5.3.0",
|
|
53
59
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
60
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
54
61
|
"@opencode/client": "^2.2.1",
|
|
55
62
|
"@sessiongraph/core": "workspace:*",
|
|
56
63
|
"@tauri-apps/api": "^2.12.4",
|
|
@@ -66,14 +73,15 @@
|
|
|
66
73
|
"@zag-js/select": "^1.47.0",
|
|
67
74
|
"@zag-js/vanilla": "^1.47.0",
|
|
68
75
|
"esbuild": "^0.28.2",
|
|
69
|
-
"lucide": "^0.468.0",
|
|
70
76
|
"mediabunny": "^1.65.0",
|
|
71
77
|
"minisearch": "^7.2.0",
|
|
78
|
+
"playwright": "^1.65.1",
|
|
72
79
|
"three": "^0.180.0",
|
|
73
80
|
"tsx": "^4.23.15",
|
|
74
81
|
"typescript": "^5.9.0",
|
|
75
|
-
"vite": "^7.2.0"
|
|
82
|
+
"vite": "^7.2.0",
|
|
83
|
+
"zod": "4.6.7"
|
|
76
84
|
},
|
|
77
85
|
"packageManager": "pnpm@11.10.0",
|
|
78
|
-
"sessionGraphCommit": "
|
|
86
|
+
"sessionGraphCommit": "9de832adfead10cdf9a3711df5e76177242e365d"
|
|
79
87
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as u}from"./index-B1kyvo41.js";const p="Cosmic Wobbly Disco Sneaky Bouncy Galactic Crispy Dizzy Fuzzy Noodle Groovy Sleepy Spicy Jolly Loopy Squishy Turbo Giggly Velvet Soggy Zippy Fluffy Moonwalking Wiggly Fizzy Snazzy Goofy Jazzy Tiny Chunky Dapper Wacky".split(" "),h="Wombat Pickle Pancake Badger Potato Narwhal Noodle Goblin Otter Turnip Hamster Comet Dumpling Goose Biscuit Llama Muffin Squid Raccoon Toaster Waffle Penguin Yeti Pudding Walrus Taco Jellybean Platypus Sloth Cactus Donut Mongoose".split(" ");function f(e,t){let r=5457746;const c=(()=>(r=Math.imul(r,1664525)+1013904223>>>0,r/2**32)),a=p.flatMap(n=>h.map(o=>`${n} ${o}`));for(let n=a.length-1;n>0;n--){const o=Math.floor(c()*(n+1));[a[n],a[o]]=[a[o],a[n]]}return Array.from({length:e},(n,o)=>`Project ${"Mega".repeat(Math.floor(o/a.length))}${a[o%a.length]}`)}function d(e,t,r){e.open&&(e.addEventListener("close",()=>r(t),{once:!0}),e.close())}function g(e,t,r){const c=document.createDocumentFragment(),a=document.createElement("header");a.className="sharing-header";const n=document.createElement("h2");n.id=`sharing-${t}-title`,n.textContent="Share SessionGraph",e.setAttribute("aria-labelledby",n.id);const o=document.createElement("button");o.type="button",o.className="text-button",o.textContent="Close",o.setAttribute("aria-label","Close sharing"),o.onclick=()=>e.close(),a.append(n,o);const i=document.createElement("div");i.className="sharing-modes",i.setAttribute("role","group"),i.setAttribute("aria-label","Share method");for(const l of["publish","video"]){const s=document.createElement("button");s.type="button",s.dataset.shareMode=l,s.textContent=l==="publish"?"Publish":"Video",s.setAttribute("aria-pressed",String(l===t)),s.onclick=()=>{l!==t&&d(e,l,r)},i.append(s)}return c.append(a,i),c}async function y(e,t){await u("plugin:opener|open_url",{url:e,with:t})}function m(e){const t=new URL(e);if(!["https:","http:"].includes(t.protocol)||t.username||t.password)throw new Error("Choose a valid web link.");return t.href}async function S(e,t=y){await t(m(e))}export{m as e,S as o,f as p,g as s};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|