Polish web UI UX: scroll anchoring, composer, perf (Phase 1)#267
Closed
edwin-zvs wants to merge 1 commit into
Closed
Polish web UI UX: scroll anchoring, composer, perf (Phase 1)#267edwin-zvs wants to merge 1 commit into
edwin-zvs wants to merge 1 commit into
Conversation
Phase 1 of the web UI polish pass — small, high-leverage fixes for the four most-noticed rough edges (scroll jumps on click, the flash/lurch on session load, the confusing Insert/Enter buttons, and sluggishness): - Scroll anchoring: drop `scroll-behavior: smooth` on the transcript so programmatic "stick to bottom" lands instantly; preserve the session list's scrollTop across its innerHTML rebuild so clicks/background updates no longer teleport it to the top; rAF-coalesce scrollToBottom with a passively-tracked at-bottom flag (no forced reflow per token). - Composer: collapse Insert/Enter to a single "Send" for chat sessions (byte-identical there); show a secondary "Type" only for PTY-backed sessions; add titles/aria + a Shift+Enter hint; restore typed text if a send fails (guarded against session switches). - Performance: throttle the header matrix loop before its layout read and gate it on document.hidden (~60 -> ~8fps; idle when backgrounded). - Polish/a11y: composer button hover/active/focus-visible states, a global :focus-visible ring, a global prefers-reduced-motion block, on-accent contrast fixes (#fff -> #06160c), and operator-row alignment. All changes are confined to crates/daemon/assets/index.html and were adversarially reviewed for regressions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing as redundant: the Phase 1 web UI changes from this branch are already in |
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.
Phase 1 of a web UI polish pass aimed at Apple-grade feel. These are small, high-leverage fixes targeting the four most-noticed rough edges. All changes are confined to
crates/daemon/assets/index.html.The four issues this addresses
innerHTMLrebuild resetscrollTopto 0, andscroll-behavior: smoothanimated every programmatic scroll over a still-settling layout.getBoundingClientRectevery animation frame (~60fps) and never idled.Changes
Scroll anchoring
scroll-behavior: smoothon.transcript-pane— programmatic "stick to bottom" lands instantly.sessionListEl.scrollTopacross theinnerHTMLrebuild (interim until the Phase 2 in-place reconcile).scrollToBottomwith a passively-tracked_atBottomflag — no forced reflow per streamed token.Composer
title/aria-label+ a Shift+Enter hint.Performance
document.hidden(~60 → ~8fps; zero cost when the tab is backgrounded), with avisibilitychangerepaint on return.Polish / a11y
:hover/:active/:focus-visible+ transition.:focus-visiblering (low specificity, so component focus styles still win).@media (prefers-reduced-motion: reduce)block.#fff→#06160c, ×4) and operator-row grid alignment.Verification
transitionend/animationendlisteners exist, so the reduced-motion block can't stall any state machine. The e2eweb_smokepaintedassertion still holds (canvas is painted synchronously at init).🤖 Generated with Claude Code