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:
@@ -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)} · </span>
|
||||
<input
|
||||
value={runTarget}
|
||||
|
||||
Reference in New Issue
Block a user