Repository navigation
Wallpapers: Add the Pulse Monitor wallpaper and widget - #1006
Conversation
A PixiJS ECG wired to the site, as a canvas wallpaper (`wp-pulse`) and
a widget (`desktop-mode/pulse`) that ship in one bundle and share one
engine, one signal hub and one settings bag.
Every request the shell makes or sees is a labelled beat: wp.os.fetch,
raw fetch/XHR, sendBeacon, fetch/XHR inside admin windows, in-window
navigations and form posts, WordPress Heartbeat, assets, window events,
input, messages, toasts, uploads and errors. A Heartbeat-relayed server
feed (includes/pulse-monitor.php) adds what only the server sees:
visitors, bots, comments, publishes, orders, logins, API calls, cron,
other people's admin traffic, and the listener's own block-editor
requests, which the shell cannot observe.
Failed beats are drawn amber and say why ("request · 404", "heartbeat ·
timeout", "PVC: slow responses"). The rhythm is a health diagnosis —
sinus, PVCs, atrial fibrillation, ventricular tachycardia, flatline —
capped by kind of trouble so that only failing requests reach VT.
Latency samples from hidden tabs are ignored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The block editor's windows are cross-origin isolated, and the shell's window bridge does not re-dispatch their `os-iframe-network` reports as `os.iframe.network-completed` — so the editor's REST, autosave and Heartbeat traffic never reached the trace in real time. Read those reports straight off the message (same-origin, sent by one of the desk's own iframes) and drop the server-side workaround that relayed the listener's own editor requests one Heartbeat tick late. The diagnosis now requires substantial failure (~16 % of requests) before drawing ventricular tachycardia, and failure or slowness before fibrillation; abnormal beats print the reason that justified the rhythm. A slow, misconfigured site with a few 404s used to read as VT "caused by" slowness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A window page that never reached `admin_footer` — a 404, a fatal error — has no chromeless bridge, so its fetch/XHR were never reported. Count those from the frame's resource timing instead, and keep skipping it for bridged pages, which report their own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #1005 the shell relays the chromeless bridge's network reports for admin pages embedded in native windows too, so the block editor's traffic reaches the hook. Subscribe to it again instead of reading the bridge's messages directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@claude can you review? |
|
Claude finished @AllTerrainDeveloper's task in 28s —— View job Review of PR #1006: Pulse MonitorThis is a partial review. I read Must fix
Should fix
Worth considering (not blockers)
Not coveredThe following still need review: the TS engine and hub ( |
Second-pass review: TypeScript engine, hub and widget, plus PHP gapsThis comment only lists findings that the earlier review did not cover. It skips the Should fix
Nits
|
…ettings Review fixes (both passes on #1006): - PHP feed: drop the @SInCE tags; one openstation_pulse_read_log() for the writer and the Heartbeat relay; relay everything after a log reset; only comments, reviews, pingbacks and trackbacks beat (not order notes); skip WP-CLI; drop the unused `load` field; document the write cost and the best-effort (lock-free) log in the docblock and docs. - Signals: release each window document's taps on pagehide or when its frame goes away; cancel the follow-up scan on teardown; ignore requests the page cancelled itself (the chromeless bridge now reports `aborted`, relayed on os.iframe.network-completed). - Diagnosis: cap a request at 10 s and need 20 samples for p95, so one long call cannot make the site look slow. - Audio context only while sound is on; paused or reduced-motion monitors drop beats instead of queueing them; the alarm pauses with the trace. - Labels positioned with physical left/top (RTL); readout clear of the docked pill; the widget gear is an <os-button variant="ghost">, and its dialog closes with the widget. - docs/data-model.md lists openstation_pulse_log and _listeners. New: - Work area reservations (wp.os.workArea.reserve / reservedRectOf / placementRectOf, Experimental): a band nothing may use — maximize, snap, new windows, icons, widgets and notes stay out, and dragging, resizing and pinned positions stop at it. - Wallpaper layout setting: whole wallpaper, or a reserved top band (56–300 px, 88 by default; off on phones). - Issues window (click the numbers in the band or widget, a settings button, or the command palette): the diagnosis itemised with Site Health links, and every failure with URL, method, status and window. - The widget keeps its own settings; the trace survives browser resizes; smaller numbers; a clock icon on the response time; the settings dialog's headings use the dialog's colour tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@claude has everything been addressed? |
|
Claude finished @AllTerrainDeveloper's task in 38s —— View job Has everything been addressed?Mostly yes. I checked each earlier finding against the code on Addressed
Not confirmed
If you want, I can read those last five items properly and report back. Say so and I'll do that. |
What
openstation-pulse-monitor-short-v10.mp4
A heart monitor wired to the site, as a built-in PixiJS wallpaper (
wp-pulse) and a widget (desktop-mode/pulse). Every HTTP request and every signal the desk can see is a beat on a red ECG trace over black, labelled with its cause; failed beats are amber and say why; and the rhythm is a health diagnosis.wp.os.fetch, raw fetch / XHR /sendBeaconin the shell, fetch/XHR inside every window (viaos.iframe.network-completed— the Posts app's block editor included, since Windows: Relay embedded pages' error and network reports #1005), window pages without the bridge (resource timing), page loads and in-window form posts, WordPress Heartbeat, assets, window events, clicks/typing, messages, toasts, uploads, JS errors.includes/pulse-monitor.php, over Heartbeat): visitors, bots, comments, publishes, orders, logins (failed ones amber), anonymous API calls, cron, other people's admin traffic. Records only while someone has a monitor mounted (a 3-minute lease), skips the listener's own requests, stores no URLs/IPs/UAs, admins only by default (openstation_pulse_capability).request · 404,heartbeat · timeout,error · TypeError: …,PVC: slow responses (p95 3.1 s).How it's built
One bundle (
os-pulse-monitor) publishes both faces, so the engine loads once. A reference-counted hub (hub.ts) wires the signal taps, the Heartbeat field and the health monitor once per page however many monitors are mounted; each monitor (monitor.ts) has its own rhythm + Pixi scene and applies its own muting. The widget's gear opens the same form (config.ts) the wallpaper's settings dialog renders, writing through the OS Settings store like that dialog does.New public surface (all Experimental, documented in
docs/pulse-monitor.md,hooks-reference.md,javascript-reference.md):openstation_pulse_record(); filtersopenstation_pulse_capability,_request_kind,_is_bot,_event,_health.pulse/beat({ source, amplitude, error, detail }), actionos.pulse.beat, Heartbeat fieldopenstation_pulse.Testing
tests/vitest/pulse-monitor.test.ts(27) — settings, diagnosis + severity caps, rhythm scheduling and morphologies, spike text, the shared hub (two monitors, one set of taps). Neighbouring wallpaper/widget suites pass.tests/phpunit/tests/pulseMonitor.php(22) — lease gate, classification, recorder, own-request exclusion, Heartbeat relay, health snapshot, script + widget registration. phpcs clean.tsc --noEmitand eslint clean.apiFetch; and real visitor, Googlebot, anonymous REST, comment andwp-cron.phprequests sent with curl.🤖 Generated with Claude Code