@oharness/server 0.9.1 → 0.9.3

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/page.js CHANGED
@@ -45,54 +45,79 @@ ${ANALYTICS_STUB}
45
45
  </head>
46
46
  <body>
47
47
  <aside>
48
- <header>
49
- <span class="mark" aria-hidden="true">
50
- <svg viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="2.5"
51
- stroke-linecap="round">
52
- <path d="M20 6h-8a6 6 0 0 0-6 6v8"/>
53
- <path d="M12 26h8a6 6 0 0 0 6-6v-8"/>
54
- <circle cx="16" cy="16" r="3.5" fill="currentColor" stroke="none"/>
55
- </svg>
56
- </span>
57
- <b class="wordmark">OHarness</b>
58
- <button id="nav-collapse" type="button" data-t-title="nav.collapse" data-t-aria-label="nav.collapse"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.25" y="3.25" width="11.5" height="9.5" rx="2.5"/><path d="M6.25 3.25v9.5"/></svg></button>
59
- <button id="nav-close" type="button" aria-label="Close"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8"/></svg></button>
60
- </header>
61
- <button id="project" class="project" type="button">
62
- <span class="avatar" id="project-avatar"></span>
63
- <span class="project-name" id="project-name">—</span>
64
- <span class="chev"></span>
65
- </button>
66
- <div id="nav">
67
- <!-- The label goes in a span, like every other nav item: data-t on the
68
- button itself makes applyStrings replace its children, which took the
69
- icon with it.
48
+ <!-- The top of the sidebar, in the tab strip's white and at its height, so
49
+ the two read as one bar across the window: the traffic lights sit in
50
+ it on a desktop, #nav-toggle beside them, then the mark and the name
51
+ together. Folded, the bar is the rail's width and the name goes with
52
+ the panel. -->
53
+ <div id="side-top">
54
+ <div class="brand">
55
+ <span class="mark" aria-hidden="true">
56
+ <svg viewBox="0 0 32 32" fill="none" stroke="currentColor" stroke-width="2.5"
57
+ stroke-linecap="round">
58
+ <path d="M20 6h-8a6 6 0 0 0-6 6v8"/>
59
+ <path d="M12 26h8a6 6 0 0 0 6-6v-8"/>
60
+ <circle cx="16" cy="16" r="3.5" fill="currentColor" stroke="none"/>
61
+ </svg>
62
+ </span>
63
+ <b class="wordmark">OHarness</b>
64
+ </div>
65
+ </div>
66
+ <div id="side-body">
67
+ <!-- The app's places, as a rail of icons beside the work: they are where
68
+ you go, the panel beside them is what you are doing. The rail stays
69
+ when the panel folds away. -->
70
+ <nav id="rail">
71
+ <div id="nav">
72
+ <!-- The label goes in a span, like every other nav item: data-t on the
73
+ button itself makes applyStrings replace its children, which took the
74
+ icon with it.
70
75
 
71
- Icons are Lucide (ISC) — square-pen, box, clock, settings-2 —
72
- scaled from their 24 grid onto the 16 one every other icon here uses,
73
- which is where the .33s come from. Scaling the geometry rather than
74
- the viewBox keeps the 1.5 stroke shared with folder, copy and the
75
- rest, so nothing in the sidebar sits at a different weight. -->
76
- <button class="nav-item" id="new" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2H3.33a1.33 1.33 0 0 0-1.33 1.33v9.33a1.33 1.33 0 0 0 1.33 1.33h9.33a1.33 1.33 0 0 0 1.33-1.33V8"/><path d="M12.25 1.75a.67.67 0 0 1 2 2l-6.01 6.01a1.33 1.33 0 0 1-.57.34l-1.92.56a.33.33 0 0 1-.41-.41l.56-1.92a1.33 1.33 0 0 1 .34-.57z"/></svg><span data-t="nav.new"></span></button>
77
- <!-- Search is the palette by another name: the same dialog, for a hand
78
- already on the mouse. The chord beside it is filled in at boot,
79
- because it is ⌘K on one machine and Ctrl K on the next. -->
80
- <button class="nav-item" id="nav-search" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.33" cy="7.33" r="5.33"/><path d="m14 14-2.87-2.87"/></svg><span data-t="nav.search"></span><span class="count" id="palette-hint"></span></button>
81
- <!-- Artifacts sit above Models because they belong to the work, not to the
82
- configuration: this row answers "where did that chart go", which is a
83
- question asked mid-task, while the three below it are settings. -->
84
- <button class="nav-item" id="nav-artifacts" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="2.67" width="8" height="6" rx="1"/><rect x="6" y="7.33" width="8" height="6" rx="1"/></svg><span data-t="nav.artifacts"></span><span class="count" id="artifact-count"></span></button>
85
- <button class="nav-item" id="nav-models" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 5.33a1.33 1.33 0 0 0-.67-1.15L8.67 1.51a1.33 1.33 0 0 0-1.33 0L2.67 4.18A1.33 1.33 0 0 0 2 5.33v5.33a1.33 1.33 0 0 0 .67 1.15l4.67 2.67a1.33 1.33 0 0 0 1.33 0l4.67-2.67A1.33 1.33 0 0 0 14 10.67Z"/><path d="m2.2 4.67 5.8 3.33 5.8-3.33"/><path d="M8 14.67V8"/></svg><span data-t="nav.models"></span><span class="count" id="model-count"></span></button>
86
- <button class="nav-item" id="nav-routines" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="8" r="6.67"/><path d="M8 4v4l2.67 1.33"/></svg><span data-t="nav.routines"></span><span class="count" id="routine-count"></span></button>
87
- <button class="nav-item" id="nav-settings" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.67 4.67h-6"/><path d="M9.33 11.33H3.33"/><circle cx="4.67" cy="4.67" r="2"/><circle cx="11.33" cy="11.33" r="2"/></svg><span data-t="nav.settings"></span></button>
76
+ Icons are Lucide (ISC) — square-pen, box, clock, settings-2 —
77
+ scaled from their 24 grid onto the 16 one every other icon here uses,
78
+ which is where the .33s come from. Scaling the geometry rather than
79
+ the viewBox keeps the 1.5 stroke shared with folder, copy and the
80
+ rest, so nothing in the sidebar sits at a different weight. -->
81
+ <!-- Search is the palette by another name: the same dialog, for a hand
82
+ already on the mouse. The chord beside it is filled in at boot,
83
+ because it is ⌘K on one machine and Ctrl K on the next. -->
84
+ <!-- Home is the start page: a fresh session in the project on screen,
85
+ the same thing New session does, at the top of the places.
86
+ Lucide house on the 16 grid. -->
87
+ <button class="nav-item" id="nav-home" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M2 6.67 8 2l6 4.67v6.66a1.33 1.33 0 0 1-1.33 1.34H3.33A1.33 1.33 0 0 1 2 13.33Z"/><path d="M6 14.67V8h4v6.67"/></svg><span data-t="nav.home"></span></button>
88
+ <button class="nav-item" id="nav-search" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.33" cy="7.33" r="5.33"/><path d="m14 14-2.87-2.87"/></svg><span data-t="nav.search"></span><span class="count" id="palette-hint"></span></button>
89
+ <!-- Artifacts sit above Models because they belong to the work, not to the
90
+ configuration: this row answers "where did that chart go", which is a
91
+ question asked mid-task, while the three below it are settings. -->
92
+ <button class="nav-item" id="nav-artifacts" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2" y="2.67" width="8" height="6" rx="1"/><rect x="6" y="7.33" width="8" height="6" rx="1"/></svg><span data-t="nav.artifacts"></span><span class="count" id="artifact-count"></span></button>
93
+ <button class="nav-item" id="nav-sessions" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.33 10a1.33 1.33 0 0 1-1.33 1.33H4.67L2 14V3.33A1.33 1.33 0 0 1 3.33 2H12a1.33 1.33 0 0 1 1.33 1.33Z"/><path d="M5.33 5.33h5.34"/><path d="M5.33 8h3.34"/></svg><span data-t="nav.sessions"></span></button>
94
+ <button class="nav-item" id="nav-models" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 5.33a1.33 1.33 0 0 0-.67-1.15L8.67 1.51a1.33 1.33 0 0 0-1.33 0L2.67 4.18A1.33 1.33 0 0 0 2 5.33v5.33a1.33 1.33 0 0 0 .67 1.15l4.67 2.67a1.33 1.33 0 0 0 1.33 0l4.67-2.67A1.33 1.33 0 0 0 14 10.67Z"/><path d="m2.2 4.67 5.8 3.33 5.8-3.33"/><path d="M8 14.67V8"/></svg><span data-t="nav.models"></span><span class="count" id="model-count"></span></button>
95
+ <button class="nav-item" id="nav-routines" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="8" cy="8" r="6.67"/><path d="M8 4v4l2.67 1.33"/></svg><span data-t="nav.routines"></span><span class="count" id="routine-count"></span></button>
96
+ <button class="nav-item" id="nav-settings" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.67 4.67h-6"/><path d="M9.33 11.33H3.33"/><circle cx="4.67" cy="4.67" r="2"/><circle cx="11.33" cy="11.33" r="2"/></svg><span data-t="nav.settings"></span></button>
97
+ </div>
98
+ </nav>
99
+ <div id="side-panel">
100
+ <header>
101
+ <b class="wordmark">OHarness</b>
102
+ <button id="nav-close" type="button" aria-label="Close"><svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8"/></svg></button>
103
+ </header>
104
+ <button id="project" class="project" type="button">
105
+ <span class="avatar" id="project-avatar"></span>
106
+ <span class="project-name" id="project-name">—</span>
107
+ <span class="chev"></span>
108
+ </button>
109
+ <div id="side-new">
110
+ <button class="nav-item" id="new" type="button"><svg class="ico" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 2H3.33a1.33 1.33 0 0 0-1.33 1.33v9.33a1.33 1.33 0 0 0 1.33 1.33h9.33a1.33 1.33 0 0 0 1.33-1.33V8"/><path d="M12.25 1.75a.67.67 0 0 1 2 2l-6.01 6.01a1.33 1.33 0 0 1-.57.34l-1.92.56a.33.33 0 0 1-.41-.41l.56-1.92a1.33 1.33 0 0 1 .34-.57z"/></svg><span data-t="nav.new"></span></button>
111
+ </div>
112
+ <div id="sessions"></div>
113
+ <!-- Pinned under the session list, where an account belongs and where
114
+ people look for one. Signing in is what turns on sync and what lets an
115
+ artifact be published, and until now the only door to it was inside the
116
+ model-provider setup — a place nobody goes to find their account. -->
117
+ <div id="update-hint" hidden></div>
118
+ <div id="account"></div>
119
+ </div>
88
120
  </div>
89
- <div id="sessions"></div>
90
- <!-- Pinned under the session list, where an account belongs and where
91
- people look for one. Signing in is what turns on sync and what lets an
92
- artifact be published, and until now the only door to it was inside the
93
- model-provider setup — a place nobody goes to find their account. -->
94
- <div id="update-hint" hidden></div>
95
- <div id="account"></div>
96
121
  </aside>
97
122
  <div id="scrim"></div>
98
123
 
@@ -104,8 +129,6 @@ ${ANALYTICS_STUB}
104
129
 
105
130
  <div id="split">
106
131
  <div id="main">
107
- <!-- Shown only while the sidebar is folded away: the way back to it. -->
108
- <button id="nav-expand" type="button" data-t-title="nav.expand" data-t-aria-label="nav.expand"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.25" y="3.25" width="11.5" height="9.5" rx="2.5"/><path d="M6.25 3.25v9.5"/></svg></button>
109
132
  <div id="tabs"></div>
110
133
  <div id="log">
111
134
  <div id="empty">
@@ -288,6 +311,12 @@ ${ANALYTICS_STUB}
288
311
  </div>
289
312
  </div>
290
313
  </main>
314
+ <!-- One button folds the sidebar and brings it back, fixed in the top bar so
315
+ it stays where it was clicked. After everything else on purpose: Electron
316
+ applies drag regions in document order, so a no-drag button written before
317
+ the tab strip was covered again by the strip's drag and could not be
318
+ clicked once the sidebar was folded. -->
319
+ <button id="nav-toggle" type="button" data-t-title="nav.collapse" data-t-aria-label="nav.collapse"><svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.25" y="3.25" width="11.5" height="9.5" rx="2.5"/><path d="M6.25 3.25v9.5"/></svg></button>
291
320
 
292
321
  <dialog id="browse">
293
322
  <div class="pp-head"><span id="browse-here" class="mono small"></span></div>
package/dist/page.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../src/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AAGH;;;;;;;GAOG;AACH,MAAM,OAAO,GAAG;;;;;yCAKyB,CAAC;AAE1C,MAAM,CAAC,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAuaK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;qBACvB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;EAC1C,aAAa;EACb,UAAU;EACV,gBAAgB;;;QAGV,CAAC"}
package/dist/server.js CHANGED
@@ -2241,12 +2241,6 @@ export async function startWebServer(opts) {
2241
2241
  // Sorted by what was spent, not by name: the row worth seeing first
2242
2242
  // is the expensive one.
2243
2243
  models: [...byModel.values()].sort((a, b) => b.costUsd - a.costUsd),
2244
- // A page of them is a page nobody reads. The rest are counted in the
2245
- // totals above, which is where a number that large belongs.
2246
- sessions: list.slice(0, 10).map((row) => ({
2247
- ...row,
2248
- current: row.id === current.session.id,
2249
- })),
2250
2244
  scanned: rows.size,
2251
2245
  // Said out loud so a total that stops short is not read as final.
2252
2246
  truncated: stored.length >= USAGE_SESSION_SCAN,