Profile System
The dashboard supports multiple data sources, each representing a different profile.Profile Interface
Fromsrc/components/dashboard.tsx:23:
- id: Unique identifier for the profile
- name: Display name shown in the UI
- data: Complete analytics data for that profile
Dashboard Props
The dashboard accepts profile-related props:Profile Switcher
A dropdown selector in the header allows switching between profiles.Display Condition
The switcher only appears when multiple profiles exist:Implementation
Fromsrc/components/dashboard.tsx:119:
- 180px width for adequate label space
- Dropdown with all available profiles
- Controlled component (value managed by parent)
- Calls
onSwitchProfilecallback on selection
Add Profile Button
A button allows adding new profiles to track.Display Condition
The button appears when:onAddProfilecallback is provided- At least one profile exists
- Dark background with subtle border
- Small text (xs)
- Hover effects for better UX
- Plus icon prefix
Dashboard Data Structure
Each profile contains a completeDashboardData object (src/lib/types.ts:95):
- stats: Aggregated statistics and charts data
- sessions: All session metadata
- history: Complete prompt history
- memories: Project-specific memory files
- account: User/organization identifiers
- exportedAt: Timestamp of data export
Use Cases
Personal vs. Work
Track separate profiles for:- Personal coding projects
- Work/enterprise account
- Side projects or consulting work
- Which environment you’re more active in
- Different tool usage patterns
- Model preferences across contexts
Team Comparison
If you have access to exported data from teammates:- Load multiple team member profiles
- Compare coding patterns
- Identify best practices
- Understand tool adoption
Before/After Analysis
Create profiles for:- Different time periods
- Before and after learning new tools
- A/B testing prompt strategies
Multi-Organization
For consultants or multi-org developers:- Track activity per client
- Compare project complexity
- Analyze time distribution
Profile Management
Profile management is handled by the parent component (not shown in source files).Switching Profiles
WhenonSwitchProfile is called:
- Parent updates
activeProfileId - Parent passes new
dataprop - Dashboard re-renders with new profile’s data
- All components update automatically
Adding Profiles
TheonAddProfile callback typically:
- Opens a file picker or input dialog
- Loads data from selected source
- Adds to profiles array
- Switches to new profile
Header Layout
The profile switcher appears alongside other controls:- Horizontal flex layout
- 12px gap between elements
- Right-aligned in header
- Responsive on mobile
Account Information
Profiles can include account metadata for identification.Account Info Structure
Fromsrc/lib/types.ts:84:
- Distinguish between different accounts
- Track which app version generated data
- Organize profiles by organization
Account information is optional. Profiles can work without it, using just the profile name for identification.
Project Filtering Across Profiles
Project filtering works independently within each profile:- Project list updates to reflect new profile’s projects
- Selected project resets to “All Projects”
- Filtered data reflects new profile + project combination
Export and Import
While not implemented in the visible components, the data structure supports:Exporting
exportedAt timestamp indicates when data was exported, useful for:
- Version control
- Data freshness validation
- Historical analysis
Data Portability
The structuredDashboardData format enables:
- Saving snapshots of analytics
- Sharing anonymized data
- Backup and archival
- Cross-machine comparison
Performance Considerations
Multiple profiles are handled efficiently:Lazy Loading
Only the active profile’s data is rendered:- Other profiles remain in memory but not in DOM
- Switching is instant (no re-fetch needed)
- Component state is preserved per profile
Memory Management
For large numbers of profiles:- Consider loading profiles on-demand
- Cache only recently accessed profiles
- Provide profile unload functionality
Related Features
- Overview - All features work per-profile
- Session Explorer - Compare session patterns across profiles
- Activity Tracking - See activity differences between profiles
- Cost Tracking - Compare costs across different accounts