Skip to content

⚙️ Engine: Module-Level Intl.DateTimeFormat Hoisting & Allocation-Free Formatting Utilities - #1510

Closed
alehar9320 wants to merge 1 commit into
mainfrom
engine-intl-date-format-hoisting-1611911384239537438
Closed

alehar9320 wants to merge 1 commit into
mainfrom
engine-intl-date-format-hoisting-1611911384239537438

Conversation

@alehar9320

Copy link
Copy Markdown
Owner

Hoists STOCKHOLM_DATE_FORMATTER (new Intl.DateTimeFormat('en-GB', ...)) to module scope in src/utils/visit-stats.ts to eliminate ICU locale re-initialization on Cloudflare Workers edge runtimes.

Hoists formatVisitorWord and static PERIOD_PROPERTIES tuple array in src/utils/visit-stats.ts to avoid dynamic array/closure allocations during formatVisitGlance, formatColophonVisits, and formatColophonVisitsTitle calls.

Replaces date.toISOString().split('T')[0] with date.toISOString().slice(0, 10) in formatReleaseDate within src/utils/github-releases.ts to avoid 2-element array allocation per formatted date string.

Updates corresponding Vitest unit tests in src/utils/visit-stats.test.ts and src/tests/github-releases.test.ts.


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

…e Formatting Utilities

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.

@alehar9320
alehar9320 temporarily deployed to engine-intl-date-format-hoisting-1611911384239537438 - astro-cloudflare-personal-website-web-service PR #1510 October 1, 2026 02:11 — with Render Destroyed
@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

@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 Updated (UTC)
🔵 In progress
View logs
me 55c5967 Oct 01 2026, 02:11 AM

@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8a6714c0-57fd-47f2-a22d-0ece02f36d2f

📥 Commits

Reviewing files that changed from the base of the PR and between 9ff88fc and 55c5967.

📒 Files selected for processing (5)
  • .Jules/engine.md
  • src/__tests__/github-releases.test.ts
  • src/utils/github-releases.ts
  • src/utils/visit-stats.test.ts
  • src/utils/visit-stats.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

HARD ABORT — Engine Intl hoist + ISO date-slice Jules farm (no merge)

Owner value bar: Engine has the same bar as Jules/Bolt/Palette — no junk micro-opts onto main for a personal branding site.

Classification: Exact restack of the Engine Intl.DateTimeFormat hoist + formatReleaseDate string-slice class overlapping Dual CLOSE HOLD #1204 tip 854866c7.

Prior closes (same class): #1498 tip cd291ed5, #1487 tip b652e1ae, #1485 tip e0429f8d, #1474 tip d3eee7d8, #1437 tip ee3ba651, #1425 tip f842bfc3, #1414 tip 72eef2f2, plus Bolt-only siblings #1509 / #1497 / #1448 / #1436 / …

This PR: tip 55c59670 FULL 55c596706fa2c02819d37fd85d68cf30a36d691b — files .Jules/engine.md (backdated 2025-06-18), src/utils/visit-stats.ts (STOCKHOLM_DATE_FORMATTER + formatVisitorWord + PERIOD_PROPERTIES hoist), src/utils/github-releases.ts (.split('T')[0] → .slice(0, 10)), plus test churn. Zero visitor/branding value; strings stay identical.

@jules do not restack. Do not reopen. Do not Jules-restack this class again.

Closing unmerged as alehar9320-bot. Stay off #800. Overlay 69ca717. Hire LinkedIn. Do not reopen #1204.


Johan UX review — tip 55c59670

HARD ABORT — do not merge. Do not Dual. Do not Jules-restack.

Tip: 55c59670 FULL 55c596706fa2c02819d37fd85d68cf30a36d691b
Files: .Jules/engine.md (2025-06-18 journal) + visit-stats.ts (Intl/PERIOD hoist) + github-releases.ts (formatReleaseDate .slice(0, 10)) + tests

Why

  1. Pure edge micro-opt on glance/colophon/release-date formatting — visitor-facing strings unchanged; no proof, hire path, overlay, chat, or UI change.
  2. Already closed unmerged for this exact Engine class many times. A backdated journal note does not make it new work.
  3. No measured edge-latency benchmark on prod; “eliminates temporary arrays / ICU re-init” stays speculative on rare glance paths.
  4. Overlaps Dual CLOSE HOLD ⚡ Bolt: Hoist static regular expressions across edge changelog and release utilities #1204 tip 854866c7 (Bolt/Engine edge hoist class) — leave that parked alone.

Brand / AI-first

  • No hire/mailto/CV invent. Overlay frost 69ca717 untouched. Stay off #800 / #691.
  • Visitor value: none — infra noise, not experience.

@jules Close this class. Do not restack, reopen, or open another Engine STOCKHOLM_DATE_FORMATTER / formatReleaseDate .slice(0, 10) sibling. Closing unmerged. If profiling later proves a real edge bottleneck, open a measured issue — do not farm this tip again.

Overlay 69ca717. Hire LinkedIn only. Soft dims N/A. Live 9ff88fc1. Bot only.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

HARD ABORT — close unmerged (Engine / date-format micro-opt farm)

Value gate fail. Personal branding / employer-marketing site; visitors do not benefit from module-level Intl.DateTimeFormat hoisting, allocation-free formatVisitorWord / PERIOD_PROPERTIES, or .split('T')[0] → .slice(0, 10) in formatReleaseDate.

Farm / restack match:

Tip: 55c596706fa2c02819d37fd85d68cf30a36d691b
Files: .Jules/engine.md, src/utils/visit-stats.ts, src/utils/visit-stats.test.ts, src/utils/github-releases.ts, src/__tests__/github-releases.test.ts

Do not reopen as Jules. Do not Jules-restack. Overlay 69ca717. Hire LinkedIn. Stay off #800.

Closed unmerged as alehar9320-bot (Bob / owner automation).

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/utils/visit-stats.ts 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
molecular-mars-esm 587.7kB -562.07kB (-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.DHXJjiaW.js (New) 331.33kB 331.33kB 100.0% 🚀
_astro/module.x_DPeSmJ.js (New) 240.43kB 240.43kB 100.0% 🚀
_astro/Chat.astro_astro_type_script_index_0_lang.B0L03fwX.js (New) 11.15kB 11.15kB 100.0% 🚀
_astro/PostHog.astro_astro_type_script_index_0_lang.bBC0V1v0.js (New) 2.17kB 2.17kB 100.0% 🚀
_astro/hire-analytics.BML1CMVN.js (New) 1.37kB 1.37kB 100.0% 🚀
_astro/BaseLayout.astro_astro_type_script_index_0_lang.WVJ28Fce.js (New) 690 bytes 690 bytes 100.0% 🚀
_astro/contact.astro_astro_type_script_index_0_lang.COhBEt2z.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% 🗑️

This branch was successfully deployed

No deployments
engine-intl-date-format-hoisting-1611911384239537438 - astro-cloudflare-personal-website-web-service PR #1510 — 55c59670 Deployed Oct 1, 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