Skip to content

experiment(control-ui): park closed header session menu [do not merge] - #174758

Closed
steipete wants to merge 1 commit into
mainfrom
steipete/coldload-header-session-menu-live-churn
Closed

steipete wants to merge 1 commit into
mainfrom
steipete/coldload-header-session-menu-live-churn

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A signed-in dashboard deep-link reload keeps updating the closed header session menu during live session traffic. Campaign evidence attributed 290–583 late mutations per reload window to this hidden surface.

User Impact

Rejected experiment — do not merge. The stream improved, but header first-open readiness regressed by 18.2 ms p50, exceeding the campaign's 16 ms allowance. The first render opportunity also regressed by 23.8 ms. This variant must not ship.

Why This Change Was Made

The candidate parks header presentation props and the owner snapshot while the menu is closed, retaining the idle-prepared DOM. It reconciles synchronously before native opening validates and focuses the menu. Roster construction moves inside the parked boundary, deleting its separate eager memo. The result demonstrates a tradeoff: less background work, more synchronous work at opening. It does not establish that the remaining cost is inherent.

Evidence

Seven interleaved AB/BA pairs on one quiet AWS c7a.4xlarge, lease cbx_163b383052c7 (16 AMD EPYC 9R14 vCPUs). Production bundles built once per variant; repository Playwright Chromium; warm synthetic dashboard reloads; 125 mixed live frames across 24 active sessions and 126 assignment options. Values below are median [Q1, Q3].

Metric Baseline Candidate
Late header mutations (>5s of replay) 48.00 [48.00, 48.00] 0.00 [0.00, 0.00]
All stream header mutations 512.00 [512.00, 512.00] 0.00 [0.00, 0.00]
Renderer busy ms / replayed event 34.93 [34.83, 35.52] 34.17 [33.90, 34.44]
Stream LoAF blocking ms 567.00 [545.00, 570.50] 460.00 [459.50, 474.00]
Reload LoAF blocking ms 375.00 [343.00, 385.50] 391.00 [364.00, 399.50]
Header first-open readiness ms 30.80 [30.05, 31.10] 49.00 [48.50, 49.30]
Header first render opportunity ms 69.20 [68.90, 70.05] 93.00 [90.95, 94.25]
126-owner readiness ms 18.50 [18.45, 18.70] 19.10 [18.90, 20.15]
Owner first render opportunity ms 83.00 [81.95, 83.50] 107.00 [95.65, 110.35]

Both stream busy/event and stream blocking improved with non-overlapping IQRs. The first-open gate failed, so this draft is closed rather than promoted. No full UI e2e or CI acceptance claim is made after that stop decision.

The header test file passed all 24 tests on the lease (9.17 s wrapper wall time, 7.90 s Vitest duration). The regression fails on the baseline at its closed-menu mutation assertion. Native opening, compact actions, ordering/group preservation, action gating, and retained row identity passed the existing file. P2 autoreview is clean. The test waits for overlay-after-hide before observing steady-state mutations.

Measured baseline: a1506c240abaa0781b7a462c30c653d2caf14dd4; measured candidate runtime: a77fbf22f819c1f2fc2f15d321e861235e8c8a08, with the test-only lifecycle correction recorded as a patch. Subsequent branch updates preserve the experiment; these numbers remain evidence for that pinned comparison.

Production delta for the experiment: +7 LOC, 26 insertions / 19 deletions across three files. The growth carries the closed/open presentation boundary and synchronous native focus contract; the redundant eager roster memo is removed. One header regression file also changes. No Gateway state/schema/config or changelog changes.

Harness fidelity corrections were kept outside production: legacy chat-controller counters are explicitly unavailable after their Solid cutovers; the current sidebar counter remains. Browser-native TaskDuration, LoAF attribution and DOM observations supply the performance evidence. The synthetic mock advertises sessions.assignOwner, which the stock fixture omitted, so the real owner branch can open. Both variants use identical instrumentation and capability data. No private deployment capture is attached.

Follow-up for the campaign lead: preserving a completed idle-preparation snapshot while dropping live dependencies may avoid this opening cost. It was not attempted after the gate failed.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR freezes closed header-menu presentation and owner-roster updates, then refreshes them synchronously before opening.

Example: A closed session menu receives pinned=false and unread=true after previously showing a pinned session.

  • Before: The retained hidden menu updates immediately.
  • After: The hidden DOM stays unchanged until reopening, when the same pin button shows “Pin session” and the menu offers “Mark as read.”

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source change is focused and no actionable defect was identified, but this deliberately unvalidated experiment does not establish a performance win.
Proof confidence 🦪 silver shellfish (2/6) This maintainer-authored experiment is outside the ordinary contributor-proof gate; its body explicitly leaves runtime validation and performance acceptance pending.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Signed-in dashboard reloads spend rendering work updating a session menu the user has not opened.
Reason: The maintainer-authored experiment targets an identified hidden-rendering cost with a small change and an explicit measurement hold; its direction needs no second approval.

Merge readiness

✅ Ready for maintainer review

Keep open as a maintainer-owned, explicitly paused performance experiment; no concrete introduced defect was found.

Priority: P2
Reviewed head: a77fbf22f819c1f2fc2f15d321e861235e8c8a08

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The planned signed-in reload comparisons and native header/owner opening checks are pending, and no base-failing/head-passing result for the modified regression test is supplied.
Agent review details

How this fits together

The Control UI header menu consumes session properties and Gateway directory projections, presents available actions, and dispatches selections through existing action owners.

flowchart LR
  A[Session properties] --> C[Parked presentation]
  B[Gateway directory owners] --> D[Parked roster]
  C --> E[Retained native menu]
  D --> E
  E --> F[Existing action owners]
Loading

Technical review

Best possible solution:

Retain the existing parking helper and native menu lifecycle, and adopt this optimization only if the planned comparison demonstrates a benefit without worsening opening behavior.

Do we have a high-confidence way to reproduce the issue?

Current source shows retained hidden menu content consuming live properties and roster projections; the claimed performance magnitude has not been independently reproduced.

Is this the best way to solve the issue?

Reusing createParkedProjection fits the existing retained-view contract and preserves the shared action owner, but the optimization's value still depends on measurements.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 009f93170ec1.

Provenance checked

  • Retained native session-menu content keeps the original intent (dc61fee: The native-menu migration retained mounted DOM, focus behavior, existing actions, permissions, and synchronous dispatch through domain owners.)
  • Idle preparation and first-open latency keeps the original intent (10ee984: Idle preparation reduced startup blocking while avoiding the first-open latency introduced by lazy-only construction.)
  • Owner-roster derivation changes intended behavior with a stated reason (f22af74: Solid derivations replaced host invalidation while preserving search, directory loading, reconnect behavior, and identity refresh; this PR explains why the header now defers those presentation updates while closed.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

  • Explicit experiment hold: The complete current body says validation and seven interleaved comparisons are pending and explicitly prohibits merging; GitHub confirms the reviewed head remains a draft. (a77fbf22f819)
  • Verified introduced behavior: The pinned introduction diff parks header properties and the roster, preserves live trigger labeling and prewarm inputs, and flushes updated presentation before native opening. (ui/src/pages/chat/components/chat-header-session-menu.tsx:108, a77fbf22f819)
  • Current-main boundary: Current main retains live owner-roster memos; the touched production files match the introduction base, so this parking change is still distinct work. (ui/src/components/session-owner-menu.ts:29, 009f93170ec1)
  • Existing parking owner: The existing helper retains its previous value while hidden, drops source dependencies, and reads current sources when presentation resumes. (ui/src/lib/reactive/parked-projection.ts:4, a77fbf22f819)
  • Regression coverage inspected: The modified mounted-menu test checks zero hidden mutations, current pin/unread presentation on reopening, and retained button identity; no execution result is supplied. (ui/src/pages/chat/components/chat-header-session-menu.test.ts:234, a77fbf22f819)
  • CI attribution: The failed “PR context and evidence” check requests authored body sections; it reports no runtime failure. Selected runtime checks were skipped, and the cancelled auto-response has a successful replacement. (a77fbf22f819)

PR surface

Source +7, Tests +9. Total +16 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 26 19 +7
Tests 1 10 1 +9
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 36 20 +16

Labels

Label changes:

  • add P2: This is a focused reload-performance improvement with no established outage or broken user workflow.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a focused reload-performance improvement with no established outage or broken user workflow.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Complete the planned seven interleaved comparisons, including hidden mutations, renderer work, LoAF blocking, and native header/owner first-open latency.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 6:31 PM ET / 22:31 UTC.

@steipete steipete closed this Oct 16, 2026
@steipete steipete changed the title experiment(control-ui): park closed header session menu [do not merge] experiment(control-ui): reconcile parked header menu rows [do not merge] Oct 16, 2026
@steipete steipete changed the title experiment(control-ui): reconcile parked header menu rows [do not merge] experiment(control-ui): park closed header session menu [do not merge] Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant