Repository navigation
Add unpacked MV3 URL Cleaner extension (draft) - #31
Conversation
Toolbar popup imports cleanUrl() and explanations from the repo engine, copies the cleaned tab URL locally, and links back via the existing #url= handoff. Tests cover YouTube si cleanup, invalid input, long URLs, opaque shorteners, and non-http(s) pages. Not for store publish. Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 4116cd5c-7d27-4119-932f-0cbf609c2da4) |
Cover https://bit.ly/abc and assert the popup shows the local warning without fetch. Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 8e17eec9-634f-4785-af2e-ff94bdadf044) |
Match the site tokens in a 340px card, show Copied! only after clipboard writeText resolves, and keep load-unpacked working without a build by committing extension/vendor/. Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 36ff0771-14e5-453f-ac98-fb15dffe3987) |
writeText can reject with "Document is not focused" while the
popup is opening. Focus first, wait up to 150ms, then fall back
to a hidden textarea + execCommand('copy'). Copied! only shows
when one of those actually succeeds.
Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: c26b4b9c-27bb-406c-9681-bd36e0b0a9f1) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 9acc2225-d22e-4a27-9ea3-5cde4fc57307) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9086bb1a0
ℹ️ 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".
|
|
||
| if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { | ||
| buildDist(); | ||
| buildExtensionVendor(); |
There was a problem hiding this comment.
Preserve committed vendor files until synchronization checks run
When an engine file changes without updating extension/vendor/, npm test runs this build through its existing pretest hook and silently replaces the committed vendor copies before either synchronization test reads them. Both tests therefore pass even though loading the extension directly from that checkout uses stale cleaning rules, contrary to the documented no-build installation flow. Check the committed copies before regenerating them, or generate into a temporary directory for comparison.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Stopped npm run build from rewriting extension/vendor/; drift is detected by comparing committed files to a fresh buildExtensionVendor output in a temp dir (findExtensionVendorDrift + stale-copy unit test). — 6533b44
| if (!result.removedParams.length) { | ||
| return { kind: "neutral", text: ALREADY_CLEAN, check: false }; |
There was a problem hiding this comment.
Account for redirect unwrapping in the success headline
For a recognized redirect whose destination has no tracking parameters, such as https://www.google.com/url?q=https%3A%2F%2Fexample.com%2F, the engine replaces the wrapper with https://example.com/ but returns an empty removedParameters array. This condition consequently displays Already clean, copied even though the extension changed the URL and removed a redirect wrapper. Preserve the engine's changed or unwrappedFrom metadata in cleanTabUrl() and use it to distinguish an unchanged URL from a successfully unwrapped one.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Popup headline and chips now use the engine changed / unwrappedFrom fields (Google /url shows Copied! + Unwrapped redirect chip); unit + Playwright tests added. — 6533b44
- Merge main and keep horrible playbook in Playwright CI chain - Stop npm run build from rewriting extension/vendor before tests - Compare committed vendor to fresh builds in a temp directory - Drive popup headline from engine changed flag; show unwrap chip - Add unit and Playwright coverage for Google /url unwrap Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 2627b024-4c6d-4c70-936f-2dd8abd4c266) |
- Count redirect unwrap once in removed badge; host-named redirect chips - Reject whitespace/encoded-space hostnames without copying - Neutral styling for nothing-to-clean; unwrap-limit headline and warning - Consistent popup punctuation; execCommand focus restore; link tap target - Vendor drift assertion message; artifacts dir via env with temp fallback Co-authored-by: Andromeda <heyandromeda@users.noreply.github.com>
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: e36174bd-30cd-4936-be0c-d47150b73d0e) |
Unpacked Manifest V3 toolbar extension plus a README bookmarklet. Not for store publish, and this PR should stay a draft.
What landed
extension/toolbar popup importscleanUrl()andexplainParameter()from the repo engine via committedextension/vendor/copies. It does not fork the cleaner. Load unpacked works without a build; CI checks vendor still matchesextension/build.mjs./#url=hash handoff (never?url=).activeTabandclipboardWriteonly. Nohost_permissions, no page fetch, no remote scripts.javascript:(()=>{window.open('https://andromeda-url-cleaner.vercel.app/#url='+encodeURIComponent(location.href),'_blank')})()Popup UI
Compact 340px card using the site logo and
styles.csstokens, including system dark mode. NoLOCAL UTILITYeyebrow.prefers-reduced-motion)Copy reliability
navigator.clipboard.writeTextcan reject withDocument is not focusedwhile the popup is opening. Before the first try the popup callswindow.focus()and, ifdocument.hasFocus()is false, waits up to ~150ms. IfwriteTextstill rejects, it falls back to a hidden textarea +select()+document.execCommand('copy'). Copied! / Already clean, copied only show if one of those two succeeded.Popup rules (tested)
#url=in the hash only.cleanTabUrl()callsisOpaqueShortener()from the engine. If it flags the URL (for examplehttps://bit.ly/abcorhttps://bit.ly/abc?utm_source=x), the popup shows the site's shortener warning — Its destination cannot be inspected locally without following the redirect. The visible URL was cleaned, but the hidden destination was not opened or checked. The short URL is cleaned in place. Nothing is fetched or followed. Covered bytests/extension.test.js.chrome://,file:,about:blank, and other non-http(s) pages showNothing to clean on this page.No copy, no site open.https://youtu.be/_ARIGPnYYUk?si=BNwFs4FDXQAIIDYbbecomeshttps://youtu.be/_ARIGPnYYUk.not a urlreturns an error object instead of throwing.writeTextor execCommand fallback; both failing shows Copy failed.How to try it
chrome://extensions→ Developer mode → Load unpacked →extension/(no build step)http(s)pageTests
npm test: 197 passingcd mcp && node --test tests/*.mjs: 26 passingnpm run test:playwright: 8 scripts, including five back-to-back popup opens that still copy afterwriteTextrejectsNote
Low Risk
Optional local-only extension with minimal permissions; no changes to hosted app auth or data handling, mainly new client surface area covered by tests.
Reviewed by Cursor Bugbot for commit 7626e60. Bugbot is set up for automated code reviews on this repo. Configure here.