fix: sync workspace chip immediately on chat switch + searchable sorted dropdown#1464
fix: sync workspace chip immediately on chat switch + searchable sorted dropdown#1464JKJameson wants to merge 1 commit intonesquena:masterfrom
Conversation
|
Thanks for the PR. The frontend pieces (search input, immediate
The repo already has a workspace reorder feature — This PR's change to return sorted(cleaned, key=lambda w: w.get('name', '').lower()) or [...]…re-sorts the list alphabetically on every load. Effect: as soon as the user reorders by dragging, their custom order survives until the next page load, then gets clobbered back to alphabetical. The reorder UI silently does nothing user-visible. The existing I think the right call is one of:
I'd suggest option (1) — strip the two Other notes:
Once the backend sort is removed and the i18n keys are added, this is good to merge. The dropdown UX win is real, just don't let it overwrite #492's reorder. |
|
Alphabetical order with search is an upgrade UX in my opinion, especially if you have hundreds of workspaces. |
90ce451 to
6a61ce8
Compare
|
Pushed. Changes...
|
|
Good follow-through, the revert + i18n additions + class refactor address the three blocking points cleanly. On the alphabetical-vs-manual question: dropping the backend sort and keeping it as a frontend dropdown convenience is the right call — drag-to-reorder (#492) keeps working, and 100+-workspace users get find-ability via the new search input regardless of order. Best of both worlds without a sort-mode toggle. Will let Nathan take final look on merge. |
UX review needed — need before/after screenshotsTagging Before merge we need: 1. Before/after screenshots in the PR body, on both:
2. Surfaces to capture:
3. UX maintainer review: Once screenshots land, our UX reviewer will look at them and confirm the dropdown behavior at the responsive breakpoints. Code looks reasonable on read-through; this is purely a visual-verification gate. Should be quick once images are up. |
|
cc @aronprins — flagging this for UX review once before/after screenshots are posted. Top-bar workspace chip + dropdown changes affecting both desktop and 390px mobile, see screenshot list above. |
|
Awaiting screenshots. |
…ace dropdown - sessions.js: call syncTopbar() immediately after S.session assignment in loadSession() so workspace chip label reflects the correct session workspace before async message-loading begins - panels.js: rewrite renderWorkspaceDropdownInto() to sort workspaces alphabetically by name (localeCompare) and add a search input that filters by name or path in real-time; clear button resets filter; 'No workspaces found' shown when search matches nothing; pre-create noResults element before filterWs to avoid ref-before-set - style.css: add .ws-search-row/.ws-search-input/.ws-search-clear/ .ws-list-container/.ws-no-results styles matching the model dropdown; list scrolling now uses a .ws-list-container class instead of inline style for theme consistency - i18n.js: add ws_search_placeholder and ws_no_results keys to all nine locales (en, ja, ru, es, de, zh, zh-Hant, pt-BR, ko) NOTE: backend load_workspaces() alphabetical sort was reverted after review -- it clobbers the drag-to-reorder feature (nesquena#492). Frontend dropdown sort is preserved.
6a61ce8 to
e04b2d2
Compare
Code-quality review (assuming UX approval clears) ❌ blocker foundThanks for posting the screenshot, @JKJameson. Stepping through the diff line-by-line + comparing to what the screenshot shows, I found one inverted boolean that's currently shipping the bug live in your screenshot, plus a couple of smaller polish items. Detail below. 🔴 Blocker —
|
…sorbed CHANGELOG, ROADMAP, TESTING bumped (3936 \u2192 3946). 8 constituent PRs: - nesquena#1523 (@franksong2702) branch indicator codepoint fix - nesquena#1519 (@franksong2702) onboarding API-key focus loss fix - nesquena#1518 (@franksong2702) voice-mode toggle-off recognizer stop - nesquena#1516 (@franksong2702) YAML newline CSS rules - nesquena#1517 (@franksong2702) __CACHE_VERSION__ \u2192 __WEBUI_VERSION__ rename - nesquena#1532 (@ai-ag2026) state.db WebUI session recovery - nesquena#1525 (@ai-ag2026) stale stream state proactive cleanup - nesquena#1526 (@ai-ag2026) max_tokens forwarding + OpenRouter quota classifier Opus MUST-FIX absorbed: sw.js conflict-marker cleanup + regression guard. Opus SHOULD-FIX deferred to follow-up nesquena#1533 (race in _clear_stale_stream_state). 2 closed as duplicates: nesquena#1528 (identical to nesquena#1517), nesquena#1529 (superseded by nesquena#1516). 1 maintainer-review label: nesquena#1531 (Asunfly stowaway change in force-push). 5 stay on hold: nesquena#1418 nesquena#1464 nesquena#1404 nesquena#1353 nesquena#1311.
… — 4094→4111 tests - #1586 (Michaelyklam): login asset SW cache exemption - #1590 (Michaelyklam): hot-apply compact tool activity setting - #1591 (Michaelyklam): first-turn sidebar visibility (optimistic upserts) - #1592 (Michaelyklam): turn duration display (Done in 1m 12s) + Opus follow-up (truthy-check on _pending_started_at) - #1464 (JKJameson, maintainer-augmented): workspace dropdown sort+search+chip-sync (rebased + ternary fix + regression test) Maintainer-side test fixes in stage: - tests/test_465_session_branching.py: widen compact() search window 1500→3000 - tests/test_regressions.py: anchor on api('/api/chat/start' instead of comment line Browser API sanity: 11/11 passed. Live UX verification: vision-confirmed dropdown sort+search+empty-state on test server. Opus advisor: SHIP AS-IS.
|
Shipped in v0.50.290 via release PR #1593 (merged commit Thanks @JKJameson! The workspace dropdown design — search filter + alphabetical sort + immediate chip sync on chat switch — landed clean with one maintainer-side adjustment (the noResults ternary inversion) plus a regression test to lock the visibility relationship as mirror-image opt/noResults ternaries. A few notes from the merge process:
GitHub didn't auto-close this PR because the rebase changed the merge commit's parent — Genuinely great primary work on this — the search input was the right shape (no debounce needed at the workspace count scale, dataset-attribute-based filtering is fast enough, class-based CSS instead of inline styles, full 9-locale i18n parity). The dropdown's a real upgrade for users with 50+ workspaces. Thanks for the persistence through the review cycle. |
…c by @JKJameson (maintainer-augmented: ternary fix + regression test)

Fixes the workspace display lagging behind after switching chats, and adds alphabetical sort + search to the workspace dropdown.