Skip to content

Commit 5fff746

Browse files
authored
Merge pull request #407 from wri/develop
Merging develop and main
2 parents cbb5b17 + 4e642f2 commit 5fff746

File tree

15 files changed

+142
-131
lines changed

15 files changed

+142
-131
lines changed

app/(home)/sections/11_CTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function CTASection() {
3737
</Box>
3838
<Button asChild variant="solid" colorPalette="primary" rounded="lg">
3939
<Link href="/app">
40-
{LANDING_PAGE_VERSION === "public" ? "Explore the beta" : "Try the preview"}
40+
{LANDING_PAGE_VERSION === "public" ? "Explore the preview" : "Try the preview"}
4141
<CaretRightIcon weight="bold" />
4242
</Link>
4343
</Button>

app/(home)/sections/1_Hero.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default function LandingHero({
166166
>
167167
Global Nature Watch is an open, AI-powered system that transforms groundbreaking
168168
land monitoring data into intelligence to understand Earth&rsquo;s landscapes.
169-
Test the beta and help shape the future of land monitoring.
169+
Test the preview and help shape the future of land monitoring.
170170
</Text>
171171
</Container>
172172
<Container
@@ -282,14 +282,14 @@ export default function LandingHero({
282282
>
283283
<Text>
284284
<Badge size="xs" fontSize="8px" rounded="4px" mr="1">
285-
BETA
285+
PREVIEW
286286
</Badge>
287287
Global Nature Watch is
288288
{LANDING_PAGE_VERSION === "closed"
289-
? " in closed beta."
289+
? " in closed preview."
290290
: LANDING_PAGE_VERSION === "limited"
291-
? " in limited beta."
292-
: " in beta."}
291+
? " in limited preview."
292+
: " in preview."}
293293
</Text>
294294
<Tooltip
295295
openDelay={100}
@@ -306,7 +306,7 @@ export default function LandingHero({
306306
alignItems="center"
307307
>
308308
<QuestionIcon />
309-
What does beta mean?
309+
What does preview mean?
310310
</Box>
311311
</Tooltip>
312312
</Box>

app/(home)/sections/4_FeaturesTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default function FeaturesTabsSection() {
6868
rounded="lg"
6969
>
7070
<Link href="/app">
71-
Explore the beta
71+
Explore the preview
7272
<CaretRightIcon weight="bold" />
7373
</Link>
7474
</Button>

app/(home)/sections/5_SupportWorkTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default function SupportWorkTabsSection() {
153153
rounded="lg"
154154
>
155155
<Link href="/app">
156-
Explore the beta
156+
Explore the preview
157157
<CaretRightIcon weight="bold" />
158158
</Link>
159159
</Button>

app/actions/ortto.ts

Lines changed: 0 additions & 58 deletions
This file was deleted.

app/api/auth/me/route.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { cookies } from "next/headers";
44
import { API_CONFIG } from "@/app/config/api";
55
import { getAPIRequestHeaders } from "../../shared/utils";
66

7+
// Force dynamic rendering - this route should never be cached
8+
export const dynamic = "force-dynamic";
9+
710
const TOKEN_NAME = "auth_token";
811

912
export async function GET() {
@@ -96,13 +99,22 @@ export async function GET() {
9699
userObj && typeof userObj.id === "string" ? (userObj.id as string) : null;
97100
const userId = idSub ?? idRoot ?? idUserId ?? idFromUser ?? email;
98101

99-
return NextResponse.json({
100-
isAuthenticated: true,
101-
user: { email, id: userId },
102-
promptsUsed,
103-
promptQuota,
104-
hasProfile,
105-
});
102+
return NextResponse.json(
103+
{
104+
isAuthenticated: true,
105+
user: { email, id: userId },
106+
promptsUsed,
107+
promptQuota,
108+
hasProfile,
109+
},
110+
{
111+
headers: {
112+
"Cache-Control": "no-store, no-cache, must-revalidate",
113+
Pragma: "no-cache",
114+
Expires: "0",
115+
},
116+
}
117+
);
106118
} catch {
107119
return NextResponse.json({ isAuthenticated: false }, { status: 401 });
108120
}

app/components/ChatMessages.tsx

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import Reasoning from "./Reasoning";
77
import SamplePrompts from "./SamplePrompts";
88
import ChatDisclaimer from "./ChatDisclaimer";
99

10-
const LANDING_PAGE_VERSION = process.env.NEXT_PUBLIC_LANDING_PAGE_VERSION;
11-
1210
function ChatMessages() {
1311
const containerRef = useRef<HTMLDivElement>(null);
1412
const { messages, isLoading } = useChatStore();
@@ -55,49 +53,50 @@ function ChatMessages() {
5553
const isFirst = index === 0;
5654
return (
5755
<Fragment key={message.id}>
58-
{isFirst && displayDisclaimer && (
56+
{isFirst && displayDisclaimer && (
5957
<ChatDisclaimer
6058
type="info"
6159
setDisplayDisclaimer={setDisplayDisclaimer}
6260
>
6361
<Box>
6462
<Text mb={{ base: 1, md: 2 }}>
65-
<strong>Global Nature Watch beta</strong>
63+
<strong>Global Nature Watch preview</strong>
6664
</Text>
6765
<Text mb={{ base: 1, md: 2 }}>
68-
You&apos;re using a beta version that&apos;s still under active development.
66+
You&apos;re using a preview version that&apos;s still under active development.
6967
You may encounter errors or incomplete results, so verify results with primary sources.
7068
Features, datasets, and assistant behavior may change or be removed as we iterate.
7169
</Text>
7270
<Text>
73-
By using this beta, you&apos;re helping shape the future of Global Nature Watch.
74-
Share feedback via{" "}
75-
<Link
76-
color="primary.solid"
77-
textDecor="underline"
78-
href="https://surveys.hotjar.com/860def81-d4f2-4f8c-abee-339ebc3129f3"
79-
>
80-
this survey
81-
</Link>{" "}
82-
or by emailing{" "}
83-
<Link
84-
color="primary.solid"
85-
textDecor="underline"
86-
href="mailto:landcarbonlab@wri.org"
87-
>
88-
landcarbonlab@wri.org
89-
</Link>{". "}
90-
Visit the{" "}
91-
<Link
92-
color="primary.solid"
93-
textDecor="underline"
94-
href="https://help.globalnaturewatch.org/"
95-
target="_blank"
96-
rel="noopener noreferrer"
97-
>
98-
Help Center
99-
</Link>{" "}
100-
to learn more about the beta.
71+
By using this preview, you&apos;re helping shape the future of Global Nature Watch.
72+
Share feedback via{" "}
73+
<Link
74+
color="primary.solid"
75+
textDecor="underline"
76+
href="https://surveys.hotjar.com/860def81-d4f2-4f8c-abee-339ebc3129f3"
77+
>
78+
this survey
79+
</Link>{" "}
80+
or by emailing{" "}
81+
<Link
82+
color="primary.solid"
83+
textDecor="underline"
84+
href="mailto:landcarbonlab@wri.org"
85+
>
86+
landcarbonlab@wri.org
87+
</Link>
88+
{" "}
89+
Visit the{" "}
90+
<Link
91+
color="primary.solid"
92+
textDecor="underline"
93+
href="https://help.globalnaturewatch.org/"
94+
target="_blank"
95+
rel="noopener noreferrer"
96+
>
97+
Help Center
98+
</Link>{" "}
99+
to learn more about the preview.
101100
</Text>
102101
</Box>
103102
</ChatDisclaimer>
@@ -110,7 +109,7 @@ function ChatMessages() {
110109
{isLoading && index === lastUserMessageIndex && <Reasoning />}
111110

112111
{/* Prompt options for first message, removed when sent */}
113-
{messages.length < 2 && LANDING_PAGE_VERSION !== "public" && (
112+
{messages.length < 2 && (
114113
<SamplePrompts />
115114
)}
116115
</Fragment>

app/components/GlobalHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const renderNavItems = (
8585
</Link>
8686
) : (
8787
<Link href="/app" onClick={() => setNavOpen && setNavOpen(false)}>
88-
Explore the beta
88+
Explore the preview
8989
</Link>
9090
)}
9191
</Button>

app/components/PageHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function PageHeader() {
7777
variant="solid"
7878
size="xs"
7979
>
80-
BETA
80+
PREVIEW
8181
</Badge>
8282
</Flex>
8383
<Flex gap="6" alignItems="center" hideBelow="md">

app/components/ThreadActionsMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import ThreadDeleteDialog from "./ThreadDeleteDialog";
1313
import ThreadRenameDialog from "./ThreadRenameDialog";
1414
import ThreadShareDialog from "./ThreadShareDialog";
1515
import { sendGAEvent } from "@next/third-parties/google";
16+
import { sendGAEventAsync } from "@/app/utils/analytics";
1617

1718
function ThreadActionsMenu({
1819
thread,
@@ -49,7 +50,7 @@ function ThreadActionsMenu({
4950
)
5051

5152
const onDelete = useCallback(async () => {
52-
sendGAEvent("event", "thread_deleted", {
53+
await sendGAEventAsync("thread_deleted", {
5354
thread_name: thread.name,
5455
thread_id: thread.id,
5556
});

0 commit comments

Comments
 (0)