Skip to content

fix(web): keep progress chips visible for a minimum duration - #219

Closed
deepanshu1422 wants to merge 3 commits into
elie222:mainfrom
deepanshu1422:fix/progress-min-visible-duration
Closed

fix(web): keep progress chips visible for a minimum duration#219
deepanshu1422 wants to merge 3 commits into
elie222:mainfrom
deepanshu1422:fix/progress-min-visible-duration

Conversation

@deepanshu1422

Copy link
Copy Markdown
Contributor

Summary

A fast tool call (e.g. schedule_create) can complete before the browser
gets a paint frame, so the terminal event immediately strips the live
"working…" chip from the thread — the intermediate progress never actually
renders, even though the run did real work.

Changes

  • Track when a progress/steps message is first seen (progressFirstSeenRef)
  • Delay applying a run's terminal event until that message has been visible
    for at least 700ms, but only if it ever actually rendered something
  • The first-seen map is capped at 200 entries so a message whose terminal
    event never reaches this client (SSE drop mid-run, tab backgrounded
    through a reconnect, bot archived mid-run) doesn't linger forever

Testing notes

  • pnpm --filter @rakazo/web check
  • biome check on the touched file

A fast tool call (e.g. schedule_create) can complete before the
browser gets a paint frame, so the terminal event immediately strips
the live "working…" chip from the thread — the intermediate progress
never actually renders, even though the run did real work.

Track when a progress/steps message is first seen, and delay applying
its terminal event until it's been visible for at least 700ms if it
ever painted anything. The first-seen map is capped so a message whose
terminal event never reaches this client doesn't linger forever.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
rakazo-www Skipped Skipped Aug 25, 2026 9:54pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 18 minutes.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c014d62-7bfd-458e-a271-0d2139f91426

📥 Commits

Reviewing files that changed from the base of the PR and between f12b5f0 and 51f98f9.

📒 Files selected for processing (3)
  • apps/web/src/lib/thread-events.test.ts
  • apps/web/src/lib/thread-events.ts
  • apps/web/src/pages/Shell.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR keeps transient progress chips visible for a minimum duration without delaying terminal run-state updates or blocking the event stream.

  • Adds progress visibility tracking, bounded bookkeeping, and delayed chip removal.
  • Integrates hold cleanup with thread navigation, run stopping, and component teardown.
  • Adds reducer tests covering durable answers, terminal states, waiting-input transitions, clears, and refresh reconciliation.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/web/src/lib/thread-events.ts Adds bounded first-seen tracking and snapshot reconciliation that temporarily retains visible progress messages.
apps/web/src/pages/Shell.tsx Integrates delayed progress removal into snapshot commits and cleans timers across lifecycle transitions.
apps/web/src/lib/thread-events.test.ts Adds focused coverage for progress retention across terminal events, refreshes, waiting-input states, and thread clears.

Reviews (3): Last reviewed commit: "chore: retrigger CI after transient acti..." | Re-trigger Greptile

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

Playwright screenshots

Open screenshot gallery · Dashboard · CI run

Updated for commit dc8392b.

Keep the 700ms min-visible chip by retaining live progress removal in
commitSnapshot/retainMinVisibleLiveProgress instead of awaiting inside
the subscribe loops. Terminal events, durable answers, and refreshes
apply on time; only the live chip strip is deferred. Stop and
waiting_input still clear immediately.

Co-authored-by: Elie Steinbock <elie222@users.noreply.github.com>
Lint and Postgres journeys failed at Set up job downloading
pnpm/action-setup (DNS), not on our changes. Retrigger the suite.

Co-authored-by: Elie Steinbock <elie222@users.noreply.github.com>
@elie222

elie222 commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Hey, why does the user need to see in the progress state if it's already done?

@elie222 elie222 closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants