feat: session delete + touch-friendly message controls
Session delete:
- DELETE /sessions/{session_id} endpoint (chat.py + session_store.py)
- × button on each session item in the panel (hover-reveal on desktop)
- Clears UI if the active session is deleted
Touch accessibility:
- @media (hover: none) rule makes msg-actions always visible on touch devices
- msg-act-btn tap targets enlarged to 36px min-height, readable font size
- session-delete-btn also always visible and finger-sized on touch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -176,6 +176,23 @@
|
||||
.session-item:hover { background: var(--bg); }
|
||||
.session-item.new { color: var(--accent); justify-content: center; }
|
||||
|
||||
.session-delete-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--muted);
|
||||
font-size: 1.1rem;
|
||||
line-height: 1;
|
||||
padding: 2px 4px;
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
flex-shrink: 0;
|
||||
margin-left: 4px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s, color 0.15s;
|
||||
}
|
||||
.session-item:hover .session-delete-btn { opacity: 1; }
|
||||
.session-delete-btn:hover { color: #e06c75; }
|
||||
|
||||
.session-id {
|
||||
font-family: monospace;
|
||||
font-size: 0.85rem;
|
||||
@@ -1029,6 +1046,29 @@
|
||||
#note-type-btn { padding: 6px 10px; }
|
||||
}
|
||||
|
||||
/* ── Touch devices — no hover capability ─────────────────── */
|
||||
/* Always show message controls; make tap targets finger-sized */
|
||||
@media (hover: none) {
|
||||
.msg-actions {
|
||||
opacity: 1;
|
||||
padding: 4px 2px 2px;
|
||||
}
|
||||
|
||||
.msg-act-btn {
|
||||
font-size: 0.78rem;
|
||||
padding: 6px 12px;
|
||||
min-height: 36px;
|
||||
}
|
||||
|
||||
.session-delete-btn {
|
||||
opacity: 1;
|
||||
font-size: 1.3rem;
|
||||
padding: 4px 8px;
|
||||
min-width: 36px;
|
||||
min-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 380px) {
|
||||
header .name { font-size: 1rem; }
|
||||
.header-emoji { font-size: 1.3rem; }
|
||||
|
||||
Reference in New Issue
Block a user