Refactor component terminology to programs in config and manifest

- Updated the terminology from "components" to "programs" across the codebase, including in config loading, saving, and manifest specifications.
- Introduced a new `stacks.py` file to handle lifecycle actions for development stacks, implementing handlers for Python and React Vite stacks.
- Adjusted tests to reflect the new program structure and ensure proper functionality.
- Revised documentation to align with the new terminology and structure, ensuring clarity on the purpose and configuration of programs, services, and jobs.
This commit is contained in:
2026-02-23 22:09:41 -08:00
parent f559fba143
commit 0d36e4f72a
48 changed files with 7512 additions and 632 deletions

View File

@@ -1,7 +1,8 @@
import { useRef } from "react"
import { useParams } from "react-router-dom"
import { Clock } from "lucide-react"
import { useComponent, useStatus, useEventStream } from "@/services/api/hooks"
import { LogViewer } from "@/components/LogViewer"
import { Clock, Trash2 } from "lucide-react"
import { useJob, useStatus, useEventStream } from "@/services/api/hooks"
import { LogViewer, type LogViewerHandle } from "@/components/LogViewer"
import { DetailHeader } from "@/components/detail/DetailHeader"
import { ServiceControls } from "@/components/detail/ServiceControls"
import { SystemdPanel } from "@/components/detail/SystemdPanel"
@@ -9,8 +10,9 @@ import { ConfigPanel } from "@/components/detail/ConfigPanel"
export function ScheduledDetailPage() {
useEventStream()
const logRef = useRef<LogViewerHandle>(null)
const { name } = useParams<{ name: string }>()
const { data: component, isLoading, error, refetch } = useComponent(name ?? "")
const { data: component, isLoading, error, refetch } = useJob(name ?? "")
const { data: statusResp } = useStatus()
const health = statusResp?.statuses.find((s) => s.id === name)
@@ -35,7 +37,7 @@ export function ScheduledDetailPage() {
backTo="/"
backLabel="Back to Jobs"
name={component.id}
behavior={component.behavior}
behavior="tool"
stack={component.stack}
source={component.source}
>
@@ -73,8 +75,16 @@ export function ScheduledDetailPage() {
{component.managed && (
<div className="mb-6">
<h2 className="text-lg font-semibold mb-3">Logs</h2>
<LogViewer name={component.id} />
<div className="flex items-center justify-between mb-3">
<h2 className="text-lg font-semibold">Logs</h2>
<button
onClick={() => logRef.current?.clear()}
className="flex items-center gap-1.5 px-3 py-1.5 text-sm rounded border border-[var(--border)] text-[var(--muted)] hover:text-[var(--foreground)] hover:border-[var(--foreground)] transition-colors"
>
<Trash2 size={14} /> Clear
</button>
</div>
<LogViewer ref={logRef} name={component.id} />
</div>
)}
</div>