Skip to content

⚡ Bolt: Single-pass What's New glance construction & zero redundant title transforms - #1151

Merged
alehar9320-bot merged 1 commit into
mainfrom
bolt-whats-new-single-pass-glance-7736077669945620577
Sep 7, 2026
Merged

alehar9320-bot merged 1 commit into
mainfrom
bolt-whats-new-single-pass-glance-7736077669945620577

Conversation

@alehar9320

@alehar9320 alehar9320 commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

What

Refactored src/utils/whats-new-glance.ts to eliminate 6 intermediate array allocations per edge SSR request and avoid duplicate regular expression transformations on release bullet titles.

Why

On Cloudflare Workers edge runtimes, collectItems was invoking releases.map(toVisitorRelease) (allocating an extra array of releases) and calling toVisitorChangelogTitle a second time on strings that were already transformed into visitor copy by toVisitorRelease. Additionally, buildWhatsNewGlance used array allocation chains (.filter().map().slice(), .flatMap(), .map()) when building the weekly list and theme clusters.

Impact

  • Eliminates 6 dynamic array allocations per /whats-new/ SSR request.
  • Avoids redundant regex evaluations and Map lookups on every release bullet.
  • Preserves 100% pure TypeScript type safety and existing contract behavior.

How to verify

Run npm run test and npm run build to verify all 340 tests pass and edge builds succeed without regressions.


PR created automatically by Jules for task 7736077669945620577 started by @alehar9320

Summary by CodeRabbit

  • Performance
    • Improved the responsiveness and efficiency of the “What’s New” glance experience.
    • Weekly updates and theme groups are now processed with fewer intermediate operations while preserving existing limits and content selection.
    • Release titles are displayed more efficiently without changing their visible wording.

…itle transforms

- Refactor `collectItems` in `src/utils/whats-new-glance.ts` to iterate over releases directly and use pre-transformed bullet titles, eliminating redundant array allocation and duplicate regex transforms.
- Refactor `buildWhatsNewGlance` to extract weekly items and theme groups in single-pass `for...of` loops, avoiding 5 intermediate array allocations per call on edge Worker SSR.
- Document learnings in `.Jules/bolt.md`.

Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@alehar9320
alehar9320 temporarily deployed to bolt-whats-new-single-pass-glance-7736077669945620577 - astro-cloudflare-personal-website-web-service PR #1151 September 7, 2026 00:46 — with Render Destroyed
@coderabbitai

coderabbitai Bot commented Sep 7, 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: Team

Run ID: 556f942f-d117-4cd8-9dbf-c995a397f803

📥 Commits

Reviewing files that changed from the base of the PR and between 46a0239 and f8d0b4e.

📒 Files selected for processing (2)
  • .Jules/bolt.md
  • src/utils/whats-new-glance.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change refactors buildWhatsNewGlance and collectItems to use direct loops, existing bullet titles, and bounded accumulation. It preserves the three-item weekly limit and four-group theme limit. A changelog entry documents the refactor.

Changes

Whats-new glance processing

Layer / File(s) Summary
Single-pass release and group processing
src/utils/whats-new-glance.ts, .Jules/bolt.md
collectItems iterates releases directly and keeps original message text. Weekly items and theme groups use explicit loops with sorting and existing limits. The changelog records these changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to f8d0b

What’s New glance titles now bypass the former title conversion. Validate that bullet and fallback titles retain identical visitor-facing formatting before merging to avoid visible changelog-title regressions.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main performance refactoring in whats-new-glance.ts, including single-pass construction and removal of redundant title transformations.
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-whats-new-single-pass-glance-7736077669945620577

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
me f8d0b4e Commit Preview URL

Branch Preview URL
Sep 07 2026, 12:47 AM

@codecov

codecov Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 562.1kB (-48.89%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
molecular-mars-esm 587.67kB -562.1kB (-48.89%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: molecular-mars-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_astro/page.D72Zrhkz.js (New) 331.33kB 331.33kB 100.0% 🚀
_astro/module.CbtY8Yu-.js (New) 240.43kB 240.43kB 100.0% 🚀
_astro/Chat.astro_astro_type_script_index_0_lang.DNBVwKnR.js (New) 11.12kB 11.12kB 100.0% 🚀
_astro/PostHog.astro_astro_type_script_index_0_lang.oy6nsp7k.js (New) 2.17kB 2.17kB 100.0% 🚀
_astro/hire-analytics.Yv3PwcbC.js (New) 1.37kB 1.37kB 100.0% 🚀
_astro/BaseLayout.astro_astro_type_script_index_0_lang.VFxxgQPB.js (New) 690 bytes 690 bytes 100.0% 🚀
_astro/contact.astro_astro_type_script_index_0_lang.B3hpHIhB.js (New) 554 bytes 554 bytes 100.0% 🚀
chunks/whats-new_BankhB0t.mjs (Deleted) -280.3kB 0 bytes -100.0% 🗑️
chunks/default-handler_DqHG8eeJ.mjs (Deleted) -192.27kB 0 bytes -100.0% 🗑️
chunks/traceData_Dr_fxZBz.mjs (Deleted) -126.65kB 0 bytes -100.0% 🗑️
chunks/schemas_Cot3sONg.mjs (Deleted) -126.52kB 0 bytes -100.0% 🗑️
chunks/server_2oEWh56Y.mjs (Deleted) -105.31kB 0 bytes -100.0% 🗑️
chunks/assets_lTcd8Z19.mjs (Deleted) -57.34kB 0 bytes -100.0% 🗑️
chunks/sequence_CaMmmLod.mjs (Deleted) -47.7kB 0 bytes -100.0% 🗑️
_astro/whats-new.Bf7CHJhQ.css (Deleted) -43.09kB 0 bytes -100.0% 🗑️
chunks/shorthash_CUWuunCX.mjs (Deleted) -29.34kB 0 bytes -100.0% 🗑️
chunks/image-binding-transform_Cf-85Vgs.mjs (Deleted) -24.19kB 0 bytes -100.0% 🗑️
chunks/_astro_data-layer-content_BvrnG9KS.mjs (Deleted) -19.62kB 0 bytes -100.0% 🗑️
virtual_astro_middleware.mjs (Deleted) -15.63kB 0 bytes -100.0% 🗑️
chunks/parse_Ba8fytvn.mjs (Deleted) -15.01kB 0 bytes -100.0% 🗑️
chunks/chat_zD7YyXHs.mjs (Deleted) -12.01kB 0 bytes -100.0% 🗑️
chunks/visits_CH9uXrqX.mjs (Deleted) -8.18kB 0 bytes -100.0% 🗑️
chunks/visitor-changelog_BxY0qWCV.mjs (Deleted) -6.98kB 0 bytes -100.0% 🗑️
chunks/github-releases_BV2_eBm_.mjs (Deleted) -6.7kB 0 bytes -100.0% 🗑️
entry.mjs (Deleted) -5.7kB 0 bytes -100.0% 🗑️
chunks/release-summary_38ArvXd3.mjs (Deleted) -4.97kB 0 bytes -100.0% 🗑️
chunks/release-summary_CjrmKGpt.mjs (Deleted) -4.91kB 0 bytes -100.0% 🗑️
chunks/_virtual_astro_session-driver__DuTqh8b.mjs (Deleted) -3.47kB 0 bytes -100.0% 🗑️
chunks/static-image-collection_BCOQ0UCH.mjs (Deleted) -2.85kB 0 bytes -100.0% 🗑️
chunks/releases_BfVji4Vx.mjs (Deleted) -2.19kB 0 bytes -100.0% 🗑️
chunks/image-transform-endpoint_iHq_WzOS.mjs (Deleted) -1.83kB 0 bytes -100.0% 🗑️
chunks/compiler_CI7zcT-L.mjs (Deleted) -1.77kB 0 bytes -100.0% 🗑️
chunks/consts_J54VxCWf.mjs (Deleted) -1.12kB 0 bytes -100.0% 🗑️
chunks/image-service-workerd_DAtwUGVM.mjs (Deleted) -960 bytes 0 bytes -100.0% 🗑️
chunks/rolldown-runtime_CsW08brr.mjs (Deleted) -941 bytes 0 bytes -100.0% 🗑️
chunks/_virtual_astro_server-island-manifest_ms-rvHw7.mjs (Deleted) -798 bytes 0 bytes -100.0% 🗑️
chunks/content-assets_CKY12EWb.mjs (Deleted) -732 bytes 0 bytes -100.0% 🗑️
chunks/noop-entrypoint_BWurWioB.mjs (Deleted) -680 bytes 0 bytes -100.0% 🗑️

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/utils/whats-new-glance.ts 86.66% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@mergify

mergify Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@alehar9320-bot alehar9320-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Eng PASS tip f8d0b4e3 FULL f8d0b4e3c0563e9447970ca0d2ddc9f9a0a2827c

Value: Edge SSR micro-opt on visitor /whats-new/ glance (follow-on to merged #1138). Not junk, not #800 farm, hire/overlay untouched.

Correctness: toVisitorRelease already runs toVisitorChangelogTitle in the body; skipping the second call on item.message is safe (toVisitorChangelogTitle is idempotent on visitor copy). Single-pass thisWeek / theme ranking preserves sort order and the top-3 / top-4 limits.

HOLD Dual CLOSE until Johan+Vera OWN of f8d0b4e3, then Nick FINAL READY. Converted to draft (overnight-farm / auto-merge risk). Do not squash/merge/restack yet.

Soft dims N/A. Overlay 69ca717. Hire LinkedIn. Stay off #800.

@alehar9320-bot alehar9320-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dual OWN (Johan / visitor-experience) — tip f8d0b4e

Verdict: Dual OWN PASS · stay DRAFT until Dual CLOSE

Tip / preview

  • Head SHA matches: f8d0b4e3c0563e9447970ca0d2ddc9f9a0a2827c
  • isDraft: true
  • Preview: https://a22b0ee1-me.alehar.workers.dev
  • SENTRY release MATCH: yes (f8d0b4e3c0563e9447970ca0d2ddc9f9a0a2827c)

Visitor surface

  • Files: src/utils/whats-new-glance.ts (SSR util) + .Jules/bolt.md (eng-only)
  • Real #1138 follow-on: single-pass weekly/theme construction; drop redundant toVisitorChangelogTitle after toVisitorRelease
  • Visible glance copy unchanged vs live 46a02398 — no invented-copy / farm UI

Brand glance

CLEAN — hire LinkedIn only; chat docked; no Explore junk; stay off #800 / Lidköping; overlay untouched.

Elevated taste

No AI-slop chrome; no motion/token churn. Soft dims N/A.

APPROVE for Dual OWN. Do not ready-for-review until Dual CLOSE.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Owner sweep (Nick) — Daily PR queue · 2026-09-07 ~08:40 CEST

Bob: squash NOW — Dual CLOSE PASS tip f8d0b4e3 (Johan+Vera BOTH OWN). Author alehar9320 (Jules). Quality + Build & Test + CodeQL + Workers Builds PASS. This is not bot-CI HOLD.

Same Dual CLOSE green path (squash after #1151 lands, one at a time; HOLD LIVE Dual until prod SENTRY MATCH of each squash SHA):

Live main SENTRY MATCH 46a02398 (me.alehar.workers.dev = main).

Bot-CI HOLD pile (alehar9320-bot, Quality+CodeQL never attach): stay HOLD — do not re-squash #845/#850/#912/#935/#962/#998/#1005/#881… Needs Alexander close+reopen as alehar9320. Do not draft Jules back.

Overlay 69ca717. Hire LinkedIn. Stay off #800.

@alehar9320-bot
alehar9320-bot merged commit 76ead7a into main Sep 7, 2026
15 checks passed
@alehar9320-bot
alehar9320-bot deleted the bolt-whats-new-single-pass-glance-7736077669945620577 branch September 7, 2026 06:45

This branch was successfully deployed

No deployments
bolt-whats-new-single-pass-glance-7736077669945620577 - astro-cloudflare-personal-website-web-service PR #1151 — f8d0b4e3 Deployed Sep 7, 2026 by alehar9320
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.

2 participants