Cannot enter active mode right after onboarding

FYI: @kmochocki

There is a problem when trying to switch to active mode right after completing onboarding.

The following exception is thrown:

Cannot activate, reason: (JSONRPCRequest(id_=0, jsonrpc='2.0', method='beekeeper_api.open',                  
      params={'wallet_name': ''}), {'jsonrpc': '2.0', 'error': {'code': -32003, 'message': 'Assert                    
      Exception:valid_filename(name): Invalid filename, path not allowed in wallet name ', 'data': {'code': 10,       
      'name': 'assert_exception', 'message': 'Assert Exception', 'stack': [{'context': {'level': 'error',             
      'file': 'beekeeper_wallet_manager.cpp', 'line': 92, 'method': 'open', 'hostname': '', 'timestamp':              
      '2023-05-04T08:13:32'}, 'format': 'valid_filename(name): Invalid filename, path not allowed in wallet name      
      ${n}', 'data': {'n': ''}}]}}, 'id': 0})   

Steps to reproduce:

  1. Start a new onboarding process and fill all the inputs
  2. When the dashboard is shown, try to switch to the active mode
  3. Exception is thrown

It's caused because the __profile_data reference held in the World class differs from the one set in clive/__private/ui/onboarding/onboarding.py:31.

It seems like there is no easy way to notify the World about updated ProfileData since by design it does not inherit from textual's Widget. We might introduce some additional method to the World like update_profile_data or update_from to the ProfileData class but I don't like any of these approaches since it creates additional dependency (such methods would need to be called every time when Contextual context is saved)

Edited by Mateusz Żebrak