fix(shopinbit): show car research invoice errors as a dialog
What changed, and why it matters
This commit changes how invoice creation errors are shown to users in a car-research shopping feature. Instead of a brief floating warning bar, the app now displays a proper dialog box with the error message. This is a user-experience improvement, not a security fix, and it does not change how errors are handled or logged.
No security action required. Treat as a normal UI improvement during routine review.
Security signals we found
No security-relevant code paths changed
No input validation, authentication, cryptography, or network logic modified
Error messages are surfaced to the user more visibly, which may reduce support burden but does not alter confidentiality/integrity/availability
Commit title and message describe a UI/UX fix only
Evidence from the diff
The patch replaces two calls to showFloatingFlushBar(..., type: FlushBarType.warning, ...) with showDialog<void>(... builder: StackOkDialog(...)) in shopinbit_car_fee_view.dart. One instance handles a failed GraphQL response (resp.exception), the other handles a caught exception. The TODO comments asking for error dialogs were removed. No logic for creating invoices, validating inputs, or handling secrets was modified.
Changed components
lib/pages/shopinbit/shopinbit_car_fee_view.dartInspect captured patch +16 / −11
diff --git a/lib/pages/shopinbit/shopinbit_car_fee_view.dart b/lib/pages/shopinbit/shopinbit_car_fee_view.dart
index 3f2f48d..8b4b280 100644
--- a/lib/pages/shopinbit/shopinbit_car_fee_view.dart
+++ b/lib/pages/shopinbit/shopinbit_car_fee_view.dart
@@ -25,6 +25,7 @@ import '../../widgets/desktop/primary_button.dart';
import '../../widgets/dialogs/nested_navigator_dialog/nested_navigator_dialog.dart';
import '../../widgets/dialogs/s_dialog.dart';
import '../../widgets/rounded_white_container.dart';
+import '../../widgets/stack_dialog.dart';
import '../../widgets/textfields/adaptive_text_field.dart';
import '../more_view/services_view.dart';
import 'shopinbit_car_research_payment_view.dart';
@@ -259,15 +260,17 @@ class _ShopInBitCarFeeViewState extends ConsumerState<ShopInBitCarFeeView> {
error: resp.exception,
stackTrace: StackTrace.current,
);
- // TODO: show error dialogs so users can easily see what happened and share with support without digging through logs
if (mounted) {
setState(() => _submitting = false);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
- message: resp.exception?.message ?? "Failed to create invoice",
- context: context,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to create invoice",
+ maxWidth: Util.isDesktop ? 500 : null,
+ message: resp.exception?.message,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
@@ -302,14 +305,16 @@ class _ShopInBitCarFeeViewState extends ConsumerState<ShopInBitCarFeeView> {
);
} catch (e, s) {
Logging.instance.e("Create invoice failed", error: e, stackTrace: s);
- // TODO: show error dialogs so users can easily see what happened and share with support without digging through logs
if (mounted) {
setState(() => _submitting = false);
- unawaited(
- showFloatingFlushBar(
- type: FlushBarType.warning,
+ await showDialog<void>(
+ context: context,
+ useRootNavigator: Util.isDesktop,
+ builder: (context) => StackOkDialog(
+ title: "Failed to create invoice",
+ maxWidth: Util.isDesktop ? 500 : null,
message: e.toString(),
- context: context,
+ desktopPopRootNavigator: Util.isDesktop,
),
);
}
Why this scored 17/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.