* fix(transparent-stream): defer settled tool-detail DOM + cap per-turn rows (#5966) Reported by @curtisszmania-cytocync. Transparent Stream built a DOM node for every activity event of every settled turn at load, and eagerly materialized each tool row's full detail body — a 15+ prompt reasoning-heavy history produced thousands of subtrees and tipped the tab into a multi-GB freeze. The #5860/#5839 lazy-worklog fix did not cover Transparent Stream (it never collapses). Two-part surgical fix in static/ui.js, mirroring #5860's proven machinery: - Row-detail deferral: a settled+collapsed transparent tool row renders header-only; its heavy .tool-card-detail body builds on first expand (_materializeTransparentToolDetail), recovering the tool call from the scene after an innerHTML cache round-trip. Same anchor-suppressed post-processing as the eager path, so an expanded row is byte-identical. - Per-turn row cap: a settled turn with >CAP+SLACK (30+10) rows renders the last 30 behind a clean 'Show earlier steps (N)' affordance that materializes the prefix in place with viewport compensation. Just-settled turn (keep-open token) and already-revealed turns are exempt; true Trace tool-count is stashed so the label stays honest; Expand-all reveals capped rows; cache-restore re-wires the affordance. Live rendering is untouched. Server-side #5858 (scene serialize-after-messages) already covers the container RSS half on the experimental channel; this is the browser-DOM half. * style(#5966): compact 'Show earlier steps' pill (hug content, left-aligned) Constrain the affordance to fit-content width + align-self:flex-start so it reads as a light inline control on the activity rail, not a full-width bar. * fix(#5966): address Codex gate findings + Fable UX fast-follows Codex SHIP-ONLY-WITH-FIXES (3 SILENT defects), all fixed + browser-verified: - F1: buildToolCard PRE-BUILDS .tool-card-detail when a tool has args/output, so the old `!detail` defer guard skipped exactly the heavy rows. Defer now fires on settled+collapsed+has-detail and STRIPS any prebuilt body (verified: 400 shell tool rows -> 0 detail bodies mounted; expand still materializes byte-identically). - F2: stamp owner rawIdx on rows + affordance; dataset recovery and cache-restore rebind resolve the scene-owning message (multi-segment turns own it on a later segment, not the first) with a scene-owning-segment fallback. - F3: persist revealed-turn state in a session/owner-keyed Set + invalidate the session HTML cache on reveal, so a rebuild/switch-away never re-caps a turn the user expanded (verified: reveal 30->400, full re-render stays 400). Fable SHIP-UX fast-follows: t()-with-fallback label (+ en locale keys), 640px touch breakpoint, stale comment fixed. Tests: 21 pass (added has-detail deferral+strip, detail-less no-defer, owner-idx recovery, persistent-reveal, i18n). * fix(#5966): address Codex re-gate findings (r2) Codex re-gate SHIP-ONLY-WITH-FIXES — 2 more SILENT defects, both fixed + browser-verified: - F1(r2): _materializeTransparentToolDetail rebuilt via the thinner _transparentToolDetailHtml(), dropping buildToolCard's richer detail (diff coloring / show-more / canonical shell-command lead). Now transplants buildToolCard(tc)'s own .tool-card-detail node so an expanded deferred row is byte-identical to the eager path (verified: canonical structure + 595-char body). - F2(r2): after an in-session renderMessages() rebuild (next send) an already-open settled tool row got re-deferred, and disclosure-restore only toggled .open → open-but-empty card. _setWorklogDetailDisclosureOpen now materializes a deferred transparent row BEFORE toggling open (verified: expand → rebuild → still open WITH content). Likely the same defect the RegressionGate caught intermittently. Tests: 22 pass (added canonical-detail + disclosure-restore-materialize). * fix(review): add show_earlier_steps i18n keys to all locales (#5966) The transparent-stream row-cap "Show N earlier steps" pill added two new i18n keys (show_earlier_steps, show_earlier_step_one) to the English block only, so the strict locale-parity tests (zh/ko/ru/zh-Hant/...) failed with missing-key assertions and CI shard 0 went red across 3.11/3.12/3.13. Add both keys to all 14 non-English locale blocks with the English string as fallback (the repo's established add-with-English-fallback convention for new UI keys). Inserted after each block's collapse_all anchor. All 197 locale tests + the #5966 suite green; node --check clean. * fix(review): extract _transparentToolRowHasDetail into the #5700 harness #5966 added a _transparentToolRowHasDetail() call into the settled transparent render (_anchorSceneTransparentNodeForRow) to decide whether to defer a collapsed tool row's detail body. The pre-existing #5700 timestamp test extracts that render fn into a node harness but didn't extract the new helper, so the extracted fn hit a ReferenceError → node exited non-zero → 3 #5700 tests failed (RED across CI shards; the PR updated its own #5966 harness but missed this one). Add `eval(extractFunc('_transparentToolRowHasDetail'))` to the harness. The helper self-guards its _toolActionKind/_toolCardAllowsDetail deps (returns true when absent), and the #5700 timestamp lives on the row HEADER (rendered even when detail is deferred), so all 20 #5700 assertions pass unchanged — confirming this was a harness gap, not a timestamp regression. * fix(#5974): hide Show-earlier-steps pill when a capped transparent turn is collapsed (Fable UX gate) Fable UX gate SHIP-WITH-UX-FIXES: the .transparent-earlier-steps pill wasn't in the .assistant-turn[data-transparent-turn-collapsed=1] hide rule, so collapsing a capped turn via the name-tag toggle left an orphan pill. Added it to the hide rule. (i18n finding was already resolved — both pill keys present in all 15 locales w/ English fallback + show_earlier_step_one is live at ui.js:12918, not dead.) * Release exp-v0.52.50: transparent-stream lazy settled DOM + per-turn cap (#5974, #5966) --------- Co-authored-by: nesquena-hermes <agent@nesquena-hermes> Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
This commit is contained in:
6 files changed
+754
-7
No files matched your search
+45
-1
@@ -4356,7 +4356,8 @@ body.resizing .sidebar{transition:none!important;}
|
||||
|
||||
/* ── Collapsible Hermes chat name tag ───────── */
|
||||
.assistant-turn[data-transparent-turn-collapsed="1"] .transparent-event-row,
|
||||
.assistant-turn[data-transparent-turn-collapsed="1"] .transparent-event-controls{
|
||||
.assistant-turn[data-transparent-turn-collapsed="1"] .transparent-event-controls,
|
||||
.assistant-turn[data-transparent-turn-collapsed="1"] .transparent-earlier-steps{
|
||||
display:none;
|
||||
}
|
||||
.assistant-turn .msg-role.assistant{cursor:pointer;user-select:none;}
|
||||
@@ -6260,6 +6261,49 @@ main.main > #mainPlugin{display:none;}
|
||||
.load-older-indicator:hover{opacity:.75;}
|
||||
.message-window-load-earlier{align-self:center;margin:4px auto 14px;padding:7px 14px;border:1px solid var(--border);border-radius:999px;background:var(--surface);box-shadow:var(--shadow-sm);}
|
||||
.message-window-load-earlier:hover{background:var(--hover-bg);border-color:var(--accent);}
|
||||
/* #5966: "Show earlier steps" affordance for a capped Transparent Stream turn.
|
||||
Sits inline at the top of the turn's activity run, styled as a quiet pill in
|
||||
the app's own visual language (matches .message-window-load-earlier) but
|
||||
left-aligned + fit-content so the PILL (not the full row) is the click/tap
|
||||
target and it reads as part of the run. >=44px tall for touch on phones. */
|
||||
.transparent-earlier-steps{
|
||||
display:inline-flex;align-items:center;gap:7px;
|
||||
align-self:flex-start;width:fit-content;max-width:100%;
|
||||
margin:2px 0 8px;padding:7px 13px;
|
||||
min-height:34px;box-sizing:border-box;
|
||||
cursor:pointer;user-select:none;
|
||||
font-size:12.5px;font-weight:500;line-height:1;
|
||||
color:var(--text-muted,var(--muted));
|
||||
background:var(--surface);
|
||||
border:1px solid var(--border);border-radius:999px;
|
||||
box-shadow:var(--shadow-sm);
|
||||
transition:background .15s ease,border-color .15s ease,color .15s ease;
|
||||
}
|
||||
.transparent-earlier-steps:hover{
|
||||
background:var(--hover-bg);
|
||||
border-color:var(--accent);
|
||||
color:var(--accent-text,var(--text));
|
||||
}
|
||||
.transparent-earlier-steps:focus-visible{
|
||||
outline:2px solid var(--accent);outline-offset:2px;
|
||||
}
|
||||
.transparent-earlier-steps-chevron{
|
||||
display:inline-flex;align-items:center;justify-content:center;
|
||||
color:var(--accent-text,var(--blue));
|
||||
transition:transform .15s ease;
|
||||
}
|
||||
.transparent-earlier-steps:hover .transparent-earlier-steps-chevron{transform:translateY(-1px);}
|
||||
.transparent-earlier-steps-label{white-space:nowrap;}
|
||||
@media (max-width:640px){
|
||||
.transparent-earlier-steps{min-height:44px;padding:11px 15px;font-size:13px;}
|
||||
}
|
||||
/* Newly-revealed prefix rows fade in gently so the reveal feels intentional,
|
||||
not a flash of hundreds of rows. Respects reduced-motion. */
|
||||
@keyframes transparentEarlierReveal{from{opacity:0;transform:translateY(-2px);}to{opacity:1;transform:none;}}
|
||||
.transparent-event-row[data-earlier-revealed="1"]{animation:transparentEarlierReveal .18s ease both;}
|
||||
@media (prefers-reduced-motion:reduce){
|
||||
.transparent-earlier-steps-chevron,.transparent-event-row[data-earlier-revealed="1"]{transition:none;animation:none;}
|
||||
}
|
||||
.message-virtual-spacer{width:100%;pointer-events:none;}
|
||||
.msg-date-sep {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
|
||||
Reference in new issue
Block a user