feat: implement error event detail view for all events panel and upda… - #15
Conversation
…te selection styling
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds an ChangesError Detail Presentation (all_events)
Copy Button and Error Inspector Panel Updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a dedicated ErrorDetail view for error events in the all_events side panel, complete with platform and severity badges, copy buttons, and improved selection styling in the error list. Feedback focuses on internationalizing hardcoded strings, adding a missing metadata section to the new error detail panel, and ensuring that screenshot generation logic is updated to support the new error event type instead of falling back to a generic layout.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| _DetailRow('Platform', entry.platform.name), | ||
| _DetailRow('Severity', entry.severity.name), | ||
| _DetailRow('Source', entry.source ?? 'unknown'), | ||
| _DetailRow('Device ID', entry.deviceId), | ||
| if (entry.deviceInfo != null) | ||
| _DetailRow('Device Info', entry.deviceInfo!), |
There was a problem hiding this comment.
Improve user-facing details by using localized labels and properly formatted values (e.g., uppercase severity and platformLabel for platforms). Additionally, include the missing metadata section to match the ErrorDetailPanel functionality.
_DetailRow(S.of(context).platform, platformLabel(entry.platform)),
_DetailRow(S.of(context).severity, entry.severity.name.toUpperCase()),
_DetailRow(S.of(context).source, entry.source ?? 'unknown'),
_DetailRow(S.of(context).deviceId, entry.deviceId),
if (entry.deviceInfo != null)
_DetailRow(S.of(context).deviceInfo, entry.deviceInfo!),
if (entry.metadata != null && entry.metadata!.isNotEmpty) ...[
const SizedBox(height: 12),
Text(
'Metadata',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Colors.grey[500],
),
),
const SizedBox(height: 4),
Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: isDark ? Colors.black26 : Colors.grey.shade100,
borderRadius: BorderRadius.circular(8),
),
child: Text(
entry.metadata.toString(),
style: TextStyle(
fontFamily: AppConstants.monoFontFamily,
fontSize: 11,
color: isDark ? Colors.white70 : Colors.black87,
),
),
),
],| import '../../../../core/constants/app_constants.dart'; | ||
| import '../../../../core/utils/smooth_scroll_controller.dart'; | ||
| import '../../../../core/utils/toast_utils.dart'; | ||
| import '../../../../models/log/error_event.dart'; | ||
| import '../shared/copy_button.dart'; | ||
| import '../shared/error_block.dart'; | ||
| import 'platform_badge.dart'; | ||
| import 'severity_badge.dart'; |
There was a problem hiding this comment.
Import app_localizations.dart and error_tokens.dart to support internationalization and proper formatting of platform labels.
| import '../../../../core/constants/app_constants.dart'; | |
| import '../../../../core/utils/smooth_scroll_controller.dart'; | |
| import '../../../../core/utils/toast_utils.dart'; | |
| import '../../../../models/log/error_event.dart'; | |
| import '../shared/copy_button.dart'; | |
| import '../shared/error_block.dart'; | |
| import 'platform_badge.dart'; | |
| import 'severity_badge.dart'; | |
| import '../../../../core/constants/app_constants.dart'; | |
| import '../../../../core/utils/smooth_scroll_controller.dart'; | |
| import '../../../../core/utils/toast_utils.dart'; | |
| import '../../../../l10n/app_localizations.dart'; | |
| import '../../../../models/log/error_event.dart'; | |
| import '../shared/copy_button.dart'; | |
| import '../shared/error_block.dart'; | |
| import 'error_tokens.dart' show platformLabel; | |
| import 'platform_badge.dart'; | |
| import 'severity_badge.dart'; |
| Text( | ||
| 'Message', | ||
| style: TextStyle( | ||
| fontSize: 11, | ||
| fontWeight: FontWeight.w600, | ||
| color: Colors.grey[500], | ||
| ), | ||
| ), | ||
| const Spacer(), | ||
| CopyButton( | ||
| tooltip: 'Copy message', | ||
| onTap: () => _copyText(context, entry.message, 'Message'), | ||
| ), |
There was a problem hiding this comment.
Use localized strings from S.of(context) instead of hardcoded 'Message' to adhere to internationalization standards.
| Text( | |
| 'Message', | |
| style: TextStyle( | |
| fontSize: 11, | |
| fontWeight: FontWeight.w600, | |
| color: Colors.grey[500], | |
| ), | |
| ), | |
| const Spacer(), | |
| CopyButton( | |
| tooltip: 'Copy message', | |
| onTap: () => _copyText(context, entry.message, 'Message'), | |
| ), | |
| Text( | |
| S.of(context).message, | |
| style: TextStyle( | |
| fontSize: 11, | |
| fontWeight: FontWeight.w600, | |
| color: Colors.grey[500], | |
| ), | |
| ), | |
| const Spacer(), | |
| CopyButton( | |
| tooltip: 'Copy message', | |
| onTap: () => _copyText(context, entry.message, S.of(context).message), | |
| ), |
| Text( | ||
| 'Details', | ||
| style: TextStyle( | ||
| fontSize: 11, | ||
| fontWeight: FontWeight.w600, | ||
| color: Colors.grey[500], | ||
| ), | ||
| ), |
There was a problem hiding this comment.
Use localized strings from S.of(context) instead of hardcoded 'Details' to adhere to internationalization standards.
| Text( | |
| 'Details', | |
| style: TextStyle( | |
| fontSize: 11, | |
| fontWeight: FontWeight.w600, | |
| color: Colors.grey[500], | |
| ), | |
| ), | |
| Text( | |
| S.of(context).details, | |
| style: TextStyle( | |
| fontSize: 11, | |
| fontWeight: FontWeight.w600, | |
| color: Colors.grey[500], | |
| ), | |
| ), |
| case EventType.error: | ||
| if (widget.event.rawData is ErrorEvent) { | ||
| return ErrorDetail(entry: widget.event.rawData as ErrorEvent); | ||
| } | ||
| return FallbackDetail(event: widget.event); |
There was a problem hiding this comment.
While ErrorDetail is now correctly returned for the live UI, the screenshot generation logic in _buildScreenshotContent (which is outside this diff) still falls back to _fallbackScreenshot for EventType.error.
To ensure that screenshots of error events match the beautifully formatted live UI instead of rendering a generic fallback layout, please update _buildScreenshotContent to handle EventType.error by extracting the ErrorEvent and rendering a dedicated layout (similar to how it's done for log, network, state, and storage).
…te selection styling
Description
Related Issue
Type of Change
Testing
Screenshots (if applicable)
Summary by CodeRabbit
New Features
Bug Fixes