feat: mobile UI, chat history search, news source filtering

- Mobile (#11): responsive 3-button bottom nav (STATS/CHAT/INFO), panel switching, compact topbar, touch-friendly inputs; panels show one-at-a-time on screens <900px
- Search (#12): 🔍 button next to TRANSMIT opens search modal; history.php endpoint queries conversations table; results show role, timestamp, and snippet
- News filter (#13): ⚙ gear on NEWS tab reveals category checkboxes; hidden categories stored in localStorage; empty-state message when all hidden

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 02:18:10 +00:00
parent 290389abef
commit c74a9af8be
3 changed files with 193 additions and 4 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
// Chat history search endpoint
require_once __DIR__ . '/../config.php';
require_once __DIR__ . '/../../includes/auth.php';
header('Content-Type: application/json');
AuthMiddleware::requireAuth();
$q = trim($_GET['q'] ?? '');
if (strlen($q) < 2) {
echo json_encode(['results' => [], 'error' => 'Query too short']);
exit;
}
$rows = JarvisDB::query(
"SELECT role, content, created_at FROM conversations
WHERE content LIKE ? ORDER BY created_at DESC LIMIT 25",
['%' . $q . '%']
) ?? [];
echo json_encode(['results' => $rows, 'total' => count($rows)]);