Skip to content

Dashboard tab becomes unresponsive during long sessions / concurrent jobs #551

@esengine

Description

@esengine

Summary

Dashboard tab becomes unresponsive during active sessions — Chrome
shows the native "Page not responding" dialog and the user has to
choose between waiting and killing the tab. Repeatable enough that a
user reported it; needs investigation.

Likely a main-thread block on the dashboard side (long synchronous
work, runaway render, or unbounded state growth as session events
stream in), not a terminal-side rendering issue.

Observed

  • Browser: Chrome (native unresponsive dialog: "此页面没有响应").
  • Dashboard tab title: Reasonix.
  • TUI session was active with multiple concurrent jobs running
    (visible in the screenshot: job 4, job 6 under 运行中).
  • Project under work: a Node/TSX codebase (habit-goal-tracker),
    status line shows the session was non-trivial (token counters
    populated, balance accruing).

Hypotheses to check

  1. Unbounded event/log accumulation. Every tool call / stream chunk
    pushed into React state without virtualization → DOM grows
    linearly with session length, scroll/repaint cost balloons.
  2. Synchronous work on the render path. Markdown / syntax
    highlighting / diff rendering done eagerly per update instead of
    memoized + windowed.
  3. Concurrent-job fan-in. Multiple jobs streaming simultaneously
    may be multiplying re-render rate (N streams × M subscribers).
  4. Memory leak — listeners/timers not torn down across
    session/route changes; check long-session heap snapshot.
  5. Tab in background. Chrome throttles background timers; if we
    batch updates with setTimeout/requestIdleCallback, the queue
    may explode and then flush in one blocking burst when the tab
    refocuses.

Repro steps (to nail down)

Not yet a clean repro. Conditions present in the report:

  • Long-running TUI session
  • Multiple concurrent jobs
  • Dashboard tab left open in Chrome the whole time

Action: try to reproduce with a synthetic long session + N concurrent
jobs, and capture a Performance recording when the freeze hits.

Asks

  • Reproduce locally
  • Performance trace at the moment of hang (which task/frame is
    blocking?)
  • Heap snapshot after a long session (leak vs accumulation?)
  • Decide on virtualization for the event/log stream if that's the
    root cause

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdashboardWeb companion — v1 only; v2 has no web dashboard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions