dashboard: drop misleading manager-special bulk-stop confirm (#443)

mirror of the #445 fix on the bulk-action side: mara's dont
This commit is contained in:
iris 2026-05-26 00:47:20 +02:00
commit 086cbc0311

View file

@ -796,18 +796,13 @@ window.marked = marked;
}); });
// #443 also lifts the manager-stop guard: when the whole selection // #443 also lifts the manager-stop guard: when the whole selection
// is running, ST0P applies — manager included. host-side hive-c0re // is running, ST0P applies — manager included. host-side hive-c0re
// keeps serving the dashboard either way. Per-agent confirm message // keeps serving the dashboard either way + per-agent approvals +
// calls out the manager case ("approvals pause until restart") when // meta-input updates still work without the manager up, so we
// the manager is in the set. // don't special-case the confirm prompt when the manager is in
// the selection (mara: "dont special case manager for stopping").
addBulkButton(actions, 'btn-stop', '■ ST0P', allRunning, selected, { addBulkButton(actions, 'btn-stop', '■ ST0P', allRunning, selected, {
action: '/kill/', action: '/kill/',
confirm: (names) => { confirm: (names) => `stop ${names.length} agent${names.length === 1 ? '' : 's'} (${names.join(', ')})?`,
const hasManager = selected.some((c) => c.is_manager);
const base = `stop ${names.length} agent${names.length === 1 ? '' : 's'} (${names.join(', ')})?`;
return hasManager
? base + ' approvals + meta operations pause until the manager is restarted.'
: base;
},
disabledTitle: why('■ ST0P', stoppedNames.map((n) => `\`${n}\` is already stopped`)), disabledTitle: why('■ ST0P', stoppedNames.map((n) => `\`${n}\` is already stopped`)),
}); });
addBulkButton(actions, 'btn-start', '▶ ST4RT', allStopped, selected, { addBulkButton(actions, 'btn-start', '▶ ST4RT', allStopped, selected, {