ui: field help text + editable program commands

- Add a 'hint' to the shared Field/TextField; annotate the config forms with
  short, accurate descriptions of each field:
  - program: source (working copy castle builds from), behavior (tool/daemon/
    frontend), stack (optional toolchain template), repo/ref (for clone),
    system deps (listed for reference, NOT auto-installed), commands.
  - service: port (listened-on, health-checked, proxied; map via ${port}),
    health path, proxy path vs proxy host, runs.
  - job: schedule (cron → systemd timer), runs.
- ProgramFields: the Commands section is now editable (build/test/lint/
  type-check/run), so a program with no stack can declare its own dev verbs
  by hand — a declared command overrides the stack default. Verified the
  commands/build shape round-trips through the config API.

App builds clean.
This commit is contained in:
2026-06-15 08:50:03 -07:00
parent 32e2ac1f8e
commit ba60019a52
4 changed files with 165 additions and 36 deletions

View File

@@ -58,8 +58,16 @@ export function JobFields({ job, onSave, onDelete }: Props) {
return (
<div className="space-y-4">
<TextField label="Description" value={description} onChange={setDescription} />
<TextField label="Schedule" value={schedule} onChange={setSchedule} width="w-48" mono placeholder="0 2 * * *" />
<Field label="Runs">
<TextField
label="Schedule"
value={schedule}
onChange={setSchedule}
width="w-48"
mono
placeholder="0 2 * * *"
hint="Cron expression — castle generates a systemd timer that runs the job on this schedule."
/>
<Field label="Runs" hint="The console script or command the job runs on each tick, then exits.">
<span className="text-sm font-mono text-[var(--muted)]">{runnerLabel(runner)} &middot; </span>
<input
value={runTarget}