feat(orchestrator): speaking bubble in front, faces in the ancestry view
The bubble whose speaker is talking gets z-index 1 while it is not leaving, so it is always the front one. With look.faces on, the ancestry view draws the face of the Operator, Chair and Session nodes (r13 ring, data-face); subagents keep their circles. anchorOf intersects a bubble's anchor with its clipping ancestors, so a bubble never points at a hidden part of a node. Unit tests, a clip mutant and an e2e run with screenshots cover it. 🎯 Fix: 95 % 💥 Break: 5 % 💸 Cost: 100 % ⏱️ Time: 100 % 🛡️ Security: 100 % 🏆 Score: 90 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3418738993
commit
3583ff2a05
6 files changed
+551
-11
No files matched your search
@@ -1,5 +1,6 @@
|
||||
const gateStage = {items: [], drag: null};
|
||||
const DRAG_SLOP = 6;
|
||||
const AGENT_R = {dot: 9, face: 13};
|
||||
|
||||
function stageGate(key, change) {
|
||||
gateStage.items = gateStage.items.filter((item) => item.key !== key);
|
||||
@@ -140,16 +141,22 @@
|
||||
};
|
||||
return ancestryChart(plan, "Ancestry: operator, chair, sessions, subagents", {
|
||||
edge: (link, d) => s("path", {class: "ancestry-edge", d, "data-child": link.child, "data-parent": link.parent}),
|
||||
node: (node) => s("g", {
|
||||
class: `node ancestry-node k-${node.kind}`, transform: `translate(${fixed(node.x)} ${fixed(node.y)})`, tabindex: 0, role: "button", "aria-label": node.label,
|
||||
"data-agent": node.id, "data-kind": node.kind, "data-generation": node.generation,
|
||||
on: {click: () => open(node), keydown: (event) => {
|
||||
if (event.key === "Enter" || event.key === " ") {
|
||||
event.preventDefault();
|
||||
open(node);
|
||||
}
|
||||
}},
|
||||
}, s("title", {}, `${node.label} · ${NODE_KINDS[node.kind] || "Subagent"}`), s("circle", {r: 9}), s("text", {class: "label", y: 26, "text-anchor": "middle"}, short(node.label).slice(0, 24))),
|
||||
node: (node) => {
|
||||
const faced = look.faces && Object.hasOwn(TOP, node.kind);
|
||||
const r = faced ? AGENT_R.face : AGENT_R.dot;
|
||||
return s("g", {
|
||||
class: `node ancestry-node k-${node.kind}`, transform: `translate(${fixed(node.x)} ${fixed(node.y)})`, tabindex: 0, role: "button", "aria-label": node.label,
|
||||
"data-agent": node.id, "data-kind": node.kind, "data-generation": node.generation, "data-face": faced ? node.id : null,
|
||||
on: {click: () => open(node), keydown: (event) => {
|
||||
if (event.key === "Enter" || event.key === " ") {
|
||||
event.preventDefault();
|
||||
open(node);
|
||||
}
|
||||
}},
|
||||
}, s("title", {}, `${node.label} · ${NODE_KINDS[node.kind] || "Subagent"}`), s("circle", {r}),
|
||||
faced ? s("g", {class: "face-art", transform: `translate(${-r} ${-r}) scale(${(2 * r) / Faces.SIZE})`}, faceParts(node.id)) : null,
|
||||
s("text", {class: "label", y: r + 17, "text-anchor": "middle"}, short(node.label).slice(0, 24)));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user