Skip to content

fix: stop late cable performs and empty coverage adds - #3987

Open
jmthomas wants to merge 1 commit into
mainfrom
fix/playwright-flakes
Open

jmthomas wants to merge 1 commit into
mainfrom
fix/playwright-flakes

Conversation

@jmthomas

@jmthomas jmthomas commented Oct 1, 2026

Copy link
Copy Markdown
Member

What changed

Cable: a component that unmounts while its connected handler is still refreshing the token performs on the closed consumer afterwards. anycable rejects that with NoConnectionError and never returns the promise, so it surfaced as an unhandled rejection (pageerror), flaking tlm-viewer "displays INST GRAPHS". Make perform/send no-ops once the subscription has been torn down.

Coverage fixture: stopJSCoverage returns [] for pages without URL'd scripts or where profiling never started; MCR logs "The added coverage data must be Array(V8) or Object(Istanbul)" for that. Skip empty results.

Why it changed

Flaky playwright test

Testing strategy

CI/CD

…aywright

Cable: a component that unmounts while its connected handler is still
refreshing the token performs on the closed consumer afterwards. anycable
rejects that with NoConnectionError and never returns the promise, so it
surfaced as an unhandled rejection (pageerror), flaking tlm-viewer
"displays INST GRAPHS". Make perform/send no-ops once the subscription
has been torn down.

Coverage fixture: stopJSCoverage returns [] for pages without URL'd
scripts or where profiling never started; MCR logs "The added coverage
data must be Array(V8) or Object(Istanbul)" for that. Skip empty results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmthomas
jmthomas requested review from EmilyRagan and calmonroe and a balanced review from Copilot and removed request for Copilot October 1, 2026 21:17
@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.11%. Comparing base (0d8985e) to head (802f8c8).

Files with missing lines Patch % Lines
...ns/packages/openc3-js-common/src/services/cable.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3987      +/-   ##
==========================================
+ Coverage   80.06%   80.11%   +0.05%     
==========================================
  Files         901      901              
  Lines       68370    68370              
  Branches     2699     2648      -51     
==========================================
+ Hits        54738    54777      +39     
+ Misses      12976    12925      -51     
- Partials      656      668      +12     
Flag Coverage Δ
frontend 66.93% <50.00%> (+0.36%) ⬆️
python 80.18% <ø> (+0.04%) ⬆️
ruby-api 82.26% <ø> (-0.35%) ⬇️
ruby-backend 85.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused guards correctly address both reported asynchronous failure cases.

Review effort: Balanced
Findings: None

What changed in this PR

No factual issues. This PR prevents late AnyCable operations after teardown and ignores empty JavaScript coverage results.

Changes:

  • Make perform and send no-ops after unsubscription.
  • Skip empty V8 coverage payloads.
File Description
playwright/​tests/​fixture.ts Skips empty coverage results.
openc3-cosmos-init/​plugins/​packages/​openc3-js-common/​src/​services/​cable.js Prevents operations on closed subscriptions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
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.

3 participants