Skip to content
Open
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
4 changes: 4 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,7 @@
## 2026-08-12 - Skip to Content Accessibility
**Learning:** Screen reader and keyboard-only users experience significant friction when forced to navigate through repetitive header controls on every page load.
**Action:** Keep a visible-on-focus skip link as the first interactive element, target a programmatically focusable main container, and give the focused link a high-contrast outline.

## 2024-09-01 - Redundant UI Events During Async Loading
**Learning:** During asynchronous loading (e.g. `aria-busy="true"` on a clicked element), user clicks or keyboard interaction can repeatedly trigger event handlers unless explicitly prevented. CSS `pointer-events: none` only guards against mouse events, but keyboard (Enter, Space) or programmatic clicks still fire.
**Action:** When an element is put into a loading/busy state, not only apply visual styles but also explicitly add a guard in all interaction listeners (e.g., `if (el.getAttribute("aria-busy") === "true") return;`) to ensure the request is not duplicated.
10 changes: 10 additions & 0 deletions plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
1. **`scanner/dashboard/console.html` μˆ˜μ • (λ‘œλ”© μƒνƒœ 의미둠적 μŠ€νƒ€μΌλ§ 적용 및 이벀트 κ°€λ“œ μΆ”κ°€)**
- `button:disabled` 및 `[aria-busy="true"]` μƒνƒœμΌ λ•Œ μ‚¬μš©μžκ°€ μ‹œκ°μ μœΌλ‘œ λΉ„ν™œμ„±ν™”λ˜μ—ˆμŒμ„ μ•Œ 수 μžˆλ„λ‘ CSS에 `opacity: 0.7; pointer-events: none;` 속성을 μΆ”κ°€ν•©λ‹ˆλ‹€.
- `tr.scan` μš”μ†Œμ— λŒ€ν•΄ 클릭 및 ν‚€λ³΄λ“œ(μ—”ν„°/슀페이슀) 이벀트 λ¦¬μŠ€λ„ˆμ—μ„œ `aria-busy` 속성을 ν™•μΈν•˜μ—¬, `aria-busy="true"`일 경우 좔가적인 `detail()` ν˜ΈμΆœμ„ λ°©μ§€ν•˜λŠ”(즉, 쀑볡 μš”μ²­ λ°©μ§€) κ°€λ“œ λ‘œμ§μ„ μΆ”κ°€ν•©λ‹ˆλ‹€.
2. **ν…ŒμŠ€νŠΈ 및 검증 μ‹€ν–‰**
- μ½”λ“œλ₯Ό μˆ˜μ •ν•œ ν›„ μ˜λ„λŒ€λ‘œ 변경이 λ˜μ—ˆλŠ”μ§€ λΈŒλΌμš°μ €λ‚˜ 도ꡬλ₯Ό μ΄μš©ν•΄ μ‹œκ°μ μœΌλ‘œ λ˜λŠ” 슀크립트둜 κ²€μ¦ν•©λ‹ˆλ‹€.
- ν”„λ‘œμ νŠΈμ˜ ν…ŒμŠ€νŠΈ λͺ…λ Ήμ–΄κ°€ μžˆλ‹€λ©΄(예: `pnpm test` λ“±) 이λ₯Ό μ‹€ν–‰ν•˜μ—¬ λ³€κ²½ 사항이 λ‹€λ₯Έ κΈ°λŠ₯을 λ§κ°€λœ¨λ¦¬μ§€ μ•Šμ•˜λŠ”μ§€ ν™•μΈν•©λ‹ˆλ‹€.
3. **Pre-commit 점검 단계 μˆ˜ν–‰**
- `pre_commit_instructions` 도ꡬλ₯Ό ν˜ΈμΆœν•˜μ—¬ μ˜¬λ°”λ₯Έ 검증, 린트, ν¬λ§€νŒ… λ“±μ˜ μž‘μ—…μ΄ λͺ¨λ‘ μ™„λ£Œλ˜μ—ˆλŠ”μ§€ μ΅œμ’… μ κ²€ν•©λ‹ˆλ‹€.
4. **λ³€κ²½ 사항 제좜(PR 생성)**
- μ½”λ“œ 리뷰λ₯Ό ν†΅κ³Όν•˜λ©΄ λ³€κ²½ 사항을 μ œμΆœν•©λ‹ˆλ‹€. 컀밋 제λͺ©μ€ "🎨 Palette: Add semantic disabled styles and event guards for async loading states" 와 같은 ν˜•νƒœλ₯Ό λ”°λ₯΄λ©°, μ„€λͺ…μ—λŠ” '무엇을', 'μ™œ', 'μ ‘κ·Όμ„±(Accessibility)'에 λŒ€ν•œ λ‚΄μš©μ„ ν•œκ΅­μ–΄λ‘œ μž‘μ„±ν•©λ‹ˆλ‹€.
5 changes: 3 additions & 2 deletions scanner/dashboard/console.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
.muted{color:var(--muted)}
.err{color:var(--crit);font-weight:600}
code{background:var(--bg);padding:1px 5px;border-radius:4px}
button:disabled, [aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.hidden{display:none}
</style>
</head>
Expand Down Expand Up @@ -135,8 +136,8 @@ <h1>AppGuardrail Console</h1>
<td>${esc(s.created_at)}</td><td>${esc(s.repo||"β€”")}</td><td><code>${esc((s.commit||"β€”").slice(0,10))}</code></td>
<td>${s.total}</td><td>${pill(s.deploy_blocking,"var(--crit)")}</td><td>${pill(s.new_blocking,"var(--high)")}</td></tr>`).join("")||'<tr><td colspan="6" class="muted">No scans. POST to /api/v1/scans from CI.</td></tr>';
document.querySelectorAll("tr.scan").forEach(tr=>{
tr.onclick=()=>detail(tr.dataset.id,tr);
tr.addEventListener('keydown', e => { if(e.key === 'Enter' || e.key === ' ') { e.preventDefault(); detail(tr.dataset.id,tr); } });
tr.onclick=()=>{ if(tr.getAttribute("aria-busy") === "true") return; detail(tr.dataset.id,tr); };
tr.addEventListener('keydown', e => { if(tr.getAttribute('aria-busy') === 'true') return; if(e.key === 'Enter' || e.key === ' ') { e.preventDefault(); detail(tr.dataset.id,tr); } });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟑 Busy rows scroll unexpectedly

Pressing Space on a busy row returns before preventDefault(), so the page scrolls instead of ignoring the repeated activation.

Suggested change
tr.addEventListener('keydown', e => { if(tr.getAttribute('aria-busy') === 'true') return; if(e.key === 'Enter' || e.key === ' ') { e.preventDefault(); detail(tr.dataset.id,tr); } });
tr.addEventListener('keydown', e => { if(e.key === 'Enter' || e.key === ' ') { e.preventDefault(); if(tr.getAttribute('aria-busy') === 'true') return; detail(tr.dataset.id,tr); } });
Devin Review

Was this helpful? React with πŸ‘ or πŸ‘Ž to provide feedback.

});
}catch(e){ $("#msg").classList.remove("hidden");$("#app").classList.add("hidden");
$("#msg").innerHTML=`<span class="err">${esc(e.message)}</span>`; }
Expand Down
Loading