feat: add Views settings tab with inline rename, reorder, and delete

Implements the "Manage Views" Settings Tab with full UI and functionality:

HTML: Added Views tab button and panel with empty state message.
JS: Added renderViewsSettingsTab() function that renders the view list with:
- Clickable name for inline rename (validates reserved/duplicate names)
- Session count display
- Up/down arrow buttons for reordering (disabled at boundaries)
- Delete button with inline 'Sure? [Yes] [No]' confirmation
- Delegated event handlers for all interactions
Added _saveViewsAndRerender() helper that PATCHes /api/settings,
updates _serverSettings, and re-renders both tab and dropdown.
Updated openSettings() to call renderViewsSettingsTab() after loading.
CSS: Added styling for views-settings-list, views-settings-row,
views-settings-name, views-settings-count, views-settings-actions,
views-settings-btn, views-settings-confirm, and rename input.
Tests: Added 3 new frontend tests and updated existing panel count test.

All 491 frontend tests pass with no regressions.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This commit is contained in:
Brian Krabach
2026-04-15 18:23:56 -07:00
parent 5732436f88
commit 2c04c2600a
5 changed files with 403 additions and 3 deletions
+96
View File
@@ -2001,3 +2001,99 @@ body {
border-radius: 4px;
color: var(--text);
}
/* ─── Manage Views settings tab (task-9) ─────────────────────────────────── */
.views-settings-list {
display: flex;
flex-direction: column;
gap: 4px;
width: 100%;
}
.views-settings-row {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 4px;
}
.views-settings-name {
flex: 1;
font-size: 13px;
color: var(--text);
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.views-settings-name:hover {
color: var(--accent);
text-decoration: underline;
}
.views-settings-count {
font-size: 11px;
color: var(--text-muted);
white-space: nowrap;
flex-shrink: 0;
}
.views-settings-actions {
display: flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
.views-settings-btn {
background: transparent;
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text-muted);
cursor: pointer;
font-size: 12px;
line-height: 1;
padding: 3px 7px;
transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.views-settings-btn:hover:not(:disabled) {
border-color: var(--accent);
color: var(--accent);
background: var(--accent-dim);
}
.views-settings-btn:disabled {
opacity: 0.35;
cursor: not-allowed;
}
.views-settings-btn--danger:hover:not(:disabled) {
border-color: #ef4444;
color: #ef4444;
background: rgba(239, 68, 68, 0.1);
}
.views-settings-confirm {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--text-muted);
}
.views-settings-rename-input {
flex: 1;
background: var(--bg);
border: 1px solid var(--accent);
border-radius: 4px;
color: var(--text);
font-size: 13px;
padding: 3px 6px;
outline: none;
}