Repository navigation
fix(desktop): a long send queue scrolls inside its own panel - #1583
Merged
Merged
Conversation
The queue panel floats over the transcript inside a frame that clips
(`overflow-hidden`), and it drew every waiting row at full height. A queue long
enough to outgrow the window therefore had its first rows clipped away above the
frame — not merely unreadable but unreachable: the edit and delete buttons on
those rows could not be hit by any pointer, and the footer's reservation, taller
than the frame it lives in, turned the transcript into blank space. The Agent
holds up to `DEFAULT_SESSION_QUEUE_CAPACITY` = 128 rows for one conversation, so
this is a state a real queue reaches.
The list is now its own scroll container, capped at `min(45vh, 26rem)`, so the
same rows are reachable by scrolling the panel. `useComposerInset` still reserves
the footer's measured height but stops at the frame minus a 120px band of
transcript, and re-measures when the frame itself resizes — the reservation can no
longer outrun the frame. No colours, type, spacing or radii change; the only new
pixels are the list's own scrollbar once it overflows.
Measured in the screenshot harness at the ceiling (`?queue=128`, the new
`queue-many` scenario, 1280×860). Every claim is a rect or a hit test:
before: panel top −6482 (6530px above the frame), list 7164px with no scroll,
first row's delete button behind "nothing", transcript −6530px
after: panel top 295, list 387px of 7164px, first and last rows' delete
buttons both hit, composer 56px and hit, transcript 247px painted
Reverting the panel to an unbounded list turns that scenario red on its first
check; reverting the inset clamp is covered by the new
"stops the reservation at the frame" unit test.
(cherry picked from commit 440943a)
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.
Cherry-pick of
440943a0bfromdev-huichen(that branch cannot be pushed:4c24677d2touches.github/workflows/ci.ymland the local PAT lacksworkflowscope).问题
桌面端队列面板浮在对话区上、父容器
overflow-hidden,而面板给每条待发行都按全高绘制 ⇒ 队列长过窗口时顶部几行被切在 frame 之外:不只是读不到,是任何指针都点不到上面的「修改/删除」(DEFAULT_SESSION_QUEUE_CAPACITY= 128,真实队列能到)。同时 footer 的占位比它所在的 frame 还高,把对话区挤成空白。改法
SendQueuePanel的列表变成自己的滚动容器,封顶min(45vh, 26rem),同样的行滚动可达。useComposerInset仍按 footer 实测高度占位,但封顶在「frame 减去 120px 对话带」,并在 frame 尺寸变化时重测,占位不再能超过 frame。验证
vitest run SendQueuePanel.test.tsx useComposerInset.test.tsx:15/15 通过。npm run lint(含tsc --noEmit):0 error(1 条既存 warning 在liveRunProjection.ts,与本改动无关)。queue-many场景红在the panel starts 6530px above the frame: its top rows are clipped;改后第一行「删除」可命中(top 295)、列表 387/7164 可滚、输入框 56px 可点、对话区可揭 247px。占位封顶由单元测试stops the reservation at the frame(550→480、900→480、420→420)保证。