Show sessions as parent/child threads with expand/collapse and improved agent row styling. Keep a 5-session cache to avoid refetching messages when switching between recently visited sessions.
- Removed box-shadow from active permission items to eliminate double-border effect
- Added CSS rule to remove borders from nested ToolCall components within permission items
- Ensures consistent single-border styling aligned with existing design system
Implements a unified permission notification UI that adapts to different runtime
environments (Electron desktop vs web browser) with distinct visual presentations.
## What Changed
### New Components
- `permission-notification-banner.tsx`: Adaptive notification component
* Electron (desktop): Full banner with "⚠️ Approval Required" text and count badge
* Web browser (portrait): Circular indicator badge showing pending count
- `permission-approval-modal.tsx`: Interactive modal for reviewing/approving permissions
* Displays permission type, detailed message, and diff viewer for file changes
* Keyboard shortcuts: Enter (allow once), A (always), D (deny), Esc (close)
* Queue management with "X of Y" counter for multiple pending permissions
- `permission-notification.css`: Comprehensive styling with pulsing animations
### Integration
- Updated `instance-shell2.tsx`:
* Added banner to desktop center toolbar (next to Command Palette)
* Added banner to mobile/phone layout center section
* Added modal component for permission approval workflow
- Updated `controls.css`: Imported new permission notification styles
## Why This Change
**Before**: Permission requests had no visual indicator in the UI, making it
difficult for users to know when agent/subagent actions required approval.
**After**: Users receive clear, persistent visual notifications with:
- Pulsing animation to draw attention
- Environment-appropriate UI (full banner on desktop, compact badge on web)
- Click-to-review workflow with full permission details
## Benefits
1. **Better UX**: Users immediately see when permissions need approval
2. **Responsive Design**: Adapts to desktop (Electron) and web browser contexts
3. **Accessible**: Proper ARIA labels, keyboard shortcuts, and focus management
4. **Queue Management**: Handles multiple pending permissions gracefully
5. **Contextual Information**: Shows diffs for file changes, permission types, etc.
## Impact
- **No Breaking Changes**: Purely additive feature
- **Build**: ✅ Verified successful build
- **Testing**: ✅ Tested in Electron app and web browser
- Add clipboard utility with fallback for non-secure contexts
- Implement modern Clipboard API with document.execCommand fallback
- Update copy buttons in code blocks, markdown, messages, and session list
- Add proper error handling and user feedback for copy operations
Fixes issue where copy buttons did not work in web browsers served over HTTP or without Clipboard API support