Skip to content

perf(site): scope composer menu positioning to open surfaces - #30180

Closed
DanielleMaywood wants to merge 11 commits into
mainfrom
perf/agentspage-feedback-loop
Closed

DanielleMaywood wants to merge 11 commits into
mainfrom
perf/agentspage-feedback-loop

Conversation

@DanielleMaywood

@DanielleMaywood DanielleMaywood commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Idle typing with multiple Kanban chats repeatedly published shared document-root menu geometry. Move that geometry onto each open menu, and preserve board state when an already-frontmost pinned window is raised. This removes the dominant idle-typing cost without changing chat/editor lifetimes.

Plus, context, and organization popovers use native Radix anchors; model selection, slash suggestions, and workspace actions retain keyboard-inset and height compensation through usePositionOverlayAboveAnchor({ anchorElement, overlayElement, enabled }). The hook runs only while its menu is open below 768px, initializes before paint, and tracks anchor size, position-only layout shifts, relevant scrolling, and visual-viewport resize/scroll/scrollend. Updates are frame-coalesced and written only to the supplied wrapper. Default body portals remain. On mobile, model, slash, and workspace menus dismiss immediately instead of fading at stale coordinates; plus, context, and organization menus retain their existing exit animations.

Supporting changes make board Escape handling respect consumed events, label model and organization search inputs through cmdk, and migrate the mobile model story from Lost Pixel configuration to Pixel's 390px phone viewport. A screenshot-only story moves the composer after opening the model picker.

Production evidence

Independent production builds of base 2a81d59ccc and head 4a966a84dc, using a real CODER_EXPERIMENTS=chat-board ./scripts/develop.sh backend and verified built frontend assets:

Event to second animation frame, median/p95 ms Base Head
Chromium idle typing 658/1110 28/37
Linux WebKit idle typing 4539/6151 25/33
Chromium idle window switching, pointerdown 1860/1943 305/323
Linux WebKit idle window switching, pointerdown 7118/8394 946/996

These measure presentation opportunities, not direct paint latency or production INP. Each cell contains three interleaved runs: 51 keyboard samples or 18 alternating pointerdown samples. The 1440x900 board held two side-by-side 520x720 windows with all 240 transcript rows mounted, approximately 8.7k DOM nodes per window. Engines were Chromium 140.0.7339.186 and Linux WebKit 26.0 with Playwright 1.55.1. Shared-host load varied; the final high-load base WebKit run was retained. Our fixture was smaller than the review's approximately 17k-node fixture, and switching was measured from pointerdown, not click, so the exact review numbers were not reproduced. A base with the desktop gate from #29596 had similar medians to this head: the additional menu changes provide instance-local ownership, not a separately established latency advantage.

Substantial window-switching and streaming costs remain; this PR does not solve them. These production measurements precede the layout-shift/scrollend follow-up and must not be attributed to its final commit. Production Firefox, first-50-message-only histories, and open-menu timing were not benchmarked. Native iPhone Safari/Chrome keyboard validation remains outstanding; synthetic terminal-event checks do not establish native event delivery or cover settling that emits no usable event.

Investigation decisions, validation, and reproduction evidence
  • Use menu-owned Radix positioning where it satisfies the placement policy; retain the above-anchor compensation only for the three consumers that need it. No private portal host, positioning registry, specialised adapter, configurable placement engine, or shared DropdownMenu/Popover API expansion.
  • Resolve each Radix positioning wrapper in its content-ref callback, not during render or typing. Preserve the DOM lookup's natural null/undefined values. Geometry never writes document-root CSS variables.
  • An actual AgentCreateForm probe reproduced unchanged-size banner movement leaving the three menus about 69px away from the composer. Opening the model menu with the banner present and then removing it left 53px overlap. Add Floating UI's event-driven layout-shift tracking to the existing open-only lifecycle; declare the already-installed @floating-ui/dom 1.7.5 directly. Keep existing resize/scroll handling and cancel/dispose owned work on close or element replacement.
  • Restore the open-only visualViewport.scrollend listener for a final viewport change that emits only that event. Do not restore per-keystroke focus/input listeners or the old application-owned timeout ladder. This is a narrow terminal-event correction, not a claim that native iOS or silent settling is validated.
  • Retain callback/state correctness tests, the captured-trigger first-click regression, pure calculation cases, and consumed/unconsumed Escape coverage. Performance/internal-spy assertions and the frontmost-window identity test remain deliberately removed. Existing preview pinning and minimized restoration tests already cover their state outcomes; placement coverage uses Pixel stories.
  • Current local checks passed 111 affected unit tests, 209 Chromium Storybook checks, formatting, frontend checks, full lint/typecheck/React Compiler, and the production frontend build. Independent Chromium, Firefox, and container Linux WebKit probes passed all three menus through both initial banner conditions, resize/scroll/scrollend, breakpoint roundtrips, close/reopen, and simultaneous-instance geometry. First sampled visible-frame placement had an 8px gap. Silent no-event viewport settling remains unsupported. CI passed at 3ce3ed6d8b, including JavaScript tests, Storybook, formatting, generation, repository lint, E2E, and the required gate. The complete local unit suite was not rerun, and earlier diagnostic runs had unrelated baseline failures.
  • Production source refs: base 2a81d59ccc718f1e47da7fae05f3d7d867ef63f5, head 4a966a84dc2bc060503ae656667a595bab2cf2da. The gate comparison ports equivalent desktop/write-dedup logic from 2d15513b35 onto that same base; it is not a build of the historical gate commit's different parent. Engines ran sequentially with no agent-owned build or competing browser workload during the measurement window, but the host was shared.
  • Independent seeding/provider and browser probes remain local and are excluded from this PR. The production comparison used NODE_ENV=production pnpm exec vite build in isolated worktrees and a static frontend with API/WebSocket proxy, rather than Vite development assets. Raw samples, exact gate patch, browser commands, and independent fixture sources are retained in the validation evidence bundle.
  • Separate-work observations were independently checked: native DOM moves retain substantial switching cost; the five-commit perf(site): keep mobile dropdown variables off the root on desktop #29596 stack improves streaming in aggregate without per-commit attribution; approximately 30-second WebKit stalls recur without proven memory-pressure attribution; live parts stop near the 1 MiB episode cap while the chat remains running. The live server's suppressed buffer error remains inferred, although a direct buffer probe captured ErrEpisodeFull. None of these separate fixes is included here.

Generated by Coder Agents on behalf of @DanielleMaywood.

@linear-code

linear-code Bot commented Sep 30, 2026

Copy link
Copy Markdown

CODAGT-1080

@DanielleMaywood DanielleMaywood changed the title perf(site): avoid idle multi-chat composer style recalculation perf(site): scope composer menu positioning to open surfaces Sep 30, 2026
@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T18:08:19.173621Z c28b03b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: c28b03b61b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review October 1, 2026 18:04
@DanielleMaywood
DanielleMaywood requested a review from a team as a code owner October 1, 2026 18:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c28b03b61b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pr-queue-manager
pr-queue-manager Bot requested a review from ThomasK33 October 5, 2026 08:28

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielleMaywood, this review comes from my agents' investigation of the same multi-chat lag that #29596 chased. Could your agents reproduce or refute each finding below with their own harness before changing code, and reply in each thread with what they ran and what they saw? Please also check the benchmark table and the out-of-scope observations at the end: they come from one shared host with variable load.

This PR removes the main cause of multi-chat typing lag, the five --mobile-dropdown-* root properties written by every mounted composer, and I agree with moving the geometry onto each open menu. In this PR: one confirmed placement regression (P2), one device check (P2), two description or evidence issues (P3) and two minor items (P4). Several costs remain that this PR does not target; they are listed last, and no change is requested for them here.

Benchmark (production builds)

Base 2a81d59ccc against head 4a966a84dc, plus base with #29596's desktop-only gate (2d15513b35) for comparison. Chat board with two side-by-side windows at 1440x900, 240 transcript rows (about 17k DOM nodes) per window with full history loaded, seeded with the scripts/chatbench seed and fake streaming provider from #29596. Headless Chromium 140 and Linux WPE WebKit 26.0 (Playwright 1.55.1). At least three interleaved runs per cell. Latency runs from the input event's timestamp to the second animation frame after it; values are median/p95 in ms.

base this PR base + 2d15513b35
Chromium, keystroke, idle 520/1282 24/33 23/32
WebKit, keystroke, idle 5669/8847 26/35 27/35
WebKit, keystroke, both chats streaming 4608/7983 82/139 75/250
Chromium, click into the other window, idle 2042/2439 460/493 492/790
WebKit, click into the other window, idle 10490/15744 1221/1549 1260/1784

Not measured: Safari on macOS or iOS, Firefox, a page with only the first 50 messages loaded, and any open composer menu.

On desktop the gate gives the same medians as this PR, so the additional code buys ownership. On base, every mounted composer, minimized board windows included, writes the same root properties, so the last writer decides where a mobile menu docks, and one composer's cleanup removes values the others still use. The code shows this; I did not reproduce a user-visible misplacement from it. The gate also had one click of about 2.3 s in each of its three WebKit streaming runs, against a PR maximum of 1.77 s, and I don't know why.

In this PR, not tied to one line

  • P3 The description's performance evidence covers idle typing on a Vite dev server, gives a baseline only for WebKit, and was measured on edited code at 4b3f5a2605. The harness is not committed, and clicking between windows was not measured. Could the description cite production base and head numbers (the table above or your own) and say that window switching is not covered?
  • P4 Three changes are not mentioned in the description: the Escape defaultPrevented check (BoardWindows.tsx:99), the cmdk label props (ModelSelector.tsx:231, CompactOrgSelector.tsx:107), and lostpixel to pixel in ModelSelector.stories.tsx. Either list them or split them out.

Outside this PR: further performance work (no change requested here)

Measured with the same setup on this PR's head. These are candidates for separate work.

  1. Clicking into the back window still costs 460/493 ms in Chromium and 1221/1549 ms in WebKit, and 1753/1931 ms in WebKit with three windows. Appending that window's DOM node by hand, with no React involved, costs about the same (Chromium 433 to 531 ms, WebKit 1047 to 1117 ms). Windows stack by DOM order (all fixed z-40) and toFront reorders the list, so React moves the raised window's subtree. This supports the DOM move as most of the remaining cost but does not prove all of it, and a stable DOM order with z-index stacking was not tried.
  2. With both chats streaming, WebKit spends 4.2 to 4.7 s of each 10.4 s in animation-frame gaps over 50 ms. With the other five #29596 site commits applied on top of this PR (ba9cf77772, 6ce224a4eb, cdc540b91f, d90301e556, 5288a15101), that falls to 0.37 to 0.46 s, and streaming keystrokes go from 82/139 to 42/134 ms. Not attributed per commit. If this PR merges, #29596's 2d15513b35 is superseded.
  3. With three idle windows, WebKit stalled for 1.5 to 1.85 s at exactly 30.0 s intervals in two of three runs. The #29596 investigation linked a 30 s cycle to WebKit memory-pressure handling; this run was not profiled.
  4. Backend: the live stream stops updating after about 2,580 deltas. The message part buffer allows 1 MiB per episode, one episode per generation attempt (coderd/x/chatd/messagepartbuffer/message_part_buffer.go:35). After that, AddPart returns ErrEpisodeFull and the publish closure discards the error (coderd/x/chatd/generation.go:1207). In the benchmark the page text stopped at 17,573 characters while the chat stayed running, and a reconstruction of the serialized size of the deltas sent up to that point lands on the same character. This is inferred from code and data; the error was not captured at runtime.

🤖 This review was automatically generated with Coder Agents.

Comment on lines +124 to +134
const observer = new ResizeObserver(scheduleUpdate);
observer.observe(anchorElement);

window.addEventListener("resize", scheduleUpdate);
window.addEventListener("scroll", handleScroll, {
passive: true,
capture: true,
});

viewport?.addEventListener("resize", scheduleUpdate);
viewport?.addEventListener("scroll", scheduleUpdate);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The hook re-measures on anchor resize and on window and visual-viewport resize or scroll, but not when the composer moves without changing size. The model, slash and workspace menus then stay where they opened, and transform: none !important in mobile-composer-menu overrides the Radix repositioning that would otherwise follow the move.

Repro in Chromium at 700x800 with the real AgentCreateForm in an isolated page: open the model picker, then set workspacesError so the error banner pushes the composer from top 295 px to 356 px at the same size. The menu bottom stays at 287 px. After one keystroke in the model search box, base re-aligns to the intended 8 px gap (its document selectionchange listener re-measures), while this PR stays 69 px away. Clearing the error while the picker is open leaves the menu over the editor by 53 px. The slash menu behaved the same in an isolated probe; the workspace menu uses this hook but was not run.

Could the hook also track the anchor's position while open? One option is autoUpdate from @floating-ui/dom, which handles layout shifts; it is installed through radix-ui but is not a direct dependency. That would keep the open-only lifetime.

🤖

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced before changing code, and fixed in 3ce3ed6d8b.

Our temporary page imported the actual AgentCreateForm, model picker, Lexical slash menu, and WorkspacePill with fixture providers. At 700x800, toggling workspacesError moved the model/slash composer from top 307 to 368 without changing its size; the old head left the menu bottom at 299, giving a 69px gap. Opening with the banner present and then clearing it produced the reported 53px overlap. Firefox reproduced the same failure, with fractional rounding. The workspace component also reproduced the stale gap. Baseline initially missed banner-only movement too, but input usually corrected it; the head did not.

Added only Floating UI's layout-shift tracking to the existing open-only hook. Scroll/resize tracking and the coalesced callback remain unchanged; no continuous frame polling or document-root writes. @floating-ui/dom 1.7.5 is now declared directly, without upgrading the installed version.

Ran the actual fixed hook, without candidate injection, through all three menus and both banner initial conditions in Chromium 140.0.7339.186, Firefox 141.0, and container Linux WebKit 26.0 with Playwright 1.55.1. Banner insertion/removal, typing, resize, scrolling, breakpoint roundtrips, and close/reopen all retained the 8px gap. The first sampled visible frame was correctly positioned, and simultaneous menus retained independent coordinates. A screenshot-only moved-composer story is included.

Reproduction commands in our retained temporary harness: node fixed/server.mjs head, node fixed/verify.mjs chromium, node fixed/verify.mjs firefox, and the same WebKit probe in mcr.microsoft.com/playwright:v1.55.1-noble. These component probes use real production components and CSS, with query/API fixtures; they are not native-device or production attachment-workflow validation.

Generated by Coder Agents on behalf of @DanielleMaywood.

Comment on lines +97 to +110
update();

let frame: number | null = null;

const scheduleUpdate = () => {
if (frame !== null) {
return;
}

frame = requestAnimationFrame(() => {
frame = null;
update();
});
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Check: base re-read geometry after focus and input events at the next frame, two frames, and 50, 150 and 300 ms, with the comment "Mobile WebKit can finish keyboard panning after focus and input events" (#25619). This version measures once when the menu opens, then only on resize and scroll events, and no longer listens for visualViewport scrollend. A menu opened after the keyboard settles measures correctly. A menu opened while the keyboard is still moving, for example typing / right after focusing, depends on iOS firing a later resize or scroll event.

The description says native iOS validation is outstanding. Could someone run the #25619 manual steps on a real iPhone in Safari and Chrome: focus the composer, type / immediately, and open the model picker and workspace menu with the keyboard up? The plus, context and organization menus now use Radix positioning, so they need the same check with the keyboard up. If one is stale, a single re-read on scrollend or one timeout after opening would not bring back per-keystroke work.

🤖

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the open-only visualViewport.scrollend subscription and its cleanup in 3ce3ed6d8b. Did not restore the per-keystroke retry ladder or add an arbitrary settling timeout.

Read #25619's iPhone Safari/Chrome manual steps and compared the baseline listeners. Our synthetic viewport probe independently reproduced the missing terminal-event handling: after changing the final viewport height/offset with only scrollend, the old head stayed stale while baseline corrected. The fixed actual hook updated model, slash, and workspace menus in Chromium 140, Firefox 141, and container Linux WebKit 26.0: height 140 / offsetTop 10 gave menu bottom 142, the intended 8px inset. Ran this through fixed/verify.mjs in the same real-component harness as the layout-shift reproduction.

The requested real-iPhone check remains outstanding. This Linux workspace has no exposed physical iPhone or device-cloud access. Linux WebKit and synthetic events cannot establish Safari/Chrome soft-keyboard timing. A deliberately silent viewport change without resize, scroll, scrollend, or anchor movement still leaves geometry stale; the description now states that boundary explicitly. We have not marked the native checks, including plus/context/organization with the keyboard up, as passed.

Generated by Coder Agents on behalf of @DanielleMaywood.

Comment thread site/src/index.css
Comment on lines +341 to +345
/* Geometry is supplied only while open, so hide exit content before cleanup. */
&[data-state="closed"] {
animation: none !important;
visibility: hidden !important;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 This rule applies only to menus with mobile-composer-menu (model, slash, workspace). The plus, context and organization menus keep the exit fade: at mobile width, Escape on the organization menu leaves it data-state="closed", visible, with a 0.15 s exit animation. The description says "Mobile composer menus dismiss immediately on close". Could it name the three menus instead?

🤖

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and corrected the description to name model selection, slash suggestions, and workspace actions as the menus that dismiss immediately on mobile. Plus, context, and organization retain their exit animations; no animation-code change was made.

Ran the actual organization selector and model/slash components at 390x844 in Chromium 140. After organization Escape, data-state="closed" stayed connected with the 0.15s exit animation: opacity was about 0.48 at 26ms, about 0.035 at 77ms, zero at animation end around 147ms, and unmounted by 179ms. Model/slash were disconnected at their close mutation. Workspace was additionally source-verified to use the same immediate-close utility. Probe: node /tmp/pr30180-minor-validation/browser.mjs, using production CSS and real composer anchors.

Generated by Coder Agents on behalf of @DanielleMaywood.

Comment on lines +116 to +122
export const raise = (list: readonly ChatWindow[], key: string) => {
const win = list.find((w) => windowKey(w) === key);
return win ? toFront(list, win) : list;
if (!win || (win === list.at(-1) && win.pinned && !win.minimized)) {
return list;
}

return toFront(list, win);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P4 No test covers the new branch: raising the frontmost pinned window returns the same list. That identity is what stops the board re-render and the saveBoardStorage write that onKeyDownCapture in ChatWindows.tsx triggers on every keypress. windows.test.ts already asserts identity for a missing key, so a toBe(list) case for the frontmost window, plus a frontmost preview being pinned and a frontmost minimized window being restored, would fit there.

In the benchmark, base plus 2d15513b35 (without this change) matched this PR's typing latency, so this change saves storage writes and renders rather than measurable latency.

🤖

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving the reference-identity test removed, intentionally. @DanielleMaywood explicitly requested correctness-only tests and approved deleting this exact performance-contract case in 4a966a84dc; we are not restoring it indirectly or adding redundant cases.

Independently imported the actual raise function in a temporary probe: frontmost pinned and missing-key inputs returned the same array; a frontmost preview became pinned, a frontmost minimized window was restored, and a back window moved to the front. The existing windows.test.ts already covers the requested frontmost preview pinning and frontmost minimized restoration. All 14 existing window tests passed.

The source supports avoiding redundant state/storage work. Our three-interleaved-run production comparison also found similar idle-typing medians for this PR and the ported desktop gate, so neither the description nor this response attributes a separately measured latency gain to the identity guard.

Generated by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@mafredri, addressing the P3 production-evidence item in review 5414740009 separately from the inline threads: the PR description now uses an independent production base/head comparison and explicitly records residual window-switching cost and measurement limits.

Built base 2a81d59ccc and head 4a966a84dc with NODE_ENV=production pnpm exec vite build, served verified built assets against a real CODER_EXPERIMENTS=chat-board ./scripts/develop.sh backend, and ran three interleaved Playwright 1.55.1 iterations per cell. The 1440x900 board had two 520x720 windows, all 240 rows loaded, approximately 8.7k nodes/window; this is smaller than your approximately 17k-node fixture. There were 51 keyboard samples and 18 alternating switching samples per cell.

Median/p95 ms Base Head
Chromium 140 idle typing 658/1110 28/37
Linux WebKit 26.0 idle typing 4539/6151 25/33
Chromium switching, pointerdown 1860/1943 305/323
WebKit switching, pointerdown 7118/8394 946/996

This corroborates the main improvement, not exact equality with your numbers. We measured switching from pointerdown, because raising/moving the subtree suppresses the subsequent click. Shared-host load varied, including a high-load final base WebKit run, which was retained. The equivalent #29596 desktop gate ported onto the same base had similar medians. These are event-to-second-rAF presentation opportunities, not paint latency or INP, and precede the layout-shift/scrollend follow-up 3ce3ed6d8b. Production Firefox, first-50-only histories, native Safari/iOS, and open-menu timing were not measured. The uncommitted independent harness remains excluded from this PR.

Independent checks of the four separate-work observations
  1. DOM movement: direct append without React cost 281-286ms in Chromium and 748-788ms in WebKit for two windows, comparable to residual switching. This supports a substantial native DOM-move contribution, not complete attribution. Stable DOM/z-index stacking was not tested.
  2. Streaming: our different mixed-Markdown corpus reproduced remaining stalls and aggregate benefit from the five-commit stack. WebKit streaming keys were base 3323/7551, head 95/932, gate 141/933, stack 50/80ms. Exact review numbers and per-commit attribution were not reproduced. Initial diagnostic counters misread batched events; a corrected fresh-pair probe separately confirmed both live streams advanced 146 to 435 parts while running, with zero protocol errors. The gate/head spike comparison was not reproduced consistently, so we do not infer a cause.
  3. Periodic idle stalls: three clean 95-second WebKit observations with three untouched windows reproduced approximately 1.03-1.06s stalls at roughly 30-second intervals in all three runs. No engine trace was captured, so memory-pressure attribution remains unverified.
  4. Episode cap: actual seven-character deltas stalled at 2,581 live parts / 1,048,378 serialized bytes / 18,067 characters while the chat remained running. The next equivalent part would exceed 1 MiB. A direct buffer probe captured ErrEpisodeFull; the live server emitted zero protocol errors, so its suppressed AddPart error remains inferred from source and the byte boundary. Final durable completion arrived; we are not claiming permanent message loss.

Raw samples, browser/version/build provenance, the exact gate/stack patches, and the temporary quiet-benchmark.cjs / provider / buffer probes are retained in the investigation evidence. No separate-work code fixes were applied to the PR.

Generated by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood

Copy link
Copy Markdown
Collaborator Author

@mafredri, addressing the P4 description-scope item in review 5414740009: the description now explicitly lists all three supporting changes rather than splitting this validated menu revision.

  • Board Escape handling respects defaultPrevented, so an inner layer consuming Escape does not also dismiss its chat window. The existing callback/state correctness test exercises consumed and unconsumed Escape.
  • The cmdk labels name model and organization search inputs. Our actual-component probe confirmed cmdk's generated aria-labelledby references its hidden root label, so the labels affect the accessible names.
  • The mobile model story uses Pixel's 390px phone matrix instead of the old Lost Pixel 320px configuration. Pixel was already the installed visual gate; the changed mobile state now uses its supported configuration.

Validated the exact base-to-head diff, installed cmdk/Pixel behavior, and existing correctness coverage. These are now documented without claiming that the labels or Escape guard independently produced the benchmark improvement.

Generated by Coder Agents on behalf of @DanielleMaywood.

@DanielleMaywood
DanielleMaywood force-pushed the perf/agentspage-feedback-loop branch from 3ce3ed6 to d3fb86b Compare October 6, 2026 14:04
@pr-queue-manager
pr-queue-manager Bot requested review from jakehwll and removed request for ThomasK33 October 6, 2026 14:10
@github-actions github-actions Bot added the stale This issue is like stale bread. label Nov 7, 2026
@github-actions github-actions Bot closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants