#7316: fix: /chat dashboard performance
app: web-ui
### UI: reduce log fetch contention
## Description
Summary
- prevent concurrent log fetches with an in-flight guard to avoid re-entrancy
- slow debug polling to reduce contention during heavy UI activity
## Problem
The /chat route could freeze in the browser when multiple log loads were triggered concurrently.
## Solution
- Introduce a logsInFlight guard so only one log fetch runs at a time, and
- increase the debug polling interval to lower pressure on the UI loop.
## Testing
- not run (not requested)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR reduces `/chat` UI contention by (1) slowing debug polling from 3s to 10s (`ui/src/ui/app-polling.ts`) and (2) adding a `logsInFlight` state flag (`ui/src/ui/app.ts`) used by `loadLogs` to prevent concurrent `logs.tail` fetches (`ui/src/ui/controllers/logs.ts`).
The concurrency guard should mitigate re-entrant log loads, but as implemented it also suppresses non-quiet/manual refresh attempts while any request is in flight. Additionally, the new `patch-openclaw-dashboard.sh` script appears to be an environment-specific, brittle patcher for built/minified assets (hardcoded Homebrew global install paths and hashed asset filenames), which is likely to break across installs and upgrades.
<h3>Confidence Score: 3/5</h3>
- Mostly safe to merge, but a couple behavior/maintainability concerns should be addressed first.
- The core UI changes are small and likely fix the reported re-entrancy issue, but the in-flight guard can unintentionally ignore user-triggered refreshes, and the added patch script is brittle and environment-specific (hardcoded dist paths and hashed asset edits) which could confuse users or break in CI/tooling.
- ui/src/ui/controllers/logs.ts, patch-openclaw-dashboard.sh
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#3721: fix(ui): webchat not displaying chat responses
by maxmaxrouge-rgb · 2026-01-29
81.4%
#14309: fix(ui): resolve chat event session key mismatch
by justonlyforyou · 2026-02-11
80.9%
#13838: UI: fix config panel CI failures and modularize rendering
by fresed05 · 2026-02-11
80.4%
#6521: fix: addressed style issue for chat compose and thread on mobile
by spencer-rafada · 2026-02-01
80.1%
#7528: feat: Adds slash command suggestions to chat
by JohnnyD1776 · 2026-02-02
79.8%
#12974: fix: intermittent (no output) reported by users
by vincentkoc · 2026-02-10
79.5%
#7794: fix(tui): refresh session info periodically to reflect config changes
by GuoxiangZu · 2026-02-03
79.3%
#14719: UI: fix debug event log layout and health history toggle
by detecti1 · 2026-02-12
79.1%
#6408: feat(ui): add job filtering and improve run history display
by Cassius0924 · 2026-02-01
79.0%
#9218: Fix Control UI chat resync on gaps and terminal events
by figitaki · 2026-02-05
78.9%