diff --git a/ROADMAP.md b/ROADMAP.md index 187bcee..8b1014c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -10,7 +10,7 @@ minor = add features (deprecate, don't remove), patch = fix something. --- -## Current State: v0.7.3 +## Current State: v0.7.4 ### ✅ Done @@ -79,6 +79,9 @@ minor = add features (deprecate, don't remove), patch = fix something. - [x] Conversation path: active-path context assembly, cursor-aware - [x] White-label branding: volume mount, org name, logo, favicon, accent color, pills - [x] Avatar system: user profile upload, preset avatars, avatar in messages/sidebar/dropdown +- [x] Chat search / filter in sidebar (real-time title filtering) +- [x] Command palette (Ctrl+K) with fuzzy search, chat jumping, keyboard nav +- [x] PWA manifest + service worker (offline shell, install prompt) **CI/CD (Gitea Actions)** - [x] Three-env pipeline (dev/test/prod) @@ -112,7 +115,7 @@ org-wide presets, users create personal ones (if user providers are enabled). ("Code Reviewer (GPT-4o)", "Research Assistant (Claude Opus)") - [x] Completion handler unwraps preset → base model + config overrides -## 0.7.x — Branding + Polish +## ~~0.7.x — Branding + Polish~~ ✅ White-label support and UX improvements that exploit existing infrastructure. @@ -137,12 +140,12 @@ White-label support and UX improvements that exploit existing infrastructure. - [x] Context assembly follows active path, not full channel history **UX Polish** -- [ ] Chat search / filter in sidebar +- [x] Chat search / filter in sidebar - [x] UI preferences: font size + UI scale (Appearance tab, localStorage) - [x] Mobile responsive: hamburger menu, sidebar overlay, auto-collapse - [x] Model name in message headers (preset name or model ID, not "Assistant") -- [ ] Keyboard shortcuts (Ctrl+K command palette) -- [ ] PWA manifest + offline shell + install prompt +- [x] Keyboard shortcuts (Ctrl+K command palette) +- [x] PWA manifest + offline shell + install prompt --- diff --git a/VERSION b/VERSION index f38fc53..0a1ffad 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/docker-entrypoint-fe.sh b/docker-entrypoint-fe.sh index e785d96..4b5092c 100644 --- a/docker-entrypoint-fe.sh +++ b/docker-entrypoint-fe.sh @@ -44,6 +44,11 @@ sed -i \ -e "s|%%BRANDING_JSON%%|${BRANDING_JSON}|g" \ /usr/share/nginx/html/index.html +# Inject version into service worker +sed -i \ + -e "s|%%APP_VERSION%%|${APP_VERSION}|g" \ + /usr/share/nginx/html/sw.js + echo "✅ Frontend configured: BASE_PATH=${BASE_PATH:-/} VERSION=${APP_VERSION}" # ── Generate nginx config ─────────────────── diff --git a/server/handlers/channels.go b/server/handlers/channels.go index aca419d..72a75b7 100644 --- a/server/handlers/channels.go +++ b/server/handlers/channels.go @@ -108,6 +108,7 @@ func (h *ChannelHandler) ListChannels(c *gin.Context) { archived := c.DefaultQuery("archived", "false") folder := c.Query("folder") channelType := c.DefaultQuery("type", "") // empty = all types + search := strings.TrimSpace(c.Query("search")) // Count total countQuery := `SELECT COUNT(*) FROM channels WHERE user_id = $1 AND is_archived = $2` @@ -124,6 +125,11 @@ func (h *ChannelHandler) ListChannels(c *gin.Context) { countArgs = append(countArgs, folder) argN++ } + if search != "" { + countQuery += ` AND title ILIKE $` + strconv.Itoa(argN) + countArgs = append(countArgs, "%"+search+"%") + argN++ + } var total int if err := database.DB.QueryRow(countQuery, countArgs...).Scan(&total); err != nil { @@ -156,9 +162,13 @@ func (h *ChannelHandler) ListChannels(c *gin.Context) { args = append(args, folder) argN++ } + if search != "" { + query += ` AND c.title ILIKE $` + strconv.Itoa(argN) + args = append(args, "%"+search+"%") + argN++ + } - query += ` ORDER BY c.is_pinned DESC, c.updated_at DESC - LIMIT $` + strconv.Itoa(argN) + ` OFFSET $` + strconv.Itoa(argN+1) + query += ` ORDER BY c.is_pinned DESC, c.updated_at DESC LIMIT $` + strconv.Itoa(argN) + ` OFFSET $` + strconv.Itoa(argN+1) args = append(args, perPage, offset) rows, err := database.DB.Query(query, args...) diff --git a/src/css/styles.css b/src/css/styles.css index 10cc991..60d8734 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -1288,6 +1288,121 @@ button { font-family: var(--font); cursor: pointer; } display: flex; gap: 8px; margin-top: 12px; } +/* ── Sidebar Search ──────────────────────── */ + +.sidebar-search { + display: flex; align-items: center; gap: 8px; + padding: 6px 10px; margin: 4px 6px; + background: var(--bg); border: 1px solid var(--border); + border-radius: var(--radius); transition: border-color var(--transition); +} +.sidebar-search:focus-within { border-color: var(--accent); } +.sidebar-search svg { color: var(--text-3); flex-shrink: 0; } +.sidebar-search input { + flex: 1; background: none; border: none; color: var(--text); + font-size: 12px; font-family: var(--font); outline: none; + min-width: 0; +} +.sidebar-search input::placeholder { color: var(--text-3); } +.sidebar-search-clear { + background: none; border: none; color: var(--text-3); cursor: pointer; + font-size: 11px; padding: 2px 4px; border-radius: 4px; + transition: color var(--transition); display: none; +} +.sidebar-search-clear:hover { color: var(--text); } +.sidebar-search.has-value .sidebar-search-clear { display: block; } +.sidebar.collapsed .sidebar-search { display: none; } + +.sidebar-search-empty { + color: var(--text-3); font-size: 12px; text-align: center; + padding: 1.5rem 0.5rem; +} + +/* ── Command Palette ─────────────────────── */ + +.cmd-palette-overlay { + position: fixed; inset: 0; background: rgba(0,0,0,0.5); + display: none; align-items: flex-start; justify-content: center; + z-index: 2000; backdrop-filter: blur(4px); + padding-top: min(20vh, 160px); +} +.cmd-palette-overlay.active { display: flex; } + +.cmd-palette { + background: var(--bg-surface); border: 1px solid var(--border-light); + border-radius: var(--radius-lg); width: 90%; max-width: 480px; + box-shadow: 0 16px 64px rgba(0,0,0,0.6); + animation: modal-in 0.12s ease; + overflow: hidden; +} + +.cmd-input-wrap { + display: flex; align-items: center; gap: 10px; + padding: 12px 16px; border-bottom: 1px solid var(--border); +} +.cmd-input-wrap svg { color: var(--text-3); flex-shrink: 0; } +.cmd-input-wrap input { + flex: 1; background: none; border: none; color: var(--text); + font-size: 15px; font-family: var(--font); outline: none; +} +.cmd-input-wrap input::placeholder { color: var(--text-3); } +.cmd-kbd { + font-size: 10px; font-family: var(--mono); color: var(--text-3); + background: var(--bg); border: 1px solid var(--border); + border-radius: 4px; padding: 2px 6px; flex-shrink: 0; +} + +.cmd-results { + max-height: 320px; overflow-y: auto; + padding: 4px; +} + +.cmd-item { + display: flex; align-items: center; gap: 10px; + padding: 8px 12px; border-radius: var(--radius); + cursor: pointer; font-size: 13px; color: var(--text-2); + transition: background 60ms ease, color 60ms ease; +} +.cmd-item:hover, .cmd-item.active { + background: var(--accent-dim); color: var(--text); +} +.cmd-item svg { flex-shrink: 0; color: var(--text-3); } +.cmd-item.active svg { color: var(--accent); } +.cmd-item-label { flex: 1; } +.cmd-item-hint { + font-size: 11px; color: var(--text-3); flex-shrink: 0; +} +.cmd-item.active .cmd-item-hint { color: var(--accent); } +.cmd-group-label { + font-size: 10px; font-weight: 600; color: var(--text-3); + padding: 8px 12px 4px; text-transform: uppercase; letter-spacing: 0.5px; +} + +.cmd-footer { + display: flex; align-items: center; gap: 16px; + padding: 8px 16px; border-top: 1px solid var(--border); + font-size: 11px; color: var(--text-3); +} +.cmd-footer kbd { + font-size: 10px; font-family: var(--mono); + background: var(--bg); border: 1px solid var(--border); + border-radius: 3px; padding: 1px 4px; +} + +/* ── PWA Install Banner ──────────────────── */ + +.pwa-install-banner { + position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); + background: var(--bg-raised); border: 1px solid var(--border-light); + border-radius: var(--radius-lg); padding: 10px 16px; + display: flex; align-items: center; gap: 12px; + box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 3000; + font-size: 13px; color: var(--text-2); + animation: pwa-banner-in 0.3s ease; + max-width: 90vw; +} +@keyframes pwa-banner-in { from { opacity: 0; transform: translateX(-50%) translateY(20px); } } + /* ── Responsive ──────────────────────────── */ .mobile-menu-btn { diff --git a/src/index.html b/src/index.html index 8000938..6929978 100644 --- a/src/index.html +++ b/src/index.html @@ -11,6 +11,10 @@ + + + + @@ -56,6 +60,11 @@ +
@@ -546,6 +555,23 @@ + + + @@ -557,5 +583,51 @@ +