Skip to content

misc#379

Merged
vicb merged 6 commits into
masterfrom
vicb/misc
Jan 2, 2026
Merged

misc#379
vicb merged 6 commits into
masterfrom
vicb/misc

Conversation

@vicb
Copy link
Copy Markdown
Owner

@vicb vicb commented Jan 2, 2026

Disabled BMAC API (no longer supported)
Bump dependencies
Use Node24 on GAE

Summary by Sourcery

Disable supporter-related BMAC integrations and update platform/runtime dependencies.

Enhancements:

  • Remove supporter modal data loading and server-side supporter API/Redis keys as the BMAC API is no longer available.
  • Stop syncing supporter information in the fetcher state machine and mark supporter sync as disabled in initial state.
  • Update Google Maps loading logic to use the new @googlemaps/js-api-loader API.
  • Upgrade various application and optimizer package dependencies, including linting, build, Google Cloud, ArcGIS, and runtime libraries.
  • Switch the GAE server runtime to Node.js 24.

Build:

  • Bump ESLint configuration packages and related tooling across the repo.

Deployment:

  • Update App Engine configuration to run on Node.js 24.

Summary by CodeRabbit

  • Removed Features

    • Removed Buy Me A Coffee / supporter integration, periodic supporter sync, API route and stored supporter metrics; supporter modal now shows static content.
  • Refactor

    • Updated Google Maps loader usage to a new import/config pattern.
  • Chores

    • Upgraded Node runtime to 24 and bumped numerous dependencies across tools, libraries, and dev tooling.

✏️ Tip: You can customize this high-level summary in your review settings.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Jan 2, 2026

Reviewer's Guide

Disables the deprecated BMAC/supporters functionality across frontend, backend, and fetcher, updates the Google Maps loader integration to the v2 API, bumps various dependencies (including ESLint, Workbox, ArcGIS, Google APIs, Ionic, SWC, etc.), and switches the GAE runtime to Node.js 24.

Sequence diagram for updated Google Maps loader integration

sequenceDiagram
  participant MapElement
  participant Store
  participant GMapLoader
  participant GMapsAPI as GoogleMapsAPI

  MapElement->>Store: getState()
  Store-->>MapElement: track.domain
  MapElement->>MapElement: getApiKeyAndHost(GMAPS, domain)
  MapElement->>GMapLoader: setOptions(key, channel, libraries)
  Note right of GMapLoader: channel set to weekly
  MapElement->>GMapLoader: importLibrary(maps)
  GMapLoader-->>GMapsAPI: load maps library
  GMapsAPI-->>GMapLoader: maps library loaded
  GMapLoader-->>MapElement: importLibrary resolved
  MapElement-->>MapElement: gMapsApiLoading resolved
Loading

Class diagram for updated supporters and state structures

classDiagram
  class SupporterModal {
    +connectedCallback() Promise~void~
    +render() TemplateResult
  }

  class Keys {
    <<enum>>
    elevationNumRetrieved
    proxyInreach
    proxySpot
    proxySkylines
    proxyGlobe
    proxyInreachAlt
  }

  class FetcherState {
    +number lastTickSec
    +number nextFullSyncSec
    +number nextExportSec
    +number nextArchiveExportSec
    +number nextSupporterSyncSec
    +number memRssMb
    +number memHeapMb
  }

  class StateInit {
    +createInitState() FetcherState
  }

  class ExpressApp {
    +use(path, router) ExpressApp
  }

  class MeshBirRouter {
  }

  class SupportersRouter {
  }

  SupporterModal ..> ExpressApp : previously fetched /api/supporters.json
  ExpressApp --> MeshBirRouter : route /api/bircom
  ExpressApp ..x SupportersRouter : removed /api/supporters
  StateInit --> FetcherState : initializes

  %% Removed enum members (now disabled)
  %% Keys .. supporterNames
  %% Keys .. supporterNum
  %% Keys .. supporterAmount
  %% Keys .. supporterLast3MonthsAmount
Loading

File-Level Changes

Change Details Files
Remove BMAC/supporters feature end-to-end (API routes, Redis keys, background sync, and frontend UI data).
  • Delete the supporters API route implementation and its registration from the Express app so /api/supporters.json is no longer served.
  • Remove supporter-related Redis keys and associated state fields/constants from the shared redis-keys module and fetcher state module.
  • Drop the periodic supporter sync from the fetcher tick, effectively disabling writes of supporter data to Redis.
  • Simplify the supporter modal component by removing the remote fetch of supporter data and the conditional rendering of supporter statistics.
apps/fxc-server/src/main.ts
apps/fxc-server/src/app/routes/supporters.ts
libs/common/src/lib/redis-keys.ts
apps/fetcher/src/app/state/state.ts
apps/fetcher/src/fetcher.ts
apps/fxc-front/src/app/components/ui/supporter-modal.ts
apps/fetcher/src/app/misc/buy-coffee.ts
Update Google Maps frontend integration to use @googlemaps/js-api-loader v2 APIs.
  • Replace direct instantiation of Loader with configuration of a shared gMapLoader instance using setOptions with the API key and channel.
  • Switch to loading the Maps library via gMapLoader.importLibrary('maps') and resolving the existing loading promise once the library is imported.
apps/fxc-front/src/app/components/2d/map-element.ts
Upgrade Node.js runtime and bump various dependencies for tooling and runtime libraries.
  • Change the Google App Engine runtime from nodejs22 to nodejs24 in the server app configuration.
  • Update linting and build tooling dependencies (e.g., @eslint/eslintrc, @eslint/js, eslint, dotenv-webpack, workbox, wrangler) to newer versions.
  • Update runtime dependencies such as @arcgis/core, @google-cloud/* clients, @googlemaps/js-api-loader, @ionic/core, @reduxjs/toolkit, @stencil/core, SWC packages, compression, express, ioredis, lit, validator, and others to the latest specified versions.
  • Regenerate or update the package-lock.json to reflect the new dependency versions.
apps/fxc-server/src/app.yaml
package.json
libs/optimizer/package.json
package-lock.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 2, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

The PR removes the supporters tracking feature end-to-end, updates Google Maps loader usage in a frontend component, and bumps Node/runtime and many dependencies across the repo.

Changes

Cohort / File(s) Summary
Supporters feature removal
apps/fetcher/src/app/misc/buy-coffee.ts, apps/fetcher/src/app/state/state.ts, apps/fetcher/src/fetcher.ts, apps/fxc-front/src/app/components/ui/supporter-modal.ts, apps/fxc-server/src/app/routes/supporters.ts, apps/fxc-server/src/main.ts, libs/common/src/lib/redis-keys.ts
Removed Buy Me A Coffee module and exported Supporters/fetchSupporters; disabled periodic supporter sync and removed SUPPORTER_SYNC_SEC; eliminated Redis keys and enum members for supporters; removed server /supporters.json route and its mounting; removed frontend dynamic fetch/render of supporters.
Google Maps loader migration
apps/fxc-front/src/app/components/2d/map-element.ts
Changed import style to namespace import of @googlemaps/js-api-loader; replaced new Loader(...).load() with gMapLoader.setOptions({ key, v: 'weekly', libraries: [...] }) then gMapLoader.importLibrary('maps'); adjusted option keys (apiKeykey, versionv).
Runtime & dependency updates
apps/fxc-server/src/app.yaml, libs/optimizer/package.json, package.json
Upgraded Node.js runtime from 22→24 in app.yaml; bumped many dependencies (ESLint toolchain, Google Cloud, ArcGIS, SWC/TypeScript tooling, build/tooling packages, core libs like express/ioredis/lit, etc.) and one optimizer package version.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  rect rgba(0,128,0,0.06)
  Note left of Fetcher: Previous periodic supporter sync (removed)
  end
  Fetcher->>BuyMeAPI: Paginated fetch supporters (Authorization)
  BuyMeAPI-->>Fetcher: supporter pages
  Fetcher->>Redis: write supporter keys (names, num, amount, amount3m)
  Redis-->>Server: stored keys read via pipeline
  Server->>Client(UI): GET /api/supporters.json → JSON
  Client(UI)->>User: render supporter list
  rect rgba(128,0,0,0.06)
  Note left of Fetcher: New state — all supporter sync & route removed
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • update deps #333 — overlapping dependency/version updates in root package.json.
  • Virtual branch #321 — overlapping edits to apps/fxc-front/src/app/components/ui/supporter-modal.ts (supporter display/fetch logic).

Poem

🐰 I nibbled code and found a seam,

Coffee names faded from the stream.
Maps now load with a fresher beat,
Dependencies hopped to a newer seat.
A tidy burrow, soft and clean — hooray!

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'misc' is vague and generic, failing to convey meaningful information about the substantial changes made (BMAC integration removal, Google Maps update, dependency bumps, Node.js upgrade). Replace the generic title with a specific, descriptive summary such as 'Disable BMAC integrations, update Google Maps loader, and bump dependencies' to clearly convey the primary changes to reviewers scanning the history.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vicb/misc

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c29b9a and 402face.

📒 Files selected for processing (2)
  • apps/fxc-front/src/app/components/2d/map-element.ts
  • apps/fxc-front/src/app/components/ui/supporter-modal.ts
💤 Files with no reviewable changes (1)
  • apps/fxc-front/src/app/components/ui/supporter-modal.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/fxc-front/src/app/components/2d/map-element.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Sourcery review
  • GitHub Check: Analyze (javascript)
  • GitHub Check: build (22.x)
  • GitHub Check: Cloudflare Pages

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 and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 2, 2026

Deploying flyxc with  Cloudflare Pages  Cloudflare Pages

Latest commit: 402face
Status: ✅  Deploy successful!
Preview URL: https://55bc7f23.flyxc.pages.dev
Branch Preview URL: https://vicb-misc.flyxc.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 2 issues, and left some high level feedback:

  • In map-element.ts, the new @googlemaps/js-api-loader v2 usage only calls importLibrary('maps') while previously geometry and marker libraries were explicitly requested; if any code still relies on those libraries, consider importing them explicitly with additional importLibrary calls to avoid runtime errors.
  • Now that the BMAC supporter API is fully disabled, there are still remnants like nextSupporterSyncSec in the fetcher state (set to 0 but never used); consider a follow-up cleanup to remove unused supporter-related state, types, and configuration to keep the codebase lean.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `map-element.ts`, the new `@googlemaps/js-api-loader` v2 usage only calls `importLibrary('maps')` while previously `geometry` and `marker` libraries were explicitly requested; if any code still relies on those libraries, consider importing them explicitly with additional `importLibrary` calls to avoid runtime errors.
- Now that the BMAC supporter API is fully disabled, there are still remnants like `nextSupporterSyncSec` in the fetcher state (set to 0 but never used); consider a follow-up cleanup to remove unused supporter-related state, types, and configuration to keep the codebase lean.

## Individual Comments

### Comment 1
<location> `apps/fxc-front/src/app/components/2d/map-element.ts:52-53` </location>
<code_context>
   if (!gMapsApiLoading) {
     const load = (resolve: () => void) => {
       const { key } = getApiKeyAndHost('GMAPS', store.getState().track.domain);
-      new Loader({
-        apiKey: key,
-        version: 'weekly',
+      gMapLoader.setOptions({
+        key,
+        channel: 'weekly',
</code_context>

<issue_to_address>
**issue (bug_risk):** `setOptions` is using `key` and `channel` instead of the loader’s expected `apiKey` and `version` fields.

The previous instantiation used `{ apiKey: key, version: 'weekly', libraries: [...] }`, which matches the documented `@googlemaps/js-api-loader` v2 API. The new `setOptions({ key, channel: 'weekly', libraries: [...] })` omits `apiKey` and `version`, so the loader likely won’t receive the API key or version. Please use `apiKey` and `version` here, e.g.:

```ts
gMapLoader.setOptions({
  apiKey: key,
  version: 'weekly',
  libraries: ['geometry', 'marker'],
});
```

If you need `channel`, add it alongside `version`, not instead of it.
</issue_to_address>

### Comment 2
<location> `apps/fxc-front/src/app/components/ui/supporter-modal.ts:8-9` </location>
<code_context>
 export class SupporterModal extends LitElement {
-  private supporters = { names: [], amount: 0, number: 0, amountLast3Months: 0 };
-
   async connectedCallback(): Promise<void> {
     super.connectedCallback();
-    try {
-      const response = await fetchResponse(`${import.meta.env.VITE_API_SERVER}/api/supporters.json`);
</code_context>

<issue_to_address>
**suggestion:** `connectedCallback` no longer needs to be `async` or return a `Promise`.

With the async logic removed, this method now only delegates to `super.connectedCallback()`, so it no longer needs to be `async` or return `Promise<void>`. Updating it to a plain `void`-returning method keeps the lifecycle signature accurate and avoids suggesting asynchronous work:

```ts
connectedCallback(): void {
  super.connectedCallback();
}
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread apps/fxc-front/src/app/components/2d/map-element.ts
Comment thread apps/fxc-front/src/app/components/ui/supporter-modal.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 666a062 and 0d8d510.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • apps/fetcher/src/app/misc/buy-coffee.ts
  • apps/fetcher/src/app/state/state.ts
  • apps/fetcher/src/fetcher.ts
  • apps/fxc-front/src/app/components/2d/map-element.ts
  • apps/fxc-front/src/app/components/ui/supporter-modal.ts
  • apps/fxc-server/src/app.yaml
  • apps/fxc-server/src/app/routes/supporters.ts
  • apps/fxc-server/src/main.ts
  • libs/common/src/lib/redis-keys.ts
  • libs/optimizer/package.json
  • package.json
💤 Files with no reviewable changes (5)
  • apps/fetcher/src/app/misc/buy-coffee.ts
  • libs/common/src/lib/redis-keys.ts
  • apps/fxc-front/src/app/components/ui/supporter-modal.ts
  • apps/fxc-server/src/app/routes/supporters.ts
  • apps/fetcher/src/fetcher.ts
🧰 Additional context used
🧬 Code graph analysis (1)
apps/fxc-server/src/main.ts (1)
apps/fxc-server/src/app/routes/meshbir.ts (1)
  • getMeshBirRouter (10-42)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Sourcery review
  • GitHub Check: build (22.x)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (8)
apps/fetcher/src/app/state/state.ts (1)

45-46: LGTM! Supporters sync correctly disabled.

The change appropriately disables the BMAC supporters synchronization by setting nextSupporterSyncSec to 0, with a clear comment explaining the reasoning.

apps/fxc-server/src/main.ts (1)

94-94: Supporters router has been completely removed.

Verification confirms no remaining references to getSupportersRouter, imports, route mounting, or the supporters.ts file.

apps/fxc-server/src/app.yaml (1)

1-1: Node.js 24 is officially supported and production-ready on Google App Engine. The nodejs24 runtime achieved GA status on November 20, 2025, and is on LTS (stable). No concerns with this specification.

libs/optimizer/package.json (1)

8-8: No action needed. Version 9.39.2 is valid and contains no breaking changes—it is a patch release that adds a warning for /* eslint-env */ comments and includes bugfixes.

package.json (4)

18-18: Good practice keeping dependencies current.

The routine minor and patch version updates across ESLint tooling, ArcGIS, Google Cloud libraries, SWC, Ionic, Redux Toolkit, Lit, and other packages are appropriate for maintaining compatibility and receiving bug fixes.

Also applies to: 20-20, 36-37, 40-40, 59-59, 89-91, 95-95, 97-98, 101-101, 103-103, 108-111, 138-138


118-118: No critical vulnerabilities in these specific packages.

The four security-sensitive packages (compression@1.8.1, express@4.22.1, ioredis@5.8.2, validator@13.15.26) all exist on npm and have no known vulnerabilities in their respective versions. However, the npm audit output reveals HIGH severity vulnerabilities in transitive dependencies (axios 1.0.0-1.11.0 for DoS and SSRF attacks, and MODERATE severity in esbuild ≤0.24.2). These should be addressed separately with dependency updates.

Likely an incorrect or invalid review comment.


102-102: No action required. The codebase is already correctly using the @googlemaps/js-api-loader v2 API: setOptions() and importLibrary() are implemented in map-element.ts (lines 53–58), and no deprecated v1 patterns (new Loader(), loader.load()) remain.


60-60: Review rule compatibility with ESLint v9 behavior changes.

The codebase already uses ESLint's flat config format (eslint.config.js), so the main v9 migration is complete. However, ESLint v9 introduced breaking changes to several rule behaviors (e.g., stricter parsing for no-unused-vars, camelcase, no-implicit-coercion, etc.). Verify that existing rules and their options are compatible with v9's stricter semantics.

Likely an incorrect or invalid review comment.

Comment thread apps/fxc-front/src/app/components/2d/map-element.ts
Comment thread apps/fxc-front/src/app/components/2d/map-element.ts
@vicb vicb merged commit 02217e3 into master Jan 2, 2026
7 checks passed
@vicb vicb deleted the vicb/misc branch January 2, 2026 10:59
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