refactor(app): rename Component* UI widgets to accurate domain names

The dashboard widgets were named after the old 'component' concept. Renamed
each to what it actually renders:

- ComponentCard  → ServiceCard      (ServiceSummary, /services/, service actions)
- ComponentTable → ProgramTable     (ProgramSummary[], the program catalog)
- ComponentEditor→ DeploymentEditor (DeploymentDetail, the unified type)
- ComponentFields→ DeploymentFields (AnyDetail)
- AddComponent   → AddDeployment

Also purged the domain term 'component' from the rest of the app: the
useComponent hook → useDeployment, ConfigPanel + the three detail pages'
`component` prop/var → `deployment`, and the gateway/node table headers
(Component → Program / Deployment). Props renamed to match (component →
service / program / deployment). The React UI directory app/src/components/
keeps its conventional name.

App type-checks and builds clean.
This commit is contained in:
2026-06-14 12:13:41 -07:00
parent a5dcb6b346
commit 0515faadfd
17 changed files with 151 additions and 151 deletions

View File

@@ -4,15 +4,15 @@ import { useQueryClient } from "@tanstack/react-query"
import { Check } from "lucide-react"
import { apiClient } from "@/services/api/client"
import type { AnyDetail } from "@/types"
import { ComponentFields } from "@/components/ComponentFields"
import { DeploymentFields } from "@/components/DeploymentFields"
interface ConfigPanelProps {
component: AnyDetail
deployment: AnyDetail
configSection: "services" | "jobs" | "programs"
onRefetch: () => void
}
export function ConfigPanel({ component, configSection, onRefetch }: ConfigPanelProps) {
export function ConfigPanel({ deployment, configSection, onRefetch }: ConfigPanelProps) {
const navigate = useNavigate()
const qc = useQueryClient()
const [message, setMessage] = useState<{ type: "ok" | "error"; text: string } | null>(null)
@@ -61,8 +61,8 @@ export function ConfigPanel({ component, configSection, onRefetch }: ConfigPanel
<h2 className="text-sm font-semibold text-[var(--muted)] uppercase tracking-wider mb-4">
Configuration
</h2>
<ComponentFields
component={component}
<DeploymentFields
deployment={deployment}
onSave={handleSave}
onDelete={handleDelete}
/>