You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: fix Web UI re-rendering and scroll position loss
**Problem**:
- SSE events triggered full page re-renders, causing scroll position loss
- All server cards were destroyed and recreated on any data update
- Similar issues across Servers, Secrets, Tool Calls, and Repositories views
- Jarring UX with flickering and jumping content
**Solution**:
1. **Smart Data Merging in Servers Store**:
- Implemented `mergeServers()` function to update server objects in-place
- Preserves object references to prevent unnecessary component re-renders
- Added silent background refresh mode to avoid loading states during SSE updates
- Uses Object.assign for efficient property updates
2. **Vue Best Practices**:
- Added `TransitionGroup` components for smooth list animations
- Implemented `v-memo` directive on ServerCard to skip re-renders when props unchanged
- Used stable, unique keys for all list items (server.name, secret_ref.name, call.id)
- Background data updates no longer show loading spinners
3. **Smooth CSS Transitions**:
- Added enter/leave/move animations for all list components
- Fade and scale effects for adding/removing items
- Cubic bezier timing functions for smooth, professional animations
4. **Views Updated**:
- Servers.vue: TransitionGroup with v-memo optimization
- Secrets.vue: TransitionGroup for secrets and env vars
- ToolCalls.vue: Stable keys with preserved expanded state
- Repositories.vue: TransitionGroup for search results
**Benefits**:
- ✅ Scroll position maintained during SSE updates
- ✅ Individual cards update without full page re-render
- ✅ Smooth animations when servers added/removed
- ✅ Reduced flickering and jumping content
- ✅ Better performance with large server lists
- ✅ Improved overall UX
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments