From dbdbe1540bbffa0ec89f4bd73012ecae6119e6e1 Mon Sep 17 00:00:00 2001
From: Jordi Enric <37541088+jordienr@users.noreply.github.com>
Date: Mon, 13 Jul 2026 10:30:28 +0200
Subject: [PATCH] fix(studio): make paused project messaging easier to scan
DEPR-581 (#47807)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Problem
The free-plan paused project notice was a dense paragraph, so the key
points (data is safe, resume window, download-after-expiry, upgrade)
were easy to skip.
## Fix
Present those points as a scannable bullet list, keeping the dynamic
day-count tooltip, restore-deadline timestamp, and the existing
Pro-wording variant.
Also adds a "Project Status" tab to the dev toolbar (local and staging
only) with a select for forcing the current project's status, so the
paused state and other statuses are easy to preview without touching the
backend. It overrides the status in the React Query cache and reverts on
close, project navigation, or reset.
## How to test
- Run Studio locally against the platform API
- Open the dev toolbar, go to the Project Status tab, and select
INACTIVE
- Navigate to a project page and confirm the paused screen renders
- On a free-plan org, confirm the notice now shows the details as bullet
points with the day-count tooltip and restore-deadline date intact
- Click "Reset to real data" (or close the toolbar) and confirm the
status reverts
## Summary by CodeRabbit
* **New Features**
* Added a development toolbar “Project Status” tab to simulate project
status and pause states in non-production environments.
* Status and pause-state overrides persist locally, can be reset, and
are reflected across project detail and paused-state views.
* **Style**
* Refined paused-project messaging: updated the heading and reworked the
free-plan explanation into bullet points, while keeping paid-plan
messaging paragraph-based for readability.
---
.../PausedState/ProjectPausedState.tsx | 48 +++--
.../ui/DevToolbar/ProjectStatusTab.tsx | 184 ++++++++++++++++++
.../data/projects/project-detail-query.ts | 9 +-
.../projects/project-pause-status-override.ts | 58 ++++++
.../projects/project-pause-status-query.ts | 4 +
.../data/projects/project-status-override.ts | 45 +++++
apps/studio/pages/_app.tsx | 11 +-
apps/studio/routes/__root.tsx | 17 ++
8 files changed, 361 insertions(+), 15 deletions(-)
create mode 100644 apps/studio/components/ui/DevToolbar/ProjectStatusTab.tsx
create mode 100644 apps/studio/data/projects/project-pause-status-override.ts
create mode 100644 apps/studio/data/projects/project-status-override.ts
diff --git a/apps/studio/components/layouts/ProjectLayout/PausedState/ProjectPausedState.tsx b/apps/studio/components/layouts/ProjectLayout/PausedState/ProjectPausedState.tsx
index 326d9bbe68e..3a0ea112408 100644
--- a/apps/studio/components/layouts/ProjectLayout/PausedState/ProjectPausedState.tsx
+++ b/apps/studio/components/layouts/ProjectLayout/PausedState/ProjectPausedState.tsx
@@ -59,16 +59,16 @@ export const ProjectPausedState = ({ product }: ProjectPausedStateProps) => {
- All data, including backups and storage objects, remains safe. You can resume - this project from the dashboard within{' '} +
+
+ Your project data is safe and available for{' '}
+
+ {finalDaysRemainingBeforeRestoreDisabled} day
+ {finalDaysRemainingBeforeRestoreDisabled > 1 ? 's' : ''}
+ {' '}
+ (until{' '}
+
+ Once resumed, usage will be billed by compute size and hours active.
> - ) : ( -- Your project data is safe but inaccessible while paused. Once resumed, usage - will be billed by compute size and hours active. -
) ) : !isLoading ? (
diff --git a/apps/studio/components/ui/DevToolbar/ProjectStatusTab.tsx b/apps/studio/components/ui/DevToolbar/ProjectStatusTab.tsx
new file mode 100644
index 00000000000..e31ebe9c9de
--- /dev/null
+++ b/apps/studio/components/ui/DevToolbar/ProjectStatusTab.tsx
@@ -0,0 +1,184 @@
+'use client'
+
+import { useQueryClient } from '@tanstack/react-query'
+import { useParams } from 'common'
+import { useEffect, useState } from 'react'
+import { cn, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from 'ui'
+
+import { projectKeys } from '@/data/projects/keys'
+import { useSetProjectStatus, type Project } from '@/data/projects/project-detail-query'
+import {
+ clearPauseStatusOverride,
+ getPauseStatusOverride,
+ setPauseStatusOverride,
+ type PauseStateOverride,
+} from '@/data/projects/project-pause-status-override'
+import {
+ clearProjectStatusOverride,
+ getProjectStatusOverride,
+ setProjectStatusOverride,
+} from '@/data/projects/project-status-override'
+import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization'
+import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
+import { PROJECT_STATUS } from '@/lib/constants'
+
+type ProjectStatus = Project['status']
+
+const STATUS_LABELS: Record
+ Override the status of the current project. Overrides persist across refetches until
+ reset.
+ Navigate to a project page to use this tab.