Skip to content

fix(examples-chat): unblock canonical demo prod deploy (bundle budget + Maps key)#776

Merged
blove merged 1 commit into
mainfrom
fix/examples-chat-prod-bundle-and-maps-env
Jul 7, 2026
Merged

fix(examples-chat): unblock canonical demo prod deploy (bundle budget + Maps key)#776
blove merged 1 commit into
mainfrom
fix/examples-chat-prod-bundle-and-maps-env

Conversation

@blove

@blove blove commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Why

The App-mode itinerary cockpit (#772) merged, but the Canonical demo → Vercel job failed on main — so the new frontend never deployed (prod still serves the pre-#772 build).

Two issues, both fixed here:

  1. Prod bundle budget exceeded. @angular/google-maps + @angular/cdk/drag-drop + the map/itinerary surface pushed the production initial bundle ~80 kB over the 1.5 MB budget. Only the production config enforces budgets, so every dev build + e2e passed while assemble-demo.ts (nx build … --configuration=production) failed. → Raised the initial budget to 1.75 MB (warn 1.6 MB), matching the feature's real weight. (Same class as the earlier cockpit budget bump.)

  2. Maps key not wired into the canonical deploy. The Build and assemble canonical demo step passed no GOOGLE_MAPS_* env, so inject-env baked a keyless bundle → App-mode toggle disabled in prod. → Added GOOGLE_MAPS_API_KEY + GOOGLE_MAPS_MAP_ID (mirroring the ag-ui deploy step; same secret + map id).

Verified

  • nx build examples-chat-angular --configuration=productiongeneration complete (1.58 MB < 1.75 MB).
  • ci.yml parses as valid YAML.

Backend already deployed on the #772 merge (Deploy LangGraph succeeded). Once this lands, the canonical demo redeploys with App mode + the map key enabled.

🤖 Generated with Claude Code

… budget + wire Maps key

The App-mode cockpit (@angular/google-maps + @angular/cdk + map/itinerary)
pushed the production initial bundle ~80kB over the 1.5MB budget; only the
production config enforces budgets, so dev/e2e passed while the 'Canonical
demo → Vercel' job failed at build (frontend never deployed). Raise the
initial budget to 1.75MB (warn 1.6MB), matching the feature's weight.

Also pass GOOGLE_MAPS_API_KEY + GOOGLE_MAPS_MAP_ID to the canonical demo
assemble step (mirroring the ag-ui deploy) so inject-env bakes a keyed
bundle and the App-mode toggle is enabled in prod.
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jul 7, 2026 11:08pm

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 54s —— View job


PR #776 Review

  • Gather context
  • Read changed files
  • Review CI workflow changes
  • Review project.json budget changes
  • Post findings

This is a targeted, two-fix PR. Both changes are correct and well-motivated. A couple of minor observations below.

.github/workflows/ci.yml — Maps env vars

The GOOGLE_MAPS_API_KEY secret reference is correct. The GOOGLE_MAPS_MAP_ID value (86d464ea7d5306034fe2a254) exactly mirrors the ag-ui deploy step (line 929), which confirms consistency. The in-line comment about restricting the key by HTTP referrer is good operational guidance.

One mild concern: the Map ID is now hardcoded in two separate steps. If it ever needs to change, both must be updated together. Consider promoting it to a workflow-level env: variable — but this is not a blocker and matches the existing pattern, so it's fine as-is.

examples/chat/angular/project.json — budget thresholds

Both production and production-debug are updated symmetrically — good. The original maximumWarning: 500kb was almost certainly always firing (the error threshold was already 1.5mb, so the warning was irrelevant noise). The new 1.6mb warn / 1.75mb error pair is coherent and gives ~170 kB headroom above the measured 1.58 MB bundle.

Worth tracking: this is the second budget bump since @angular/google-maps + @angular/cdk/drag-drop landed. If the initial bundle keeps growing, consider whether lazy-loading the map/itinerary surface is practical to keep the budget more meaningful.

Verdict: No bugs or security issues found. Changes are correct — good to merge.

@blove blove enabled auto-merge (squash) July 7, 2026 23:04
@blove blove merged commit f6a9866 into main Jul 7, 2026
56 checks passed
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