perf: Phase 1 critical performance fixes + production macOS build
Performance: - Move JSON parsing to background isolate via Isolate.run() (eliminates 2-4s UI freeze) - Cache filteredEntries with key-based invalidation (eliminates O(n) recomputation) - Debounce search queries at 300ms (prevents cascade rebuilds on keystroke) - Flatten timeline from 2-level turn×response Column to single virtualized ListView.builder - Add RepaintBoundary per timeline item (isolates repaints during scroll) - Use context.select for granular rebuilds instead of top-level context.watch - Lazy ExpandableCard: child not built until first expand (replaces AnimatedCrossFade) - Use IndexedStack in AppShell (preserves screen state across tab switches) Fixes: - Collect parse errors instead of silently swallowing them - Show parse error count in timeline filter bar - Fix overflow in tokens screen pie chart legend Build: - Configure Developer ID signing with hardened runtime for production distribution - Enable secure timestamps for notarization - Update app name to Claude Session Viewer - Signed, notarized, stapled DMG distribution
This commit is contained in:
@@ -39,24 +39,18 @@ class _AppShellState extends State<AppShell> {
|
||||
hasSession: hasSession,
|
||||
),
|
||||
Expanded(
|
||||
child: _buildScreen(),
|
||||
child: IndexedStack(
|
||||
index: _screen.index,
|
||||
children: [
|
||||
HomeScreen(onSessionLoaded: _onSessionLoaded),
|
||||
const TimelineScreen(),
|
||||
const AgentsScreen(),
|
||||
const ToolbeltScreen(),
|
||||
const TokensScreen(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildScreen() {
|
||||
switch (_screen) {
|
||||
case SidebarScreen.home:
|
||||
return HomeScreen(onSessionLoaded: _onSessionLoaded);
|
||||
case SidebarScreen.timeline:
|
||||
return const TimelineScreen();
|
||||
case SidebarScreen.agents:
|
||||
return const AgentsScreen();
|
||||
case SidebarScreen.toolbelt:
|
||||
return const ToolbeltScreen();
|
||||
case SidebarScreen.tokens:
|
||||
return const TokensScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user