Skip to content

fix(chat): ID-based grouped session dropdown + UI alignment, scroll, multi-agent nav#503

Merged
shanselman merged 2 commits into
openclaw:masterfrom
christineyan4:christiney/session-dropdown-fix
May 22, 2026
Merged

fix(chat): ID-based grouped session dropdown + UI alignment, scroll, multi-agent nav#503
shanselman merged 2 commits into
openclaw:masterfrom
christineyan4:christiney/session-dropdown-fix

Conversation

@christineyan4
Copy link
Copy Markdown
Contributor

Summary

UI polish and multi-agent fixes for the companion app chat surface.

Changes

  • Chat state caching — Persist last-known thread title, model, and available models so the UI shows meaningful labels while reconnecting instead of generic placeholders
  • Session dropdown ordering — Sort 'main' agent first, then alphabetical
  • Assistant bubble alignment — Continuation messages now align with the first message's bubble (invisible 36px spacer in avatar column)
  • User message clipping — Increased right margin (8→20px) to prevent bubbles hiding behind the scrollbar overlay
  • Tool expand scroll fix — Expanding/collapsing tool call cards no longer auto-scrolls to the bottom; cards unfurl in place
  • Dropdown padding — Reduced agent header top padding for symmetrical whitespace; adjusted single-group left padding
  • Workspace file caching — Per-agent Dictionary cache with thread-safe locking so switching agents doesn't re-fetch from gateway
  • Agent nav fix — Apply cached AgentsList on HubWindow bind so agents that arrive before the window opens are visible
  • Gateway service — Request agents list on connect; extract agentId from agents.files.list response

Testing

  • All 1191 existing tests pass
  • Manual verification of all UI changes
  • Two rounds of adversarial code review — fixed timer disposal, thread-safety, empty-key guard, and auto-scroll regression

Christine Yan and others added 2 commits May 21, 2026 18:37
Replace title-based session dropdown with ID-based selection to fix
sessions with identical DisplayNames being collapsed by .Distinct().

- Remove .Distinct() on channel titles that silently dropped sessions
- Group sessions by agent (main/assistant) with disabled header items
- Build ComboBox directly with ComboBoxItem objects for grouped layout
- InlinePill flyout also shows grouped channel sections
- Add BuildSessionTitle() for human-readable disambiguation
- Exclude cron sessions from dropdown via :cron: key filter

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Cache last-known chat state (title/model) for pre-connection UI
- Sort 'main' agent first in session dropdown
- Fix assistant bubble alignment for continuation messages (invisible spacer)
- Fix user message clipping behind scrollbar (right margin 8→20px)
- Suppress auto-scroll when expanding/collapsing tool call cards
- Reduce dropdown header whitespace for symmetry
- Per-agent workspace file cache to avoid re-fetching on tab switch
- Fix agents nav not showing agents that arrived before HubWindow opened
- Request agents list on connect in GatewayService
- Thread-safe agent files cache with lock

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@christineyan4 christineyan4 changed the title fix(chat): UI polish — caching, alignment, scroll, and multi-agent nav fix(chat): ID-based grouped session dropdown + UI alignment, scroll, multi-agent nav May 22, 2026
@shanselman shanselman merged commit 604e7e1 into openclaw:master May 22, 2026
25 checks passed
shanselman added a commit that referenced this pull request May 22, 2026
Includes PRs #498, #500, #501, #502, and #503.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants