Skip to content

fix(devtool-connector): align global switch keys and filter responses#2392

Merged
colinaaa merged 1 commit intolynx-family:mainfrom
colinaaa:colin/devtool-connector-global-switch-filter
Mar 28, 2026
Merged

fix(devtool-connector): align global switch keys and filter responses#2392
colinaaa merged 1 commit intolynx-family:mainfrom
colinaaa:colin/devtool-connector-global-switch-filter

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

@colinaaa colinaaa commented Mar 27, 2026

Summary

  • align GlobalKeys in devtool connector with the full Android DevToolSettings key list
  • add explicit response filters for GetGlobalSwitch and SetGlobalSwitch to avoid consuming unrelated customized events
  • add a changeset for @lynx-js/devtool-connector patch release

Verification

  • pnpm --filter @lynx-js/devtool-connector build

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed alignment of device settings keys with Android specifications
    • Enhanced response filtering for global switch operations
  • New Features

    • Expanded supported device settings to include logbox, debug mode, launch recording, quickjs debugging, performance metrics, and visual debugging tools

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 27, 2026

🦋 Changeset detected

Latest commit: 04875a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@lynx-js/devtool-connector Patch
@lynx-js/devtool-mcp-server Patch
@lynx-js/kitten-lynx-test-infra Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 145d89f8-8c33-44d9-9af3-1ded13a06b19

📥 Commits

Reviewing files that changed from the base of the PR and between 6b3cc12 and 04875a8.

📒 Files selected for processing (3)
  • .changeset/forty-trains-carry.md
  • packages/mcp-servers/devtool-connector/src/index.ts
  • packages/mcp-servers/devtool-connector/src/types.ts

📝 Walkthrough

Walkthrough

The pull request extends the devtool connector to support additional global configuration keys and adds response filtering to global switch operations through new type guards, aligning the implementation with Android DevToolSettings keys.

Changes

Cohort / File(s) Summary
Changelog Entry
.changeset/forty-trains-carry.md
Added Changesets entry documenting a patch release fixing GlobalKeys alignment with Android settings and response filtering.
Type Definitions & Guards
packages/mcp-servers/devtool-connector/src/types.ts
Expanded GlobalKeys from single value to 14 configuration keys; added two type-guard functions (isGetGlobalSwitchResponse, isSetGlobalSwitchResponse) for narrowing response types.
Transport Pipeline Logic
packages/mcp-servers/devtool-connector/src/index.ts
Integrated FilterTransformStream stages guarded by new type predicates into getGlobalSwitch, setGlobalSwitch, and listClientsForDevice request pipelines to filter responses.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • Sherry-hue

Poem

🐰 A rabbit hops through switches new,
Fourteen toggles, filters too—
Transport streams now filter clean,
Android keys and guards serene,
Devtools dance with responses true! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: aligning global switch keys with Android DevToolSettings and adding response filtering for global switch operations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ackages/mcp-servers/devtool-connector/src/types.ts 0.00% 10 Missing ⚠️
...ackages/mcp-servers/devtool-connector/src/index.ts 0.00% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 27, 2026

Merging this PR will degrade performance by 10.09%

❌ 1 regressed benchmark
✅ 62 untouched benchmarks
⏩ 21 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 40.4 ms 44.9 ms -10.09%

Comparing colinaaa:colin/devtool-connector-global-switch-filter (04875a8) with main (6b3cc12)

Open in CodSpeed

Footnotes

  1. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Mar 27, 2026

Web Explorer

#8481 Bundle Size — 728.55KiB (0%).

04875a8(current) vs 6b3cc12 main#8480(baseline)

Bundle metrics  no changes
                 Current
#8481
     Baseline
#8480
No change  Initial JS 43.29KiB 43.29KiB
No change  Initial CSS 2.16KiB 2.16KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 10 10
No change  Modules 149 149
No change  Duplicate Modules 11 11
No change  Duplicate Code 34.69% 34.69%
No change  Packages 3 3
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8481
     Baseline
#8480
No change  Other 384.4KiB 384.4KiB
No change  JS 342KiB 342KiB
No change  CSS 2.16KiB 2.16KiB

Bundle analysis reportBranch colinaaa:colin/devtool-connector...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Mar 27, 2026

React MTF Example

#37 Bundle Size — 207.47KiB (0%).

04875a8(current) vs 6b3cc12 main#36(baseline)

Bundle metrics  no changes
                 Current
#37
     Baseline
#36
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 174 174
No change  Duplicate Modules 68 68
No change  Duplicate Code 46.09% 46.09%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#37
     Baseline
#36
No change  IMG 111.23KiB 111.23KiB
No change  Other 96.24KiB 96.24KiB

Bundle analysis reportBranch colinaaa:colin/devtool-connector...Project dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci bot commented Mar 27, 2026

React Example

#6903 Bundle Size — 237.89KiB (0%).

04875a8(current) vs 6b3cc12 main#6902(baseline)

Bundle metrics  no changes
                 Current
#6903
     Baseline
#6902
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 180 180
No change  Duplicate Modules 71 71
No change  Duplicate Code 46.4% 46.4%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#6903
     Baseline
#6902
No change  IMG 145.76KiB 145.76KiB
No change  Other 92.13KiB 92.13KiB

Bundle analysis reportBranch colinaaa:colin/devtool-connector...Project dashboard


Generated by RelativeCIDocumentationReport issue

@colinaaa colinaaa merged commit 95fff27 into lynx-family:main Mar 28, 2026
48 of 50 checks passed
@colinaaa colinaaa deleted the colin/devtool-connector-global-switch-filter branch March 28, 2026 03:50
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.

1 participant