Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ jobs:
BASE_URL=http://localhost:13581 node test-issue-1279-legend-p2-e2e.js 2>&1 | tee -a e2e-output.txt
BASE_URL=http://localhost:13581 node test-issue-1799-label-vocab-e2e.js 2>&1 | tee -a e2e-output.txt
CHROMIUM_REQUIRE=1 BASE_URL=http://localhost:13581 node test-home-coverage-e2e.js 2>&1 | tee -a e2e-output.txt
CHROMIUM_REQUIRE=1 node test-issue-2027-my-mesh-node-page-e2e.js 2>&1 | tee -a e2e-output.txt
CHROMIUM_REQUIRE=1 BASE_URL=http://localhost:13581 node test-path-inspector-coverage-e2e.js 2>&1 | tee -a e2e-output.txt
CHROMIUM_REQUIRE=1 BASE_URL=http://localhost:13581 node test-issue-1206-resize-observer-leak-e2e.js 2>&1 | tee -a e2e-output.txt
CHROMIUM_REQUIRE=1 BASE_URL=http://localhost:13581 node test-nav-drawer-1064-e2e.js 2>&1 | tee -a e2e-output.txt
Expand Down
9 changes: 8 additions & 1 deletion public/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,13 @@
opacity: 0;
}
.my-node-card:hover .mnc-remove { opacity: 1; }
/* #2027 follow-up: the card's keydown handler no longer swallows Enter/Space
on nested buttons, so Remove is now genuinely keyboard-activatable. It is
hover-revealed (opacity: 0), which would otherwise hide both the control
and its focus ring from a keyboard user operating a destructive action
(WCAG 2.4.7). Reveal it whenever it, or its card, holds focus. */
.my-node-card:focus-within .mnc-remove,
.mnc-remove:focus-visible { opacity: 1; }
.mnc-remove:hover { background: var(--status-red); color: #fff; }

.mnc-status-text { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; padding-left: 28px; }
Expand All @@ -471,7 +478,7 @@
.spark-bars { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.spark-bar { flex: 1; background: var(--accent); border-radius: 1px; min-width: 0; }

.mnc-actions { display: flex; gap: 8px; }
.mnc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mnc-btn {
padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border);
background: var(--surface-2); color: var(--text); font: 500 .75rem var(--font);
Expand Down
11 changes: 11 additions & 0 deletions public/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
${obs.length ? `<div class="mnc-observers"><strong>Heard by:</strong> ${obs.map(o => escapeHtml(o.observer_name || o.observer_id)).join(', ')}</div>` : ''}
${sparkHtml ? `<div class="mnc-spark">${sparkHtml}</div>` : ''}
<div class="mnc-actions">
<button class="mnc-btn" data-action="node" data-key="${escapeAttr(mn.pubkey)}">Node page →</button>
<button class="mnc-btn" data-action="health" data-key="${mn.pubkey}">Full health →</button>
<button class="mnc-btn" data-action="packets" data-key="${mn.pubkey}">View packets →</button>
</div>
Expand All @@ -356,6 +357,9 @@
<button class="mnc-remove" data-key="${mn.pubkey}" title="Remove" aria-label="Remove ${escapeAttr(mn.name || truncate(mn.pubkey, 12))} from My Mesh"><svg class="ph-icon" aria-hidden="true"><use href="/icons/phosphor-sprite.svg#ph-x"/></svg></button>
</div>
<div class="mnc-status-text">${statusMsg}</div>
<div class="mnc-actions">
<button class="mnc-btn" data-action="node" data-key="${escapeAttr(mn.pubkey)}">Node page →</button>
</div>
</div>`;
}
}));
Expand All @@ -378,6 +382,7 @@
grid.querySelectorAll('.mnc-btn').forEach(btn => {
btn.addEventListener('click', (e) => {
e.stopPropagation();
if (btn.dataset.action === 'node') window.location.hash = '#/nodes/' + encodeURIComponent(btn.dataset.key);
if (btn.dataset.action === 'health') loadHealth(btn.dataset.key);
if (btn.dataset.action === 'packets') window.location.hash = '#/packets/' + btn.dataset.key;
});
Expand All @@ -391,6 +396,12 @@
};
card.addEventListener('click', handler);
card.addEventListener('keydown', (e) => {
// #2027 follow-up: a nested action/remove button's own Enter/Space
// activation must not be swallowed by the card's preventDefault()
// below. Bail out before it runs, the same target check `handler`
// already uses for the click case, so the button still fires its
// own click via the browser's native keyboard activation.
if (e.target.closest('.mnc-remove') || e.target.closest('.mnc-btn')) return;
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); handler(e); }
});
});
Expand Down
Loading
Loading