Repository navigation
Ads: the fallback card survives the ad remover extension, checked daily - #423
Conversation
A published Chrome extension hides the home page ad in the JTech theme: its rules name the hero's classes, the fallback's data-jt-l attribute and its place as a classless first child, and it opens closed shadow roots to find the old fallback's vote buttons and "Ad" label. The fallback is now the real card inside a closed shadow root, and nothing outside it can be named: a class that's new every page load, no id or data attribute, the label and thumbs only inside. Inline styles and marks a script puts on it are undone. A daily workflow fetches the extension's latest commit and runs its files against the ads (core's theme and the JTech theme); when a new version gets past, it fails and opens an issue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs
Codex Review Summary: ✅ CompletedThis 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: 929515ad3d
ℹ️ 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".
| JS | ||
|
|
||
| page.driver.with_playwright_page do |pw| | ||
| ([shim] + js).each { |script| pw.add_init_script(script: script) } |
There was a problem hiding this comment.
Register the extension bootstrap as one init script
When the extension has multiple content scripts, this loop does not reliably reproduce Chrome's manifest order: Playwright leaves the evaluation order of separately registered add_init_script calls undefined, including the shim that must run before scripts use chrome.dom. A script can therefore run before its prerequisite or before the shim, causing a false pass or a flaky failure in the daily compatibility check; concatenate the shim and manifest-ordered scripts and register them in one call.
Useful? React with 👍 / 👎.
| run: bundle exec rspec --format documentation plugins/${{ env.PLUGIN_NAME }}/spec/system/ads_remover_spec.rb | ||
|
|
||
| - name: Open an issue when it gets past the ads | ||
| if: failure() && github.event_name == 'schedule' |
There was a problem hiding this comment.
Gate issue creation on the remover spec failure
On a scheduled run, any earlier failure—such as cloning the external repository, installing dependencies, starting Postgres, or building Ember—makes failure() true, so this step opens an issue claiming that the remover hid the ad even though the compatibility spec may never have run. Give the RSpec step an id and condition issue creation specifically on that step's failed outcome to avoid false incident reports.
Useful? React with 👍 / 👎.
The ad remover extension (the-curious-2025/jtech-ad-remover) hid the home page ad in the JTech theme. The fallback is now the real card in a closed shadow root with nothing outside it to name, and hiding it is undone.
spec/system/ads_remover_spec.rbruns the extension's own files against the ads; it fails on main and passes here..github/workflows/ad-remover-check.ymlruns it daily against their latest commit and opens an issue when they get past.🤖 Generated with Claude Code
https://claude.ai/code/session_01BUGDaR7qv2d8CuVp7UGSTs