e6657c23ff
The store rewrite in e7eea7a left tasks.md describing a data shape
(fat schedules, host.repo_initialised_at, manual flag) that no longer
exists, and left the host-detail templates rendering against fields
the store no longer exposes. This commit reconciles both.
tasks.md
* Mid-phase pivot called out at the top of Phase 2 with commit hashes.
* P2-01..P2-05 kept as done but stamped ⚠️ "shipped against old shape
— to re-validate under P2R-02".
* P2-04.5 (manual flag) struck as superseded.
* New P2R-NN section covering work that previously lived only in
commit messages and code stubs:
P2R-00.1/00.2/00.3/00.4 — phases already shipped (this commit
records 00.4)
P2R-01 — REST + WS rewire against slim schedules + source groups
+ repo maintenance + auto-init
P2R-02 — UI rewire against the v4 wireframes
P2R-03..05 — prune / check / unlock command surfaces
P2R-06 — server-side maintenance ticker (cadence-driven)
P2R-07 — repo stats panel
P2R-08 — pending_runs queue worker
P2R-09 — auto-init UX polish
P2R-10..12 — pre/post hooks rehomed from schedule onto source group
P2R-13..14 — bandwidth + next/last-run surface
* P2-16/17/18 (Windows + announce-and-approve) untouched.
* Phase 2 acceptance criteria rewritten against the new model.
UI patch-up (P2R-00.4)
* host_detail.html + host_row.html: removed every $host.RepoInitialisedAt
reference (column dropped in migration 0008 — render was 500'ing).
* Removed manual init-repo branches; the auto-init path replaces them.
* Schedules sub-tab demoted from active link to inert div until P2R-02
rebuilds the page (it was linking to a raw 501 from the stubbed
ui_schedules.go handlers).
* Disabled the four per-host Run-now buttons (dashboard row + host
detail header + empty-snapshots state + right-rail) with a
"lands in P2 Phase 4" hint — handler is 501-stubbed pending P2R-01,
so leaving them clickable produced silent failures over htmx.
* Dashboard row-action becomes "Open →" instead of Run-now.
Project tooling
* .mcp.json at repo root: project-scoped Playwright MCP override.
Forces --headless (so I don't pop a browser at the operator) and
--output-dir _diag (so screenshots / traces land in the gitignored
_diag/ directory rather than scattered at the repo root).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
60 lines
2.8 KiB
HTML
60 lines
2.8 KiB
HTML
{{define "host_row"}}
|
|
<div class="row-hover host-row clickable hairline {{.Status}}{{if eq (deref .LastBackupStatus) "failed"}} failed{{end}}">
|
|
<a href="/hosts/{{.ID}}" class="row-link" aria-label="Open {{.Name}}">{{.Name}}</a>
|
|
<div>
|
|
{{- if eq .Status "online" -}}
|
|
<span class="dot dot-online{{if .CurrentJobID}} pulse{{end}}"></span>
|
|
{{- else if eq .Status "degraded" -}}
|
|
<span class="dot dot-degraded"></span>
|
|
{{- else if eq .Status "offline" -}}
|
|
<span class="dot dot-offline"></span>
|
|
{{- else -}}
|
|
<span class="dot dot-failed"></span>
|
|
{{- end -}}
|
|
</div>
|
|
<div class="mono {{if eq .Status "offline"}}text-ink-mid{{else}}text-ink{{end}} font-medium">{{.Name}}</div>
|
|
<div class="mono text-ink-mid text-[12px]">{{.OS}}/{{.Arch}}</div>
|
|
<div class="text-xs text-ink-mid">
|
|
{{- if .CurrentJobID -}}
|
|
<span class="text-accent">backup running…</span><br>
|
|
<span class="mono text-ink-fade">started {{relTime .LastBackupAt}}</span>
|
|
{{- else if eq (deref .LastBackupStatus) "succeeded" -}}
|
|
<span class="text-ok">succeeded</span> · <span class="mono">{{relTime .LastBackupAt}}</span>
|
|
{{- else if eq (deref .LastBackupStatus) "failed" -}}
|
|
<span class="text-bad font-medium">failed</span> · <span class="mono">{{relTime .LastBackupAt}}</span>
|
|
{{- else if eq (deref .LastBackupStatus) "cancelled" -}}
|
|
<span class="text-warn">cancelled</span> · <span class="mono">{{relTime .LastBackupAt}}</span>
|
|
{{- else if eq .Status "offline" -}}
|
|
<span class="text-ink-mute">last seen <span class="mono">{{relTime .LastSeenAt}}</span></span>
|
|
{{- else -}}
|
|
<span class="text-ink-fade italic">never run</span>
|
|
{{- end -}}
|
|
</div>
|
|
<div class="text-right mono {{if eq .Status "offline"}}text-ink-mid{{else}}text-ink{{end}}">{{bytes .RepoSizeBytes}}</div>
|
|
<div class="text-right mono {{if eq .Status "offline"}}text-ink-mute{{else}}text-ink-mid{{end}}">
|
|
{{- if eq .SnapshotCount 0 -}}
|
|
<span class="text-ink-fade">—</span>
|
|
{{- else -}}
|
|
{{comma .SnapshotCount}}
|
|
{{- end -}}
|
|
</div>
|
|
<div class="text-right mono {{if gt .OpenAlertCount 0}}text-bad font-medium{{else}}text-ink-mute{{end}}">
|
|
{{- if eq .OpenAlertCount 0 -}}—{{- else -}}{{.OpenAlertCount}}{{- end -}}
|
|
</div>
|
|
<div class="flex gap-1.5 flex-wrap">
|
|
{{- range .Tags -}}
|
|
<span class="tag">{{.}}</span>
|
|
{{- end -}}
|
|
</div>
|
|
<div class="text-right row-action">
|
|
{{- if eq .Status "offline" -}}
|
|
<span class="mono text-xs text-ink-fade">offline</span>
|
|
{{- else if .CurrentJobID -}}
|
|
<a href="/jobs/{{deref .CurrentJobID}}" class="btn btn-ghost">View job →</a>
|
|
{{- else -}}
|
|
<a href="/hosts/{{.ID}}" class="btn btn-ghost whitespace-nowrap" title="per-source-group Run-now lands in P2 Phase 4 — open the host">Open →</a>
|
|
{{- end -}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|