- Decomposed
file_comparison_view.dartfrom 3,819 lines to ~2,946 lines (23% reduction) by extracting:DiffListItemwidget (lib/presentation/widgets/diff/diff_list_item.dart)ExportService(lib/core/services/export_service.dart)FilePickerDropZonewidget (lib/presentation/widgets/file_picker_drop_zone.dart)PlatformTaskbarService(lib/core/services/platform_taskbar_service.dart) — Windows taskbar is now behind a clean abstraction
- Moved history recording logic from the presentation layer into
ComparisonBlocwhere it belongs - Split
SettingsBloc(1,772 lines, 104 events) into three focused sub-BLoCs:AppearanceBloc— theme mode, accent color, diff colors, fontsAiServicesBloc— API keys, model selection, AI temperature, translation memoryFileHandlingBloc— encoding, CSV delimiter, BOM, backup, export format
- Declared previously-transitive dependencies (
path_provider,provider) explicitly inpubspec.yaml - Removed unused
macos_uidependency - Extracted
_computeColorPalette()to consolidate duplicated HSL color computation across 4 theme factories - Moved
GitBlocmutable fields (_cachedBranches,_cachedCommits, etc.) into Freezed state
- Added
extends Equatablewith properpropsto 6 event base classes:ComparisonEvent,GitEvent,HistoryEvent,ProgressEvent,TranslationEvent,FileWatcherEvent - Fixed
context.watch<SettingsBloc>()calls inside non-build helper methods — state is now read once at the top ofbuild()and passed as parameters - Added
buildWhenpredicate toBlocBuilder<SettingsBloc>inuser_onboarding_checklist.dart - Removed dead code: duplicate
if (projectSettings?.defaultAiModel != null)block insettings_state.dart
- Added
Semantics(button: true, label: ...)to InkWell-based interactive elements (theme toggle, animated preview entries) - Converted
_ActionIconButtonfrom InkWell+Tooltip to properIconButtonthroughout the diff table - Added
tooltip:labels to 13 icon-only buttons (pagination controls, close buttons, clear search, back, delete glossary, toggle AI params) - Added non-color diff status indicators ("+", "-", "~", "=") to diff list items and diff table rows — satisfies WCAG SC 1.4.1
- Raised default accent color from
0xFF7B61FFto0xFF9B8FFFfor better contrast on dark backgrounds (~4.6:1 ratio) - Fixed blank
tooltip: ''on "More actions" PopupMenuButton - Added
label:parameter to AI temperatureSlider - Wrapped color swatches in
Semantics(label: 'Color swatch: #RRGGBB')in appearance settings - Added colorblind-friendly diff color preset (blue/orange/teal) to the first-run wizard
- Removed
semanticsEnabled: falsefrom 8 test cases
- Raised test coverage from ~12% toward meaningful coverage of all critical paths
- 259 tests passing, 0 failures, 0 skipped (previously 182 passing, 3 failing, 7 skipped)
- New test files:
test/helpers/mocks.dart— shared mock library used across all test filestest/business_logic/blocs/comparison_bloc_test.dart(10 tests)test/business_logic/blocs/translation_bloc_test.dart(6 tests)test/business_logic/blocs/git_bloc_test.dart(7 tests)test/data/parsers/arb_parser_test.dart(7 tests)test/data/parsers/csv_parser_test.dart(9 tests)test/data/parsers/properties_parser_test.dart(7 tests)test/data/parsers/resx_parser_test.dart(7 tests)
- Fixed
settings_bloc_test.darttiming issues (replacedFuture.delayed+skip:withwait:andseed:) - Fixed and un-skipped
ComparisonResultDialogtest andComparisonSettingsCardtest group - Replaced
expect(true, isTrue)placeholder inwidget_test.dartwith real tests
- Replaced 57 deprecated
.withOpacity(X)calls with.withValues(alpha: X)across 6 files