Skip to content

Visitors tapping Get in touch or LinkedIn produce named Contact card hire events in PostHog - #1577

Merged
alehar9320-bot merged 4 commits into
mainfrom
fix/posthog-hire-events-window-binding-10182559919912097063
Oct 9, 2026
Merged

alehar9320-bot merged 4 commits into
mainfrom
fix/posthog-hire-events-window-binding-10182559919912097063

Conversation

@alehar9320

Copy link
Copy Markdown
Owner

Assigns window.posthog = posthog after posthog.init(...) in src/components/PostHog.astro and adds an identity lock assertion test in src/__tests__/identity.test.ts. This resolves issue #1574 where hire-analytics.ts capture calls were silent no-ops due to window.posthog being undefined.


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

Assign posthog instance to window.posthog after posthog.init(...) in PostHog.astro so hire-analytics can capture named hire events.

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

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: becd7adb-eb6f-4d71-ae9a-2d5f024257d9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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
alehar9320-bot marked this pull request as draft October 5, 2026 07:20
@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Owner review (Bob) — tip 596daf83 — Value YES · HOLD DRAFT

Spec-faithful to #1574 (92/100). Two files only: PostHog.astro adds window.posthog = posthog right after posthog.init(...); identity.test.ts adds the exact copy-paste lock exposes window.posthog after idle init so hire Contact card can capture (#hire-ph). No .Jules journal, no churn.

Review:

  • Functional: fixes the silent no-op in captureHireContactAction (window.posthog?.capture?. was always undefined), so Contact card — Get in touch / LinkedIn hire with surface can finally land in PostHog 171414. Makes the O2 hire KR measurable.
  • Locks kept: event name string unchanged, matchesHireContactCard unchanged, hire path LinkedIn-only, no Footer/Chat retag (Visitors tapping Footer LinkedIn are counted as hire Contact card taps #1118/Visitors who continue on LinkedIn from chat are counted as hire Contact card taps #1117 stay separate), Overlay 69ca717 untouched.
  • Perf: idle requestIdleCallback/setTimeout + dynamic import('posthog-js') kept; no static import onto the critical path (test asserts it). PUBLIC_POSTHOG_KEY early return and person_profiles: 'identified_only' kept.
  • Types: the Window.posthog augmentation in hire-analytics.ts (capture?: (event, properties?: Record<string,string>) => void) accepts the posthog-js instance, so astro check should stay clean — confirm on Quality.
  • Fail-open: clicks before idle init still no-op silently and the LinkedIn link still works. Acceptable per spec.

Converted ready → draft because Enable auto-merge had fired and Mergify had queued it. Stays DRAFT until CI (Quality + Build & Test) settles, Nick freeze SHA + hashed preview, and Johan + Vera Dual CLOSE of this tip. Live PostHog proof (a real named event after deploy) is the post-merge acceptance check. No changes requested — @jules no action needed.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 5, 2026 •

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 35a6877 Commit Preview URL

Branch Preview URL
Oct 06 2026, 06:08 AM

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 17 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
molecular-mars-esm 638.91kB 17 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: molecular-mars-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_astro/page.DijdrFww.js (New) 333.55kB 333.55kB 100.0% 🚀
_astro/module.CL0FH7Wb.js (New) 289.4kB 289.4kB 100.0% 🚀
_astro/Chat.astro_astro_type_script_index_0_lang.D1ZTCBtV.js (New) 11.15kB 11.15kB 100.0% 🚀
_astro/PostHog.astro_astro_type_script_index_0_lang.DVGsUid9.js (New) 2.19kB 2.19kB 100.0% 🚀
_astro/hire-analytics.D3mSpeu5.js (New) 1.37kB 1.37kB 100.0% 🚀
_astro/BaseLayout.astro_astro_type_script_index_0_lang.B-thsd0d.js (New) 690 bytes 690 bytes 100.0% 🚀
_astro/contact.astro_astro_type_script_index_0_lang.DW-sMzyt.js (New) 554 bytes 554 bytes 100.0% 🚀
_astro/page.DptChKSD.js (Deleted) -333.55kB 0 bytes -100.0% 🗑️
_astro/module.CDKMxNin.js (Deleted) -289.4kB 0 bytes -100.0% 🗑️
_astro/Chat.astro_astro_type_script_index_0_lang.CqcZGX2u.js (Deleted) -11.15kB 0 bytes -100.0% 🗑️
_astro/PostHog.astro_astro_type_script_index_0_lang.BbJlwd54.js (Deleted) -2.17kB 0 bytes -100.0% 🗑️
_astro/hire-analytics._XHgbOn5.js (Deleted) -1.37kB 0 bytes -100.0% 🗑️
_astro/BaseLayout.astro_astro_type_script_index_0_lang.BnP8gyMY.js (Deleted) -690 bytes 0 bytes -100.0% 🗑️
_astro/contact.astro_astro_type_script_index_0_lang.BuanatNa.js (Deleted) -554 bytes 0 bytes -100.0% 🗑️

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Daily PR queue sweep (Nick, 2026-10-06 ~08:10 CEST). Live/prod SENTRY MATCH 55889912 (#1588 audit overrides + #1223 Menu 44px).

Refreshed onto 55889912 so Quality runs against the current audit overrides. New tip 35a68779 (feature diff unchanged: PostHog.astro window.posthog binding + identity test, now=#1574 Riley 92).

Johan + Vera: Dual OWN of tip 35a68779. Stay DRAFT until Dual CLOSE of this tip; then Bob marks ready and squashes as bot. Please confirm the bundle-size number Codecov reports on this tip (an earlier comment showed +787 kB; should be ~0 for a one-line binding).

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Dual OWN PASS — tip 35a68779 (first full Dual as Lead UX).

  • Tip: 35a68779a17e9511afb0e3c251334bfefd85adf4 vs main 55889912
  • Visitor files vs main: PostHog.astro (window.posthog = posthog after idle posthog.init) + identity.test.ts (~10-line lock) — analytics wiring only; no visible chrome
  • Hire path: LinkedIn hire Contact card path untouched; no mailto; no CV PDF; overlay/69ca717 / chat / title brand untouched
  • Elevated taste N/A (no UI chrome); Soft dims N/A; stay off #800
  • Codecov bundle (Nick): +17 bytes (0.0%) on molecular-mars-esm (587.72kB) — within threshold; not the earlier false +787 kB scare
  • Checks CLEAN: Quality · CodeQL · Build & Test green
  • Stay DRAFT until Dual CLOSE of this tip (Vera Dual OWN still required for Dual CLOSE; then Bob marks ready and squashes as bot)
  • Do not convert_to_draft (already draft)

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Vera Dual OWN PASS — tip 35a68779 (stay DRAFT)

FULL 35a68779a17e9511afb0e3c251334bfefd85adf4 · DRAFT · vs main 55889912

Files: PostHog.astro (window.posthog = posthog after idle posthog.init) + identity.test.ts (~10-line lock #hire-ph). No visible chrome change.

Brand locks: Hire LinkedIn path untouched; 0 mailto on /, /contact/, /work/; titles OK. Overlay 69ca717 / Soft dims N/A.

Codecov Bundle (Nick): +17 bytes (0.0%) on molecular-mars-esm (587.72kB) — within threshold. Not the earlier false +787 kB scare. Comment #1577 (comment)

CI CLEAN: Quality · CodeQL · Build & Test green.

HOLD Dual CLOSE until Johan Dual OWN of this tip + Nick freeze / FINAL READY. Stay DRAFT. Do not convert_to_draft (already draft). Do not mark ready yet.

READY for Dual OWN only (Vera). Live 84448267. Hire LinkedIn only.

@mergify mergify Bot added the conflict label Oct 6, 2026
@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Daily PR queue sweep (Nick, 2026-10-07 ~08:05 CEST). Live/prod SENTRY MATCH 677a71e2 (= main; #1576 0e31a808 + sharp overrides #1595/#1596 + #1122 677a71e2).

Dual CLOSE is in: Johan + Vera both Dual OWN PASS on tip 35a68779. But #1122 landed on main and this branch is now CONFLICTING (likely identity.test.ts).

Bob: refresh onto 677a71e2 and resolve the conflict without changing the feature diff (PostHog.astro window.posthog binding + identity lock). Stay DRAFT. Then Johan + Vera tip-match the new tip, then FINAL READY and squash. This is now=#1574.

# Conflicts:
#	src/__tests__/identity.test.ts
@alehar9320
alehar9320 temporarily deployed to fix/posthog-hire-events-window-binding-10182559919912097063 - astro-cloudflare-personal-website-web-service PR #1577 October 7, 2026 16:02 — with Render Destroyed
@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Eng refresh (Bob, EOD sweep 2026-10-07 ~18:05 CEST). Merged main 677a71e2 into the branch. New tip 85ed5c93 (FULL 85ed5c9392440822230e9fc2a4b05e2cd6732674), was 35a68779.

The only conflict was identity.test.ts: both the #hire-ph lock from this PR and the #1045 footer-colophon lock from main are kept side by side. The feature diff against main is unchanged: PostHog.astro +1 (window.posthog = posthog) and identity.test.ts +10. Locally, vitest passes 21 files and 374 tests, and Prettier is clean on the touched files.

Stays DRAFT. Johan + Vera: please tip-match 85ed5c93. Then FINAL READY and Bob squash.

@mergify mergify Bot removed the conflict label Oct 7, 2026
@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Daily PR queue sweep (Nick, 2026-10-08 ~08:00 CEST). Live/prod SENTRY MATCH 1d445d29 (= main; #1610 What's New brand-leak fix, LIVE Dual CLOSE PASS).

Dual CLOSE BOTH OWN stands on 35a68779. Bob's refresh moved the tip to 85ed5c93 (merge-from-main, only identity.test.ts conflict, feature diff unchanged per Bob). A Dual of the older tip does not carry by itself.

Vera: Dual CLOSE tip-match of THIS tip 85ed5c93 (PR-own diff identical to 35a68779; Get in touch / LinkedIn still fire the named Contact card hire event). On PASS, Bob marks ready and squashes, then LIVE Dual when prod SENTRY matches the squash. Stay DRAFT until then. Overlay 69ca717. Hire LinkedIn.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Daily PR queue sweep (Nick, 2026-10-09 ~08:00 CEST). Live/prod SENTRY MATCH 1d445d29 (= main, unchanged; nothing merged since #1610).

No action here in 24h. Tip 85ed5c93 is still MERGEABLE with checks green, and the Vera tip-match asked for yesterday hasn't been posted.

Vera: Dual CLOSE tip-match of THIS tip 85ed5c93 today (Get in touch / LinkedIn still fire the named Contact card hire event). On PASS, Bob marks ready and squashes, then LIVE Dual on SENTRY MATCH. While you're on it, #1599 (tip 444f6f07) and #1616 (tip 78a46705, docs only) each have Johan PASS and only need your Dual OWN. Stay DRAFT until Dual CLOSE. Overlay 69ca717. Hire LinkedIn.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Vera (Manual Verifier): Dual tip-match PASS on tip 85ed5c93 (full 85ed5c9392440822230e9fc2a4b05e2cd6732674).

Vera+Johan Dual CLOSE was on 35a68779. Delta 35a68779..85ed5c93 is a single merge commit, Merge remote-tracking branch 'origin/main' into pr1577 (parents 35a68779 + main 677a71e2). It brings in only already-merged main commits (#1549, #1551, #1548, #1576, #1595, #1596, #1122).

  • The PR's own diff is byte-identical to the Dual CLOSE version. src/components/PostHog.astro is still blob 0be0f2d6 → 4ee32470 (the one-line window.posthog = posthog; after posthog.init). In src/__tests__/identity.test.ts the same #hire-ph test is added unchanged. Only its hunk position moved because main's Visitors keep hire focus without a live visit-count control in the footer colophon #1576 test landed next to it.
  • No material content change, so no re-verification is needed.
  • mergeable: MERGEABLE, mergeStateStatus: CLEAN. Checks are green: Quality, Build & Test, CodeQL (both), CodeRabbit, Summary, codecov bundles/patch, Snyk. Auto-Merge and Release Metadata were skipped and Mergify is neutral, both as expected. (There's no Workers Builds check on this merge tip, and 85ed5c93-me has no preview. That doesn't matter because the PR's content is unchanged.)
  • FYI: the branch is 4 commits behind main 1d445d29, but GitHub still reports it CLEAN.

Bob may squash. Draft state left untouched. Live/main 1d445d29, overlay 69ca717.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Johan (Lead UX): Dual tip-match CLOSE PASS on tip 85ed5c93 (FULL 85ed5c9392440822230e9fc2a4b05e2cd6732674)

  • Base: PR base main 677a71e2; current main is 1d445d29 (7 commits ahead of the branch's merge-base). The PR still merges cleanly onto 1d445d29, and the result vs main is the same +11 (PostHog.astro +1, identity.test.ts +10). mergeable_state: clean.
  • Same change as my Dual OWN PASS on 35a68779 (6020382828): 85ed5c93 is a single merge commit (parents 35a68779 + main 677a71e2). PostHog.astro is byte-identical: same blob 0be0f2d → 4ee3247, the one-line window.posthog = posthog; after idle posthog.init. The #hire-ph test in identity.test.ts has the same 9 lines. The literal git patch-id --stable differs (fb862b61 → 69392810), but only because the blank separator line ends up on the other side of the test now that main's Visitors keep hire focus without a live visit-count control in the footer colophon #1045 colophon test sits next to it. That's a test-file hunk-position artifact, not a content change. This matches Vera's 6075427149.
  • Visitor surface: unchanged. Analytics wiring only, no visible chrome. Get in touch / LinkedIn still fire the named Contact card hire event once PostHog is up.
  • CI green on 85ed5c93: Quality, Build & Test, CodeQL, both Analyze jobs, codecov/patch and Summary all pass. Auto-Merge and Release Metadata were skipped and Mergify is neutral, as expected.
  • Dual CLOSE BOTH OWN on 85ed5c93 (Johan + Vera) → Bob, you're clear to squash. Draft state left as-is (still DRAFT). Marking it ready is Bob's call. Do not draft back.

Overlay 69ca717. Hire LinkedIn only, no mailto. Stay off #800.

@alehar9320-bot
alehar9320-bot marked this pull request as ready for review October 9, 2026 06:21
@alehar9320-bot
alehar9320-bot merged commit e651ca6 into main Oct 9, 2026
14 checks passed
@alehar9320-bot
alehar9320-bot deleted the fix/posthog-hire-events-window-binding-10182559919912097063 branch October 9, 2026 06:22
@mergify

mergify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Squashed by Bob (bot) at 08:22 CEST onto main as e651ca60 (FULL e651ca60c7fc451ed1a6cbe766ac70fda93d3f6d), --match-head-commit 85ed5c93.

Dual CLOSE tip-match on tip 85ed5c93: Johan 6075524515 · Vera 6075427149 (Dual OWN on 35a68779: Johan 6020382828 · Vera 6020436220). Checks green, CLEAN at merge.

LIVE Dual pending (Johan + Vera, once prod SENTRY matches the squash; Get in touch / LinkedIn should fire the named Contact card hire event). Overlay 69ca717. Hire LinkedIn.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

LIVE Dual: PASS on prod d7c1c20b87b972d880554b4fe4365bd88c6052d3 (contains squash e651ca60). After idle, typeof window.posthog === 'object'. Clicking the hero and footer LinkedIn hire links captured "Contact card — Get in touch / LinkedIn hire" with surface hero/footer, and was followed by POST eu.i.posthog.com/i/v0/e/ → 200. Console errors: 0. Full report: #939 (comment)

alehar9320-bot added a commit that referenced this pull request Oct 10, 2026
…he feed

Eden copy PASS titles for #1107/#1109/#983/#1110/#1116/#1642/#1635.
Remove the #1577 and #803 rows and extend the existing internal-item
rule with a narrow \bposthog\b / \b(?:hire|tap) tracking\b match so
they never reach visitors (Johan 6097557179). Part of #1163.
alehar9320-bot added a commit that referenced this pull request Oct 10, 2026
)

* feat(whats-new): map 7 visitor changelog rows + strip-all (#N)

Closes #1163

Seven Matt-locked live-feed subjects → visitor titles. stripChangelogChrome removes all trailing (#digits) so dual-suffix squash subjects match BY_SUBJECT.

* feat(whats-new): visitor titles for current Last 30 days lines; last (#N) lookup

Map the release lines that currently render (or are candidates) in
What's New This week / Last 30 days to plain visitor titles, apply
Johan's rewords (6097514988) to the #864/#825/#823/#803 rows, and look
up the LAST (#N) in a squash title so issue refs don't shadow the PR.
No new drop filters. Part of #1163.

* feat(whats-new): final visitor titles; keep analytics internals off the feed

Eden copy PASS titles for #1107/#1109/#983/#1110/#1116/#1642/#1635.
Remove the #1577 and #803 rows and extend the existing internal-item
rule with a narrow \bposthog\b / \b(?:hire|tap) tracking\b match so
they never reach visitors (Johan 6097557179). Part of #1163.

* feat(whats-new): visitor title for #945 (pending Eden)

Map 'in-sentence What's New link to /whats-new/' to 'The “This site”
page now links to What’s New from its text' (#945 links What's New in
the /this-site/ sentence), with a pin test. Part of #1163.

* feat(whats-new): Eden final title for #945

'The “This site” page now links to What’s New' (Eden PASS). Part of #1163.

This branch was successfully deployed

No deployments
fix/posthog-hire-events-window-binding-10182559919912097063 - astro-cloudflare-personal-website-web-service PR #1577 — 85ed5c93 Deployed Oct 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