-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Description
Kolibri PR #12879 deletes the legacy kolibri.plugins.app plugin and replaces it with hook-based capabilities (GetOSUserHook, CheckIsMeteredHook, ShareFileHook).
Wrapper in kolibri-app still depends on the removed plugin, so it can no longer launch or expose app-only features when running against the PR mentioned above. To stay compatible with current and future Kolibri releases, we must migrate to the new hook architecture.
Current Behaviour
- Following files application.py, server_manager_posix.py, and server_process_windows.py import kolibri plugins app interface, register it and builds initialization URLs.
- KolibriApp’s kolibri_plugin.py does not implement any of the new core hooks, so capabilities such as OS user login, metered-connection checks, file sharing plugins are never registered.
- We register the old app plugin and have a dependency on it.
Desired Behaviour
kolibri_app/kolibri_plugin.pyregisters concrete implementations of the new hooks:GetOSUserHook→ Return a fixed desktop pseudo-user so Kolibri can auto-login when the app launches (e.g., ("KolibriDesktopUser", True)). Otherwise return (None, False). eg: here.CheckIsMeteredHook→ Return True if the OS reports a metered connection, else False. If the platform can’t detect this, just return False. eg: here.ShareFileHook→ Implement share_file(self, filename, message) so the desktop wrapper hands that file off to the OS sharing UX (reveal/open in Explorer/Finder or show a native share dialog). Ensure the hook checks that the file exists, logs failures, and replaces the old no-opshare_file = None/interface.register_capabilitiescode so Kolibri’s “Share” button works again.
- Replace importing
kolibri.plugins.app.utilsand instead callapp_initialize_url()fromkolibri.core.device.utilsto construct initialization URL. - All
enable_plugin("kolibri.plugins.app")calls are removed. - Any previous
interface.register( )blocks are deleted, the hook registrations in kolibri_plugin.py handle capability wiring automatically. - Windows/Posix server managers rely solely on hook side effects (no manual registration).
Reference
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels