Skip to content

Commit 2844895

Browse files
rebel-nexu-zero[bot]bone3deep1962-collabalchemistklk
authored
Fix landing Cloud account header (#5040)
* Fix landing cloud account header * chore: trigger CI --------- Co-authored-by: bone3deep1962-collab <bone3deep1962@gmail.com> Co-authored-by: a1chzt <chizblank@gmail.com>
1 parent 339d0cb commit 2844895

5 files changed

Lines changed: 32 additions & 22 deletions

File tree

apps/landing-page/app/_components/header-enhancer.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
.catch(() => {});
191191
}
192192

193-
// Open Design Cloud (AMR) header account. Detects an existing cloud
193+
// Open Design Cloud header account. Detects an existing cloud
194194
// session via the vela API, swaps the "Sign in" link for an avatar menu,
195195
// drives popup login + polling, and handles sign-out. All endpoints/URLs
196196
// arrive as `data-*` on `[data-amr-account]` (header.tsx) since this inline
@@ -216,7 +216,7 @@
216216
const sessionUrl = api + '/api/auth/get-session';
217217
const signoutUrl = api + '/api/auth/sign-out';
218218

219-
// Cloud (AMR) account funnel analytics — feeds the same PostHog sink as
219+
// Cloud account funnel analytics — feeds the same PostHog sink as
220220
// the rest of the site (window.__odTrack, guarded). area is always the
221221
// header since this module only lives in the nav chrome.
222222
const track = (name, extra) => {
@@ -341,7 +341,7 @@
341341
const top = Math.round(dy + (vh - H) / 2);
342342
const popup = window.open(
343343
loginUrl,
344-
'od-amr-login',
344+
'od-cloud-login',
345345
`width=${W},height=${H},left=${left},top=${top},menubar=no,toolbar=no,location=yes`,
346346
);
347347
// Popup blocked (or returned null): fall back to a same-tab navigation

apps/landing-page/app/_components/header.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,25 @@ const REPO = 'https://github.com/nexu-io/open-design';
2323
const REPO_DISCUSSIONS = `${REPO}/discussions`;
2424
const DISCORD = 'https://discord.gg/mHAjSMV6gz';
2525
const X_PROFILE = 'https://x.com/OpenDesignHQ';
26-
// AMR product page on the production site (this repo has no /amr/ route).
26+
// Open Design Cloud product surface on the production site.
2727
// Single destination for the Agent dropdown entry and cloud account surfaces.
28-
const AMR_URL = 'https://open-design.ai/amr/';
28+
const CLOUD_URL = 'https://open-design.ai/cloud/';
2929

30-
// Open Design Cloud (AMR / vela) endpoints for the header sign-in module.
30+
// Open Design Cloud endpoints for the header sign-in module.
3131
// Production defaults; overridable at build time via PUBLIC_* env so a
3232
// preview/staging build can point at a non-prod cloud. These are surfaced to
3333
// the runtime via `data-*` on `.nav-account` because the auth logic lives in
3434
// `header-enhancer.astro`'s `<script is:inline>` (NOT processed by Vite, so it
3535
// cannot read `import.meta.env` itself).
3636
const env = import.meta.env as Record<string, string | undefined>;
37-
const AMR_API_BASE = env.PUBLIC_AMR_API_BASE ?? 'https://amr-api.open-design.ai';
38-
const AMR_LOGIN_URL = env.PUBLIC_AMR_LOGIN_URL ?? 'https://open-design.ai/amr/login';
39-
const AMR_CONSOLE_URL =
40-
env.PUBLIC_AMR_CONSOLE_URL ?? 'https://open-design.ai/amr?source=open_design';
37+
const CLOUD_API_BASE =
38+
env.PUBLIC_CLOUD_API_BASE ?? env.PUBLIC_AMR_API_BASE ?? 'https://amr-api.open-design.ai';
39+
const CLOUD_LOGIN_URL =
40+
env.PUBLIC_CLOUD_LOGIN_URL ?? env.PUBLIC_AMR_LOGIN_URL ?? 'https://open-design.ai/cloud/login';
41+
const CLOUD_CONSOLE_URL =
42+
env.PUBLIC_CLOUD_CONSOLE_URL ??
43+
env.PUBLIC_AMR_CONSOLE_URL ??
44+
'https://open-design.ai/cloud/wallet?source=open_design';
4145

4246
// Solution → Use cases / Roles. Hrefs mirror upstream main's header 1:1 and
4347
// pair positionally with the localized `useCaseItems` / `roleItems` tuples.
@@ -328,7 +332,7 @@ export function Header({
328332
aria-label={productMenuCopy.agent}
329333
>
330334
<li>
331-
<a href={AMR_URL}>
335+
<a href={CLOUD_URL}>
332336
<span className='dropdown-name'>{productMenuCopy.amrName}</span>
333337
<span className='dropdown-blurb'>{productMenuCopy.amrBlurb}</span>
334338
</a>
@@ -572,7 +576,7 @@ export function Header({
572576
{headerCopy.download}
573577
</a>
574578
{/*
575-
Open Design Cloud (AMR) account entry. Renders BOTH states up front
579+
Open Design Cloud account entry. Renders BOTH states up front
576580
and lets `header-enhancer.astro` toggle them at runtime: the
577581
signed-out "Sign in" link is visible by default (so no-JS / pre-hydration
578582
shows a working login link), and the signed-in avatar menu stays
@@ -583,12 +587,12 @@ export function Header({
583587
<div
584588
className='nav-account'
585589
data-amr-account
586-
data-amr-api={AMR_API_BASE}
587-
data-amr-login={AMR_LOGIN_URL}
588-
data-amr-console={AMR_CONSOLE_URL}
590+
data-amr-api={CLOUD_API_BASE}
591+
data-amr-login={CLOUD_LOGIN_URL}
592+
data-amr-console={CLOUD_CONSOLE_URL}
589593
data-amr-home={href('/')}
590594
>
591-
<a className='nav-signin' href={AMR_LOGIN_URL} data-amr-signin>
595+
<a className='nav-signin' href={CLOUD_LOGIN_URL} data-amr-signin>
592596
{headerCopy.signIn}
593597
</a>
594598
<details className='nav-account-menu' data-amr-menu hidden>
@@ -612,7 +616,7 @@ export function Header({
612616
<a
613617
className='nav-account-item'
614618
role='menuitem'
615-
href={AMR_CONSOLE_URL}
619+
href={CLOUD_CONSOLE_URL}
616620
target='_blank'
617621
rel='noreferrer noopener'
618622
data-amr-console-link

apps/landing-page/app/globals.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ body::before {
452452
.locale-menu { animation: none; }
453453
.locale-trigger-caret { transition: none; }
454454
}
455-
/* ---------- Open Design Cloud (AMR) header account ---------- */
455+
/* ---------- Open Design Cloud header account ---------- */
456456
/*
457457
* Two mutually-exclusive states share this slot: the signed-out "Sign in"
458458
* link and the signed-in avatar menu. Both render in the markup; the avatar
@@ -509,10 +509,15 @@ body::before {
509509
/* Avatar menu — a borderless <details> whose summary is the avatar disc. */
510510
.nav-account-menu {
511511
position: relative;
512+
display: inline-flex;
513+
align-items: center;
512514
}
513515
.nav-account-trigger {
514516
display: inline-flex;
515517
align-items: center;
518+
justify-content: center;
519+
width: 32px;
520+
height: 32px;
516521
cursor: pointer;
517522
list-style: none;
518523
border-radius: 999px;
@@ -529,6 +534,7 @@ body::before {
529534
width: 32px;
530535
height: 32px;
531536
border-radius: 50%;
537+
display: block;
532538
flex-shrink: 0;
533539
object-fit: cover;
534540
}

apps/landing-page/app/i18n.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ export interface HeaderCopy {
226226
starAria: string;
227227
starTitle: string;
228228
starPrefix: string;
229-
/** Open Design Cloud (AMR) account entry — see header-enhancer.astro. */
229+
/** Open Design Cloud account entry — see header-enhancer.astro. */
230230
signIn: string;
231231
/** aria-label for the signed-in avatar / account menu trigger. */
232232
accountAria: string;
233-
/** Avatar dropdown: open the Cloud console (AMR app). */
233+
/** Avatar dropdown: open the Cloud console. */
234234
menuConsole: string;
235235
/** Avatar dropdown: sign out of the Cloud session. */
236236
menuSignOut: string;

apps/landing-page/app/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ const cobeEnhancerUrl = `/enhancers/cobe.js?v=${
14891489
if (ev.key === 'Escape') setNavOpen(false);
14901490
});
14911491
})();
1492-
// Open Design Cloud (AMR) header account. Same as `enhanceMobileNav`
1492+
// Open Design Cloud header account. Same as `enhanceMobileNav`
14931493
// above, this mirrors `header-enhancer.astro` because the homepage does
14941494
// not include that enhancer. Detect a live cloud session, swap the
14951495
// "Sign in" link for the avatar menu, drive popup login + polling, and
@@ -1614,7 +1614,7 @@ const cobeEnhancerUrl = `/enhancers/cobe.js?v=${
16141614
const top = Math.round(dy + (vh - H) / 2);
16151615
const popup = window.open(
16161616
loginUrl,
1617-
'od-amr-login',
1617+
'od-cloud-login',
16181618
`width=${W},height=${H},left=${left},top=${top},menubar=no,toolbar=no,location=yes`,
16191619
);
16201620
// Popup blocked: fall back to a same-tab navigation.

0 commit comments

Comments
 (0)