fix(webui): keep history loading until content is ready (#6659)
* fix(webui): keep history loading until content is ready * fix(webui): preserve history content and retry state Share final activity filtering with history readiness and retain completion and fork metadata across bookkeeping pages. Route boundary retries to the failed cursor and publish navigation pages synchronously so concurrent trace details are preserved. Cover real retry gestures, metadata traversal, batched details, and fork boundaries in both directions. * fix(webui): reduce history admission work and release retry pages
This commit is contained in:
1 parent
40e4e8a3fd
commit
efec4a608d
14 files changed
+751
-103
No files matched your search
+2
-2
@@ -52,9 +52,9 @@ Supporting hooks and display-model helpers stay near the feature that owns them.
|
||||
|
||||
## History-boundary motion
|
||||
|
||||
History request hooks own loading, pagination and errors. `usePromptHistory.operation` keeps jump/newer feedback separate from an older-page slot, including failed reads and retry; index errors have no page operation. `ThreadHistorySpring` owns input resistance, gesture thresholds and transient/rest/held targets; Motion owns spring integration, frame scheduling and interruption velocity. The reduced-motion preference removes transient travel while preserving request and committed-slot behavior. The spring never writes `scrollTop`. `ThreadViewport` hands a triggered reveal to a fixed-height slot before the original boundary display unit through `ThreadMessages.beforeUnit`, subtracting that slot from the remaining transform. `ThreadMessages.topInset` remains the single normal gutter at the start of the currently rendered list and does not travel into the middle of the timeline with a loading slot; the header paints inside its own slot, not above it over earlier text. The leading content (including unlinked tasks) has its own stable keyed prelude alongside the display units, preserving identity and disclosure state across remote and local cached prepends. The scroller's `scroll-padding-top` remains the prompt-navigation inset. The preceding message margin belongs before the slot, and reading-anchor measurements exclude the slot only for following units. This keeps the handoff and later prepends continuous without a second scroll writer. The temporary loading slot stays in the message flow while a request is pending and on failure, so native scrolling carries feedback out of view; successful completion, including an exhausted result, removes the slot and its old-boundary gutter, restoring normal message spacing. `ThreadViewport` measures and compensates the active reading anchor through the existing camera when scroll bounds permit; explicit navigation and conversation changes take priority, and at a scroll bound the camera clamps rather than preserving space artificially. The leading top inset remains a single normal gutter when the historical boundary is no longer first. Explicit navigation and conversation changes reset the reveal. Boundary feedback without a real request remains transient.
|
||||
History hooks own content preparation, pagination and errors. One older/newer operation may consume several cursor pages: bookkeeping-only pages and unadmitted fragments keep it pending until display content changes, the boundary is exhausted, or a read fails. Content comparison surrounds history admission so live updates, replay identities and usage metadata cannot complete an unrelated pull. Completion publishes the prepared messages and status together; deferred Markdown, images and highlighting remain layout work, not extra loading gates. `usePromptHistory.operation` keeps jump/newer feedback separate from an older-page slot, including failed reads and retry; index errors have no page operation. `ThreadHistorySpring` owns input resistance, gesture thresholds and transient/rest/held targets; Motion owns spring integration, frame scheduling and interruption velocity. The reduced-motion preference removes transient travel while preserving request and committed-slot behavior. The spring never writes `scrollTop`. `ThreadViewport` hands a triggered reveal to a fixed-height slot before the original boundary display unit through `ThreadMessages.beforeUnit`, subtracting that slot from the remaining transform. `ThreadMessages.topInset` remains the single normal gutter at the start of the currently rendered list and does not travel into the middle of the timeline with a loading slot; the header paints inside its own slot, not above it over earlier text. The leading content (including unlinked tasks) has its own stable keyed prelude alongside the display units, preserving identity and disclosure state across remote and local cached prepends. The scroller's `scroll-padding-top` remains the prompt-navigation inset. The preceding message margin belongs before the slot, and reading-anchor measurements exclude the slot only for following units. This keeps the handoff and later prepends continuous without a second scroll writer. The temporary loading slot stays in the message flow while content preparation is pending and on failure, so native scrolling carries feedback out of view; successful content admission, including an exhausted result, removes the slot and its old-boundary gutter, restoring normal message spacing. `ThreadViewport` measures and compensates the active reading anchor through the existing camera when scroll bounds permit; explicit navigation and conversation changes take priority, and at a scroll bound the camera clamps and rebases the reading offset rather than preserving space artificially or restoring an obsolete offset on the next prepend. The leading top inset remains a single normal gutter when the historical boundary is no longer first. Explicit navigation and conversation changes reset the reveal. Boundary feedback without a real request remains transient.
|
||||
|
||||
Prompt navigation retains at most three server pages. Static ready Blocks appear only during an uncommitted boundary pull; a completed header is hidden and offers no second pagination entry point. Loading continues at the new boundary, where the header binds to the current first display unit for wheel, touch and keyboard alike; page eviction therefore does not remove the header or the message being read. A failure animates the same Blocks in red without visible error text; hovering shows details, and selecting the red Blocks or a fresh boundary gesture starts another request. Failed reads suppress scroll-triggered automatic requests, not explicit user input.
|
||||
Prompt navigation keeps a three-page raw window. Fragmented turns also retain their single terminal record so the event projector can preserve completion metadata when bookkeeping pages or the terminal page leave that window; skipped raw pages are not accumulated. Accepted metadata survives exhaustion and failed continuation without counting as new display content. Crossed fork boundaries survive skipped pages too; a marker before all visible rows keeps the pull pending until earlier content arrives or history is exhausted. Static ready Blocks appear only during an uncommitted boundary pull; a completed header is hidden and offers no second pagination entry point. Loading continues at the new boundary, where the header binds to the current first display unit for wheel, touch and keyboard alike; page eviction therefore does not remove the header or the message being read. A failure animates the same Blocks in red without visible error text; hovering shows details, and selecting the red Blocks or a fresh boundary gesture retries the failed cursor rather than rereading successful intermediate pages. Failed reads suppress scroll-triggered automatic requests, not explicit user input.
|
||||
|
||||
## Theme artwork and surface motion
|
||||
|
||||
|
||||
Reference in new issue
Block a user