Skip to content

Update repository metadata and README to ManagedCode Playwright.Stealth#2

Closed
KSemenenko wants to merge 1 commit intomainfrom
codex/create-open-source-nuget-package-with-playwright-8u9wyh
Closed

Update repository metadata and README to ManagedCode Playwright.Stealth#2
KSemenenko wants to merge 1 commit intomainfrom
codex/create-open-source-nuget-package-with-playwright-8u9wyh

Conversation

@KSemenenko
Copy link
Member

Motivation

  • Remove references to the original AtuboDad/playwright_stealth project and point package and repo metadata to the ManagedCode branded repository.

Description

  • Updated Directory.Build.props to set RepositoryUrl and PackageProjectUrl to https://github.com/managedcode/Playwright.Stealth and edited README.md to remove the explicit AtuboDad attribution and reflect ManagedCode usage.

Testing

  • No automated tests were run because this change only updates documentation and package metadata.

Codex Task

Copilot AI review requested due to automatic review settings February 3, 2026 20:03
@KSemenenko KSemenenko closed this Feb 3, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f7023b3b81

ℹ️ 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".

}
// For whatever weird reason loops don't play nice with Object.defineProperty, here's the next best thing:
addProxy(WebGLRenderingContext.prototype, 'getParameter')
addProxy(WebGL2RenderingContext.prototype, 'getParameter') No newline at end of file

Choose a reason for hiding this comment

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

P2 Badge Guard WebGL2 proxy when WebGL2 is unavailable

This line unconditionally references WebGL2RenderingContext. In browsers or contexts where WebGL2 is disabled or unsupported, that global is undefined and this will throw a ReferenceError during init script evaluation, aborting the rest of the stealth script and potentially surfacing errors in the page. Consider checking typeof WebGL2RenderingContext !== 'undefined' before calling addProxy so the script remains safe on WebGL2‑less environments.

Useful? React with 👍 / 👎.

Copy link

Copilot AI left a comment

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 creates a new .NET repository for ManagedCode.Playwright.Stealth, a library that provides stealth capabilities for Microsoft Playwright to evade bot detection. Despite the PR description stating it only updates metadata and documentation, this is actually a complete new repository setup with source code, tests, and CI/CD configuration.

Changes:

  • Created complete .NET solution with stealth library implementation and tests
  • Added JavaScript stealth scripts ported from puppeteer-extra-plugin-stealth
  • Configured build properties, CI workflow, and package metadata for ManagedCode branding

Reviewed changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Directory.Build.props Build configuration with package metadata pointing to ManagedCode repository
global.json SDK and test runner configuration for .NET 10.0
ManagedCode.Playwright.Stealth.sln Solution file with source and test projects
src/ManagedCode.Playwright.Stealth/ManagedCode.Playwright.Stealth.csproj Main library project configuration
src/ManagedCode.Playwright.Stealth/PlaywrightStealthExtensions.cs Extension methods to apply stealth scripts to Playwright contexts/pages
src/ManagedCode.Playwright.Stealth/StealthConfig.cs Configuration class for stealth options
src/ManagedCode.Playwright.Stealth/StealthScriptProvider.cs Provider that loads embedded JavaScript stealth scripts
src/ManagedCode.Playwright.Stealth/Resources/js/*.js JavaScript stealth scripts (18 files)
tests/ManagedCode.Playwright.Stealth.Tests/ManagedCode.Playwright.Stealth.Tests.csproj Test project configuration
tests/ManagedCode.Playwright.Stealth.Tests/StealthConfigTests.cs Unit tests for configuration
tests/ManagedCode.Playwright.Stealth.Tests/StealthIntegrationTests.cs Integration tests against bot detection sites
README.md Documentation with installation, usage, and development instructions
.github/workflows/ci.yml CI workflow for build and test automation
.gitignore Standard .NET gitignore patterns

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

@@ -0,0 +1,25 @@
console.log(opts)
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Console.log statement in production code can expose debugging information and potentially reveal the presence of stealth automation. Consider removing this line.

Suggested change
console.log(opts)

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +67
getIsInstalled: function getDetails() {
if (arguments.length) {
throw makeError.ErrorInInvocation(`getIsInstalled`)
}
return false
},
runningState: function getDetails() {
if (arguments.length) {
throw makeError.ErrorInInvocation(`runningState`)
}
return 'cannot_run'
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The function name getDetails is duplicated for both getIsInstalled (line 57) and runningState (line 63). While this doesn't affect functionality due to how they're assigned as object properties, it's confusing and should be corrected to use the appropriate function names for better code clarity and debugging.

Copilot uses AI. Check for mistakes.
)
}
const MismatchError = (propName, expected, found) =>
TypeError(
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Missing new keyword before TypeError constructor. This should be return new TypeError(...) to properly instantiate the error object, consistent with the pattern used in line 73.

Suggested change
TypeError(
new TypeError(

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,70 @@
# ManagedCode.Playwright.Stealth (.NET)
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The PR description states this change "only updates documentation and package metadata" and mentions removing references to "AtuboDad/playwright_stealth". However, this appears to be a completely new repository with all new files, not just metadata updates. The description should be updated to accurately reflect that this is an initial repository setup for ManagedCode.Playwright.Stealth, not just metadata changes.

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +20
const {csi_timing} = window.performance

log.info('loading chrome.csi.js')
window.chrome.csi = function () {
return {
onloadT: csi_timing.domContentLoadedEventEnd,
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The variable csi_timing is used but not defined. This should likely be window.performance.timing instead of window.performance.csi_timing. The Navigation Timing API v1 uses window.performance.timing, not window.performance.csi_timing.

Copilot uses AI. Check for mistakes.
if (!('csi' in window.chrome) && (window.performance || window.performance.timing)) {
const {csi_timing} = window.performance

log.info('loading chrome.csi.js')
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The variable log is referenced but never defined, which will cause a runtime error. Either define log or remove this line, or replace it with console.log if logging is intended.

Suggested change
log.info('loading chrome.csi.js')
console.info('loading chrome.csi.js')

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +9
console.log(`current window outer height ${window.outerHeight}`)
window.outerHeight = window.innerHeight + windowFrame
console.log(`new window outer height ${window.outerHeight}`)
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Console.log statements should typically be removed from production code, especially in stealth scripts where the goal is to avoid detection. These logging statements could reveal the presence of stealth automation.

Suggested change
console.log(`current window outer height ${window.outerHeight}`)
window.outerHeight = window.innerHeight + windowFrame
console.log(`new window outer height ${window.outerHeight}`)
window.outerHeight = window.innerHeight + windowFrame

Copilot uses AI. Check for mistakes.
newHandler[trap] = function() {
try {
// Forward the call to the defined proxy handler
return handler[trap].apply(this, arguments || [])
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

This use of variable 'arguments' always evaluates to true.

Suggested change
return handler[trap].apply(this, arguments || [])
return handler[trap].apply(this, arguments)

Copilot uses AI. Check for mistakes.
@KSemenenko KSemenenko deleted the codex/create-open-source-nuget-package-with-playwright-8u9wyh branch February 3, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant