Skip to content

feat(nav): add Pro/Assistant mode switch with animated transition#158

Merged
GCWing merged 2 commits intomainfrom
gcwing/dev
Mar 15, 2026
Merged

feat(nav): add Pro/Assistant mode switch with animated transition#158
GCWing merged 2 commits intomainfrom
gcwing/dev

Conversation

@GCWing
Copy link
Owner

@GCWing GCWing commented Mar 15, 2026

Summary

Add a Pro/Assistant nav display mode toggle to the NavPanel, replacing the old mode dropdown with a full-width mode-switch card.

Changes

NavPanel

  • New NavDisplayMode state (pro/assistant) persisted to localStorage
  • Full-width mode-switch card with clip-path ripple animation (480ms)
  • Pro mode: split Code/Cowork create buttons
  • Assistant mode: single new-session button + My Agent footer entry
  • handleOpenProModeSession / handleOpenAssistantModeSession restore last session before creating new one
  • prefers-reduced-motion guard added

ChatInput

  • Moved ModelSelector after mode-selector block

WelcomePanel

  • Replaced CSS blink animation with hover-swap for panda frames

i18n (en-US + zh-CN)

  • Added nav.displayModes.{pro,assistant,switchToPro,switchToAssistant,proDesc,assistantDesc}
  • Added nav.actions.openMyAgent

GCWing added 2 commits March 15, 2026 15:01
Ensure workspace menu session creation uses the clicked workspace instead of the stale active workspace context, then activate that workspace so the new session opens in the expected scope.
- Add NavDisplayMode toggle (pro/assistant) persisted to localStorage
- Replace workspace-bot button with full-width mode-switch card showing
  label, description, and hover hint; supports clip-path ripple animation
- Pro mode shows split Code/Cowork create buttons; Assistant mode shows
  single new-session button plus My Agent footer entry
- Remove modeDropdown portal in favour of direct mode handlers
  (handleCreateCodeSession, handleCreateCoworkSession,
   handleCreateAssistantSession, handleToggleNavDisplayMode)
- Add handleOpenProModeSession / handleOpenAssistantModeSession that
  restore the last session for the target workspace before creating a new one
- Add nav sections fade/slide animation synced with button ripple
- Update NavPanel.scss: new mode-switch card styles, split-button variants,
  assistant-footer/entry styles, keyframe animations with reduced-motion guard
- ChatInput: move ModelSelector after mode-selector block
- WelcomePanel: replace CSS blink animation with hover-swap for panda frames
- Update panda_1/2/full_1/full_2 image assets
- Add i18n keys: nav.displayModes.{pro,assistant,switchToPro,switchToAssistant,
  proDesc,assistantDesc}, nav.actions.openMyAgent (en-US, zh-CN)
- Import compareSessionsForDisplay for session ordering in nav handlers

Generated with BitFun

Co-Authored-By: BitFun
@GCWing GCWing merged commit 117eda9 into main Mar 15, 2026
1 check passed
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.

1 participant