Skip to content

Commit 3a70546

Browse files
authored
Fix: show the deprecation panel if it's an old project and v3 (#3113)
Without doing an expensive query we can’t tell if it’s definitely a v3 projects – like getting run counts. So let’s just assume if the project hasn’t been upgraded to v4 (by running dev/deploy CLI with v4) AND the project is older than the v4 release then it’s v3.
1 parent 6765252 commit 3a70546

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ type SideMenuUser = Pick<
127127
};
128128
export type SideMenuProject = Pick<
129129
MatchedProject,
130-
"id" | "name" | "slug" | "version" | "environments" | "engine"
130+
"id" | "name" | "slug" | "version" | "environments" | "engine" | "createdAt"
131131
>;
132132
export type SideMenuEnvironment = MatchedEnvironment;
133133

@@ -611,6 +611,7 @@ export function SideMenu({
611611
<V3DeprecationPanel
612612
isCollapsed={isCollapsed}
613613
isV3={isV3Project}
614+
projectCreatedAt={project.createdAt}
614615
hasIncident={incidentStatus.hasIncident}
615616
isManagedCloud={incidentStatus.isManagedCloud}
616617
/>
@@ -641,15 +642,21 @@ export function SideMenu({
641642
function V3DeprecationPanel({
642643
isCollapsed,
643644
isV3,
645+
projectCreatedAt,
644646
hasIncident,
645647
isManagedCloud,
646648
}: {
647649
isCollapsed: boolean;
648650
isV3: boolean;
651+
projectCreatedAt: Date;
649652
hasIncident: boolean;
650653
isManagedCloud: boolean;
651654
}) {
652-
if (!isManagedCloud || !isV3 || hasIncident) {
655+
// Only show for projects created before v4 was released
656+
const V4_RELEASE_DATE = new Date("2025-09-01");
657+
const isLikelyV3 = isV3 && new Date(projectCreatedAt) < V4_RELEASE_DATE;
658+
659+
if (!isManagedCloud || !isLikelyV3 || hasIncident) {
653660
return null;
654661
}
655662

apps/webapp/app/presenters/OrganizationsPresenter.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export class OrganizationsPresenter {
112112
organization,
113113
project: {
114114
...fullProject,
115+
createdAt: fullProject.createdAt,
115116
environments: sortEnvironments(
116117
fullProject.environments.filter((env) => {
117118
if (env.type !== "DEVELOPMENT") return true;

0 commit comments

Comments
 (0)