diff --git a/.gitignore b/.gitignore index 3835bdc4..82189a45 100644 --- a/.gitignore +++ b/.gitignore @@ -61,6 +61,7 @@ playwright-report/ # AI assistant/tooling metadata (keep local, do not track) .agent/ +.antigravitycli/ .cursor/ .gemini/ .cursorrules diff --git a/app/(build-model)/plant/page.tsx b/app/(build-model)/plant/page.tsx index a91b7848..cbdb8d4c 100644 --- a/app/(build-model)/plant/page.tsx +++ b/app/(build-model)/plant/page.tsx @@ -15,7 +15,6 @@ import Stack from '@mui/material/Stack'; import CircularProgress from '@mui/material/CircularProgress'; import WarningAmberIcon from '@mui/icons-material/WarningAmber'; import Dialog from '@mui/material/Dialog'; -import DialogActions from '@mui/material/DialogActions'; import Link from 'next/link'; import AuthGuard from '@/components/auth/AuthGuard'; import { useAuth } from '@/components/auth/AuthProvider'; @@ -461,11 +460,23 @@ export default function BuildModelPlantPage() { maxWidth="sm" fullWidth > - - - + + + PlantSEED — Update In Progress + + + PlantSEED v2.0 → PlantSEED v3.0 + + + Annotation and reconstruction services are temporarily offline for updates + and will be restored shortly. + + + + + diff --git a/app/(reference-data)/biochem/reactions/page.tsx b/app/(reference-data)/biochem/reactions/page.tsx index 5c41e597..f93a997e 100644 --- a/app/(reference-data)/biochem/reactions/page.tsx +++ b/app/(reference-data)/biochem/reactions/page.tsx @@ -17,8 +17,8 @@ import Link from 'next/link'; import { getReactions, type Reaction, type SolrQueryOpts, EXTERNAL_DBS } from '@/lib/api/biochem'; import ChemicalEquation from '@/components/ui/ChemicalEquation'; import IconButton from '@mui/material/IconButton'; -import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline'; -import ReactionCommentModal from '@/components/ui/ReactionCommentModal'; +/* import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline'; */ +/* import ReactionCommentModal from '@/components/ui/ReactionCommentModal'; */ import { GridHighlightText } from '@/components/GridHighlightText'; import DataControlHeader from '@/components/layout/DataControlHeader'; import ExportModal from '@/components/ui/ExportModal'; @@ -272,23 +272,7 @@ export default function ReactionsPage() { ), }, - { - field: 'actions', - headerName: '', - width: 50, - sortable: false, - disableColumnMenu: true, - renderCell: (params) => ( - handleOpenComment(params.row.id)} - sx={{ color: '#00acc1' }} - > - - - ) - }, + /* comment button column disabled */ { field: 'name', headerName: 'Name', @@ -348,13 +332,7 @@ export default function ReactionsPage() { ); }, }, - { - field: 'notes', - headerName: 'Notes', - width: 100, - sortable: false, - renderCell: (params) => , - }, + /* notes column disabled */ { field: 'synonyms', headerName: 'Synonyms', @@ -463,11 +441,11 @@ export default function ReactionsPage() { autoHeight /> - setCommentModalOpen(false)} reactionId={commentReactionId} - /> + /> */} { + // 1. Check file-based toggle first (runtime toggle, no restart needed) + const fileStatus = readFileStatus(); + if (fileStatus) { + return NextResponse.json(fileStatus, { headers: NO_CACHE_HEADERS }); + } + + // 2. Fall back to env var (requires container restart) + const envEnabled = process.env.MAINTENANCE_MODE === 'true' || process.env.MAINTENANCE_MODE === '1'; + if (envEnabled) { + return NextResponse.json({ + enabled: true, + message: process.env.MAINTENANCE_MESSAGE || 'Site is undergoing maintenance. Please check back shortly.', + }, { headers: NO_CACHE_HEADERS }); + } + + // 3. Default: not in maintenance + return NextResponse.json( + { enabled: false, message: '' }, + { headers: NO_CACHE_HEADERS }, + ); +} diff --git a/app/layout.tsx b/app/layout.tsx index 9a472634..25487af4 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,7 @@ import CssBaseline from '@mui/material/CssBaseline'; import theme from '@/lib/theme'; import Box from '@mui/material/Box'; import HeaderLayoutRouter from '@/app/HeaderLayoutRouter'; +import OutageBanner from '@/components/ui/OutageBanner'; import Providers from '@/components/Providers'; import { AuthProvider } from '@/components/auth/AuthProvider'; import type { Metadata } from "next"; @@ -35,6 +36,7 @@ export default function RootLayout({ + (null); + + useEffect(() => { + fetch('/api/maintenance', { cache: 'no-store' }) + .then((res) => { + if (!res.ok) throw new Error(`HTTP ${res.status}`); + return res.json(); + }) + .then((data: MaintenanceStatus) => setStatus(data)) + .catch(() => setStatus({ enabled: false, message: '' })); + }, []); + + if (!status || !status.enabled) return null; + + return ( + + + + {status.message || 'Site is undergoing maintenance. Please check back shortly.'} + + + + ); +}