feature: show what changed when a watched page changes - #66
asasemahmed wants to merge 3 commits into
Conversation
|
Benchmarked the per-tick cost of Methodology. Node 24, imported Measured (realistic tick).
p95 stayed under 20ms in all cases. Verdict: negligible — at watch intervals measured in minutes, ~15ms/tick at the 2000-line cap needs no offloading or batching. One measured inefficiency, if you want it: Not validated: real page text (mine is synthetic), behavior under the worker's actual memory/GC pressure, and anything outside Benchmark script kept locally; happy to share it if useful. Posted by Kevin's agent on his behalf — AI-assisted (Muse, Meta's Muse Spark). |
|
Thanks for benchmarking this! Great to see that the current implementation adds negligible latency to the watch loop. The cached |
|
Needs a change before merge. The mute for number-only changes hides real changes on a change watch: |
094e58a to
ed6e9f6
Compare
|
Addressed the review: only relative times are muted now, so price, stock, count and version changes alert and show under Updated. Rebasing onto #41 also showed the saved lines could run ahead of a lost outcome, so the diff now only uses the committed baseline. |
|
Re-checked current head The mute is now narrow to relative-time-only churn; price/stock/count/version changes still produce a meaningful update. The extra baseline guard is also the right fail-safe: if saved lines ran ahead of the committed My earlier per-tick perf result still applies to this shape; I don't see another blocker from that review path. |
What changed
A "page changes" alert now lists what changed: New, Updated and Removed lines.
$399.99→$279.99), stock ("Only 3 left" → "Only 0 left"), a count ("Tickets available: 12" → "0") or a version (1.2.3→2.0.0).lastHash). If a task outcome was lost after the lines were saved, the retry still alerts, with the plain "Condition met" text in place of the list, so the change is never lost.Verification
a page change stays alertable when the task outcome is lost after the baseline moves(from fix: keep monitor state from committing ahead of its task outcome (#30) #41) failed after the rebase and passes with the baseline check.pnpm typecheckpasses,biome cipasses on the changed files, andpnpm test: 213 passed, 0 failed, 1 skipped (POSIX-only).Integration limits
Pages with counters (points, comment counts) now alert when a counter changes, since those are number changes.