Repository navigation
fix(extension): restore the hijacking login strip on the laptop new tab - #7035
Conversation
Layout v2 dropped MainFeedPage's shortcuts slot on laptop, and that slot was how HijackingPage rendered HijackingLoginStrip, so logged-out and onboarding-incomplete visitors only got the generic ExtensionSignInStrip. Pass the strip as a dedicated loginStrip prop and render it in the top banner in place of ExtensionSignInStrip on laptop; smaller screens keep it in the shortcuts slot.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
On the laptop hijacking new tab, render the 'Sign in to personalize your feed' title with Log in / Sign up inside the feed's page header (new MainFeedLayout pageHeaderContent prop), alongside the cover strip above the feed card.
The sticky ExtensionSignInStrip it replaced stayed reachable while scrolling; the feed page header holding the same CTAs did not. Pin it under --sticky-header-offset with an opaque background, only when it holds the sign-in content, so the regular feed heading is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
a80b3d9 to
f8599aa
Compare
…over strip The header's Log in / Sign up opened the in-extension auth modal, where social OAuth from the extension origin is rejected with a 403; the cover strip on the same screen already hands off to the webapp onboarding URL. Both now share one onboardingHref module. Drop the ExtensionSignInStrip wrapper: App.tsx routes every logged-out or onboarding-incomplete user to HijackingPage, which always passes loginStrip, so the fallback could only ever render null. MainFeedPage gates the top-banner strip on laptop itself instead of leaning on MainLayout hiding the slot. Drop feedStyles.cards from the hijacking strip: its desktopL cap reads --num-cards, which is only set inside the feed, and below laptop the breakpoint never applies, so the class was inert in both placements. Add a MainFeedPage spec for the laptop/below-laptop strip and header wiring, the path #7017 dropped without any test noticing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
| <div className="flex shrink-0 items-center gap-2"> | ||
| <Button | ||
| tag="a" | ||
| href={loginHref} |
There was a problem hiding this comment.
Non-blocking: once these became plain anchors, header clicks stopped showing up in analytics. Before this commit they went through showLogin({ trigger: AuthTriggers.MainButton }), so the auth flow recorded where the click came from. Now nothing is logged before the browser leaves for the webapp. The cover strip on the same screen logs LogEvent.Click with TargetType.LoginButton / SignupButton and target_id: 'hijacking' (HijackingLoginStrip.tsx, logClick), so a sign-up from the cover strip will be counted but one from the header CTAs on that same screen won't.
Suggest adding the same onClick click log to both anchors, with a separate target_id (e.g. 'hijacking_header') so the two placements can be compared. Keep href as is.
Reviewed by AI.
Takes main's extension new tab (#7035: the hijacking cover strip above the card and the sign-in CTAs in the feed header replace ExtensionSignInStrip); the shared SignInStrip stays webapp-only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he shared strip is webapp only Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Takes #7035 (the hijacking login strip on the laptop new tab), which rewrote MainFeedPage.tsx. Kept main's version plus this branch's removal of the CompanionPopupButton slot; the new MainFeedPage spec no longer mocks the deleted module. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Problem
Layout v2 graduation (#7017) left
MainFeedPageignoring theshortcutsslot on laptop.HijackingPageused that slot to renderHijackingLoginStrip, so logged-out and onboarding-incomplete users on the laptop new tab (/hijacking) only got the generic stickyExtensionSignInStrip("Sign in to personalize your feed…"). The cover strip with the "Log in to continue", "Continue as…" and "Continue onboarding" variants, plus itshijackingimpression and click events, stopped rendering.Fix
MainFeedPagegets a dedicatedloginStripprop in place of the genericshortcutsoverride.loginStriprenders in the top banner above the feed card. The sign-in title and Log in / Sign up CTAs (ExtensionSignInContent, split out ofExtensionSignInStrip) move into the feed's page header through a newMainFeedLayoutprop,pageHeaderContent. Before this change that header was an empty bar for anonymous users. The header only gets the CTAs while the user is logged out.HijackingPagepassesloginStrip={<HijackingLoginStrip />}.The regular signed-in new tab is unchanged.
Verified
Built the extension and loaded it unpacked in Chromium (1440×900, logged out). Before: generic sign-in strip. After: the hijacking cover strip is above the feed card, and the sign-in title and CTAs are in the feed header.
Ran
eslint,tscandjest src/newtab(17 tests) and the sharedMainFeedLayout/Feedspecs (58 tests); all pass.🤖 Opened by Smith (AI) for @tsahimatsliah
Preview domain
https://fix-extension-hijacking-strip-la.preview.app.daily.dev