Skip to content

Work view refresh is slow — switch from polling to event-driven or improve perceived responsiveness #388

Closed

Description

@waleedkadous

Problem

The Work view in the dashboard refreshes slowly. It appears to be poll-based, which means after an action (merge, close, spawn) the user has to wait for the next poll cycle to see updated state.

Expected Behavior

After an action that changes state (PR merged, issue closed, builder spawned/completed), the Work view should update near-instantly — either via:

  1. Server-Sent Events (SSE) or WebSocket push from Tower when state changes
  2. Optimistic UI updates after user-initiated actions
  3. Shorter poll interval with smarter diffing
  4. Manual refresh button that triggers an immediate fetch

Where to Look

  • Dashboard Work view component
  • Tower API endpoints that serve work view data
  • Current polling mechanism and interval

Acceptance Criteria

  • Work view feels responsive after state changes
  • No perceptible delay when a PR is merged or builder status changes

Activity

  1. waleedkadous commented on Feb 17, 2026

    @waleedkadous
    ContributorAuthor

    Additional symptom: race condition causes flickering

    The Projects/Bugs and Recently Closed sections appear and disappear on each poll cycle. This is a stale-while-revalidate problem — the UI clears while waiting for the GitHub API response, then re-renders when data arrives.

    Root cause: The poll handler likely sets state to empty/loading before the fetch completes, causing a flash of empty content.

    Fix approach: Keep displaying stale data during refresh. Only swap in new data when the new response arrives. Never clear the display mid-fetch.

  2. waleedkadous commented on Feb 17, 2026

    @waleedkadous
    ContributorAuthor

    On it! Working on a fix now.

  3. waleedkadous commented on Feb 17, 2026

    @waleedkadous
    ContributorAuthor

    Additional Issues Found (2026-02-17)

    1. Builder state shows 'null'

    Bugfix builders show null for their protocol phase/state. Should show the actual phase (e.g., investigate, fix, verify).

    2. No duration indicator

    Builder rows don't show how long the builder has been running. Should display elapsed time since spawn.

    3. Needs table layout

    Builder rows use flexbox which causes progress bars to misalign. Switching to a proper table layout would make the columns (name, state, progress, duration) line up consistently.

    4. Active Bugs section flickers

    The 'Active Bugs' and 'Projects' sections appear and disappear, likely a race condition in the polling/caching logic — stale-while-revalidate clears state before new data arrives.

  4. added 8 commits that reference this issue on Feb 17, 2026
    e0fa7cf
    496d2d1
    acb132a
    da90f84
    da36b8d
    53bb41a
    9695f47
    6b2219b
  5. added a commit that references this issue on Feb 17, 2026
    ec3564a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions