Description
AWS Bedrock credentials entered in the AI Assistant config screen are held only in memory. They are lost on every app restart, so the user has to paste the access key and secret key again each time.
Current behaviour
lib/page/ai_assistant/views/router_assistant_view.dart:
_tryInitController() first attempts AWSConfig.fromEnvironment()
- On
ConfigurationException it falls back to a manual entry screen (access key / secret key / model dropdown)
_initControllerWithManualConfig() builds an AWSConfig and constructs the controller — nothing is persisted
- Pressing the settings icon discards the controller and returns to the config screen
Region is also hardcoded to us-west-2.
Proposed approach
Persist credentials using flutter_secure_storage (already a project dependency):
- Save access key / secret key / selected model after a successful connection
- On view init, try
AWSConfig.fromEnvironment() first, then fall back to stored credentials, then to the manual entry screen
- Provide an explicit way to clear stored credentials (the existing "Change configuration" flow is the natural place)
- Do not log credential values
Out of scope
Moving credential handling to a backend proxy is the proper long-term fix (the frontend should not hold AWS credentials at all), but that is a cross-team effort and is not covered here. This issue only removes the re-entry friction while keeping storage local and encrypted.
Acceptance criteria
Context
Follow-up to #929. Related to the AI Assistant still being in PoC state.
Description
AWS Bedrock credentials entered in the AI Assistant config screen are held only in memory. They are lost on every app restart, so the user has to paste the access key and secret key again each time.
Current behaviour
lib/page/ai_assistant/views/router_assistant_view.dart:_tryInitController()first attemptsAWSConfig.fromEnvironment()ConfigurationExceptionit falls back to a manual entry screen (access key / secret key / model dropdown)_initControllerWithManualConfig()builds anAWSConfigand constructs the controller — nothing is persistedRegion is also hardcoded to
us-west-2.Proposed approach
Persist credentials using
flutter_secure_storage(already a project dependency):AWSConfig.fromEnvironment()first, then fall back to stored credentials, then to the manual entry screenOut of scope
Moving credential handling to a backend proxy is the proper long-term fix (the frontend should not hold AWS credentials at all), but that is a cross-team effort and is not covered here. This issue only removes the re-entry friction while keeping storage local and encrypted.
Acceptance criteria
flutter_secure_storageContext
Follow-up to #929. Related to the AI Assistant still being in PoC state.