dashboard: remove the Y3R C4LL questions pane (ask/answer removal, frontend)

This commit is contained in:
damocles 2026-08-29 20:32:34 +02:00 committed by mara
commit ff0a6660aa
16 changed files with 74 additions and 680 deletions

View file

@ -12,7 +12,7 @@ import { themedConfirm, themedToast } from '@hive/shared/modal.js';
import { h, render } from 'preact';
import { JobqRollup } from '@hive/shared/jobq-rollup.js';
import {
containersState, questionsState,
containersState,
} from './state.js';
import { closeAllMenus } from '@hive/shared/hive-menu.js';
import './agent-menu/hive-agent-menu.js'; // registers <hive-agent-menu> — side-effect import
@ -305,7 +305,7 @@ function treePrefixDom({ depth, ancestorIsLast, isLast }) {
// strip, ctx badge, status text) is intentionally excluded: it
// populates in-place and is preserved when a row is reused.
function containerRowFingerprint(c, node, pending, opRunning, selected,
askerCount, targetCount, gatewayLinks, hostname) {
gatewayLinks, hostname) {
return JSON.stringify({
running: c.running,
failed: c.failed,
@ -317,8 +317,6 @@ function containerRowFingerprint(c, node, pending, opRunning, selected,
pending,
opRunning,
selected,
askerCount,
targetCount,
depth: node.depth,
isLast: node.isLast,
ancestorIsLast: node.ancestorIsLast,
@ -334,7 +332,6 @@ function containerRowFingerprint(c, node, pending, opRunning, selected,
function buildContainerLi(c, node, opts) {
const {
pending, opRunning, selected,
askerCount, targetCount, agentQCount,
url, containerBase, forgeBase, s,
} = opts;
// A single `pending-running` class now covers the whole "has at
@ -559,21 +556,6 @@ function buildContainerLi(c, node, opts) {
c.active_model));
}
// Pending questions where this agent is the asker (awaiting an
// answer) or the target (owes a reply). Derived live from
// questionsState so the badge updates instantly on QuestionAdded /
// QuestionResolved without a separate backend field.
if (agentQCount > 0) {
const parts = [];
if (askerCount > 0) parts.push(`${askerCount} asked`);
if (targetCount > 0) parts.push(`${targetCount} to answer`);
head.append(el('span',
{
class: 'hive-pill-sm badge-loose-ends',
title: `pending questions: ${parts.join(', ')} — see the Q33R1ES tab`,
},
`${agentQCount}`));
}
body.append(head);
// Per-card action buttons (R3ST4RT / ST0P / ST4RT / R3BU1LD /
@ -595,7 +577,7 @@ export function renderContainers(s) {
// Belt-and-suspenders for any future page that adds tabs.js
// without a #containers-section — matches the
// no-op-when-target-absent convention the other renderers
// (renderQuestions, renderApprovals, etc.) follow.
// (renderApprovals, etc.) follow.
if (!root) return;
// Containers come from the derived map (event-driven) rather than
@ -690,18 +672,9 @@ export function renderContainers(s) {
? Array.from(transientKindsMap.keys()).sort() : [];
const opRunning = pending.length > 0;
const selected = selectionState.has(c.name);
// Pending questions where this agent is the asker (awaiting an
// answer) or the target (owes a reply). Derived live from
// questionsState so the badge updates instantly on QuestionAdded /
// QuestionResolved without a separate backend field.
const askerCount = questionsState.pending.filter((q) => q.asker === c.name).length;
const targetCount = questionsState.pending.filter((q) => q.target === c.name).length;
const agentQCount = questionsState.pending.filter(
(q) => q.asker === c.name || q.target === c.name,
).length;
const fp = containerRowFingerprint(c, node, pending, opRunning, selected,
askerCount, targetCount, gatewayLinks, hostname);
gatewayLinks, hostname);
const cached = containerRowCache.get(c.name);
let li;
@ -713,7 +686,6 @@ export function renderContainers(s) {
} else {
li = buildContainerLi(c, node, {
pending, opRunning, selected,
askerCount, targetCount, agentQCount,
url, containerBase, forgeBase, s,
});
containerRowCache.set(c.name, { el: li, fingerprint: fp });