Repository navigation
perf(app): smoother panel, list and dialog motion - #142
Merged
Merged
Conversation
Both animated their width, so the chat was laid out again on every frame. With a long chat that took 4-7 ms a frame, over the 5.5 ms a 180 Hz screen gives, and frames came unevenly. Now the room changes at once and only a transform moves: the list and the panels slide over the chat, at 180 fps and about 1.8 ms a frame on the same chat. Spec 15.1 said the chat narrowed along with the panel; it now says the chat takes its new width at once.
React's strict mode mounts a panel twice in dev. The first mount left its own width as "the panel being replaced", so the second started from that width and did not slide. A panel no longer counts as replacing itself.
A dialog popped in but vanished at once, since its owner unmounts it. It now leaves a still copy of itself that fades and shrinks a little in 150 ms, whatever closed it (X, Escape, Cancel, Save), with what was typed still in its fields. Nothing changes for the dialogs that use it.
httpsphl
enabled auto-merge
October 4, 2026 01:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On a 180 Hz screen, hiding the bots list and opening or closing a side panel did not look smooth. Both animated
width, so the whole chat was laid out on every frame. Measured in the WebView2 with a long chat: 4-7 ms of main-thread work a frame (the budget at 180 Hz is 5.5 ms), frames arriving 4-10 ms apart, and 85-115 fps during the slide. WebView2 itself runs at 179 fps, so the limit was ours.What
transform. The room changes at once (one layout), and the list or panel slides over the chat. Same chat: 178-180 fps, about 1.8 ms a frame.Dialognow leaves a still copy of itself that fades and shrinks a little in 150 ms, however it was closed (X, Escape, Cancel, Save). No dialog had to change.Spec 15.1 and 15.3 are updated: the chat now takes its new width at once instead of narrowing with the panel.
Testing
pnpm check: 333 tests pass. New tests cover the dialog's exit copy (and none in strict mode) and a panel in strict mode still sliding from the edge.Manual check in the real app: open a bot with a long chat, press Ctrl+B a few times, open and close Details, Files and the browser panel, and open and close Settings, Usage and Edit bot.