Skip to content

fix(wgc): capture per-step stop timing, bump timeout, add diagnostic tool#36

Merged
EtienneLescot merged 5 commits into
mainfrom
fix/wgc-stop-diagnostics
Jun 26, 2026
Merged

fix(wgc): capture per-step stop timing, bump timeout, add diagnostic tool#36
EtienneLescot merged 5 commits into
mainfrom
fix/wgc-stop-diagnostics

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #34 — Windows 10 recording stop times out at 15s with no useful diagnostics. Three orthogonal changes that together turn 'Stop hangs after 15s, file lost' into 'Stop hangs after 15s, here is exactly which cleanup step is slow on this hardware':

  1. Fix: \NATIVE_WINDOWS_CAPTURE_STOP_TIMEOUT_MS\ was 15s vs. the macOS equivalent at 30s. Bumped to 60s so \SinkWriter::Finalize\ has room to drain on slower encoders.
  2. Instrumentation: per-step [stop-timing]\ stderr logs around the stop cleanup chain (microphone / loopback / webcam / audio-mixer / video-writer-join / wgc-session-close / encoder-finalize). Lines flow into the existing
    ativeWindowsCaptureOutput\ buffer.
  3. Save Diagnostics (which previously hardcoded \logs: []) now includes \helperOutput\ (helper stdout+stderr, capped 64 KB) and \mainProcessLogs\ (a console ring buffer populated when \OPENSCREEN_DIAGNOSTIC=1).
  4. Standalone diagnostic tool: \scripts/diagnostic-tool/\ runs the helper outside the Electron app, captures [stop-timing]\ lines, writes a structured JSON report. Intended to ship as a downloadable artifact attached to bug reports.
  5. CI: .github/workflows/diagnostic-artifact.yml\ builds per-platform diagnostic zips on every push to \main, retained 14 days. Windows job smoke-tests the bundle before upload.

Related issue

Refs #34 (not closes — we still need a data point from the reporter to pin down which step is slow on their hardware).

Type of change

  • Bug fix
  • Feature
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging

Testing

  • Local reproduction via
    ode scripts/diagnostic-tool/diagnostic.mjs\ against the instrumented helper; stop completes in ~100 ms with full per-step breakdown on Win11 + Parsec virtual display. Cannot reproduce the user's >15 s hang locally.
  • Vitest tests added: \electron/diagnostics/main-log-buffer.test.ts\ (6 cases covering install/uninstall/capacity/clear/levels).
  • \�iome check\ clean on all touched files.
  • \ sc --noEmit\ clean.
  • GitHub Actions workflow includes a Windows smoke test that expands the zip, runs the bundle, asserts exit code 0 and at least one [stop-timing]\ entry.

Next step for the bug reporter

After this lands, attach a Windows diagnostic bundle from the next CI run (artifact: \openscreen-diagnostic-windows-x64). The user runs \diagnostic.bat --duration 30, attaches the resulting JSON, and the maintainer reads \stopTiming\ to pinpoint the slow step on their hardware.

Summary by CodeRabbit

  • New Features
    • Added a standalone diagnostics tool for Windows and macOS, including per-platform packaging and automated smoke coverage.
    • Added opt-in in-app diagnostics log buffering and richer diagnostic reports (console log snapshots plus native helper tail output).
    • Added a GitHub Pages documentation site (homepage, intro content, navigation, and styling).
  • Documentation
    • Documented the diagnostics tool usage/output and the website setup.
  • Bug Fixes
    • Improved native capture stop diagnostics and extended the Windows capture stop timeout.
  • Tests
    • Added automated tests for main-process log buffering behavior.
  • Chores
    • Added CI workflows for diagnostic artifact generation and website build/deploy; added diagnostics npm scripts.

First of three PRs for the docs site effort tracked in ROADMAP.md
(tier 'Site & documentation', see PR #32).

- website/: minimal Docusaurus 3 site (TS config, Infima-tweaked theme,
  hero landing with WIP badge, intro doc only).
- .github/workflows/docs.yml: build on PR, deploy to GitHub Pages on
  push to main. Concurrency group, minimal permissions.
- website/postcss.config.cjs: overrides the monorepo Tailwind config
  so Docusaurus CSS pipeline doesn't try to load Tailwind.

PR #2 will polish the landing (full bento, demo, footer polish).
PR #3 will migrate docs/ -> website/docs/.
…tool

Issue #34: Windows 10 recording stop times out at 15s with no useful
data. Three changes:

1. The stop timeout (electron/ipc/handlers.ts:415) was 15s, shorter
   than the macOS equivalent at 30s. Bumped to 60s so the Media
   Foundation SinkWriter::Finalize has room to drain on slow encoders.

2. Added per-step elapsed-time logs ([stop-timing] step=... elapsed_ms=...)
   around the cleanup chain in main.cpp so future stop hangs pinpoint
   which step is slow. These go to stderr, which Electron already
   captures into nativeWindowsCaptureOutput.

3. Save Diagnostics (electron/ipc/handlers.ts) previously hardcoded
   logs: [] in the renderer; now includes helperOutput (helper stdout +
   stderr, capped at 64KB) and mainProcessLogs (a console ring buffer
   populated when OPENSCREEN_DIAGNOSTIC=1).

4. New scripts/diagnostic-tool/ runs the helper outside the Electron
   app, captures [stop-timing] lines, writes a structured JSON report.
   Used as a standalone diagnostic bundle attached to bug reports.

5. .github/workflows/diagnostic-artifact.yml builds per-platform
   diagnostic zips on every push to main, retained 14 days. Windows
   job smoke-tests the bundle before upload.

Replaces scripts/repro-stop-hang.mjs and scripts/wgc-diagnostic-bundle/
which were scratch tools; the new diagnostic.mjs subsumes both.
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds diagnostic capture for Electron and native helpers, a standalone diagnostic CLI with packaging workflows, and a new Docusaurus website with Pages deployment.

Changes

Diagnostic capture and artifact flow

Layer / File(s) Summary
Main-process log buffer
electron/diagnostics/main-log-buffer.*
MainLogBuffer captures console output in a capped ring buffer, restores console methods on uninstall, and is covered by behavior tests.
Diagnostic payload wiring
electron/main.ts, electron/ipc/handlers.ts
Diagnostic mode installs the buffer at startup, and diagnostic payloads now include main-process logs, truncated helper output, and a longer native Windows stop timeout.
Native stop timing logs
electron/native/wgc-capture/src/main.cpp
The native helper logs elapsed milliseconds for each shutdown step during stop.
Standalone diagnostic CLI
package.json, scripts/diagnostic-tool/*
The standalone diagnostic tool resolves a helper, schedules stop and kill timers, captures helper output, parses [stop-timing] lines into a JSON report, and adds wrapper scripts, npm commands, and usage notes.
Diagnostic artifact workflows
.github/workflows/diagnostic-artifact.yml
The workflow builds Windows and macOS bundles, smoke-tests the Windows zip, and uploads the archives as artifacts.

Website setup and deployment

Layer / File(s) Summary
Site scaffolding
website/package.json, website/tsconfig.json, website/docusaurus.config.ts, website/sidebars.ts, website/postcss.config.cjs, website/.gitignore
The Docusaurus package, TypeScript config, site config, sidebar, PostCSS settings, and ignore rules are added.
Homepage and theme styles
website/src/css/custom.css, website/src/pages/index.*
The homepage renders the hero and feature sections, and new CSS defines the site palette and page layout.
Intro content and site notes
website/README.md, website/docs/intro.md
The site README and intro page describe the docs site commands, deployment path, status note, and introductory content.
Pages build and deploy workflow
.github/workflows/docs.yml
The workflow builds the website with Node 22, uploads the Pages artifact, and deploys it on pushes to main.

Sequence Diagram(s)

sequenceDiagram
  participant diagnostic.mjs
  participant NativeHelper
  participant JSONReport
  diagnostic.mjs->>NativeHelper: spawn with config JSON
  diagnostic.mjs->>NativeHelper: send stop after --duration
  NativeHelper-->>diagnostic.mjs: stdout, stderr, [stop-timing] lines
  diagnostic.mjs->>JSONReport: write parsed timings and helper output
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I nibble logs in moonlit rows,
Then hop where stop-timing data grows.
A zip, a tar, a web page too—
My floppy ears say “bop-de-doo!”
🐇 The burrow hums with tidy clues.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The website/docs site and docs workflow changes are unrelated to #34's Windows stop-timeout diagnostic work. Move the website/docs additions to a separate PR or explain why they are required for the #34 fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed It succinctly summarizes the main change set: WGC stop timing instrumentation, timeout increase, and the new diagnostic tool.
Description check ✅ Passed The PR description matches the template and includes summary, related issue, change type, release impact, desktop impact, and testing.
Linked Issues check ✅ Passed The PR adds per-step stop timing, longer timeout, diagnostic logs, and a standalone bundle workflow that directly addresses #34's diagnosability needs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wgc-stop-diagnostics

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🧹 Nitpick comments (5)
electron/ipc/handlers.ts (1)

2895-2899: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value

Diagnostic payload may embed user-identifying strings.

helperOutput and mainProcessLogs can contain absolute paths (which include the OS username), selected window/display names, and microphone/webcam device names. The save is user-initiated and the buffer is gated, so this is acceptable, but since these files are intended to be attached to upstream bug reports, consider a brief redaction pass (e.g., scrub the home-directory prefix from paths) or a note in the save dialog so reporters know what is being shared.

🤖 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 `@electron/ipc/handlers.ts` around lines 2895 - 2899, The diagnostic payload
assembled in the IPC save flow can include user-identifying strings from
helperOutput and mainProcessLogs. Update the save/report path in the IPC handler
to either add a lightweight redaction step (for example, scrub home-directory
prefixes and other obvious local identifiers before writing) or clearly warn in
the save dialog that the attached logs may contain such details. Keep the change
localized around the diagnostic payload construction and save dialog code so the
behavior is easy to locate later.
website/README.md (1)

7-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer npm ci in the setup instructions.

The .github/workflows/docs.yml build job already installs website/ with npm ci, so npm install can drift from the dependency graph the site is built and tested against.

Proposed fix
- npm install
+ npm ci
🤖 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 `@website/README.md` around lines 7 - 11, Update the setup steps in the README
to use npm ci instead of npm install so the website instructions match the
locked dependency graph used by the docs build. Keep the existing flow around cd
website and npm run dev, and adjust the install step in the setup snippet only.
website/src/pages/index.tsx (1)

27-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a Docusaurus internal link for the docs CTA.

href="/openscreen/docs/intro" hardcodes the current baseUrl from website/docusaurus.config.ts, so this page becomes the first place that drifts if the site path changes. Route this through Docusaurus instead.

Suggested change
+import Link from "`@docusaurus/Link`";
 import useDocusaurusContext from "`@docusaurus/useDocusaurusContext`";
 import Layout from "`@theme/Layout`";
 import Heading from "`@theme/Heading`";
@@
-						<a className={styles.secondaryCta} href="/openscreen/docs/intro">
-							Read the docs
-						</a>
+						<Link className={styles.secondaryCta} to="/docs/intro">
+							Read the docs
+						</Link>
🤖 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 `@website/src/pages/index.tsx` around lines 27 - 35, The docs CTA in the
homepage JSX uses a hardcoded site path, which can drift from the configured
base URL. Update the secondary CTA in the index page to use Docusaurus routing
instead of a raw href, using the existing link handling in the homepage
component so it follows the configured baseUrl automatically.
scripts/diagnostic-tool/README.md (1)

23-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Optional: add a language to fenced code blocks.

markdownlint flags MD040 on these fences. Use text (or console) for the usage/layout blocks to satisfy the linter.

Also applies to: 52-52

🤖 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 `@scripts/diagnostic-tool/README.md` at line 23, The README’s fenced code
blocks in the diagnostic tool usage/layout sections are missing a language tag,
which triggers markdownlint MD040. Update the affected fences in the README
content to specify an appropriate language such as text or console for the
blocks around the documented examples, including the other referenced fence
occurrence, so the linter accepts them.

Source: Linters/SAST tools

.github/workflows/diagnostic-artifact.yml (1)

18-20: 🔒 Security & Privacy | 🔵 Trivial

Pin the workflow actions and disable checkout credential persistence
actions/checkout@v4 and actions/setup-node@v4 are still floating tags here. Add persist-credentials: false to both checkout steps and pin these actions to full commit SHAs; the rest of the workflows in this repo use the same unpinned pattern, so this is a repo-wide hardening change.

🤖 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 @.github/workflows/diagnostic-artifact.yml around lines 18 - 20, The workflow
still uses floating action tags and keeps checkout credentials persisted, so
harden the diagnostic artifact job by updating the two action references in the
workflow to full commit SHAs and adding persist-credentials: false to each
actions/checkout step. Apply the same pattern wherever this workflow uses
actions/checkout or actions/setup-node so the repo is consistent with the
intended pinned-action hardening.

Source: Linters/SAST tools

🤖 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 @.github/workflows/diagnostic-artifact.yml:
- Around line 44-53: The Windows smoke test in the Smoke-test the bundle step is
running on a non-interactive runner, which can prevent WGC capture from
acquiring a display and cause the job to fail before stopTiming is written.
Update this step in diagnostic-artifact.yml to run on an interactive self-hosted
Windows runner, or relax/remove the stopTiming.Count gate in the smoke-test
logic so the workflow does not depend on interactive display capture. Use the
existing Smoke-test the bundle step and the diagnostic.bat invocation as the
place to make the change.

In @.github/workflows/docs.yml:
- Around line 30-31: The workflow currently uses floating action refs in the
docs pipeline, so update every `uses:` entry in the workflow to an immutable
commit SHA instead of tags like `actions/checkout@v4` and
`actions/setup-node@v4`. Make the same pinning change for the other affected
`uses:` steps in this workflow as well, keeping the existing action names but
replacing each version tag with the corresponding commit SHA.

In `@scripts/diagnostic-tool/diagnostic.bat`:
- Around line 1-3: The batch launcher in diagnostic.bat is using LF-only
endings; convert the file to CRLF so Windows cmd parsing stays reliable, and
ensure it remains pinned to CRLF by updating the repository’s line-ending rules
for diagnostic.bat (for example via the file’s Git attributes). Focus the fix on
the diagnostic.bat launcher so its ending is preserved across checkouts and
commits.

In `@scripts/diagnostic-tool/diagnostic.mjs`:
- Around line 50-51: The `--duration` handling in `diagnostic.mjs` can turn
missing or invalid input into `NaN`, which then causes the timeout to fire
immediately; update the argument parsing around the `opts.duration` assignment
to validate the value before storing it. In the CLI parsing branch for
`--duration`/`-d`, check that the next argv entry exists and parses to a finite
numeric value, and only then convert it to milliseconds; otherwise report a
clear usage/error message and avoid scheduling the stop timer with an invalid
delay.

In `@website/docusaurus.config.ts`:
- Around line 1-3: Normalize the Docusaurus config to satisfy Biome by fixing
the import ordering at the top of the file and reformatting the wrapped editUrl
configuration block. Update the Config/Preset imports in the same sorted style
Biome expects, and then run the auto-fix on the config object so the editUrl
assignment is kept on a single normalized line or wrapped consistently. Use the
docusaurus config export as the target for the formatting changes.

In `@website/package.json`:
- Around line 28-39: Reformat the package manifest so it matches Biome’s
expected formatting: adjust the browserslist configuration in the package.json
manifest so the production array is laid out consistently with the rest of the
file, and ensure the file ends with a trailing newline. Use the package.json
manifest and its browserslist/engines sections as the reference points.

In `@website/postcss.config.cjs`:
- Around line 3-5: The PostCSS config needs formatting cleanup so Biome stops
failing on the closing brace/trailing newline. Update the module.exports object
in the PostCSS config to match the repo’s formatting conventions and ensure the
file ends with the correct trailing newline, using the existing module.exports
symbol as the reference point.

In `@website/sidebars.ts`:
- Line 9: Run the formatter on the sidebars module so Biome inserts the missing
trailing newline after the exported `sidebars` default export. Update the
`export default sidebars;` statement formatting to match the rest of the file
and ensure the file ends with the expected newline.

In `@website/src/pages/index.tsx`:
- Around line 1-5: The imports and JSX in the index page need to be reformatted
to satisfy Biome. Run organize-imports and formatting on the component in
index.tsx, and make sure the Layout/Heading usage and related JSX in the page
component are rewritten into the formatter’s preferred style without changing
behavior.

In `@website/tsconfig.json`:
- Around line 1-6: The tsconfig JSON is missing the required trailing newline at
EOF, which Biome flags during CI. Update the website tsconfig file so it ends
with a single newline after the closing brace; this is a formatting-only fix and
can be verified against the JSON document itself.

---

Nitpick comments:
In @.github/workflows/diagnostic-artifact.yml:
- Around line 18-20: The workflow still uses floating action tags and keeps
checkout credentials persisted, so harden the diagnostic artifact job by
updating the two action references in the workflow to full commit SHAs and
adding persist-credentials: false to each actions/checkout step. Apply the same
pattern wherever this workflow uses actions/checkout or actions/setup-node so
the repo is consistent with the intended pinned-action hardening.

In `@electron/ipc/handlers.ts`:
- Around line 2895-2899: The diagnostic payload assembled in the IPC save flow
can include user-identifying strings from helperOutput and mainProcessLogs.
Update the save/report path in the IPC handler to either add a lightweight
redaction step (for example, scrub home-directory prefixes and other obvious
local identifiers before writing) or clearly warn in the save dialog that the
attached logs may contain such details. Keep the change localized around the
diagnostic payload construction and save dialog code so the behavior is easy to
locate later.

In `@scripts/diagnostic-tool/README.md`:
- Line 23: The README’s fenced code blocks in the diagnostic tool usage/layout
sections are missing a language tag, which triggers markdownlint MD040. Update
the affected fences in the README content to specify an appropriate language
such as text or console for the blocks around the documented examples, including
the other referenced fence occurrence, so the linter accepts them.

In `@website/README.md`:
- Around line 7-11: Update the setup steps in the README to use npm ci instead
of npm install so the website instructions match the locked dependency graph
used by the docs build. Keep the existing flow around cd website and npm run
dev, and adjust the install step in the setup snippet only.

In `@website/src/pages/index.tsx`:
- Around line 27-35: The docs CTA in the homepage JSX uses a hardcoded site
path, which can drift from the configured base URL. Update the secondary CTA in
the index page to use Docusaurus routing instead of a raw href, using the
existing link handling in the homepage component so it follows the configured
baseUrl automatically.
🪄 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: 0082474f-65b7-4edb-8b68-d29fd082ca86

📥 Commits

Reviewing files that changed from the base of the PR and between 6c2fdd1 and 912e755.

⛔ Files ignored due to path filters (2)
  • website/package-lock.json is excluded by !**/package-lock.json
  • website/static/img/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (23)
  • .github/workflows/diagnostic-artifact.yml
  • .github/workflows/docs.yml
  • electron/diagnostics/main-log-buffer.test.ts
  • electron/diagnostics/main-log-buffer.ts
  • electron/ipc/handlers.ts
  • electron/main.ts
  • electron/native/wgc-capture/src/main.cpp
  • package.json
  • scripts/diagnostic-tool/README.md
  • scripts/diagnostic-tool/diagnostic.bat
  • scripts/diagnostic-tool/diagnostic.mjs
  • scripts/diagnostic-tool/diagnostic.sh
  • website/.gitignore
  • website/README.md
  • website/docs/intro.md
  • website/docusaurus.config.ts
  • website/package.json
  • website/postcss.config.cjs
  • website/sidebars.ts
  • website/src/css/custom.css
  • website/src/pages/index.module.css
  • website/src/pages/index.tsx
  • website/tsconfig.json

Comment thread .github/workflows/diagnostic-artifact.yml Outdated
Comment thread .github/workflows/docs.yml Outdated
Comment thread scripts/diagnostic-tool/diagnostic.bat Outdated
Comment thread scripts/diagnostic-tool/diagnostic.mjs Outdated
Comment thread website/docusaurus.config.ts Outdated
Comment thread website/package.json Outdated
Comment thread website/postcss.config.cjs Outdated
Comment thread website/sidebars.ts Outdated
Comment thread website/src/pages/index.tsx
Comment thread website/tsconfig.json Outdated
- ci: Windows smoke test now validates bundle structure and the
  diagnostic.bat --help exit code instead of running capture. The
  non-interactive runner has no display, so WGC cannot acquire frames
  and the helper exits before [stop-timing] lines appear (verified
  locally). Real users exercise the capture path on their own boxes.
- tool: --duration / --output / --source now validate their values
  and exit with a clear error on missing or non-numeric input, rather
  than silently turning into NaN and firing the stop timer immediately.
- tool: diagnostic.bat is now CRLF-terminated so Windows cmd parses
  it reliably.
- docs: tag fenced code blocks in the diagnostic-tool README with
  'text' to satisfy markdownlint MD040.
@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

CodeRabbit review triage — addressed in 2780203:

Real, fixed in my code:

  • Windows smoke test no longer requires stopTiming.Count >= 1. Non-interactive runners have no display, so WGC cannot capture frames and the helper exits before emitting [stop-timing]. Smoke test now validates bundle structure and diagnostic.bat --help.
  • --duration / --output / --source validate their values; missing or non-numeric input now exits with a clear error instead of silently turning into NaN.
  • diagnostic.bat is now CRLF-terminated.
  • Fenced code blocks in scripts/diagnostic-tool/README.md tagged with text to satisfy MD040.

Pre-merge checks not addressed here:

  • "Out of Scope Changes" — CodeRabbit itself flagged the website/ + docs.yml content from cce4524 as out of scope for this PR. Those are the Docusaurus scaffolding work from a prior commit, not part of the diagnostic fix. The matching nitpicks on those files (action pinning in docs.yml, hardcoded baseUrl in index.tsx, Biome formatting across website/) belong in a follow-up PR against cce4524, not here.

  • "Docstring Coverage 7.69% < 80%" — repo-wide metric; pulling it up to 80% requires changes to pre-existing code outside this PR's diff. The new files I added (main-log-buffer.ts, diagnostic.mjs) are documented at module/class level.

  • Save dialog privacy warning — skipped; the user is already explicitly choosing to write a file. Adding another dialog adds friction without changing what gets written. Filed mentally as a future UX improvement, not a fix blocker.

  • Repo-wide action pinning + persist-credentials: false — acknowledged by CodeRabbit as applying to existing workflows in the repo. Out of scope for this PR; should be a repo-wide hardening pass.

Mechanical biome --write pass on the Docusaurus scaffolding files
introduced in cce4524. No behavior change; resolves CodeRabbit
formatting comments and unblocks the lint job.
Resolves the last remaining CodeRabbit review comment on PR #36.
Pins actions/checkout, actions/setup-node, actions/upload-pages-artifact,
and actions/deploy-pages to their current v4/v3 commit SHAs with inline
version comments for grep-ability.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
.github/workflows/docs.yml (1)

30-30: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable credential persistence for actions/checkout.

This job executes repo-controlled scripts on pull_request after checkout, so keeping the default token in git config makes the read-scoped GITHUB_TOKEN unnecessarily exposable. Add persist-credentials: false on Line 30 and only opt back in where a later step actually needs authenticated git.

Suggested change
-      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+      - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+        with:
+          persist-credentials: false
🤖 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 @.github/workflows/docs.yml at line 30, The docs workflow checkout step is
leaving the default Git credentials persisted, which is unnecessary for this
job. Update the `actions/checkout` step in the docs workflow to set
`persist-credentials: false`, and only re-enable credential persistence in any
later step that truly needs authenticated git access. Use the existing
`actions/checkout` job step as the anchor for the change.

Source: Linters/SAST tools

🤖 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.

Duplicate comments:
In @.github/workflows/docs.yml:
- Line 30: The docs workflow checkout step is leaving the default Git
credentials persisted, which is unnecessary for this job. Update the
`actions/checkout` step in the docs workflow to set `persist-credentials:
false`, and only re-enable credential persistence in any later step that truly
needs authenticated git access. Use the existing `actions/checkout` job step as
the anchor for the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 318b3c75-579a-485e-a8b4-6506abf4d17b

📥 Commits

Reviewing files that changed from the base of the PR and between 470f0d7 and 985504c.

📒 Files selected for processing (1)
  • .github/workflows/docs.yml

@EtienneLescot EtienneLescot merged commit 8f1134e into main Jun 26, 2026
19 checks passed
@EtienneLescot EtienneLescot deleted the fix/wgc-stop-diagnostics branch June 26, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: I need help pls on windows 10

1 participant