Skip to content

test(frontend): extend CoeditorPresenceService coverage#6386

Merged
aglinxinyuan merged 1 commit into
apache:mainfrom
aglinxinyuan:test-fe-coeditor-presence
Jul 13, 2026
Merged

test(frontend): extend CoeditorPresenceService coverage#6386
aglinxinyuan merged 1 commit into
apache:mainfrom
aglinxinyuan:test-fe-coeditor-presence

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Extends the CoeditorPresenceService spec (was ~19% covered), driving the real yjs Awareness object: join/leave/update handling, yDoc-reload re-registration, shadowing start/stop, cursor pointer branches, incremental highlight diffing, currently-editing tracking, property-changed flash timeout, and code-editor open/close emissions.

Any related issues, documentation, discussions?

Closes #6383.

How was this PR tested?

Extended the spec from 1 to 24 tests against the real WorkflowGraph/SharedModel with spied joint-wrapper coeditor methods. Verified locally with Vitest and CI's format:ci gate clean. Test-only change — no production code is modified.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8 [1M context])

Copilot AI review requested due to automatic review settings July 12, 2026 23:57
@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jul 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @Yicong-Huang
    You can notify them by mentioning @Yicong-Huang in a comment.

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.

Pull request overview

This PR expands the frontend unit test coverage for CoeditorPresenceService by exercising it against a real Yjs Awareness instance and a real WorkflowGraph/SharedModel, verifying collaboration-presence behaviors without changing production code.

Changes:

  • Added comprehensive Awareness-driven tests for co-editor add/update/remove, including local-client filtering and stale-removal handling.
  • Added coverage for yDoc reload re-observation, shadowing mode behaviors, highlight/currently-editing propagation, and code-editor open/close event emission.
  • Added coverage for cursor pointer creation/move/removal and property-changed flash timeout behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.04%. Comparing base (afa8af2) to head (722c1eb).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #6386   +/-   ##
=========================================
  Coverage     66.04%   66.04%           
  Complexity     3380     3380           
=========================================
  Files          1142     1142           
  Lines         44980    44980           
  Branches       4948     4948           
=========================================
  Hits          29709    29709           
  Misses        13631    13631           
  Partials       1640     1640           
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from afa8af2
agent-service 51.90% <ø> (ø) Carriedforward from afa8af2
amber 66.57% <ø> (ø) Carriedforward from afa8af2
computing-unit-managing-service 9.97% <ø> (ø) Carriedforward from afa8af2
config-service 52.30% <ø> (ø) Carriedforward from afa8af2
file-service 63.97% <ø> (ø) Carriedforward from afa8af2
frontend 63.51% <ø> (ø) Carriedforward from afa8af2
notebook-migration-service 78.94% <ø> (ø) Carriedforward from afa8af2
pyamber 91.18% <ø> (ø) Carriedforward from afa8af2
workflow-compiling-service 55.14% <ø> (ø) Carriedforward from afa8af2

*This pull request uses carry forward flags. 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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aglinxinyuan aglinxinyuan requested review from mengw15 and xuang7 July 13, 2026 00:40

@mengw15 mengw15 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.

LGTM

@aglinxinyuan aglinxinyuan added this pull request to the merge queue Jul 13, 2026
Merged via the queue into apache:main with commit 30175c7 Jul 13, 2026
23 checks passed
@aglinxinyuan aglinxinyuan deleted the test-fe-coeditor-presence branch July 13, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unit test coverage for CoeditorPresenceService

4 participants