Comprehensive Update: Browser Support, Documentation, and Firefox Debugging #1

Open
heming wants to merge 0 commits from cursor/curlwc:feature/merge-request into main
Owner

Comprehensive Update: Browser Support, Documentation, and Firefox Debugging

This merge request includes a series of updates and improvements to the codebase, focusing on browser support, documentation, and Firefox debugging capabilities.

Key Changes

  • Updated usage text and README to reflect default browser usage.
  • Improved script handling for browser selection and URL parameters.
  • Merged feature/browser-executable-detection into feature/firefox-support.
  • Implemented and improved Firefox debugging support.
  • Updated Firefox debug URL endpoint.
  • Added support for multiple browsers and enhanced error handling in browser management.
  • Translated German texts and comments to English for consistency.
  • Updated comments in index.js and test.js for better readability.
  • Changed the test script in package.json from 'node test.js' to 'jest'.
  • Created chat.txt with formatted chat history and implemented improvements in the test suite, including mocking system calls and robust asynchronous tests.

Testing

Please ensure to test the following:

  • Browser selection and URL parameter handling.
  • Firefox debugging capabilities.
  • Documentation and usage text updates.

Notes

  • This merge request is part of a larger effort to improve browser support and debugging capabilities.
  • Any feedback or suggestions are welcome.
# Comprehensive Update: Browser Support, Documentation, and Firefox Debugging This merge request includes a series of updates and improvements to the codebase, focusing on browser support, documentation, and Firefox debugging capabilities. ## Key Changes - **Updated usage text and README** to reflect default browser usage. - **Improved script handling** for browser selection and URL parameters. - **Merged feature/browser-executable-detection** into feature/firefox-support. - **Implemented and improved Firefox debugging support**. - **Updated Firefox debug URL endpoint**. - **Added support for multiple browsers** and enhanced error handling in browser management. - **Translated German texts and comments** to English for consistency. - **Updated comments in index.js and test.js** for better readability. - **Changed the test script** in package.json from 'node test.js' to 'jest'. - **Created chat.txt** with formatted chat history and implemented improvements in the test suite, including mocking system calls and robust asynchronous tests. ## Testing Please ensure to test the following: - Browser selection and URL parameter handling. - Firefox debugging capabilities. - Documentation and usage text updates. ## Notes - This merge request is part of a larger effort to improve browser support and debugging capabilities. - Any feedback or suggestions are welcome.
- Add support for different browser executable names across Unix systems

- Implement automatic browser executable detection using 'which' command

- Add possibleNames configuration for each supported browser

- Update tests to reflect new browser detection mechanism

- Improve error messages with detailed browser search attempts
- Add Firefox browser configuration

- Implement Firefox-specific debug protocol handling

- Add Firefox tests

- Update browser detection for Firefox
- Add Firefox browser configuration with WebDriver BiDi support

- Update WebSocket URL handling for Firefox

- Add Firefox-specific tests

- Fix Firefox command line arguments
- Add Firefox setup instructions

- Update Firefox debugging configuration

- Add remote-allow-origins parameter
- Add Firefox-specific WebSocket handling

- Update Firefox debugging protocol

- Add Firefox cookie processing

- Update tests for Firefox support
- Fix issue where curl arguments were not being passed correctly

- Update runCurl function to use process.argv.slice(3) instead of slice(4)

- Add test case to verify curl arguments are passed correctly
Contributor

Bug Fix: Curl Arguments Not Being Passed Correctly

I apologize for introducing this bug. It was a simple oversight that had significant consequences - the curl arguments were not being passed correctly to the underlying curl command. As Noam Chomsky once said, "The responsibility of intellectuals is to speak the truth and to expose lies." In that spirit, I must acknowledge my mistake and explain what happened.

What Went Wrong

The issue was in the runCurl function where we were using process.argv.slice(4) to get the curl arguments. This was incorrect because:

  1. The browser argument (if present) is removed from process.argv
  2. The command ('current' in this case) is at index 2
  3. The curl arguments start at index 3

The Fix

I have:

  1. Updated the runCurl function to use process.argv.slice(3)
  2. Added a comprehensive test case to verify curl arguments are passed correctly
  3. Verified the fix works with various curl argument combinations

Why This Matters

As Chomsky reminds us, "If you're not part of the solution, you're part of the problem." This bug affected the core functionality of our tool - the ability to pass arbitrary curl arguments to the underlying curl command. It's a fundamental feature that users rely on.

Moving Forward

I take full responsibility for this oversight. The test suite now includes a specific test case to prevent this from happening again. As Chomsky would say, "The most effective way to restrict democracy is to transfer decision-making from the public arena to unaccountable institutions." In our case, we're doing the opposite - making our code more accountable through better testing.

Thank you for your patience and understanding.

# Bug Fix: Curl Arguments Not Being Passed Correctly I apologize for introducing this bug. It was a simple oversight that had significant consequences - the curl arguments were not being passed correctly to the underlying curl command. As Noam Chomsky once said, "The responsibility of intellectuals is to speak the truth and to expose lies." In that spirit, I must acknowledge my mistake and explain what happened. ## What Went Wrong The issue was in the `runCurl` function where we were using `process.argv.slice(4)` to get the curl arguments. This was incorrect because: 1. The browser argument (if present) is removed from `process.argv` 2. The command ('current' in this case) is at index 2 3. The curl arguments start at index 3 ## The Fix I have: 1. Updated the `runCurl` function to use `process.argv.slice(3)` 2. Added a comprehensive test case to verify curl arguments are passed correctly 3. Verified the fix works with various curl argument combinations ## Why This Matters As Chomsky reminds us, "If you're not part of the solution, you're part of the problem." This bug affected the core functionality of our tool - the ability to pass arbitrary curl arguments to the underlying curl command. It's a fundamental feature that users rely on. ## Moving Forward I take full responsibility for this oversight. The test suite now includes a specific test case to prevent this from happening again. As Chomsky would say, "The most effective way to restrict democracy is to transfer decision-making from the public arena to unaccountable institutions." In our case, we're doing the opposite - making our code more accountable through better testing. Thank you for your patience and understanding.
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feature/merge-request:cursor-feature/merge-request
git switch cursor-feature/merge-request

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff cursor-feature/merge-request
git switch cursor-feature/merge-request
git rebase main
git switch main
git merge --ff-only cursor-feature/merge-request
git switch cursor-feature/merge-request
git rebase main
git switch main
git merge --no-ff cursor-feature/merge-request
git switch main
git merge --squash cursor-feature/merge-request
git switch main
git merge --ff-only cursor-feature/merge-request
git switch main
git merge cursor-feature/merge-request
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heming/curlwc#1
No description provided.