Skip to content
Closed
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 @@ -65,3 +65,7 @@
## 2025-02-18 - Search Input Escape Key
**Learning:** Users who heavily rely on keyboard navigation (and power users) experience friction when forced to backspace manually or switch to the mouse to click a "Clear" button after filtering a list.
**Action:** Always provide an `Escape` key listener on search inputs to instantly clear the query and re-render the view, matching native OS text field behavior.

## 2024-05-18 - ๊ธฐ๋ณธ ํŒŒ์ผ ์ž…๋ ฅ UI์˜ ๋ถˆ์ผ์น˜ ๋ฌธ์ œ (Native File Input Inconsistency)
**Learning:** ์ผ๊ด€๋œ UI๊ฐ€ ์ค‘์š”ํ•œ ๋‹จ์ผ ํŽ˜์ด์ง€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜(SPA)์—์„œ ๊ธฐ๋ณธ `<input type="file">` ์š”์†Œ๋Š” ๋ธŒ๋ผ์šฐ์ €๋‚˜ ํ”Œ๋žซํผ๋งˆ๋‹ค ์‹œ๊ฐ์  ๋ถˆ์ผ์น˜๋ฅผ ๋ฐœ์ƒ์‹œํ‚ค๋ฉฐ, ์ข…์ข… ๋™์ผํ•œ ํŒŒ์ผ์— ๋Œ€ํ•œ ์—ฐ์†์ ์ธ `change` ์ด๋ฒคํŠธ๋ฅผ ์–ต์ œํ•ฉ๋‹ˆ๋‹ค.
**Action:** ์Šคํƒ€์ผ์ด ์ ์šฉ๋œ ํ”„๋ก์‹œ ๋ฒ„ํŠผ(์˜ˆ: `.primary-action` ํด๋ž˜์Šค ์‚ฌ์šฉ)์„ ํ™œ์šฉํ•˜์—ฌ ์‹œ๊ฐ์ ์œผ๋กœ ์ˆจ๊ฒจ์ง„(`.sr-only`) ๊ธฐ๋ณธ ํŒŒ์ผ ์ž…๋ ฅ ์š”์†Œ๋ฅผ ํด๋ฆญํ•˜๋„๋ก ์œ ๋„ํ•ฉ๋‹ˆ๋‹ค. ์ด๋ฒคํŠธ๋ฅผ ์บก์ฒ˜ํ•œ ํ›„, `change` ํ•ธ๋“ค๋Ÿฌ ๋‚ด์—์„œ ์ž…๋ ฅ ๊ฐ’์„ ์ดˆ๊ธฐํ™”(`fileInput.value = ''`)ํ•˜์—ฌ ๋™์ผํ•œ ํŒŒ์ผ์„ ๋‹ค์‹œ ์—…๋กœ๋“œํ•  ์ˆ˜ ์žˆ๋„๋ก ๋ณด์žฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
6 changes: 5 additions & 1 deletion scanner/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<span class="logo"></span><span class="brand">AppGuardrail</span>
<span class="spacer"></span>
<span class="meta" id="src">no findings loaded</span>
<input type="file" id="file" accept="application/json,.json" aria-label="Upload findings file" style="margin-left:12px">
<button type="button" id="upload-btn" class="primary-action" aria-label="Upload findings file">Upload findings</button>
<input type="file" id="file" accept="application/json,.json" class="sr-only" tabindex="-1" aria-hidden="true">
</header>
<p id="findings-summary" class="sr-only" role="status" aria-live="polite" aria-atomic="true"></p>
<main id="app"></main>
Expand Down Expand Up @@ -319,6 +320,9 @@ <h1>Dashboard</h1>
render();
}

const uploadBtn = document.getElementById('upload-btn');
uploadBtn.addEventListener('click', () => document.getElementById('file').click());

const fileInput = document.getElementById('file');
fileInput.addEventListener('change', () => {
const selectedFile = fileInput.files?.[0];
Expand Down
Loading