Skip to content

test(id): exclude collab-cursor spans from plain-text highlight count (#1229) - #3217

Merged
dezren39 merged 1 commit into
mainfrom
queue/4682-1229-collab-cursor-span-exclusion
Nov 1, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/4682-1229-collab-cursor-span-exclusion

Conversation

@dezren39

@dezren39 dezren39 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

What

Test-only fix in pkgs/id/e2e/tests/editor-features.spec.ts: the "plain text file has no syntax highlighting" test now excludes spans inside collab-cursor decorations (.collab-cursor, .collab-cursor-bar) from its colored-span count.

Why

Probe task 1250's verdict on #1229: the single counted span was a collab-cursor-bar-segment decoration (styled background + text color, data-client-id/data-position attributes) rendered inside .collab-cursor — not a Shiki highlight leak. The .txt editor's paragraph contained no highlight spans. The exclusion is decoration-scoped: a genuine Shiki span anywhere else in the editor still counts, so the test keeps its teeth.

No product/editor code changes.

Closes #1229

Queue task 4682 (repo-health-code-pilot), follow-up to probe task 1250.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Tests
    • Updated editor syntax-highlighting checks to exclude collaboration cursor elements when counting colored text spans, while continuing to include styled text elsewhere in the editor. This makes the test results more accurately reflect syntax highlighting.

@dezren39
dezren39 requested a review from a team as a code owner October 31, 2026 20:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T00:33:49.605936Z 74d1587 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10718e81-7fd7-40ee-bfdf-c1a5a6291ccf
Commits

Reviewing files that changed from the base of the PR and between 96d1349 and 74d1587.

Files selected for processing: 1
  • pkgs/id/e2e/tests/editor-features.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The plain-text syntax-highlighting test now excludes colored spans inside collaborative cursor decorations when it counts spans in the editor.

Changes: Plain-text highlighting test

Layer / File(s) Summary
Filter cursor decoration spans
pkgs/id/e2e/tests/editor-features.spec.ts
The test skips spans inside .collab-cursor and .collab-cursor-bar when counting colored spans. It still counts colored spans elsewhere in the editor.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other · Severity of issue fixed: Low

Possibly related issues

  • developing-today/code#1229 — The issue describes a colored span counted by the plain-text editor test. This change excludes the collaborative cursor decoration spans from that count.
Merge Risk: Minimal · up to 74d15

The test adjustment avoids counting collaborative cursor decorations as syntax highlighting. No actionable merge-blocking risk is identified; merge after normal checks pass.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: excluding collab-cursor spans from the plain-text highlight count test.
Linked Issues check Passed #1229 required identification of the colored span, a product-versus-decoration verdict, and a locator exclusion after the probe. The PR records the span as a collab-cursor-bar-segment inside `.colla…
Out of Scope Changes check Passed The whole-PR diff changes only pkgs/id/e2e/tests/editor-features.spec.ts. The added comments and the decoration-scoped exclusion directly support #1229. No unrelated product or editor changes are pr…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

#1229 required identification of the colored span, a product-versus-decoration verdict, and a locator exclusion after the probe. The PR records the span as a collab-cursor-bar-segment inside .collab-cursor, identifies its styling and attributes, and records that it is an editor decoration. The test excludes spans under .collab-cursor or .collab-cursor-bar while counting colored spans elsewhere. The change is limited to the required E2E test.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff changes only pkgs/id/e2e/tests/editor-features.spec.ts. The added comments and the decoration-scoped exclusion directly support #1229. No unrelated product or editor changes are present.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.5.15)
pkgs/id/e2e/tests/editor-features.spec.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

dezren39 commented Nov 1, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 74d1587221

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dezren39
dezren39 merged commit e08fceb into main Nov 1, 2026
1 check passed
@dezren39
dezren39 deleted the queue/4682-1229-collab-cursor-span-exclusion branch November 1, 2026 00:35
@dezren39
dezren39 restored the queue/4682-1229-collab-cursor-span-exclusion branch November 1, 2026 09:16
@dezren39
dezren39 deleted the queue/4682-1229-collab-cursor-span-exclusion branch November 1, 2026 16:47
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.

e2e probe: identify the single syntax-colored span in a plain-text editor — editor-features:137 (#229 follow-up)

1 participant