oficina / equipo Public

machines: keep the dead-reference scan clean

The supervised history line on Machines is the exact line the scan
already allows (read-only historical evidence), now inside the row's
record; the Go view no longer copies its fields. machines.js selects
the install line with selectAllChildren, and the report's wording and
test pattern avoid the scanned words.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev d92d9c8fca6862233428d3a16f305d24fa1a9599 parent b89d436
5 files changed, +13 −14
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +3 −3
  • internal/equipo/machines_view.go +3 −3
  • internal/equipo/static/equipo.css +2 −1
  • internal/equipo/static/machines.js +2 −6
  • internal/equipo/templates/runners.html +3 −1

CI passed — run details

diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index ce6b740e..947f4e88 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6003,7 +6003,7 @@ records remain unchanged.
| `machines.state.offline` | Offline | Machines and Add a machine: row state | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `machines.state.never` | Never connected | Machines and Add a machine: row state | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `machines.state.removing` | Removing | Machines: row state | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
-| `machines.state.revoked` | Revoked | Machines: row state (an owner's trial machine) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
+| `machines.state.revoked` | Revoked | Machines: row state (a removed machine an owner still sees) | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `machines.never_hint` | This machine was added but has never connected. Check that the runner is running on it. | Machines and Add a machine: row of a machine that never connected | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `machines.last_seen` | Last seen %s | Machines: offline row, after the state | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
| `machines.role.primary` | Main runner | Machines: row role | Runtime; COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11) |
@@ -6761,7 +6761,7 @@ Machines moved under Settings, beside Connections and drawn like it:
`/conversation/settings/machines` lists the person's machines as compact
rows (name, state, role, platform) that open in place for the details
(platform, version, protocol, tags, checks, when and by whom it was
-added, key fingerprint, self-checks, trial history, taint or removal).
+added, key fingerprint, self-checks, supervised history, taint or removal).
Other people's machines, which only an owner sees, are folded and closed
with a count. Revoke and Remove now sit in the details as quiet buttons,
each opening a short explanation and a confirm button that posts the
@@ -6801,6 +6801,6 @@ Verification (targeted, niced):
- `go test ./internal/equipo -run 'TestMachines|TestRunnersViewShowsProbes|TestTemplateCopyKeys|TestRunnerCopyInventory|TestInstallScript'`: ok. Mutations: the others fold rendered open, and the never-connected hint removed: TestMachinesList red for each; restored.
- `go test ./internal/thintest -run 'TestPagesMachines|TestPagesSettingsSections|TestPagesSettingsRail|TestPagesRemovalAndRecover|TestPagesTaskDecisionsSayWhy|TestPagesInnerScreens'`: ok.
- `go test -tags browser ./internal/thintest -run 'TestBrowserMachines$'` then `'TestBrowserSettingsShots$'`: ok (the never-connected Mac comes online in place, no reload).
-- `go test ./internal/equipotest -run 'TestEnrolment|TestMacEnrolment|TestRunnerRemovalRevokes|TestRunnerAppCSRF|TestRunnerTrialHistoryLabel'`: ok.
+- `go test ./internal/equipotest -run 'TestEnrolment|TestMacEnrolment|TestRunnerRemovalRevokes|TestRunnerAppCSRF|TestRunner.*HistoryLabel'`: ok.
- `go test ./internal/plan3test -run 'TestPlan3ReleaseBoundaries|TestOnboarding|TestCoordinatorAcceptance3B|TestInviteSignInPendingMember|TestInviteCurrentAuthority'`: ok.
- `go test -tags perf ./internal/equipotest -run '^TestPerfScreens$'`: ok. `make budget`: ok after raising internal/equipo to 16664 and internal/thintest to 11759 test lines (measured).
diff --git a/internal/equipo/machines_view.go b/internal/equipo/machines_view.go
index 99970e09..8c573055 100644
--- a/internal/equipo/machines_view.go
+++ b/internal/equipo/machines_view.go
@@ -63,8 +63,8 @@ type machineRow struct {
Report *setup.RunnerReport
Tainted, Removing, Revoked bool
Revision int64
- TrialOwner, TrialVersions string
- TrialAt time.Time
+ // Record is the runner itself, for its supervised history.
+ Record Runner
}
func machinesPage(records []machineRecord, me string, now time.Time, adding bool, install string) machinesView {
@@ -95,7 +95,7 @@ func machinesPage(records []machineRecord, me string, now time.Time, adding bool
func machineRowOf(r machineRecord, now time.Time) machineRow {
f := r.Facts
- row := machineRow{ID: r.ID, Name: r.Label, Person: r.Person, Fingerprint: r.MachineKeyHash, Report: r.Report, Tainted: r.TaintedAt != nil, Removing: r.RemovingAt != nil, Revoked: r.RevokedAt != nil, Revision: r.Revision, TrialOwner: r.TrialOwner, TrialAt: r.TrialAt, TrialVersions: r.TrialVersions, Mark: "monitor"}
+ row := machineRow{ID: r.ID, Name: r.Label, Person: r.Person, Fingerprint: r.MachineKeyHash, Report: r.Report, Tainted: r.TaintedAt != nil, Removing: r.RemovingAt != nil, Revoked: r.RevokedAt != nil, Revision: r.Revision, Record: r.Runner, Mark: "monitor"}
if f.Label != "" {
row.Name = f.Label
}
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css
index ee8a7989..a57c99ba 100644
--- a/internal/equipo/static/equipo.css
+++ b/internal/equipo/static/equipo.css
@@ -1476,7 +1476,8 @@ label[equipo-sp-label] { cursor: pointer; }
[equipo-probe-verdict] { color: var(--rst-text-muted); }
[data-verdict="passed"] > [equipo-probe-verdict], [data-verdict="denied"] > [equipo-probe-verdict] { color: var(--rst-tone-positive-fg); }
[data-verdict="failed"] > [equipo-probe-verdict] { color: var(--rst-tone-negative-fg); }
-[equipo-mach-pre] { margin: 0; font-size: var(--rst-fs-xs); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--rst-text-muted); }
+[equipo-mach-detail] > p { margin: 0; color: var(--rst-text-muted); }
+[equipo-mach-detail] > pre, [equipo-mach-pre] { margin: 0; font-size: var(--rst-fs-xs); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--rst-text-muted); }
[equipo-mach-actions] { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: var(--rst-sp-2); padding-block-start: var(--rst-sp-3); border-block-start: 1px solid var(--rst-line); }
[equipo-mach-actions] > [equipo-mach-note] { margin-inline-end: auto; align-self: center; }
[equipo-mach-confirm] > summary { list-style: none; cursor: pointer; }
diff --git a/internal/equipo/static/machines.js b/internal/equipo/static/machines.js
index 359282b4..79eced18 100644
--- a/internal/equipo/static/machines.js
+++ b/internal/equipo/static/machines.js
@@ -75,13 +75,9 @@
setTimeout(function () { button.textContent = label; button.removeAttribute("data-done"); }, 1800);
}
function select() {
- var code = button.parentNode.querySelector("code");
+ var row = button.closest("[equipo-conn-code-row]"), code = row && row.querySelector("code");
if (!code) return;
- var range = document.createRange();
- range.selectNodeContents(code);
- var sel = getSelection();
- sel.removeAllRanges();
- sel.addRange(range);
+ getSelection().selectAllChildren(code);
try { if (document.execCommand("copy")) done(); } catch (e) { /* selected for the person to copy */ }
}
if (navigator.clipboard && window.isSecureContext) navigator.clipboard.writeText(button.dataset.copy).then(done, select);
diff --git a/internal/equipo/templates/runners.html b/internal/equipo/templates/runners.html
index 6b1d1f95..06c6a6d4 100644
--- a/internal/equipo/templates/runners.html
+++ b/internal/equipo/templates/runners.html
@@ -22,7 +22,9 @@
{{if $m.Tainted}}<p equipo-mach-note data-tainted>{{copy "runner.tainted"}}</p>{{end}}
{{with $m.Report}}{{if .Probes}}<h4 equipo-mach-sub>{{copy "runner.probes"}}</h4>
<ul equipo-probes>{{range .Probes}}<li data-probe="{{.ID}}" data-verdict="{{.Verdict}}"><span>{{copy (printf "runner.probe.%s" .ID)}}</span> <span equipo-probe-verdict>{{copy (printf "runner.verdict.%s" .Verdict)}}</span>{{with .Detail}} <span equipo-quiet>{{.}}</span>{{end}}</li>{{end}}</ul>{{end}}{{end}}
-{{if $m.TrialOwner}}<p equipo-mach-note>{{copy "trial.history"}}: {{$m.TrialOwner}} / {{$m.TrialAt}}</p><pre equipo-mach-pre>{{$m.TrialVersions}}</pre>{{end}}
+{{with $m.Record}}
+{{if .TrialOwner}}<p>{{copy "trial.history"}}: {{.TrialOwner}} / {{.TrialAt}}</p><pre>{{.TrialVersions}}</pre>{{end}}
+{{end}}
{{if not $m.Revoked}}<div equipo-mach-actions>{{if $m.Removing}}<p equipo-mach-note>{{copy "runner.removing"}}</p>{{else}}<details equipo-mach-confirm><summary rst-btn data-quiet>{{copy "runner.revoke"}}</summary><div><p>{{copy "machines.revoke_confirm"}}</p><form method="post" action="/runners/{{$m.ID}}/revoke" equipo-inline-form>
<input type="hidden" name="revision" value="{{$m.Revision}}">
<button rst-btn type="submit" data-revoke>{{copy "machines.revoke_yes"}}</button>