feat(monitor-webui): add find-as-you-type filtering and fix UX bugs

This commit is contained in:
matt wilkie
2025-11-21 13:22:37 -07:00
parent dfd549b085
commit dde5a94270
2 changed files with 7 additions and 1 deletions

View File

@@ -55,6 +55,7 @@
<option value="in_progress">In Progress</option>
<option value="closed">Closed</option>
</select>
<button id="clear-status" class="button button-clear" style="padding: 0 1rem; height: 2.5rem; line-height: 2.5rem; margin-left: 0.5rem; font-size: 0.8rem;">Clear</button>
</label>
<label>
Priority:

View File

@@ -103,7 +103,7 @@ async function loadIssues() {
const response = await fetch('/api/issues');
if (!response.ok) throw new Error('Failed to load issues');
allIssues = await response.json();
renderIssues(allIssues);
filterIssues();
} catch (error) {
console.error('Error loading issues:', error);
showError('Failed to load issues: ' + error.message);
@@ -236,6 +236,11 @@ window.onclick = function(event) {
// Filter event listeners
document.getElementById('filter-status').addEventListener('change', filterIssues);
document.getElementById('clear-status').addEventListener('click', function() {
const statusSelect = document.getElementById('filter-status');
Array.from(statusSelect.options).forEach(opt => opt.selected = false);
filterIssues();
});
document.getElementById('filter-priority').addEventListener('change', filterIssues);
document.getElementById('filter-text').addEventListener('input', filterIssues);