From 8d012f5e8c998d9116854520c223169906a082bb Mon Sep 17 00:00:00 2001 From: mira-2026 Date: Mon, 27 Jul 2026 16:43:42 +0200 Subject: [PATCH 1/4] refactor: rename PR page to Delivery --- docs/architecture/frontend-feature-map.md | 2 +- docs/architecture/overview.md | 34 ++++----- docs/development/local-dev.md | 2 +- docs/setup/production-deploy.md | 2 +- .../ProductionReleasesCard.tsx | 0 .../PullRequestDevelopmentCard.tsx} | 2 +- src/components/layout/Layout.tsx | 10 +-- src/hooks/index.ts | 12 +-- .../{usePullRequests.ts => useDelivery.ts} | 74 +++++++++---------- src/pages/{PullRequests.tsx => Delivery.tsx} | 24 +++--- src/router.tsx | 10 +-- src/test/frontendBehavior.test.tsx | 18 +++-- src/test/pageBehavior.test.tsx | 19 ++--- src/test/productionReleasesCard.test.tsx | 2 +- ...sx => pullRequestDevelopmentCard.test.tsx} | 20 ++--- 15 files changed, 119 insertions(+), 112 deletions(-) rename src/components/features/{pullRequests => delivery}/ProductionReleasesCard.tsx (100%) rename src/components/features/{pullRequests/PullRequestPreviewCard.tsx => delivery/PullRequestDevelopmentCard.tsx} (99%) rename src/hooks/{usePullRequests.ts => useDelivery.ts} (85%) rename src/pages/{PullRequests.tsx => Delivery.tsx} (98%) rename src/test/{pullRequestPreviewCard.test.tsx => pullRequestDevelopmentCard.test.tsx} (82%) diff --git a/docs/architecture/frontend-feature-map.md b/docs/architecture/frontend-feature-map.md index 197294d72..2d1fb2552 100644 --- a/docs/architecture/frontend-feature-map.md +++ b/docs/architecture/frontend-feature-map.md @@ -20,7 +20,7 @@ cannot infer. | `/jobs` | `Jobs.tsx` | scheduled jobs and run history | | `/reports` | `Reports.tsx` | reports list/detail APIs | | `/notifications` | notification bell/modal | notification APIs | -| `/pull-requests` | `PullRequests.tsx` | GitHub, PR dev, release/deploy services | +| `/delivery` | `Delivery.tsx` | GitHub, PR dev, release/deploy services | | `/docker` | `Docker.tsx` | Docker inventory/updater APIs | | `/files` | `Files.tsx` | workspace file APIs | | `/logs` | `Logs.tsx` | log file APIs | diff --git a/docs/architecture/overview.md b/docs/architecture/overview.md index 61829591d..61eb7149b 100644 --- a/docs/architecture/overview.md +++ b/docs/architecture/overview.md @@ -38,23 +38,23 @@ Mira Dashboard worker | Primary pages: -| Path | Purpose | -| ---------------- | ---------------------------------------------------------- | -| `/` | Operations dashboard overview. | -| `/tasks` | Local task board and task updates. | -| `/agents` | Agent status and task history. | -| `/sessions` | OpenClaw session table and actions. | -| `/chat` | Gateway-backed chat UI. | -| `/logs` | Log file browsing/tailing. | -| `/jobs` | Dashboard scheduled jobs. | -| `/reports` | Daily briefs, summaries, heartbeats, and custom reports. | -| `/pull-requests` | PR review, trusted PR dev, releases, deploy, and rollback. | -| `/files` | Workspace file browser/editor. | -| `/docker` | Docker state and managed updater. | -| `/database` | Postgres/PgBouncer and Dashboard SQLite overview. | -| `/moltbook` | Moltbook dashboard. | -| `/settings` | OpenClaw/Dashboard settings. | -| `/terminal` | Terminal helper/completion UI. | +| Path | Purpose | +| ----------- | ---------------------------------------------------------- | +| `/` | Operations dashboard overview. | +| `/tasks` | Local task board and task updates. | +| `/agents` | Agent status and task history. | +| `/sessions` | OpenClaw session table and actions. | +| `/chat` | Gateway-backed chat UI. | +| `/logs` | Log file browsing/tailing. | +| `/jobs` | Dashboard scheduled jobs. | +| `/reports` | Daily briefs, summaries, heartbeats, and custom reports. | +| `/delivery` | PR review, trusted PR dev, releases, deploy, and rollback. | +| `/files` | Workspace file browser/editor. | +| `/docker` | Docker state and managed updater. | +| `/database` | Postgres/PgBouncer and Dashboard SQLite overview. | +| `/moltbook` | Moltbook dashboard. | +| `/settings` | OpenClaw/Dashboard settings. | +| `/terminal` | Terminal helper/completion UI. | ## Backend diff --git a/docs/development/local-dev.md b/docs/development/local-dev.md index 89a8f9792..8dceb97be 100644 --- a/docs/development/local-dev.md +++ b/docs/development/local-dev.md @@ -133,7 +133,7 @@ the frontend proxy strips non-dev Dashboard cookies before forwarding requests. ## Managed PR Dev -The Pull requests page exposes one shared **PR dev** slot: +The Delivery page exposes one shared **PR dev** slot: - Only PRs targeting `main` from the configured trusted-author allowlist can start. diff --git a/docs/setup/production-deploy.md b/docs/setup/production-deploy.md index fd3c5d54c..8ce037c8d 100644 --- a/docs/setup/production-deploy.md +++ b/docs/setup/production-deploy.md @@ -107,7 +107,7 @@ must still return `401`. ## Rollback Normal activation automatically rolls back on restart or commit-bound readiness -failure. The preferred manual path is **Pull requests → Production releases → +failure. The preferred manual path is **Delivery → Production releases → Roll back**, which uses the same exclusive release lock, persistent job, detached guardian, web/worker restart, commit-bound readiness, and automatic restoration of the original release if the rollback target fails. diff --git a/src/components/features/pullRequests/ProductionReleasesCard.tsx b/src/components/features/delivery/ProductionReleasesCard.tsx similarity index 100% rename from src/components/features/pullRequests/ProductionReleasesCard.tsx rename to src/components/features/delivery/ProductionReleasesCard.tsx diff --git a/src/components/features/pullRequests/PullRequestPreviewCard.tsx b/src/components/features/delivery/PullRequestDevelopmentCard.tsx similarity index 99% rename from src/components/features/pullRequests/PullRequestPreviewCard.tsx rename to src/components/features/delivery/PullRequestDevelopmentCard.tsx index c243d0d6e..3bfc92613 100644 --- a/src/components/features/pullRequests/PullRequestPreviewCard.tsx +++ b/src/components/features/delivery/PullRequestDevelopmentCard.tsx @@ -45,7 +45,7 @@ function previewLabel(status: PullRequestPreviewStatus["status"]): string { } /** Renders the global single-slot trusted PR development status. */ -export function PullRequestPreviewCard({ +export function PullRequestDevelopmentCard({ error, isStopPending = false, onStop, diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index 3fb06613b..4a8d12320 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -6,10 +6,10 @@ import { Database, FileText, FolderOpen, - GitPullRequest, Home, MessageSquare, Newspaper, + Rocket, Settings, Terminal, Users, @@ -24,7 +24,7 @@ import { useState, } from "react"; -import { PULL_REQUEST_NAV_REFRESH_MS, useCacheEntry, usePullRequests } from "../../hooks"; +import { DELIVERY_NAV_REFRESH_MS, useCacheEntry, usePullRequests } from "../../hooks"; import { cn } from "../../utils/cn"; import { AppHeader } from "./AppHeader"; @@ -37,7 +37,7 @@ const navItems = [ { to: "/logs", icon: FileText, label: "Logs" }, { to: "/jobs", icon: Clock3, label: "Jobs" }, { to: "/reports", icon: Newspaper, label: "Reports" }, - { to: "/pull-requests", icon: GitPullRequest, label: "PRs" }, + { to: "/delivery", icon: Rocket, label: "Delivery" }, { to: "/files", icon: FolderOpen, label: "Files" }, { to: "/docker", icon: Boxes, label: "Docker" }, { to: "/database", icon: Database, label: "Database" }, @@ -65,7 +65,7 @@ export function Layout({ children }: LayoutProperties) { const sidebarId = useId(); const [isSidebarOpen, setIsSidebarOpen] = useState(false); const { data: systemHost } = useCacheEntry("system.host", 60_000); - const { data: pullRequests = [] } = usePullRequests(PULL_REQUEST_NAV_REFRESH_MS); + const { data: pullRequests = [] } = usePullRequests(DELIVERY_NAV_REFRESH_MS); const openClawVersion = systemHost?.data.version?.current; const openPullRequestCount = pullRequests.length; @@ -120,7 +120,7 @@ export function Layout({ children }: LayoutProperties) { >