reifyui 0.8.2 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reifyui",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI \u2014 model-agnostic, framework-agnostic, design-system-native. The foundation for building generative-UI and agent products.",
5
5
  "keywords": [
6
6
  "react",
@@ -68,7 +68,8 @@
68
68
  "build": "tsup",
69
69
  "prepublishOnly": "npm run build",
70
70
  "clean": "rm -rf dist",
71
- "prepare": "npm run build"
71
+ "prepare": "npm run build",
72
+ "test": "node test/run.mjs"
72
73
  },
73
74
  "peerDependencies": {
74
75
  "echarts": "^5 || ^6",
@@ -91,6 +91,9 @@ export function ChatPanel(props) {
91
91
  const [draft, setDraft] = useState('');
92
92
  const [busy, setBusy] = useState(false);
93
93
  const [connecting, setConnecting] = useState(false);
94
+ // A turn this tab started but can no longer hear: its stream broke after the gateway accepted
95
+ // it. Its messages come from history until it settles.
96
+ const [dropped, setDropped] = useState(false);
94
97
  const [histLoading, setHistLoading] = useState(true);
95
98
  const [staged, setStaged] = useState([]); // files picked, not yet sent
96
99
  const [attachErr, setAttachErr] = useState('');
@@ -182,12 +185,25 @@ export function ChatPanel(props) {
182
185
  }
183
186
  pendingRef.current = null;
184
187
  setConnecting(false);
188
+ if (out.dropped) {
189
+ // The turn is running and this tab lost its stream. Never resend: that starts a second
190
+ // turn behind the first (a game played twice at once, a deck written twice). The message
191
+ // stays as sent, the answer stays "running", and history fills it in below.
192
+ setDropped(true);
193
+ return;
194
+ }
185
195
  updateLastAsst((a) => (a.status === 'running' ? { ...a, status: 'done' } : a));
186
196
  api.current.onChanged?.();
187
- } catch {
188
- dropRunningAsst();
189
- pendingRef.current = { text, files };
190
- setConnecting(true);
197
+ } catch (e) {
198
+ // A refused turn is an answer, not a gateway still coming up: a wall, a bad request, a
199
+ // session busy with another turn. Say so on the message and leave it there; resending
200
+ // every twenty seconds is what filled a pane with "connecting" over a game that was
201
+ // playing fine (2026-09-22).
202
+ updateLastAsst((a) => ({
203
+ ...a,
204
+ blocks: a.blocks.length ? a.blocks : withText([], (e && e.message) || 'The turn could not be started.'),
205
+ status: 'failed',
206
+ }));
191
207
  } finally {
192
208
  setBusy(false);
193
209
  }
@@ -272,6 +288,24 @@ export function ChatPanel(props) {
272
288
  return () => window.clearInterval(iv);
273
289
  }, [connecting, busy, deliver]);
274
290
 
291
+ // A turn this tab started and lost the stream of: poll its history until the turn settles,
292
+ // then one last reload for the final answer and whatever it changed.
293
+ useEffect(() => {
294
+ if (!dropped) return undefined;
295
+ let dead = false;
296
+ const tick = () => Promise.resolve(api.current.loadHistory(sessionId)).then((hist) => {
297
+ if (dead || !hist?.length) return;
298
+ const last = hist[hist.length - 1];
299
+ const settled = !(last.role === 'assistant' && last.status === 'running')
300
+ && !externalBusy;
301
+ setMessages(hist);
302
+ if (settled) { setDropped(false); api.current.onChanged?.(); }
303
+ }).catch(() => {});
304
+ const iv = window.setInterval(tick, POLL_MS);
305
+ return () => { dead = true; window.clearInterval(iv); };
306
+ // eslint-disable-next-line react-hooks/exhaustive-deps
307
+ }, [dropped, externalBusy, sessionId]);
308
+
275
309
  // A turn may be running that this tab did not start. While that is true and nothing local is
276
310
  // streaming, poll history so its messages appear; when it ends, reload once so the final answer
277
311
  // and whatever it changed land here without a refresh.
@@ -380,6 +414,7 @@ export function ChatPanel(props) {
380
414
  {title ? <span className="uic-chat-title" title={title}>{title}</span> : null}
381
415
  {headerRight}
382
416
  {connecting ? <span className="uic-chat-conn">{connectingLabel}</span> : null}
417
+ {dropped ? <span className="uic-chat-conn">{workingLabel}</span> : null}
383
418
  </div>
384
419
 
385
420
  <div className="uic-chat-body" ref={bodyRef} onScroll={onBodyScroll} role="log" aria-live="polite">
@@ -202,17 +202,22 @@ export async function streamTurn({ sessionId, harnessId, input, instructions, ha
202
202
  hid = h.id;
203
203
  }
204
204
  const existing = sessionId ? String(sessionId) : '';
205
- const res = await fetch(`${CONFIG.base}/responses`, {
206
- method: 'POST',
207
- cache: 'no-store',
208
- headers: { 'content-type': 'application/json', accept: 'text/event-stream' },
209
- body: JSON.stringify({
210
- input,
211
- ...(instructions ? { instructions } : {}),
212
- metadata: { harness_id: hid, ...(existing ? { session_id: existing } : {}) },
213
- stream: true,
214
- }),
215
- });
205
+ let res;
206
+ try {
207
+ res = await fetch(`${CONFIG.base}/responses`, {
208
+ method: 'POST',
209
+ cache: 'no-store',
210
+ headers: { 'content-type': 'application/json', accept: 'text/event-stream' },
211
+ body: JSON.stringify({
212
+ input,
213
+ ...(instructions ? { instructions } : {}),
214
+ metadata: { harness_id: hid, ...(existing ? { session_id: existing } : {}) },
215
+ stream: true,
216
+ }),
217
+ });
218
+ } catch {
219
+ return { connecting: true }; // nothing reached the gateway (down, or restarting): safe to send again
220
+ }
216
221
  if (res.status === 503) return { connecting: true };
217
222
  if (!res.ok || !res.body) {
218
223
  const t = await res.text().catch(() => '');
@@ -225,13 +230,21 @@ export async function streamTurn({ sessionId, harnessId, input, instructions, ha
225
230
  ...handlers,
226
231
  onError: (msg) => { sawError = true; handlers.onError?.(msg); },
227
232
  });
228
- await readSSEStream(res.body, (data) => {
229
- let evt;
230
- try { evt = JSON.parse(data); } catch { return; } // malformed frame
231
- const found = sessionIdOf(evt);
232
- if (found && found !== sid) { sid = found; handlers.onSession?.(found); }
233
- d.dispatch(evt);
234
- });
233
+ try {
234
+ await readSSEStream(res.body, (data) => {
235
+ let evt;
236
+ try { evt = JSON.parse(data); } catch { return; } // malformed frame
237
+ const found = sessionIdOf(evt);
238
+ if (found && found !== sid) { sid = found; handlers.onSession?.(found); }
239
+ d.dispatch(evt);
240
+ });
241
+ } catch {
242
+ // The gateway ACCEPTED the turn (200) and the stream broke afterwards: a console rollout
243
+ // that stopped the old slot, a proxy timeout, a network blink. The turn is running without
244
+ // this stream, so sending the message again would start a second one; the caller attaches
245
+ // to the one that exists instead (its history, polled until it settles).
246
+ return { ok: false, dropped: true, sessionId: sid };
247
+ }
235
248
  return { ok: !sawError, sessionId: sid };
236
249
  }
237
250
 
package/src/index.d.ts CHANGED
@@ -496,6 +496,8 @@ export interface SheetColumn {
496
496
  options?: Array<string | { label?: string; value?: unknown; color?: string }>;
497
497
  [key: string]: unknown;
498
498
  }
499
+ /** With no `height` a row fits its tallest cell, up to --shg-row-max (eight lines by default), and
500
+ * a cell holding more scrolls inside itself. A `height` is a row someone sized: exactly that tall. */
499
501
  export interface SheetRow { id: string; height?: number; [key: string]: unknown }
500
502
  export interface SheetCell { value?: unknown; status?: string; error?: string | null; [key: string]: unknown }
501
503
  export interface Sheet {
@@ -23,6 +23,10 @@
23
23
  //
24
24
  // Editing is optimistic: local edits call onChange with the next sheet; the host persists and
25
25
  // hands truth back through `sheet`.
26
+ //
27
+ // Row heights: a row with no `height` fits its tallest cell, up to --shg-row-max (eight lines
28
+ // unless the host sets it); a cell with more than that scrolls inside itself. A row with a
29
+ // `height` (someone dragged it) is exactly that tall, and its cells scroll the same way.
26
30
  import { useEffect, useRef, useState } from 'react';
27
31
  import { createPortal } from 'react-dom';
28
32
 
@@ -68,6 +72,12 @@ const COMPUTE_KINDS = [
68
72
  const RESOURCE_KINDS = ['image', 'sheet', 'slides', 'workflow', 'graph'];
69
73
  const RESOURCE_ICON = { image: '🖼', sheet: '▦', slides: '▤', workflow: '⚙', graph: '◉' };
70
74
 
75
+ // Select and resource cells edit in a popover, so the cell keeps showing its value under it.
76
+ // Every other editable cell edits in place, and of those only these hold a single line.
77
+ const POPOVER_EDITORS = new Set(['select', 'resource']);
78
+ const SINGLE_LINE_EDITORS = new Set(['number', 'date', 'tags']);
79
+ const isMultiline = (col) => !SINGLE_LINE_EDITORS.has(col.type);
80
+
71
81
  // Popovers render through a body portal with FIXED positioning — inside the grid they'd be
72
82
  // clipped by the scroll container and out-stacked by the sticky header/row-number cells. anchor
73
83
  // is a DOMRect captured at open time; the box clamps to the viewport and flips above the anchor
@@ -245,6 +255,10 @@ export function SheetGrid({
245
255
  document.body.style.cursor = '';
246
256
  if (!d) return;
247
257
  setSizeDraft({});
258
+ // A press that never moved is not a resize. Committing it pinned the row at whatever height
259
+ // it had, and a pinned row stops fitting its content, so a click near a cell's bottom edge
260
+ // quietly froze the row.
261
+ if (d.last === d.start) return;
248
262
  mutate((n) => {
249
263
  if (d.kind === 'col') { const c = n.columns.find((x) => x.id === d.id); if (c) c.width = Math.round(d.last); }
250
264
  else { const r = n.rows.find((x) => x.id === d.id); if (r) r.height = Math.round(d.last); }
@@ -308,8 +322,29 @@ export function SheetGrid({
308
322
  const numW = Math.max(48, 30 + String(rows.length || 1).length * 9);
309
323
  const numStyle = { width: numW, minWidth: numW, maxWidth: numW };
310
324
  const rowHeight = (row) => (sizeDraft.row && sizeDraft.row[row.id]) || row.height || undefined;
325
+ // The table lays an unsized row out to its tallest cell, so a row fits on the first render,
326
+ // after an edit and while a column is dragged, with nothing to measure and nothing to store. A
327
+ // sized row becomes its own cap: its cells never push it past the height it was given.
328
+ const rowStyle = (row) => {
329
+ const h = rowHeight(row);
330
+ return {
331
+ ...(h ? { height: h, '--shg-row-max': `${h - 1}px` } : null),
332
+ // The grid's own text wraps and no longer reads this; it stays for host cell bodies that do.
333
+ '--shg-clamp': Math.max(1, Math.floor(((h || 34) - 10) / 18)),
334
+ };
335
+ };
336
+ // Double-clicking a row's edge hands it back to its content, as it does in a spreadsheet.
337
+ const fitRow = (rowId) => mutate((n) => {
338
+ const r = n.rows.find((x) => x.id === rowId); if (r) delete r.height;
339
+ });
311
340
 
312
- useEffect(() => { if (editing && inputRef.current) inputRef.current.focus(); }, [editing]);
341
+ useEffect(() => {
342
+ const el = editing && inputRef.current;
343
+ if (!el) return;
344
+ el.focus();
345
+ // Into a cell's text at its end, where an edit to a long value usually goes.
346
+ if (el.tagName === 'TEXTAREA') el.setSelectionRange(el.value.length, el.value.length);
347
+ }, [editing]);
313
348
 
314
349
  const mutate = (fn) => {
315
350
  if (readOnly || !onChange) return;
@@ -426,6 +461,20 @@ export function SheetGrid({
426
461
  </PopPortal>
427
462
  );
428
463
  }
464
+ // Text edits in a textarea: an <input> strips line breaks from its value, so opening a
465
+ // multi-line cell and clicking away rewrote it as one line. Enter still commits, as in any
466
+ // spreadsheet; Shift+Enter is a new line inside the cell.
467
+ if (isMultiline(col)) {
468
+ return (
469
+ <textarea ref={inputRef} className="shg-input shg-input-area" value={draft} rows={1}
470
+ onChange={(e) => setDraft(e.target.value)}
471
+ onBlur={commitEdit}
472
+ onKeyDown={(e) => {
473
+ if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { e.preventDefault(); commitEdit(); }
474
+ if (e.key === 'Escape') setEditing(null);
475
+ }} />
476
+ );
477
+ }
429
478
  const inputType = col.type === 'date' ? 'date' : col.type === 'number' ? 'number' : 'text';
430
479
  return (
431
480
  <input ref={inputRef} className="shg-input" type={inputType} value={draft}
@@ -475,17 +524,15 @@ export function SheetGrid({
475
524
  </thead>
476
525
  <tbody>
477
526
  {rows.map((row, ri) => (
478
- <tr key={row.id} data-row-id={row.id}
479
- style={{
480
- ...(rowHeight(row) ? { height: rowHeight(row) } : null),
481
- '--shg-clamp': Math.max(1, Math.floor(((rowHeight(row) || 34) - 10) / 18)),
482
- }}>
527
+ <tr key={row.id} data-row-id={row.id} style={rowStyle(row)}>
483
528
  <td className={'shg-rownum' + dndClass('row', row.id)} style={numStyle}
484
529
  title="Drag to reorder" {...dndProps('row', row.id)}>
485
530
  <span>{ri + 1}</span>
486
531
  {!readOnly && <button className="shg-rowdel" onClick={() => deleteRow(row.id)} title="Delete row">×</button>}
487
532
  {!readOnly && (
488
- <span className="shg-resize-row" onMouseDown={(e) => startResize(e, 'row', row.id, rowHeight(row) || e.currentTarget.closest('tr').offsetHeight)} />
533
+ <span className="shg-resize-row" title="Drag to resize, double-click to fit"
534
+ onMouseDown={(e) => startResize(e, 'row', row.id, rowHeight(row) || e.currentTarget.closest('tr').offsetHeight)}
535
+ onDoubleClick={() => fitRow(row.id)} />
489
536
  )}
490
537
  </td>
491
538
  {columns.map((col) => {
@@ -523,11 +570,21 @@ export function SheetGrid({
523
570
  <span className="shg-resize-row shg-resize-in-cell"
524
571
  onClick={(e) => e.stopPropagation()}
525
572
  onMouseDown={(e) => startResize(e, 'row', row.id,
526
- rowHeight(row) || e.currentTarget.closest('tr').offsetHeight)} />
573
+ rowHeight(row) || e.currentTarget.closest('tr').offsetHeight)}
574
+ onDoubleClick={(e) => { e.stopPropagation(); fitRow(row.id); }} />
527
575
  </>
528
576
  )}
529
577
  {peer && <span className="shg-peer-flag" style={{ background: peer.color }}>{peer.name}</span>}
530
- {isEditing ? renderEditor(col) : (
578
+ {isEditing && renderEditor(col)}
579
+ {isEditing && !POPOVER_EDITORS.has(col.type) ? (
580
+ // The editor lies over the cell; this invisible copy of the draft holds the
581
+ // cell's place, so the row keeps its height while you type and grows with
582
+ // the draft, to the same cap as the value. The trailing zero-width space
583
+ // gives a draft that ends in a line break its last, empty line.
584
+ <div className="shg-val shg-val-mirror" aria-hidden="true">
585
+ <span className="shg-val-txt">{`${typeof draft === 'string' ? draft : ''}\u200b`}</span>
586
+ </div>
587
+ ) : (
531
588
  <div className="shg-val">
532
589
  {custom !== undefined ? custom : (
533
590
  <>
@@ -723,10 +780,10 @@ function ColumnMenu({ col, columns, anchor, columnTypes, renderColumnConfig, onA
723
780
  /**
724
781
  * The height each row would need to show its content in full, measured from what is on screen.
725
782
  *
726
- * A row is clamped to its height by design — a sheet you cannot scan is not a sheet. But after a
727
- * run, the thing a person wants is the answer, and an answer cut off at one line with no way to
728
- * see the rest is the grid hiding the work it just paid for. So the host measures and commits a
729
- * height, ONCE, rather than the grid guessing continuously.
783
+ * Since 0.8.4 the grid fits a row with no stored height by itself, on every render, so a host no
784
+ * longer needs this to show a run's answer. Committing what it returns STORES a height, and a
785
+ * stored height is a row someone sized: it stops refitting when the column or the text changes.
786
+ * Kept for a host that wants exactly that.
730
787
  *
731
788
  * Measured, not estimated: `scrollHeight` is what the content actually occupies at this width,
732
789
  * including the file cards. A formula over character counts would be a number nobody derived.
package/styles/sheet.css CHANGED
@@ -14,17 +14,22 @@
14
14
  border: 1px solid var(--uic-line, #DDDFE6);
15
15
  padding: 0; height: 34px; box-sizing: border-box;
16
16
  }
17
+ /* 34px is a row's floor; a row is as tall as its tallest cell. Every cell in it reads from the
18
+ top, level with the first line of that tallest one, rather than floating to the middle. */
19
+ .shg-table tbody td { vertical-align: top; }
17
20
  .shg-corner, .shg-rownum {
18
21
  background: var(--uic-surface-2, #F7F8FA);
19
22
  text-align: center; color: var(--uic-mute-2, #8E9199); font-variant-numeric: tabular-nums;
20
23
  position: sticky; left: 0; z-index: 3;
21
24
  }
22
25
  .shg-corner { z-index: 6; }
23
- .shg-rownum span { font-size: 12.5px; }
26
+ /* The number sits in a band the height of a one-line row, so it lines up with the first line of
27
+ a tall row as well as centering in a short one. */
28
+ .shg-rownum span { font-size: 12.5px; display: block; line-height: 32px; }
24
29
  /* A 12x18 target for a destructive action was too small to hit deliberately and too small to
25
30
  read. It is a real button now, and the gutter is wide enough to hold it beside the number. */
26
31
  .shg-rowdel {
27
- position: absolute; right: 3px; top: 50%; transform: translateY(-50%);
32
+ position: absolute; right: 3px; top: 6px;
28
33
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
29
34
  border: none; border-radius: 5px; background: transparent; color: var(--uic-mute-2, #8E9199);
30
35
  cursor: pointer; font-size: 17px; line-height: 1; opacity: 0; padding: 0;
@@ -64,21 +69,33 @@
64
69
  .shg-cell:hover { background: var(--uic-surface-2, #F7F8FA); }
65
70
  /* The cell is the constraint on its own value. This used to carry an inline max-width of the
66
71
  column width minus 20, or 400px where the column had no explicit width — a number nothing
67
- derived, which ellipsised a value long before its own cell ran out of room. */
68
- .shg-val { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px; height: 100%;
69
- width: 100%; min-width: 0; box-sizing: border-box; }
72
+ derived, which ellipsised a value long before its own cell ran out of room.
73
+
74
+ The value box is what sizes the row, and it stops at --shg-row-max: eight lines by default, or
75
+ the height of a row someone sized. Past that the value scrolls inside its own cell, so one
76
+ long cell can never turn its row into a page. A host changes the cap by setting the variable
77
+ on the grid or anywhere above it. */
78
+ .shg-val { display: flex; align-items: flex-start; gap: 6px; padding: 6px 10px;
79
+ width: 100%; min-width: 0; box-sizing: border-box;
80
+ max-height: var(--shg-row-max, calc(8 * 18px + 12px));
81
+ overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; }
70
82
  .shg-val-txt {
71
83
  flex: 1; min-width: 0; color: var(--uic-ink, #111317); align-self: flex-start;
72
- /* Wrap to the row's height; the last visible line ellipsizes. Rows at the
73
- default height clamp to one line (classic sheet behavior); taller rows
74
- show more lines. --shg-clamp is set per row from its height. */
75
- display: -webkit-box; -webkit-box-orient: vertical;
76
- -webkit-line-clamp: var(--shg-clamp, 1);
77
- overflow: hidden; white-space: normal; word-break: break-word;
84
+ /* All of the value, as written: its own line breaks kept, and a long word or an address broken
85
+ at the cell's edge, never ellipsised and never pushed past it. */
86
+ white-space: pre-wrap; overflow-wrap: anywhere;
78
87
  line-height: 18px;
79
88
  }
80
- .shg-input { width: 100%; height: 100%; border: 2px solid var(--uic-brand, #285AFF); padding: 0 8px;
81
- font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
89
+ /* The editor lies over its cell. Under it, an invisible copy of the draft (.shg-val-mirror) holds
90
+ the cell's place, so the row keeps its height while you type and grows with the draft. The ring
91
+ is a shadow, not a border, so the textarea wraps at exactly the width the copy does. */
92
+ .shg-val-mirror { visibility: hidden; }
93
+ .shg-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
94
+ border: none; box-shadow: inset 0 0 0 2px var(--uic-brand, #285AFF); padding: 0 8px;
95
+ font-size: 13px; font-family: inherit; color: var(--uic-ink, #111317);
96
+ background: var(--uic-surface, #FFFFFF); outline: none; box-sizing: border-box; }
97
+ .shg-input-area { display: block; padding: 6px 10px; line-height: 18px; resize: none;
98
+ white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; }
82
99
  .shg-runcell {
83
100
  border: none; background: transparent; color: var(--uic-brand, #285AFF); cursor: pointer;
84
101
  font-size: 10px; opacity: 0; flex-shrink: 0; padding: 2px 4px;
@@ -104,10 +121,12 @@
104
121
  .shg-add-row:hover { border-color: var(--uic-brand, #285AFF); color: var(--uic-brand, #285AFF); }
105
122
 
106
123
  /* ── Typed cell values ─────────────────────────────────────────────────── */
124
+ /* A long option wraps inside its pill like any other value. The radius is half a one-line pill's
125
+ height, so one line still reads as a pill and two read as a rounded box, not a lozenge. */
107
126
  .shg-pill {
108
127
  display: inline-flex; align-items: center; max-width: 100%;
109
- padding: 1.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
110
- color: var(--uic-ink, #1F2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
128
+ padding: 1.5px 9px; border-radius: 10px; font-size: 12px; font-weight: 600;
129
+ color: var(--uic-ink, #1F2937); white-space: normal; overflow-wrap: anywhere;
111
130
  }
112
131
  .shg-pills { display: flex; gap: 4px; overflow: hidden; flex: 1; min-width: 0;
113
132
  flex-wrap: wrap; max-height: 100%; align-content: center; }
@@ -117,8 +136,8 @@
117
136
  font-size: 12px; font-weight: 700; color: var(--uic-on-brand, #fff); background: var(--uic-surface, #FFFFFF);
118
137
  }
119
138
  .shg-check.on { background: var(--uic-brand, #285AFF); border-color: var(--uic-brand, #285AFF); }
120
- .shg-link { color: var(--uic-brand, #285AFF); text-decoration: none; overflow: hidden;
121
- text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
139
+ .shg-link { color: var(--uic-brand, #285AFF); text-decoration: none; line-height: 18px;
140
+ overflow-wrap: anywhere; flex: 1; min-width: 0; }
122
141
  .shg-link:hover { text-decoration: underline; }
123
142
  .shg-num { text-align: right; font-variant-numeric: tabular-nums; }
124
143
 
@@ -195,7 +214,8 @@
195
214
 
196
215
  /* ── Ghost add-row (Airtable-style, attached to the grid) ───────────────── */
197
216
  .shg-ghost-row { cursor: pointer; }
198
- .shg-ghost-row td { border-color: var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF); }
217
+ .shg-ghost-row td { border-color: var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
218
+ vertical-align: middle; }
199
219
  .shg-ghost-num { color: var(--uic-mute-2, #8E9199); font-size: 15px !important; }
200
220
  .shg-ghost-cell { color: var(--uic-mute-2, #8E9199); font-size: 12.5px; padding: 0 10px !important; }
201
221
  .shg-ghost-row:hover td { background: var(--uic-brand-faint, #EFF3FF); }