You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds stats-gl runtime packaging and module resolution, introduces a WebGPU GPU utilization overlay with drag/resize/close controls, loads it in the websocket UI, scopes canvas styling, and updates related validation guidance and tests.
Changes
GPU meter overlay
Layer / File(s)
Summary
Runtime dependency and module wiring .mise/config.js.toml, libs/edge-toolkit/..., services/ws-server/Dockerfile, services/ws-server/static/package.json, services/modules/tests/api_modules.rs
Registers, packages, resolves, and verifies the stats-gl runtime module.
WebGPU meter implementation services/ws-server/static/meters.js
Adds WebGPU timestamp probing, stats-gl rendering, panel interaction controls, and device-loss handling.
Page integration and verification services/ws-server/static/index.html, services/ws-server/static/style.css, config/ast-grep/..., CLAUDE.md
Loads meters.js, scopes canvas styling to main, expands the documentation rule allowlist, and prioritizes functional verification before checks.
We reviewed changes in 49edf37...2ecbaae on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
Pin stats-gl to one exact version across all three paths.latest, *, and the unversioned pnpm add can drift independently, so the local module, static package, and container can end up on different releases.
.mise/config.js.toml
services/ws-server/static/package.json
services/ws-server/Dockerfile
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.mise/config.js.toml at line 19, Pin stats-gl to one identical exact version
in .mise/config.js.toml:19, services/ws-server/static/package.json:16, and
services/ws-server/Dockerfile:26, replacing latest, wildcard, or unversioned
installation references while preserving each file’s existing configuration
style.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@libs/edge-toolkit/src/config.rs`:
- Around line 132-133: The first summary lines in both Rust files lack terminal
punctuation. Update the stats-gl summary in libs/edge-toolkit/src/config.rs
lines 132-133 and the JS-package summary in
services/modules/tests/api_modules.rs lines 44-46 to end with ., !, or ?; also
add libs/edge-toolkit/src/config.rs to the sorted allowlist in
doc-summary-ends-with-period.yaml.
In `@services/ws-server/static/meters.js`:
- Around line 125-158: The GPU meter lifecycle lacks centralized teardown,
leaving animation and global listeners active after closure or device loss. Add
an idempotent stop() in the GPU meter setup that cancels the RAF, removes window
listeners, removes the overlay, and disposes Stats; invoke it on close, setup
failure, and device.lost, while reusing the existing listener and overlay
references.
---
Nitpick comments:
In @.mise/config.js.toml:
- Line 19: Pin stats-gl to one identical exact version in
.mise/config.js.toml:19, services/ws-server/static/package.json:16, and
services/ws-server/Dockerfile:26, replacing latest, wildcard, or unversioned
installation references while preserving each file’s existing configuration
style.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
Push a commit to this branch (recommended)
Create a new PR with the fixes
ℹ️ Review info⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 21ca55ed-0f45-45e4-bb93-d682d9ade392
📥 Commits
Reviewing files that changed from the base of the PR and between 49edf37 and 2ecbaae.
Terminate the new Rust comment summaries with punctuation.
Both files are covered by doc-summary-ends-with-period.yaml, but their added first summary lines end without ., !, or ?.
libs/edge-toolkit/src/config.rs#L132-L133: end the first stats-gl summary sentence with terminal punctuation.
services/modules/tests/api_modules.rs#L44-L46: end the first JS-package summary sentence with terminal punctuation.
As per coding guidelines, **/*.rs: "Whenever modifying a Rust file, add it to the sorted allowlist in doc-summary-ends-with-period.yaml and fix first-line doc summaries so they end in ., !, or ?."
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@libs/edge-toolkit/src/config.rs` around lines 132 - 133, The first summary
lines in both Rust files lack terminal punctuation. Update the stats-gl summary
in libs/edge-toolkit/src/config.rs lines 132-133 and the JS-package summary in
services/modules/tests/api_modules.rs lines 44-46 to end with ., !, or ?; also
add libs/edge-toolkit/src/config.rs to the sorted allowlist in
doc-summary-ends-with-period.yaml.
sed -n '1,340p' services/ws-server/static/meters.js
Repository: edge-toolkit/core
Length of output: 10129
Centralize GPU meter teardown. Add an idempotent stop() that cancels RAF, removes the window listeners, removes the overlay, and disposes Stats on close, setup failure, and device.lost; otherwise the global listeners keep the overlay reachable and the frame loop keeps running after device loss.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@services/ws-server/static/meters.js` around lines 125 - 158, The GPU meter
lifecycle lacks centralized teardown, leaving animation and global listeners
active after closure or device loss. Add an idempotent stop() in the GPU meter
setup that cancels the RAF, removes window listeners, removes the overlay, and
disposes Stats; invoke it on close, setup failure, and device.lost, while
reusing the existing listener and overlay references.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by CodeRabbit
New Features
Bug Fixes
Tests