Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (claude): close two guard blind spots and the violations they hid

[._.]/ Adam Eivy6094a4820b44
diff --git a/client/src/a11yConventions.test.js b/client/src/a11yConventions.test.js
index f516976678..7836a8bcff 100644
--- a/client/src/a11yConventions.test.js
+++ b/client/src/a11yConventions.test.js
@@ -183,7 +183,25 @@ function matchTernaryIcons(inner) {
return iconRe.test(a) && iconRe.test(b);
}
-function isIconOnlyBody(rawBody) {
+// Unwrap presentational wrappers: a button whose body is `<span><X/></span>`
+// (an extra element for padding, a hover background, or a badge) is still
+// icon-only, but a walker that stops at the wrapper's opening tag reads its
+// children as "more than one top-level node" and skips the button entirely.
+// Recurse through lowercase host elements that carry no text of their own.
+function unwrapPresentational(rawBody, depth = 0) {
+ if (depth > 4) return rawBody;
+ const s = stripJsxComments(rawBody).trim();
+ const m = s.match(/^<([a-z][\w-]*)\b/);
+ if (!m) return s;
+ const boundary = tagBoundaryAt(s, 0);
+ if (!boundary || boundary.selfClosing) return s;
+ const close = `</${m[1]}>`;
+ if (!s.endsWith(close)) return s;
+ return unwrapPresentational(s.slice(boundary.end, s.length - close.length), depth + 1);
+}
+
+function isIconOnlyBody(rawBodyIn) {
+ const rawBody = unwrapPresentational(rawBodyIn);
const node = soleTopLevelNode(rawBody);
if (!node) return false;
if (node.kind === 'element') return node.selfClosing && /^<[A-Z]/.test(node.raw);
@@ -425,7 +443,14 @@ describe('a11y conventions', () => {
// already covers the entire screen/panel, so a min-w/min-h floor is
// meaningless — the element's box is already forced to fill its
// positioned ancestor.
- const CLOSE_LABEL_RE = /aria-label\s*=\s*"(Close[^"]*)"/;
+ // Matches both a literal `aria-label="Close…"` and an expression form
+ // `aria-label={cond ? 'Close panel' : …}` / {`Close ${x}`} / {closeLabel}.
+ // Scanning only the literal form is how a live 16px close button in
+ // apps/DeployPanel.jsx (dynamic label, no sizing at all) hid from this
+ // guard while it reported zero offenders — the canonical Drawer.jsx close
+ // button uses a dynamic label too, so the literal-only form misses the
+ // exact shape the convention was written from.
+ const CLOSE_LABEL_RE = /aria-label\s*=\s*(?:"Close[^"]*"|\{[^}]*(?:['"`]Close|[Cc]loseLabel)[^}]*\})/;
const offenders = [];
for (const file of trackedJsxFiles()) {
const src = readFileSync(join(CLIENT_ROOT, file), 'utf8');
diff --git a/client/src/components/EntityCombobox.jsx b/client/src/components/EntityCombobox.jsx
index 22313d9515..3ef7f07cb9 100644
--- a/client/src/components/EntityCombobox.jsx
+++ b/client/src/components/EntityCombobox.jsx
@@ -142,7 +142,7 @@ export default function EntityCombobox({
<button
type="button"
onClick={() => setOpen((p) => !p)}
- className="absolute right-1 top-1/2 -translate-y-1/2 p-1 text-gray-500 hover:text-white"
+ className="absolute right-1 top-1/2 -translate-y-1/2 flex items-center justify-center min-h-[44px] min-w-[44px] text-gray-500 hover:text-white"
aria-label={open ? `Close ${noun} list` : `Open ${noun} list`}
tabIndex={-1}
>
diff --git a/client/src/components/apps/DeployPanel.jsx b/client/src/components/apps/DeployPanel.jsx
index e287a1e96d..e9160dd938 100644
--- a/client/src/components/apps/DeployPanel.jsx
+++ b/client/src/components/apps/DeployPanel.jsx
@@ -141,7 +141,7 @@ export default function DeployPanel({ appId, appName }) {
</div>
<button
onClick={handleClose}
- className="text-gray-400 hover:text-white transition-colors"
+ className="flex items-center justify-center min-h-[44px] min-w-[44px] text-gray-400 hover:text-white transition-colors"
title={isDeploying ? 'Hide (deploy keeps running)' : 'Close'}
aria-label={isDeploying ? 'Hide deploy output' : 'Close deploy panel'}
>
diff --git a/client/src/components/brain/tabs/TrustTab.jsx b/client/src/components/brain/tabs/TrustTab.jsx
index 5dfb9c052c..661a4bab40 100644
--- a/client/src/components/brain/tabs/TrustTab.jsx
+++ b/client/src/components/brain/tabs/TrustTab.jsx
@@ -268,7 +268,8 @@ export default function TrustTab({ onRefresh }) {
<button
onClick={() => setExpandedId(isExpanded ? null : entry.id)}
className="p-1.5 text-gray-400 hover:text-white rounded hover:bg-port-border/50"
- title="View details" aria-label="View details"
+ title={isExpanded ? 'Hide details' : 'View details'}
+ aria-label={isExpanded ? 'Hide details' : 'View details'}
>
{isExpanded ? <ChevronDown size={16} /> : <Eye size={16} />}
</button>