Skip to content

Add pull request template#1

Merged
balloman merged 8 commits into
mainfrom
update-deps-05-2026
Jul 7, 2026
Merged

Add pull request template#1
balloman merged 8 commits into
mainfrom
update-deps-05-2026

Conversation

@balloman

@balloman balloman commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Migrates the extension build/runtime setup from the custom Vite + CRXJS configuration to WXT.
  • Moves the extension source into WXT entrypoints for the content script and popup.
  • Replaces the old Hope UI popup implementation with Tailwind CSS v4 + daisyUI styling.
  • Updates storage usage to WXT's typed storage helper for the saved work address.
  • Replaces ESLint/Prettier/nodemon tooling with oxlint and oxfmt.
  • Adds a GitHub Actions workflow that runs formatting and lint checks on pull requests and pushes to main.
  • Updates package metadata, scripts, dependencies, lockfile, workspace config, TypeScript config, and VS Code settings for the new toolchain.
  • Refreshes the README to document the WXT workflow, updated output directory, available scripts, and current stack.
  • Adds a lightweight GitHub pull request template.

Notes

  • The PR is intentionally stacked on the existing update-deps-05-2026 bookmark, so it includes the earlier WXT/OXC/dependency/readme/icon work plus the PR template and CI changes.
  • WXT now owns manifest generation via wxt.config.ts; the old hand-written manifest types, CRXJS Vite config, PostCSS config, Tailwind v3 config, nodemon config, and old page-based entrypoints are removed.
  • The extension now loads from WXT's .output directory during development instead of dist.
  • The popup address fallback is now defined in src/utils/storage.ts as Empire State Building.
  • The content script now observes StreetEasy DOM mutations, mounts before the About the building section when available, and cleans up on WXT invalidation.
  • CI uses jdx/mise-action, so Node and pnpm versions come from mise.toml instead of a separate packageManager pin.
  • push runs on main will also fire for merged PRs; skipping only those reliably would require extra workflow logic or a repo convention, so this is kept simple.

Testing

  • mise exec -- pnpm install --frozen-lockfile
  • mise exec -- pnpm run format:check
  • mise exec -- pnpm lint
  • mise exec -- pnpm build
  • GitHub Actions CI passed on PR run 28566612833

Summary by CodeRabbit

  • New Features

    • Added a popup where you can save a work address.
    • Added transit directions support on StreetEasy pages, with the page automatically showing a Google Maps embed when available.
  • Documentation

    • Updated the README with current setup steps, environment variables, and available commands.
  • Bug Fixes

    • Improved page injection and reload handling so the embedded UI stays in sync more reliably.

@gitguardian

gitguardian Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
20459644 Triggered Google API Key 627a7d9 src/entrypoints/content/components/Map/App.tsx View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc54baf9-73d1-48ba-895f-779a5f0bbfa6

📥 Commits

Reviewing files that changed from the base of the PR and between 943e830 and 29724eb.

📒 Files selected for processing (8)
  • .env.example
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/ci.yml
  • .gitignore
  • README.md
  • src/entrypoints/content/components/Map/App.tsx
  • src/entrypoints/popup/index.html
  • src/entrypoints/popup/main.tsx
💤 Files with no reviewable changes (1)
  • src/entrypoints/popup/main.tsx
✅ Files skipped from review due to trivial changes (4)
  • .env.example
  • src/entrypoints/popup/index.html
  • .github/PULL_REQUEST_TEMPLATE.md
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/entrypoints/content/components/Map/App.tsx
  • README.md

📝 Walkthrough

Walkthrough

This PR switches the extension to WXT and Oxc-based tooling, adds CI and project configuration, and replaces the old pages-based popup/content setup with WXT entrypoints backed by a storage item for the work address.

Changes

Build tooling and CI migration

Layer / File(s) Summary
Package manifest and dependency updates
package.json, mise.toml, pnpm-workspace.yaml
Version, scripts, dependencies, and local tool versions are updated for the WXT/Oxc workflow.
Oxc and editor configuration
.oxfmtrc.json, .oxlintrc.json, .vscode/settings.json, tsconfig.json
Adds Oxc config, updates editor defaults and save actions, and extends the WXT TypeScript config.
CI and repo metadata
.github/workflows/ci.yml, .gitignore, .github/PULL_REQUEST_TEMPLATE.md, .env.example
Adds CI checks, ignore rules, a PR template, and an example environment variable.
WXT project configuration
wxt.config.ts, web-ext.config.ts
Adds WXT and web-ext configuration files.

WXT entrypoints, storage, and legacy removal

Layer / File(s) Summary
Work address storage and popup UI
src/utils/storage.ts, src/entrypoints/popup/Popup.tsx, src/entrypoints/popup/main.tsx, src/entrypoints/popup/index.html, src/entrypoints/popup/style.css
Defines the stored work address and wires the popup UI, mount entrypoint, HTML shell, and styling around it.
Content script map injection
src/entrypoints/content/index.tsx, src/entrypoints/content/components/Map/App.tsx
Adds the content script that mounts the map app into the page and the app logic that builds the Google Maps embed from storage and page metadata.
README update
README.md
Rewrites the project documentation for the new workflow and extension behavior.
Legacy pages and build files removed
src/pages/*, src/manifest.ts, src/manifest-type.ts, vite.config.ts, postcss.config.cjs, tailwind.config.cjs, nodemon.json, src/global.d.ts, src/vite-env.d.ts, utils/log.ts, utils/plugins/make-manifest.ts
Removes the prior Vite/pages-based implementation and related build utilities.

Estimated code review effort: 4 (Complex) | ~55 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ContentScript as Content script
  participant Document as document.body
  participant MapApp as App
  participant Storage as workAddress
  ContentScript->>Document: find "About the building" section and insert container
  ContentScript->>MapApp: render App into injected container
  MapApp->>Storage: read workAddress and watch for updates
  MapApp->>Document: wait for meta[name='ICBM'] to resolve building coordinates
Loading

Estimated code review effort: 4 (Complex) | ~50 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches one real change, but the PR's main focus is the WXT migration and tooling overhaul.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@balloman
balloman force-pushed the update-deps-05-2026 branch from 943e830 to 21225b9 Compare July 2, 2026 05:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🧹 Nitpick comments (2)
src/entrypoints/content/index.tsx (1)

40-52: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

Observer callback runs querySelectorAll on every DOM mutation until mount succeeds.

Before the container is inserted, every mutation on document.body (subtree, childList) triggers findSectionByText which scans all <section> elements. On a heavy SPA page this could fire very frequently prior to the first successful mount. Consider debouncing the callback or using a more targeted selector/root instead of document.body.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entrypoints/content/index.tsx` around lines 40 - 52, The MutationObserver
in the content entrypoint is doing an expensive full-page scan on every DOM
mutation before the container mounts, which can be very frequent on SPA pages.
Update the observer callback around mount(), cleanup(), and findSectionByText()
so it avoids repeated querySelectorAll work on document.body, either by
debouncing/throttling the callback or by watching a narrower root/selector that
is more directly related to the container insertion. Keep the mounting behavior
the same, but reduce how often the scan runs until the first successful mount.
src/entrypoints/content/components/Map/App.tsx (1)

57-65: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Stale comment and unreachable/malformed fallback branch.

The comment on line 60 ("Gets the address by getting the string starting with the first numeric character") doesn't describe the code below it. Also, the else branch (line 64) is effectively dead code — source() is only invoked inside <Show when={work()}>, so it never runs when work() is falsy — and if it were reached, the query string is malformed (missing & between origin=...Trade and destination=...).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entrypoints/content/components/Map/App.tsx` around lines 57 - 65, The
source() helper in App.tsx has a stale comment that no longer matches the logic
and a fallback branch that is unreachable because source() is only called under
<Show when={work()}>. Update source() to remove the misleading comment and
either eliminate the dead fallback or make it a valid, reachable default path;
if you keep the fallback, fix the Google Maps URL so the query string is
well-formed. Use the source, work, and building symbols to locate the logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 14: The two actions/checkout@v6 steps in the CI workflow should disable
git credential persistence to harden the job. Update each checkout invocation to
set persist-credentials to false so the token is not left in the local git
config for later steps. Use the existing checkout steps in the workflow as the
target and keep the rest of the job unchanged.

In `@src/entrypoints/content/components/Map/App.tsx`:
- Line 62: The Google Maps embed URL in App.tsx is hardcoding an API key, which
should not be committed to source. Update the URL निर्माण in the App component
to read the key from a build-time environment variable or secret instead of a
literal string, and ensure the key is injected through the app’s config/setup
path rather than stored in the code. Also replace any other occurrences in the
same URL-building logic so the key is not duplicated.
- Line 1: The Map/App component is using solid-js APIs and workAddress without
importing them, which will cause runtime ReferenceError on mount. Update the
imports at the top of App.tsx to include createResource and onCleanup from
solid-js, and bring in workAddress from its source used in this component.
Double-check the App component’s setup code where these symbols are referenced
so all used identifiers are explicitly imported.
- Line 45: The waitForElm call in App.tsx is using a malformed selector string,
which will make the underlying querySelector throw a SyntaxError. Fix the
selector passed to waitForElm so the ICBM meta tag query is syntactically
complete, and verify the surrounding App component code that handles the
returned element still works with the corrected selector.
- Around line 11-29: The MutationObserver in waitForElm is never cleaned up, so
it can leak when the selector never matches or when App remounts. Update
waitForElm in App.tsx to always disconnect the observer once it resolves and
also add component cleanup using onCleanup so the observer is torn down on
unmount. Make sure the logic around document.querySelector, MutationObserver,
and observer.disconnect covers both success and teardown paths.

In `@src/entrypoints/content/index.tsx`:
- Line 1: The content entrypoint calls render(App, container) but never imports
render, so add the missing solid-js/web render import alongside the existing App
import. Update the entrypoint module that mounts the app so the render symbol is
available at runtime, matching the pattern used in
src/entrypoints/popup/main.tsx.

In `@src/entrypoints/popup/index.html`:
- Around line 7-13: The manifest.default_icon meta content in the popup
entrypoint is not valid JSON because it uses single quotes and a trailing comma,
which can break WXT parsing. Update the content string to valid JSON in the same
meta tag by using double quotes and removing the trailing comma, keeping the
icon mapping for the manifest override intact.

In `@src/entrypoints/popup/Popup.tsx`:
- Around line 1-6: The Popup component uses createResource without importing it,
so add the missing solid-js import in Popup so the resource setup can resolve
correctly. Update the imports at the top of Popup.tsx to bring in createResource
alongside the existing workAddress and style imports, and ensure the Popup
function keeps using createResource(workAddress.getValue) unchanged.
- Around line 8-14: The save confirmation in saveAddress uses alert(), which is
not reliable in the popup context. Update Popup.tsx so saveAddress reports
success through inline popup UI instead of a blocking browser alert, using an
existing or new status/toast element in the Popup component to show “Saved
successfully!” after workAddress.setValue resolves.

---

Nitpick comments:
In `@src/entrypoints/content/components/Map/App.tsx`:
- Around line 57-65: The source() helper in App.tsx has a stale comment that no
longer matches the logic and a fallback branch that is unreachable because
source() is only called under <Show when={work()}>. Update source() to remove
the misleading comment and either eliminate the dead fallback or make it a
valid, reachable default path; if you keep the fallback, fix the Google Maps URL
so the query string is well-formed. Use the source, work, and building symbols
to locate the logic.

In `@src/entrypoints/content/index.tsx`:
- Around line 40-52: The MutationObserver in the content entrypoint is doing an
expensive full-page scan on every DOM mutation before the container mounts,
which can be very frequent on SPA pages. Update the observer callback around
mount(), cleanup(), and findSectionByText() so it avoids repeated
querySelectorAll work on document.body, either by debouncing/throttling the
callback or by watching a narrower root/selector that is more directly related
to the container insertion. Keep the mounting behavior the same, but reduce how
often the scan runs until the first successful mount.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: be258af8-d494-4243-bcdc-98a3fd0f02e4

📥 Commits

Reviewing files that changed from the base of the PR and between 737fb79 and 943e830.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src/assets/img/logo.svg is excluded by !**/*.svg
📒 Files selected for processing (42)
  • .eslintrc
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/ci.yml
  • .gitignore
  • .oxfmtrc.json
  • .oxlintrc.json
  • .prettierrc
  • .vscode/settings.json
  • README.md
  • mise.toml
  • nodemon.json
  • package.json
  • pnpm-workspace.yaml
  • postcss.config.cjs
  • src/entrypoints/content/components/Map/App.tsx
  • src/entrypoints/content/index.tsx
  • src/entrypoints/popup/Popup.tsx
  • src/entrypoints/popup/index.html
  • src/entrypoints/popup/main.tsx
  • src/entrypoints/popup/style.css
  • src/global.d.ts
  • src/manifest-type.ts
  • src/manifest.ts
  • src/pages/content/components/Map/App.module.css
  • src/pages/content/components/Map/app.tsx
  • src/pages/content/components/Map/index.tsx
  • src/pages/content/index.tsx
  • src/pages/popup/Popup.module.css
  • src/pages/popup/Popup.tsx
  • src/pages/popup/index.css
  • src/pages/popup/index.html
  • src/pages/popup/index.tsx
  • src/styles/index.css
  • src/utils/storage.ts
  • src/vite-env.d.ts
  • tailwind.config.cjs
  • tsconfig.json
  • utils/log.ts
  • utils/plugins/make-manifest.ts
  • vite.config.ts
  • web-ext.config.ts
  • wxt.config.ts
💤 Files with no reviewable changes (21)
  • postcss.config.cjs
  • .eslintrc
  • nodemon.json
  • src/pages/content/components/Map/app.tsx
  • tailwind.config.cjs
  • src/vite-env.d.ts
  • src/pages/popup/index.tsx
  • src/pages/popup/Popup.tsx
  • src/pages/content/components/Map/index.tsx
  • src/manifest.ts
  • utils/log.ts
  • src/pages/content/components/Map/App.module.css
  • src/pages/popup/index.html
  • .prettierrc
  • vite.config.ts
  • src/pages/popup/index.css
  • src/manifest-type.ts
  • src/global.d.ts
  • src/pages/content/index.tsx
  • utils/plugins/make-manifest.ts
  • src/pages/popup/Popup.module.css

Comment thread .github/workflows/ci.yml
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on checkout.

Static analysis (zizmor) flags both actions/checkout@v6 steps for not disabling credential persistence. Since permissions: {} already limits token scope, risk is low, but this is a cheap hardening step to prevent the token from lingering in the git config for subsequent steps (e.g., pnpm install scripts).

🔒 Proposed fix
       - uses: actions/checkout@v6
+        with:
+          persist-credentials: false

Also applies to: 29-29

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 14-14: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 14, The two actions/checkout@v6 steps in
the CI workflow should disable git credential persistence to harden the job.
Update each checkout invocation to set persist-credentials to false so the token
is not left in the local git config for later steps. Use the existing checkout
steps in the workflow as the target and keep the rest of the job unchanged.

Source: Linters/SAST tools

Comment thread src/entrypoints/content/components/Map/App.tsx Outdated
Comment thread src/entrypoints/content/components/Map/App.tsx
Comment thread src/entrypoints/content/components/Map/App.tsx Outdated
Comment thread src/entrypoints/content/components/Map/App.tsx Outdated
@@ -0,0 +1,60 @@
import App from "./components/Map/App";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Missing render import.

render(App, container) is called on line 37, but render from solid-js/web is never imported. src/entrypoints/popup/main.tsx explicitly imports it for the same purpose, confirming it isn't auto-imported here — this will throw a ReferenceError and the content script will never mount.

🐛 Proposed fix
 import App from "./components/Map/App";
+import { render } from "solid-js/web";

Also applies to: 37-37

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entrypoints/content/index.tsx` at line 1, The content entrypoint calls
render(App, container) but never imports render, so add the missing solid-js/web
render import alongside the existing App import. Update the entrypoint module
that mounts the app so the render symbol is available at runtime, matching the
pattern used in src/entrypoints/popup/main.tsx.

Comment thread src/entrypoints/popup/index.html Outdated
Comment thread src/entrypoints/popup/Popup.tsx
Comment thread src/entrypoints/popup/Popup.tsx
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Docstrings generation - IN PROGRESS

Generating docstrings for this pull request

@balloman
balloman merged commit f73e907 into main Jul 7, 2026
4 checks passed
@balloman
balloman deleted the update-deps-05-2026 branch July 7, 2026 17:24
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