feat(sessions): show progress bar and elapsed time while compacting#3330
Draft
tatoalo wants to merge 3 commits into
Draft
feat(sessions): show progress bar and elapsed time while compacting#3330tatoalo wants to merge 3 commits into
tatoalo wants to merge 3 commits into
Conversation
The in-flight compaction row previously showed only a static spinner, so there was no signal about whether compaction was progressing or stuck. Add an indeterminate progress bar plus a live elapsed-time counter to the "Compacting conversation history..." row. Compaction is a single streaming summarization call with no measurable percentage, so the bar is intentionally indeterminate (constant motion, so it never reads as frozen) and the elapsed timer carries the concrete progress signal. The bar reuses the existing section-loading keyframe, is tinted to match the row's blue accent, and falls back to a static track under prefers-reduced-motion. Generated-By: PostHog Code Task-Id: 1a85695f-6d34-4d9c-9a78-c2f4c836acf4
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
React Doctor flagged the indeterminate compaction bar for using role="progressbar" on a div (prefer-tag-over-role). The bar is decorative — its status is already carried by the visible "Compacting conversation history..." text and the spinner — so drop the role/aria-label and mark it aria-hidden, matching the existing quill-section-loading swoop loader and the decorative spinners in the same feature. Generated-By: PostHog Code Task-Id: 1a85695f-6d34-4d9c-9a78-c2f4c836acf4
Drop the redundant startedAt state cell and the inert [startedAt] effect dependency; capture the start time inside the effect and run it once on mount, matching the sibling GeneratingIndicator's timer. Behavior is unchanged. Generated-By: PostHog Code Task-Id: 1a85695f-6d34-4d9c-9a78-c2f4c836acf4
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.
Problem
When the agent compacts the conversation, the "Compacting conversation history..." row showed only a static spinner. That gives no signal about whether compaction is making progress or has stalled, and since compaction can take 10-20s on long sessions a motionless spinner tends to read as frozen.
Changes
StatusNotificationView), keeping the existing spinner.prefers-reduced-motion.Note on approach: I checked how other harnesses handle this before picking indeterminate. No coding-agent harness ships a verified real-percentage compaction bar — the Claude Code CLI request for one (anthropics/claude-code#30115) was closed "not planned", and the "percentage" it references from the desktop app has no documented mechanism. An indeterminate bar plus a real elapsed timer is both honest and directly fixes the "appears frozen" complaint.
How did you test this?
biome checkon the changed files: clean, no fixes needed.turbo typecheck --filter=@posthog/ui: passes.formatDurationtimer helper and the section-loading keyframe).Automatic notifications
Created with PostHog Code