Skip to content

Comments

fix: eliminate Rich live table flicker during ade run#116

Open
clkao wants to merge 1 commit intodbt-labs:mainfrom
clkao:fix/rich-table-flicker
Open

fix: eliminate Rich live table flicker during ade run#116
clkao wants to merge 1 commit intodbt-labs:mainfrom
clkao:fix/rich-table-flicker

Conversation

@clkao
Copy link
Contributor

@clkao clkao commented Feb 6, 2026

Summary

  • Replace Rich Live auto-refresh timer with manual debounced refresh to eliminate table flicker during ade run
  • Table only redraws when data actually changes, at most every 200ms — zero redraws during idle periods
  • Remove time.sleep(0.5) initialization delay that was only needed for the background timer

Approach

The RichTaskLogger previously used Live(refresh_per_second=4) which redraws the entire table by erasing and reprinting on every tick, even when no data changed. This caused visible flicker.

Now uses auto_refresh=False with _live.refresh() called manually from update_task_from_dict(), debounced to 200ms intervals. All refresh() calls happen outside self._lock to avoid deadlock (since refresh()_create_table() → acquires the same lock). A final refresh() in stop() ensures the last state is displayed.

Test plan

  • Run ade run with multiple concurrent tasks and verify table no longer flickers
  • Verify task status updates still appear promptly
  • Verify SYSTEM log messages still print above the table
  • Verify table shows final state when run completes

🤖 Generated with Claude Code

Instead of pushing a new Table to Live.update() on every task update,
pass a _TableRenderable that Live polls on its refresh timer. This
decouples update frequency from render frequency, eliminating flicker
from redundant redraws. Refresh rate lowered from 4hz to 2hz.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant