- Created lib/core/semantics/ with semantic ID constants and helper widget
- Enabled SemanticsBinding on web builds for accessibility tree exposure
- Added semantic IDs to:
- ProfileDropdown (button, settings, theme options, logout)
- TopHeaderBar room tabs (frontHall, controlRoom, security, parlor)
- NavPanel items (nav_item_{id})
This enables browser automation tools like Puppeteer and WebDriver to
discover and interact with Flutter widgets via the accessibility tree.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Dart
38 lines
1.2 KiB
Dart
import 'dart:developer' as developer;
|
|
|
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/rendering.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'app.dart';
|
|
import 'core/auth/auth_controller.dart';
|
|
import 'core/config/url_strategy.dart';
|
|
import 'version.g.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
// Enable semantics tree on web for accessibility and automation tools.
|
|
// This exposes widget identifiers to browser automation (Puppeteer, etc.)
|
|
if (kIsWeb) {
|
|
SemanticsBinding.instance.ensureSemantics();
|
|
}
|
|
|
|
// Use path-based URLs on web (no-op on mobile/desktop)
|
|
configureUrlStrategy();
|
|
|
|
debugPrint('🪣 ${AppVersion.name} v${AppVersion.fullVersion}');
|
|
|
|
// Initialize auth before starting the app.
|
|
// This handles OIDC callback and silent auth on web.
|
|
// If it returns false, we're redirecting and shouldn't continue.
|
|
final authReady = await AuthController.initialize();
|
|
if (!authReady) {
|
|
developer.log('Auth redirecting, not starting app', name: 'tatlock_ui');
|
|
return; // Don't run the app - browser is redirecting
|
|
}
|
|
|
|
runApp(const ProviderScope(child: TatlockApp()));
|
|
}
|