feat(app): design system Arah + rebrand Ará → Arah#283
Conversation
- Tokens dark alinhados a design-tokens.css (#0a0e12, #141a21, links, erro) - Tipografia Inter (google_fonts) com escala 1.125 e peso visual reforçado - ArahBrandHeader e ArahScaffold (gradiente sutil, cards com borda) - Login, shell, onboarding e perfil com presença de marca Arah - Web manifest/index.html com cores e nome da marca - Mapa/onboarding sem cores hardcoded (territoryBoundary, locationPin) Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
📝 WalkthroughWalkthroughThe app is renamed from "Ará" to "Arah" with a new ChangesArah rebrand and design system overhaul
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
- Replace Scaffold with ArahScaffold across all feature screens - Add AppLocalizations for mapped UI strings - Use AppConstants.mapUserAgentPackage in map and onboarding screens - Regenerate l10n bindings for new keys Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
- Logo SVG oficial em ArahBrandHeader (flutter_svg) - StorageMigration: araponga_* → arah_* na inicialização - Chaves arah_* e user-agent com.arah.app - +50 strings l10n (features, ações comuns) - Teste de migração de território legado Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (15)
frontend/arah.app/pubspec.yaml (1)
7-7:⚠️ Potential issue | 🟠 MajorRaise the minimum Dart SDK version to match APIs already in use.
The declared constraint
sdk: '>=3.2.0 <4.0.0'allows toolchains that do not support APIs used throughout the codebase.Color.withValues()(used in 18+ locations) requires Flutter 3.27.0+ (Dart 3.4.0+), andWidgetStateProperty(used infrontend/arah.app/lib/core/theme/app_theme.dart) requires Flutter 3.22.0+ (Dart 3.1.0+). Update the minimum Dart SDK constraint to reflect the actual dependency, or replace these APIs with compatible alternatives.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/pubspec.yaml` at line 7, The minimum Dart SDK version constraint in pubspec.yaml is set to 3.2.0, but the codebase uses APIs that require higher versions: Color.withValues() (used in 18+ locations) requires Dart 3.4.0+, and WidgetStateProperty (used in app_theme.dart) requires Dart 3.1.0+. Update the sdk constraint line to specify a minimum version of 3.4.0 or higher to match the actual API requirements used throughout the codebase.frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart (1)
77-84:⚠️ Potential issue | 🟠 Major | ⚡ Quick winComplete l10n migration for all user-facing strings in this screen.
There are still hardcoded PT strings in success/error snackbars, load-failure fallback, and asset subtitle/action feedback, which causes mixed-language output outside PT locale. Please move these to
AppLocalizationskeys and replace inline literals.Also applies to: 110-113, 135-137, 170-181, 187-188
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart` around lines 77 - 84, The assets_screen.dart file contains hardcoded Portuguese strings in multiple locations that should be migrated to AppLocalizations for proper localization support. Replace all hardcoded PT strings in the showSuccessSnackBar and showErrorSnackBar calls (such as 'Asset criado.' and 'Erro ao criar asset.'), as well as the load-failure fallback text, asset subtitle, and action feedback messages (referenced at lines 110-113, 135-137, 170-181, and 187-188) with corresponding AppLocalizations keys. Ensure consistency by defining new l10n keys where needed and accessing them through the AppLocalizations instance available in the build context to maintain proper localization across all user-facing strings in this screen.frontend/arah.app/lib/features/alerts/presentation/screens/alerts_screen.dart (1)
65-98:⚠️ Potential issue | 🟠 Major | ⚡ Quick winLocalize remaining hardcoded Portuguese strings in dialog and error states.
This screen is only partially migrated: title/description field labels, success/error snackbars, and alert-permission helper text still bypass
AppLocalizations, so non-PT locales will render mixed-language UI. Please move these literals into ARB keys and consume vial10nconsistently in this file.Also applies to: 119-139
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/alerts/presentation/screens/alerts_screen.dart` around lines 65 - 98, The alert creation dialog and related error messages contain multiple hardcoded Portuguese strings that bypass the localization system, causing non-Portuguese locales to display mixed-language UI. Replace all hardcoded Portuguese literals in the alerts_screen.dart file with their localized equivalents accessed via l10n: this includes the 'Título' and 'Descrição' TextField labels, the 'Alerta criado.' success snackbar message, the 'Erro ao criar alerta.' error message, and any alert-permission helper text referenced in lines 119-139. Add corresponding string keys to the ARB localization files and consume them consistently through the l10n object, following the same pattern already used for l10n.reportAlert and l10n.cancel.frontend/arah.app/lib/features/feed/presentation/screens/create_post_screen.dart (1)
48-49:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocalize the remaining hardcoded strings in create-post flow.
Line 48 and Line 210 still contain hardcoded Portuguese copy. This screen otherwise uses
AppLocalizations, so these should be moved to localization keys to keep locale behavior consistent.Also applies to: 207-211
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/feed/presentation/screens/create_post_screen.dart` around lines 48 - 49, The create_post_screen.dart file contains hardcoded Portuguese strings in the showErrorSnackBar call around line 48 and additional hardcoded strings around lines 207-211, which are inconsistent with the rest of the screen that uses AppLocalizations. Replace these hardcoded Portuguese strings with localization key references using AppLocalizations in the same manner as other localized strings in this screen. Specifically, the error message about choosing a territory before publishing and any other hardcoded Portuguese copy in that area should be extracted to localization keys and referenced through AppLocalizations.of(context) calls to maintain consistent locale behavior throughout the create post flow.frontend/arah.app/lib/features/chat/presentation/screens/chat_list_screen.dart (1)
54-57:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocalization migration is incomplete in
ChatListScreen.There are still hardcoded Portuguese strings in the create-group dialog, tab labels, error fallback, and empty states (e.g., Line 55, Line 69, Line 78, Line 110, Line 151, Line 167). These should be moved to
AppLocalizationskeys to avoid mixed-language UI.Also applies to: 69-79, 109-112, 149-169
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/chat/presentation/screens/chat_list_screen.dart` around lines 54 - 57, The ChatListScreen contains multiple hardcoded Portuguese strings (such as 'Nome do grupo', 'Criar grupo', 'Cancelar', etc.) scattered across the create-group dialog, tab labels, error fallback messages, and empty states that need to be localized. Replace all hardcoded Portuguese strings in ChatListScreen with corresponding AppLocalizations keys using the appropriate localization getter calls (e.g., AppLocalizations.of(context).keyName). Ensure each hardcoded string has a matching localization key defined in the AppLocalizations configuration, covering the dialog labels (labelText, hintText), button labels, error messages, and empty state text throughout the file.frontend/arah.app/lib/features/chat/presentation/screens/chat_conversation_screen.dart (1)
39-42:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winComplete localization for remaining chat UI strings.
Line 41, Line 55, and Line 99 still use hardcoded Portuguese (
Erro ao enviar mensagem.,Conversa,Mensagem). This leaves the screen partially untranslated for non-PT locales.Also applies to: 54-55, 98-100
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/chat/presentation/screens/chat_conversation_screen.dart` around lines 39 - 42, Three hardcoded Portuguese strings remain untranslated in the chat_conversation_screen.dart file: the error message 'Erro ao enviar mensagem.' in the showErrorSnackBar call around line 41, and the strings 'Conversa' and 'Mensagem' in the other locations mentioned. Replace each of these hardcoded Portuguese strings with the appropriate localization function calls that are already being used elsewhere in your codebase, ensuring consistent translation support across all UI strings in this screen for non-Portuguese locales.frontend/arah.app/lib/features/feed/presentation/screens/feed_screen.dart (1)
53-54:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFinish localization in
FeedScreen(empty states + filter labels).Hardcoded Portuguese strings remain in the no-territory prompt, feed-empty prompt, and
_FeedTypeFilterBaroptions (Line 53, Line 320, Line 325, Line 420). These should useAppLocalizationsto avoid language fallback inconsistencies.Also applies to: 320-326, 419-423
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/feed/presentation/screens/feed_screen.dart` around lines 53 - 54, Replace all hardcoded Portuguese strings in the FeedScreen widget with localized strings using AppLocalizations to ensure consistent language support. Specifically, update the no-territory prompt text (the string starting with 'Escolha um território'), the feed-empty state prompts around line 320-326, and the filter options in the _FeedTypeFilterBar widget around line 419-423 to use AppLocalizations.of(context) instead of hardcoded Portuguese strings. Ensure all user-facing text strings use the localization service to avoid language fallback inconsistencies.frontend/arah.app/lib/features/connections/presentation/screens/connections_screen.dart (1)
47-55:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFinish localizing remaining user-facing text in Connections flow.
Hardcoded Portuguese is still present in snackbars, fallback errors, empty-state copy, search hints, and connection-status titles (for example Line 47, Line 75, Line 114, Line 215, Line 294). Since this screen already uses
AppLocalizations, these should be migrated too.Also applies to: 73-76, 114-115, 165-166, 188-189, 215-215, 242-243, 294-294
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/connections/presentation/screens/connections_screen.dart` around lines 47 - 55, Replace all hardcoded Portuguese text strings with localized strings from AppLocalizations throughout connections_screen.dart. Specifically, update the strings in showSuccessSnackBar and showErrorSnackBar calls (such as 'Solicitação enviada.' and 'Erro ao enviar solicitação.'), as well as empty-state copy, search hints, and connection-status titles referenced in the diff locations. Use AppLocalizations.of(context) to fetch the localized strings instead of hardcoding the Portuguese text. Ensure all new string keys are added to the localization resource files and that the pattern remains consistent with how AppLocalizations is already being used elsewhere in the screen.frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart (1)
242-253:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winLocalize the pin-title fallback text.
At Line 252, unnamed pins fall back to
'Pin', which bypasses localization in a localized screen. Usel10n.mapPin(or a dedicated localized key) for the fallback.Proposed patch
- Text( - pin.title.isNotEmpty ? pin.title : 'Pin', + Text( + pin.title.isNotEmpty ? pin.title : AppLocalizations.of(ctx)!.mapPin, style: Theme.of(ctx).textTheme.titleMedium, ),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart` around lines 242 - 253, In the _onPinTap method, the fallback text for unnamed pins uses a hardcoded string 'Pin' which bypasses the localization system. Replace this hardcoded string with a localized key from the l10n object (such as l10n.mapPin) to ensure the fallback text respects the app's localization settings. The ternary expression for pin.title should use the localized key instead of the hardcoded 'Pin' string.frontend/arah.app/lib/features/profile/presentation/screens/profile_screen.dart (1)
314-316:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse localization for the edit-profile save error fallback.
At Line 315,
'Erro ao salvar'is hardcoded. Replace it with anl10nkey to keep error messaging locale-consistent.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/profile/presentation/screens/profile_screen.dart` around lines 314 - 316, The hardcoded Portuguese error message 'Erro ao salvar' in the showErrorSnackBar call within the error handling block does not use localization, which breaks locale-consistency. Replace the hardcoded string 'Erro ao salvar' with an appropriate l10n key from your localization system (typically accessed through context or a localization provider) to ensure the error message respects the user's locale settings.frontend/arah.app/lib/features/onboarding/presentation/screens/onboarding_screen.dart (1)
505-509:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDistance subtitle is still hardcoded in Portuguese.
At Line 508,
km de distânciais emitted directly. This should be a localized formatter (e.g.,l10n.distanceKm(...)) to avoid mixed-language onboarding output.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/onboarding/presentation/screens/onboarding_screen.dart` around lines 505 - 509, The subtitle assignment in the onboarding screen contains a hardcoded Portuguese text string 'km de distância' which creates inconsistent localization. Replace the hardcoded distance string in the subtitle property (where t.distanceKm.toStringAsFixed(1) is used) with a localized formatter call from the l10n object that handles distance formatting according to the current locale. This ensures the distance display is properly translated and consistent with the rest of the onboarding output.frontend/arah.app/lib/features/subscriptions/presentation/screens/subscriptions_screen.dart (1)
41-51:⚠️ Potential issue | 🟠 Major | ⚡ Quick winSubscription action/error messages are still hardcoded.
User-visible strings remain hardcoded in main paths (for example: Line 50, Line 78, Line 84, Line 109, Line 114), so locale behavior is still inconsistent despite the l10n rollout.
Also applies to: 74-85, 107-115
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/subscriptions/presentation/screens/subscriptions_screen.dart` around lines 41 - 51, Remove hardcoded user-visible strings throughout the subscriptions_screen.dart file and replace them with localized strings from the l10n system. Specifically, replace the hardcoded error message 'Erro ao carregar planos.' and any other user-facing text strings (found in the error handling paths and other locations mentioned in the review) with appropriate localization references using the application's localization framework to ensure consistent locale behavior across the subscription screens.frontend/arah.app/lib/features/moderation/presentation/screens/moderation_screen.dart (1)
63-218:⚠️ Potential issue | 🟠 Major | ⚡ Quick winModeration screen localization is still partial.
There are still hardcoded strings in active UI paths (for example: tab labels at Line 66–68, error fallback at Line 108, action tooltips at Line 149/154/159/171/176, and action snackbar/error texts at Line 194/199/212/217).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/moderation/presentation/screens/moderation_screen.dart` around lines 63 - 218, The ModerationScreen has hardcoded strings throughout multiple methods that should be localized using AppLocalizations. Replace the hardcoded tab labels ('Fila', 'Casos', 'Evidências') in the TabBar, the error fallback message in _buildBody, all action tooltips in _buildActions ('Baixar evidência', 'Aprovar', 'Rejeitar'), and the snackbar messages in _decide and _downloadEvidence methods with localized strings from the l10n object that is already available in the context. Ensure all user-facing text uses the AppLocalizations instance consistently across the screen.frontend/arah.app/lib/features/marketplace/presentation/screens/marketplace_screen.dart (1)
61-310:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMarketplace localization rollout is incomplete.
Several user-visible strings are still hardcoded (for example: Line 67, Line 68, Line 134, Line 160, Line 259, Line 266, Line 309, plus multiple snackbar/error texts around Line 76–83, Line 182–188, Line 284–305). This leaves the screen mixed-language despite the l10n migration.
Suggested direction
- Tab(text: 'Buscar'), - Tab(text: 'Minha loja'), + Tab(text: l10n.search), + Tab(text: l10n.myStore), - hintText: 'Buscar itens', + hintText: l10n.searchItems, - : 'Erro ao buscar itens.', + : l10n.errorSearchingItems,Apply the same pattern to remaining hardcoded labels/snackbars in this file and add missing ARB keys where needed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/marketplace/presentation/screens/marketplace_screen.dart` around lines 61 - 310, The marketplace screen contains multiple hardcoded user-visible strings that bypass the localization system, creating an inconsistent mixed-language experience. Replace all hardcoded strings throughout the MarketplaceScreen, _SearchTab, _MyStoreTab, and _MyStoreTabState classes (such as the tab labels, search placeholders, error messages, snackbar notifications, button labels, and field labels) with corresponding l10n method calls. For each hardcoded string, either use an existing localization method like you already do with l10n.marketplace and l10n.noItemsFound, or add new message keys to the ARB localization file and create corresponding methods in the AppLocalizations class. Ensure consistency by following the same pattern already established in the file where localized strings are retrieved and used.frontend/arah.app/lib/features/membership/presentation/screens/membership_screen.dart (1)
62-157:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMembership screen still has non-localized user text in key paths.
Hardcoded strings remain in runtime UI/feedback (for example: Line 65, Line 114, Line 119, Line 132, Line 137, Line 142, Line 152), so locale switching will still surface Portuguese literals.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/lib/features/membership/presentation/screens/membership_screen.dart` around lines 62 - 157, The membership_screen.dart file contains multiple hardcoded Portuguese strings that are not using the localization system (l10n), preventing them from being translated when locale switches. Replace all hardcoded user-facing strings with appropriate localization calls: the default error message in the initial ListView when state.error is not null, the message passed to the becomeResident method, the success and error snackbar messages in the becomeResident callback, the error message when geoLocationStateProvider is null in the verifyByGeo callback, the success and error snackbar messages after verifyByGeo, and the text displayed in the else branch when isResident is true. Add the necessary localization keys to your l10n object and use them consistently throughout the file following the existing pattern already used with l10n.yourRole, l10n.tryAgain, and other localized strings.
🧹 Nitpick comments (1)
frontend/arah.app/test/core/storage/storage_migration_test.dart (1)
9-20: 💤 Low valueOptional: Consider testing edge cases to improve coverage.
The test validates the happy path effectively, but you may want to add supplementary cases:
- When the new key already exists (migration should skip copying)
- When the legacy key is absent (removal should still succeed)
- Idempotency: calling migration twice should be safe
These are not blockers for this PR but would strengthen test resilience against future refactors.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@frontend/arah.app/test/core/storage/storage_migration_test.dart` around lines 9 - 20, Add three additional test cases to the StorageMigration test suite to improve edge case coverage. Create a test that verifies when the new key (AppConstants.keySelectedTerritoryId) already exists, the migration skips copying and doesn't overwrite the existing value. Create another test that verifies when the legacy key ('araponga_selected_territory_id') is absent, the migration still succeeds and sets the migrated flag without errors. Finally, create a test that verifies idempotency by calling StorageMigration.migrateIfNeeded() twice and confirming the second call is safe and doesn't cause issues. These supplementary tests will strengthen resilience against future refactors of the StorageMigration logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/arah.app/lib/core/storage/storage_migration.dart`:
- Around line 26-38: The secure storage migration in the try-catch block (lines
26-38) silently catches all exceptions but the one-time completion flag at line
47 is still being set unconditionally, which prevents retry attempts on the next
launch if the migration fails. Move the flag-setting logic that marks the
migration as complete so it only executes when the migration succeeds in the try
block, not after the catch block. This ensures that if secure storage operations
fail, the flag remains unset and the migration will be retried on the next
application launch.
In `@frontend/arah.app/lib/core/theme/app_design_tokens.dart`:
- Around line 213-214: The appColors getter in the AppColorsExtension extension
always falls back to AppColors.dark when the extension is missing, which doesn't
respect the current brightness setting and can cause visual inconsistencies in
light-theme contexts. Modify the getter to check the current brightness using
Theme.of(this).brightness or MediaQuery.of(this).platformBrightness and return
AppColors.light for light brightness or AppColors.dark for dark brightness,
ensuring the fallback is brightness-aware.
In `@frontend/arah.app/README.md`:
- Line 3: The README intro sentence on line 3 uses the Portuguese term
`território-first` which violates the repository's glossary standard for
geographic terminology. Replace `território-first` with `territory-first` to
align with the coding guidelines that mandate using the English term `territory`
as the consistent keyword for geographic areas throughout all code and
documentation.
In `@frontend/arah.app/web/manifest.json`:
- Around line 6-7: The theme_color value in the manifest.json file is set to
"`#4DD4A8`" which conflicts with the dark theme color "`#0A0E12`" defined in
index.html and used for background_color in the same manifest file. This
inconsistency can cause browser and install UI tinting to be misaligned. Change
the theme_color property value from "`#4DD4A8`" to "`#0A0E12`" to align it with the
dark web theme token used consistently throughout the application.
---
Outside diff comments:
In
`@frontend/arah.app/lib/features/alerts/presentation/screens/alerts_screen.dart`:
- Around line 65-98: The alert creation dialog and related error messages
contain multiple hardcoded Portuguese strings that bypass the localization
system, causing non-Portuguese locales to display mixed-language UI. Replace all
hardcoded Portuguese literals in the alerts_screen.dart file with their
localized equivalents accessed via l10n: this includes the 'Título' and
'Descrição' TextField labels, the 'Alerta criado.' success snackbar message, the
'Erro ao criar alerta.' error message, and any alert-permission helper text
referenced in lines 119-139. Add corresponding string keys to the ARB
localization files and consume them consistently through the l10n object,
following the same pattern already used for l10n.reportAlert and l10n.cancel.
In
`@frontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dart`:
- Around line 77-84: The assets_screen.dart file contains hardcoded Portuguese
strings in multiple locations that should be migrated to AppLocalizations for
proper localization support. Replace all hardcoded PT strings in the
showSuccessSnackBar and showErrorSnackBar calls (such as 'Asset criado.' and
'Erro ao criar asset.'), as well as the load-failure fallback text, asset
subtitle, and action feedback messages (referenced at lines 110-113, 135-137,
170-181, and 187-188) with corresponding AppLocalizations keys. Ensure
consistency by defining new l10n keys where needed and accessing them through
the AppLocalizations instance available in the build context to maintain proper
localization across all user-facing strings in this screen.
In
`@frontend/arah.app/lib/features/chat/presentation/screens/chat_conversation_screen.dart`:
- Around line 39-42: Three hardcoded Portuguese strings remain untranslated in
the chat_conversation_screen.dart file: the error message 'Erro ao enviar
mensagem.' in the showErrorSnackBar call around line 41, and the strings
'Conversa' and 'Mensagem' in the other locations mentioned. Replace each of
these hardcoded Portuguese strings with the appropriate localization function
calls that are already being used elsewhere in your codebase, ensuring
consistent translation support across all UI strings in this screen for
non-Portuguese locales.
In
`@frontend/arah.app/lib/features/chat/presentation/screens/chat_list_screen.dart`:
- Around line 54-57: The ChatListScreen contains multiple hardcoded Portuguese
strings (such as 'Nome do grupo', 'Criar grupo', 'Cancelar', etc.) scattered
across the create-group dialog, tab labels, error fallback messages, and empty
states that need to be localized. Replace all hardcoded Portuguese strings in
ChatListScreen with corresponding AppLocalizations keys using the appropriate
localization getter calls (e.g., AppLocalizations.of(context).keyName). Ensure
each hardcoded string has a matching localization key defined in the
AppLocalizations configuration, covering the dialog labels (labelText,
hintText), button labels, error messages, and empty state text throughout the
file.
In
`@frontend/arah.app/lib/features/connections/presentation/screens/connections_screen.dart`:
- Around line 47-55: Replace all hardcoded Portuguese text strings with
localized strings from AppLocalizations throughout connections_screen.dart.
Specifically, update the strings in showSuccessSnackBar and showErrorSnackBar
calls (such as 'Solicitação enviada.' and 'Erro ao enviar solicitação.'), as
well as empty-state copy, search hints, and connection-status titles referenced
in the diff locations. Use AppLocalizations.of(context) to fetch the localized
strings instead of hardcoding the Portuguese text. Ensure all new string keys
are added to the localization resource files and that the pattern remains
consistent with how AppLocalizations is already being used elsewhere in the
screen.
In
`@frontend/arah.app/lib/features/feed/presentation/screens/create_post_screen.dart`:
- Around line 48-49: The create_post_screen.dart file contains hardcoded
Portuguese strings in the showErrorSnackBar call around line 48 and additional
hardcoded strings around lines 207-211, which are inconsistent with the rest of
the screen that uses AppLocalizations. Replace these hardcoded Portuguese
strings with localization key references using AppLocalizations in the same
manner as other localized strings in this screen. Specifically, the error
message about choosing a territory before publishing and any other hardcoded
Portuguese copy in that area should be extracted to localization keys and
referenced through AppLocalizations.of(context) calls to maintain consistent
locale behavior throughout the create post flow.
In `@frontend/arah.app/lib/features/feed/presentation/screens/feed_screen.dart`:
- Around line 53-54: Replace all hardcoded Portuguese strings in the FeedScreen
widget with localized strings using AppLocalizations to ensure consistent
language support. Specifically, update the no-territory prompt text (the string
starting with 'Escolha um território'), the feed-empty state prompts around line
320-326, and the filter options in the _FeedTypeFilterBar widget around line
419-423 to use AppLocalizations.of(context) instead of hardcoded Portuguese
strings. Ensure all user-facing text strings use the localization service to
avoid language fallback inconsistencies.
In `@frontend/arah.app/lib/features/map/presentation/screens/map_screen.dart`:
- Around line 242-253: In the _onPinTap method, the fallback text for unnamed
pins uses a hardcoded string 'Pin' which bypasses the localization system.
Replace this hardcoded string with a localized key from the l10n object (such as
l10n.mapPin) to ensure the fallback text respects the app's localization
settings. The ternary expression for pin.title should use the localized key
instead of the hardcoded 'Pin' string.
In
`@frontend/arah.app/lib/features/marketplace/presentation/screens/marketplace_screen.dart`:
- Around line 61-310: The marketplace screen contains multiple hardcoded
user-visible strings that bypass the localization system, creating an
inconsistent mixed-language experience. Replace all hardcoded strings throughout
the MarketplaceScreen, _SearchTab, _MyStoreTab, and _MyStoreTabState classes
(such as the tab labels, search placeholders, error messages, snackbar
notifications, button labels, and field labels) with corresponding l10n method
calls. For each hardcoded string, either use an existing localization method
like you already do with l10n.marketplace and l10n.noItemsFound, or add new
message keys to the ARB localization file and create corresponding methods in
the AppLocalizations class. Ensure consistency by following the same pattern
already established in the file where localized strings are retrieved and used.
In
`@frontend/arah.app/lib/features/membership/presentation/screens/membership_screen.dart`:
- Around line 62-157: The membership_screen.dart file contains multiple
hardcoded Portuguese strings that are not using the localization system (l10n),
preventing them from being translated when locale switches. Replace all
hardcoded user-facing strings with appropriate localization calls: the default
error message in the initial ListView when state.error is not null, the message
passed to the becomeResident method, the success and error snackbar messages in
the becomeResident callback, the error message when geoLocationStateProvider is
null in the verifyByGeo callback, the success and error snackbar messages after
verifyByGeo, and the text displayed in the else branch when isResident is true.
Add the necessary localization keys to your l10n object and use them
consistently throughout the file following the existing pattern already used
with l10n.yourRole, l10n.tryAgain, and other localized strings.
In
`@frontend/arah.app/lib/features/moderation/presentation/screens/moderation_screen.dart`:
- Around line 63-218: The ModerationScreen has hardcoded strings throughout
multiple methods that should be localized using AppLocalizations. Replace the
hardcoded tab labels ('Fila', 'Casos', 'Evidências') in the TabBar, the error
fallback message in _buildBody, all action tooltips in _buildActions ('Baixar
evidência', 'Aprovar', 'Rejeitar'), and the snackbar messages in _decide and
_downloadEvidence methods with localized strings from the l10n object that is
already available in the context. Ensure all user-facing text uses the
AppLocalizations instance consistently across the screen.
In
`@frontend/arah.app/lib/features/onboarding/presentation/screens/onboarding_screen.dart`:
- Around line 505-509: The subtitle assignment in the onboarding screen contains
a hardcoded Portuguese text string 'km de distância' which creates inconsistent
localization. Replace the hardcoded distance string in the subtitle property
(where t.distanceKm.toStringAsFixed(1) is used) with a localized formatter call
from the l10n object that handles distance formatting according to the current
locale. This ensures the distance display is properly translated and consistent
with the rest of the onboarding output.
In
`@frontend/arah.app/lib/features/profile/presentation/screens/profile_screen.dart`:
- Around line 314-316: The hardcoded Portuguese error message 'Erro ao salvar'
in the showErrorSnackBar call within the error handling block does not use
localization, which breaks locale-consistency. Replace the hardcoded string
'Erro ao salvar' with an appropriate l10n key from your localization system
(typically accessed through context or a localization provider) to ensure the
error message respects the user's locale settings.
In
`@frontend/arah.app/lib/features/subscriptions/presentation/screens/subscriptions_screen.dart`:
- Around line 41-51: Remove hardcoded user-visible strings throughout the
subscriptions_screen.dart file and replace them with localized strings from the
l10n system. Specifically, replace the hardcoded error message 'Erro ao carregar
planos.' and any other user-facing text strings (found in the error handling
paths and other locations mentioned in the review) with appropriate localization
references using the application's localization framework to ensure consistent
locale behavior across the subscription screens.
In `@frontend/arah.app/pubspec.yaml`:
- Line 7: The minimum Dart SDK version constraint in pubspec.yaml is set to
3.2.0, but the codebase uses APIs that require higher versions:
Color.withValues() (used in 18+ locations) requires Dart 3.4.0+, and
WidgetStateProperty (used in app_theme.dart) requires Dart 3.1.0+. Update the
sdk constraint line to specify a minimum version of 3.4.0 or higher to match the
actual API requirements used throughout the codebase.
---
Nitpick comments:
In `@frontend/arah.app/test/core/storage/storage_migration_test.dart`:
- Around line 9-20: Add three additional test cases to the StorageMigration test
suite to improve edge case coverage. Create a test that verifies when the new
key (AppConstants.keySelectedTerritoryId) already exists, the migration skips
copying and doesn't overwrite the existing value. Create another test that
verifies when the legacy key ('araponga_selected_territory_id') is absent, the
migration still succeeds and sets the migrated flag without errors. Finally,
create a test that verifies idempotency by calling
StorageMigration.migrateIfNeeded() twice and confirming the second call is safe
and doesn't cause issues. These supplementary tests will strengthen resilience
against future refactors of the StorageMigration logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8242241f-80ef-46ea-8e95-a9d3f49243c3
⛔ Files ignored due to path filters (1)
frontend/arah.app/assets/images/arah-icon.svgis excluded by!**/*.svg
📒 Files selected for processing (41)
frontend/arah.app/README.mdfrontend/arah.app/lib/app.dartfrontend/arah.app/lib/core/config/brand_config.dartfrontend/arah.app/lib/core/config/constants.dartfrontend/arah.app/lib/core/storage/storage_migration.dartfrontend/arah.app/lib/core/theme/app_design_tokens.dartfrontend/arah.app/lib/core/theme/app_theme.dartfrontend/arah.app/lib/core/widgets/arah_brand_header.dartfrontend/arah.app/lib/core/widgets/arah_scaffold.dartfrontend/arah.app/lib/features/alerts/presentation/screens/alerts_screen.dartfrontend/arah.app/lib/features/assets/presentation/screens/assets_screen.dartfrontend/arah.app/lib/features/auth/presentation/screens/login_screen.dartfrontend/arah.app/lib/features/chat/presentation/screens/chat_conversation_screen.dartfrontend/arah.app/lib/features/chat/presentation/screens/chat_list_screen.dartfrontend/arah.app/lib/features/connections/presentation/screens/connections_screen.dartfrontend/arah.app/lib/features/events/presentation/screens/events_screen.dartfrontend/arah.app/lib/features/explore/presentation/screens/explore_screen.dartfrontend/arah.app/lib/features/feed/presentation/screens/create_post_screen.dartfrontend/arah.app/lib/features/feed/presentation/screens/feed_screen.dartfrontend/arah.app/lib/features/feed/presentation/widgets/feed_post_card.dartfrontend/arah.app/lib/features/home/presentation/screens/main_shell_screen.dartfrontend/arah.app/lib/features/map/presentation/screens/map_screen.dartfrontend/arah.app/lib/features/marketplace/presentation/screens/marketplace_screen.dartfrontend/arah.app/lib/features/membership/presentation/screens/membership_screen.dartfrontend/arah.app/lib/features/moderation/presentation/screens/moderation_screen.dartfrontend/arah.app/lib/features/notifications/presentation/screens/notifications_screen.dartfrontend/arah.app/lib/features/onboarding/presentation/screens/onboarding_screen.dartfrontend/arah.app/lib/features/profile/presentation/screens/profile_screen.dartfrontend/arah.app/lib/features/subscriptions/presentation/screens/subscriptions_screen.dartfrontend/arah.app/lib/l10n/app_en.arbfrontend/arah.app/lib/l10n/app_localizations.dartfrontend/arah.app/lib/l10n/app_localizations_en.dartfrontend/arah.app/lib/l10n/app_localizations_pt.dartfrontend/arah.app/lib/l10n/app_pt.arbfrontend/arah.app/lib/main.dartfrontend/arah.app/pubspec.yamlfrontend/arah.app/test/core/storage/storage_migration_test.dartfrontend/arah.app/test/features/auth/presentation/login_screen_test.dartfrontend/arah.app/test/features/profile/presentation/profile_screen_test.dartfrontend/arah.app/web/index.htmlfrontend/arah.app/web/manifest.json
| try { | ||
| for (final pair in _secureKeyPairs) { | ||
| final legacyValue = await secureStorage.read(key: pair.legacy); | ||
| if (legacyValue == null) continue; | ||
| final currentValue = await secureStorage.read(key: pair.current); | ||
| if (currentValue == null) { | ||
| await secureStorage.write(key: pair.current, value: legacyValue); | ||
| } | ||
| await secureStorage.delete(key: pair.legacy); | ||
| } | ||
| } catch (_) { | ||
| // Secure storage indisponível (ex.: testes unitários sem plugin). | ||
| } |
There was a problem hiding this comment.
Don’t finalize migration after a secure-storage failure.
Line 47 sets the one-time flag even when Lines 26-38 catch secure-storage errors. That prevents retry on next launch and can leave legacy auth keys unmigrated, causing avoidable session loss.
Suggested patch
- try {
+ var secureMigrationSucceeded = true;
+ try {
for (final pair in _secureKeyPairs) {
final legacyValue = await secureStorage.read(key: pair.legacy);
if (legacyValue == null) continue;
final currentValue = await secureStorage.read(key: pair.current);
if (currentValue == null) {
await secureStorage.write(key: pair.current, value: legacyValue);
}
await secureStorage.delete(key: pair.legacy);
}
} catch (_) {
// Secure storage indisponível (ex.: testes unitários sem plugin).
+ secureMigrationSucceeded = false;
}
@@
- await prefs.setBool(_migrationFlag, true);
+ if (secureMigrationSucceeded) {
+ await prefs.setBool(_migrationFlag, true);
+ }Also applies to: 47-47
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/arah.app/lib/core/storage/storage_migration.dart` around lines 26 -
38, The secure storage migration in the try-catch block (lines 26-38) silently
catches all exceptions but the one-time completion flag at line 47 is still
being set unconditionally, which prevents retry attempts on the next launch if
the migration fails. Move the flag-setting logic that marks the migration as
complete so it only executes when the migration succeeds in the try block, not
after the catch block. This ensures that if secure storage operations fail, the
flag remains unset and the migration will be retried on the next application
launch.
| extension AppColorsExtension on BuildContext { | ||
| AppColors get appColors => Theme.of(this).extension<AppColors>()!; | ||
| AppColors get appColors => Theme.of(this).extension<AppColors>() ?? AppColors.dark; |
There was a problem hiding this comment.
Make the appColors fallback respect current brightness.
Line 214 always returns AppColors.dark when the extension is missing, which can invert semantics in light-theme contexts. Prefer a brightness-aware fallback.
Proposed fix
extension AppColorsExtension on BuildContext {
- AppColors get appColors => Theme.of(this).extension<AppColors>() ?? AppColors.dark;
+ AppColors get appColors {
+ final theme = Theme.of(this);
+ return theme.extension<AppColors>() ??
+ (theme.brightness == Brightness.dark ? AppColors.dark : AppColors.light);
+ }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| extension AppColorsExtension on BuildContext { | |
| AppColors get appColors => Theme.of(this).extension<AppColors>()!; | |
| AppColors get appColors => Theme.of(this).extension<AppColors>() ?? AppColors.dark; | |
| extension AppColorsExtension on BuildContext { | |
| AppColors get appColors { | |
| final theme = Theme.of(this); | |
| return theme.extension<AppColors>() ?? | |
| (theme.brightness == Brightness.dark ? AppColors.dark : AppColors.light); | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/arah.app/lib/core/theme/app_design_tokens.dart` around lines 213 -
214, The appColors getter in the AppColorsExtension extension always falls back
to AppColors.dark when the extension is missing, which doesn't respect the
current brightness setting and can cause visual inconsistencies in light-theme
contexts. Modify the getter to check the current brightness using
Theme.of(this).brightness or MediaQuery.of(this).platformBrightness and return
AppColors.light for light brightness or AppColors.dark for dark brightness,
ensuring the fallback is brightness-aware.
| # Arah (App Flutter) | ||
|
|
||
| App mobile **território-first** e **comunidade-first**. Nome: **Ará**. Interface clean, fundo escuro padrão. Conecta ao **BFF** do repositório. | ||
| App mobile **território-first** e **comunidade-first**. Marca: **Arah**. Interface alinhada ao design system (fundo escuro, tipografia Inter, tokens compartilhados). Conecta ao **BFF** do repositório. |
There was a problem hiding this comment.
Use territory terminology in the intro sentence.
Line 3 uses território-first, which breaks the repository glossary standard for geographic terminology in documentation.
Suggested patch
-App mobile **território-first** e **comunidade-first**. Marca: **Arah**. Interface alinhada ao design system (fundo escuro, tipografia Inter, tokens compartilhados). Conecta ao **BFF** do repositório.
+App mobile **territory-first** e **comunidade-first**. Marca: **Arah**. Interface alinhada ao design system (fundo escuro, tipografia Inter, tokens compartilhados). Conecta ao **BFF** do repositório.As per coding guidelines, use 'territory' (not 'place', 'location', or other variations) as the consistent term for geographic areas in all code and documentation.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| App mobile **território-first** e **comunidade-first**. Marca: **Arah**. Interface alinhada ao design system (fundo escuro, tipografia Inter, tokens compartilhados). Conecta ao **BFF** do repositório. | |
| App mobile **territory-first** e **comunidade-first**. Marca: **Arah**. Interface alinhada ao design system (fundo escuro, tipografia Inter, tokens compartilhados). Conecta ao **BFF** do repositório. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/arah.app/README.md` at line 3, The README intro sentence on line 3
uses the Portuguese term `território-first` which violates the repository's
glossary standard for geographic terminology. Replace `território-first` with
`territory-first` to align with the coding guidelines that mandate using the
English term `territory` as the consistent keyword for geographic areas
throughout all code and documentation.
Source: Coding guidelines
| "background_color": "#0A0E12", | ||
| "theme_color": "#4DD4A8", |
There was a problem hiding this comment.
Align theme_color with the dark web theme token.
Line 7 (#4DD4A8) conflicts with the dark theme-color used in web/index.html (Line 27, #0A0E12), which can produce inconsistent browser/install UI tinting.
Suggested patch
- "theme_color": "`#4DD4A8`",
+ "theme_color": "`#0A0E12`",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "background_color": "#0A0E12", | |
| "theme_color": "#4DD4A8", | |
| "background_color": "`#0A0E12`", | |
| "theme_color": "`#0A0E12`", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@frontend/arah.app/web/manifest.json` around lines 6 - 7, The theme_color
value in the manifest.json file is set to "`#4DD4A8`" which conflicts with the
dark theme color "`#0A0E12`" defined in index.html and used for background_color
in the same manifest file. This inconsistency can cause browser and install UI
tinting to be misaligned. Change the theme_color property value from "`#4DD4A8`"
to "`#0A0E12`" to align it with the dark web theme token used consistently
throughout the application.
- Localize remaining hardcoded strings across all feature screens - Add 90+ l10n keys (comments, chat, marketplace, connections, etc.) - Use ArahScaffold on splash redirect screen - Rebrand Ará → Arah in app docs and run-app-local script Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
Resumo
Alinha o app Flutter à identidade visual Arah e conclui itens pendentes de fidelidade ao design system.
Mudanças
Design & marca
#0A0E12,#141A21), Inter, gradiente sutil, cards com bordaarah-icon.svgdo devportal) noArahBrandHeaderArahScaffoldem todas as telas de featuresl10n
Storage
arah_*substituemaraponga_*StorageMigrationmigra tokens e território legado na inicializaçãocom.arah.appValidação
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Refactoring
Chores / Tests