feat(guid): polish assistant homepage UX and agent switching (#1941)
* feat(guid): polish assistant homepage interactions and agent switcher * refactor(guid): replace green dot with agent logo in preset agent tag, add split-button agent switcher - Replace active dot with agent backend logo (Gemini, Claude, etc.) in PresetAgentTag - Add inner divider between agent logo and assistant avatar for visual clarity - Left area of tag triggers agent type switcher dropdown; right × always closes - Lift agent switcher logic from AssistantSelectionArea to GuidPage - Add border to PresetAgentTag for better theme/dark mode visibility - Add :root block to retroma-obsidian-book-2.css to satisfy preset CSS test requirements - Register retroma-obsidian-book-2 in cssThemePresets test expected list * fix(tests): add retroma-obsidian-book-2-1-dark to preset CSS test whitelist and add required :root block * feat(guid): expand/collapse assistant description inline, show details button only when expanded * feat(guid): reset agent selection and input state on new chat navigation When user clicks "New Chat" from the sidebar, navigate to /guid reuses the mounted GuidPage component so state was not cleared. Use location.key in a useEffect to reset selected agent, input, and description expanded state. * fix(tests): add retroma-nocturne-parchment to preset CSS test whitelist and add [data-theme=dark] block * feat(guid): show toast after manually switching preset agent type * feat(guid): refine homepage hero, sidebar, search modal, and settings UI - Restructure hero title row with back button, edit button, and agent type dropdown using unified BUILTIN_AGENT_OPTIONS and useAssistantBackends - Add inline description expand/collapse with overflow detection - Add agent logo icons to all agent type selectors across homepage and settings - Add Down chevron indicators to model/agent selector buttons - Implement collapsed sidebar layout with centered icon-only buttons - Reduce expanded sidebar element sizes for better proportion - Replace workspace collapse chevron with folder open/close icons - Compact search modal input (52px → 38px) with rounded corners - Add hover-based expand/collapse to SkillsMarketBanner - Move custom model hint from add-model modal to model list header - Remove agent tab content default padding, unify form item spacing - Route AgentPillBar + to settings/agent?tab=remote * style: auto-format theme preset CSS files * fix(guid): use i18n name for assistant hero title * fix(i18n): remove duplicate shortTitle keys in conversation locale files * fix(tests): update AgentPillBar test for remote agent tab navigation * fix(guid): address review issues from PR #1941 - Add try/catch to handlePresetAgentTypeSwitch with Message.error toast on failure - Fix currentPresetAgentType to use selectedAssistantRecord (handles builtin- prefix) - Extract modal tree into const to eliminate ~90-line JSX duplication Review follow-up for #1941 --------- Co-authored-by: Waili(瓦砾) <icey.liu1994@gmail.com> Co-authored-by: zynx <>
V
vishergreat committed
e92d6d09d3d4bc931701400e2772b5cb3179fc1b
Parent: 536e1af
Committed by GitHub <noreply@github.com>
on 3/31/2026, 3:35:07 PM