Web: a task's progress no longer redraws its chat message; web-live green again #327
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "khyretos/fix-weblive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Requested by Kees
web-live has been red on main since 31 Oct (run 9663). The cause is an app bug, not a flaky test.
Root cause.
messageViewscompared a message's tasks by object identity. Every progress tick of a running task (a new object, same id/state/title) rebuilt the whole message: the markdown was rendered again and all step cards were replaced. In the demo this happened every 1.2 s. Under CI load,step cards › the left icon…read a card in the middle of a rebuild.getComputedStyleon a detached node returns"", so it got""instead ofrgba(0, 0, 0, 0)and failed twice.Fix. Tasks are now compared by what the message draws of them (
id:state:title), the same way reactions already are. A new test checks that a step card keeps its DOM node across task ticks. It fails without the fix.Effort picker test (flaky, passed on retry). It waited for
document.getAnimations().length === 0. In the demo that means waiting for the running task to finish, because of an endlesstov-pulseanimation and progress-barwidthtransitions on every tick: about 15 of its 20 s. It now waits only for the side panel'stransformslide, which is what its comment says it waits for.Checked locally (CI's Playwright image v1.63.0,
CI=1): typecheck and build OK; node tests 50/50; Playwright 454 passed, 0 failed. Two unrelated tests passed on retry: contextmeter:103 and providers:126.Second commit (after CI run 27933 failed
contextmeter:103). The chat header re-mounted on everytaskschange, so on every task tick, even when its markup was identical. A test read the meter arc while it was being replaced (stroke""; 10 of 36 local runs on 2 CPUs failed). The header now keeps its DOM when the markup is unchanged: 36 of 36 pass. Six tests waited for "no animations at all", or hand-filteredtov-pulse. They now sharetests/settled.ts, which waits until only endless animations are left. Full suite after both commits: 455 passed.activity:69was flaky once (a first-load race in the Activity tab) and is left as it is.🤖 Generated with Claude Code
Title
Web: a task's progress no longer redraws its chat message; web-live green again
PR Type
Bug fix, Tests
Description
Fix message redraw bug by comparing tasks via content instead of object identity.
Update effort picker test to wait only for side panel slide, not all animations.
Add test verifying step cards persist DOM nodes during task progress ticks.
Diagram Walkthrough
File Walkthrough
conversation.ts
Use content-based comparison for task caching in message viewsweb/src/views/conversation.ts
taskKeyfunction to generate a stable string key from task id,state, and title.
messageViewscache lookup to usetaskKeyinstead of strictobject equality for tasks.
running task updates its progress.
effort.spec.ts
Wait only for side panel slide in effort picker testweb/tests/effort.spec.ts
side panel slide animations.
long waits due to endless task pulses.
delays.
ux-round2.spec.ts
Add test ensuring step cards persist across task ticksweb/tests/ux-round2.spec.ts
during task progress ticks.
document after a 3-second delay.
task update.
/review
Failed to review PR
Reason: Every configured model attempt failed. Check the PR-Agent service logs for the provider error, then retry.
🧹 Lint report · ✅ all 25 checks clean
Errors below fail this check.
✅ Clean: black, checkstyle, djlint, editorconfig-checker, git_diff, gitleaks, grype, hadolint, htmlhint, isort, jsonlint, markdownlint, npm-groovy-lint, pmd, prettier, prettier, ruff, secretlint, shellcheck, shfmt, stylelint, trivy, trufflehog, xmllint, yamllint
MegaLinter on soucouyant · full logs in the Actions run · comment
/improvefor AI fix suggestions/review
Failed to review PR
Reason: Every configured model attempt failed. Check the PR-Agent service logs for the provider error, then retry.
PR Reviewer Guide 🔍
(Review updated until commit
1639e2fdbf)Here are some key observations to aid the review process:
/review