fix: recognize visible Dockview chat panels (#3481)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
status: active
|
||||
system: ui
|
||||
created: 2026-07-30
|
||||
updated: 2026-09-04
|
||||
updated: 2026-09-07
|
||||
owners:
|
||||
- cfl
|
||||
---
|
||||
@@ -72,6 +72,11 @@ hand-off it is designed to protect.
|
||||
newest cached message and a disabled transcript shows its saved reader
|
||||
position as soon as the panel is measurable, without first exposing the
|
||||
browser's default top position.
|
||||
- **AC-UI-TRANSCRIPT-AUTO-SCROLL-001.15:** **GIVEN** a desktop transcript is the
|
||||
selected tab in its Dockview group while another visible group owns global
|
||||
focus, **WHEN** a task switch restores that layout, **THEN** the transcript
|
||||
is treated as visible and completes its enabled or disabled initial
|
||||
placement.
|
||||
|
||||
## Migrated source detail
|
||||
|
||||
@@ -127,6 +132,9 @@ the asynchronous hand-off it is designed to protect.
|
||||
**WHEN** the user switches between them and returns, **THEN** the incoming
|
||||
enabled transcript shows the newest cached message immediately and remains
|
||||
at the newest message after its history refresh.
|
||||
- **GIVEN** the Changes panel owns Dockview focus while Chat remains the
|
||||
selected center tab, **WHEN** the user returns to that task, **THEN** Chat
|
||||
completes initial transcript placement without requiring an agent update.
|
||||
- **GIVEN** the incoming transcript has auto-scroll disabled, **WHEN** that
|
||||
environment-switch placement runs, **THEN** it restores the incoming
|
||||
session's saved position rather than the outgoing transcript's position.
|
||||
|
||||
@@ -4,7 +4,7 @@ system: ui
|
||||
requirements:
|
||||
- REQ-UI-TRANSCRIPT-AUTO-SCROLL-001
|
||||
created: 2026-08-27
|
||||
updated: 2026-09-04
|
||||
updated: 2026-09-07
|
||||
owners:
|
||||
- kandev
|
||||
---
|
||||
@@ -50,8 +50,15 @@ if that path reads it. The scroll setter records the WebKit-safe offset.
|
||||
Desktop Dockview renders panel content through persistent portals. An inactive
|
||||
session transcript can therefore be mounted and receive messages while its
|
||||
scroll container has zero or detached geometry. `usePanelActive` supplies the
|
||||
authoritative active-tab signal to `TaskChatPanel`, which passes it to the
|
||||
native transcript scroll coordinator as `isVisible`.
|
||||
authoritative group-local visibility signal to `TaskChatPanel`, which passes it
|
||||
to the native transcript scroll coordinator as `isVisible`.
|
||||
|
||||
Dockview's panel `isVisible` property means the panel is the selected tab in
|
||||
its own group. Its `isActive` property additionally requires that group to own
|
||||
global Dockview focus. The transcript uses `isVisible` and
|
||||
`onDidVisibilityChange`; clicking a side-by-side Files or Changes group cannot
|
||||
make a still-rendered Chat panel ineligible for initial placement or read
|
||||
tracking.
|
||||
|
||||
Geometry-based initialization and divider placement do not consume their
|
||||
one-time completion state while `isVisible` is false. When a transcript first
|
||||
@@ -194,10 +201,11 @@ pinning, and disabled position restoration.
|
||||
## Failure modes
|
||||
|
||||
- If the container is not mounted, the helper performs no work.
|
||||
- If a transcript is mounted but inactive, one-time placement remains pending
|
||||
until the panel becomes active and measurable.
|
||||
- If a panel becomes inactive again before the post-restore frames complete,
|
||||
the scheduled placement is cancelled.
|
||||
- If a transcript is mounted but hidden behind another tab in its group,
|
||||
one-time placement remains pending until the panel becomes visible and
|
||||
measurable.
|
||||
- If a panel becomes hidden again before the post-restore frames complete, the
|
||||
scheduled placement is cancelled.
|
||||
- Chromium, Gecko, and WebKit clamp the signed 32-bit maximum to the native
|
||||
maximum scroll position.
|
||||
- An offset outside WebKit's safe range can resolve to zero and move the
|
||||
|
||||
Reference in New Issue
Block a user