mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
* docs(sync): point Nextcloud user-ID lookup at the WebDAV URL (#7617) The field hint, the 404 test-connection message, and the wiki all told users to find their user ID under 'Settings -> Personal info' / 'your Files URL'. Both are unreliable: Personal info does not clearly surface the uid, and a folder's address bar shows a folder ID, not the user ID (reporter followed it and got a folder ID). Redirect all three to the authoritative source: Files -> settings gear (bottom-left) -> the WebDAV URL '.../remote.php/dav/files/<user-id>/'. * feat(sync): auto-detect Nextcloud user ID via OCS (#7617) The Nextcloud WebDAV files path needs the account's internal user ID, which differs from the email/login name people enter and is awkward to find by hand — the root cause of the recurring '404 / connection test failed' reports. Add a 'Detect user ID' button to the Nextcloud sync config that asks the server for it. - packages/sync-providers: discoverNextcloudUserId() calls the OCS endpoint /ocs/v2.php/cloud/user (OCS-APIRequest header) authenticated with login + app password and returns ocs.data.id. A 401 reports bad credentials (cleanly distinct from the 404 wrong-user-id path); a 200 that isn't an OCS payload reports 'not a Nextcloud/OCS server'. A missing/wrong URL scheme is refused up front (matches the provider's own _cfgOrError check) so credentials never hit a schemeless host. - Dialog: button fills the Username field with the detected ID. To keep auth working, if 'Login name' was empty and the user had typed their login into 'Username', that login is preserved into 'Login name' before Username is overwritten with the ID. Result handling split into _applyDetectedUserIdResult for unit-testability. - Additive and optional: generic WebDAV and the save/sync path are untouched, no synced data shapes change. - Tests: 7 package specs (success, trailing-slash, login fallback, 401, non-OCS 200, missing id, scheme guard) + 6 dialog specs (login guard, fill+confirm, 3 login-preservation cases, failure). |
||
|---|---|---|
| .. | ||
| plugin-api | ||
| plugin-dev | ||
| shared-schema | ||
| super-sync-server | ||
| sync-core | ||
| sync-providers | ||
| vite-plugin | ||
| build-packages.js | ||
| README.md | ||
Super Productivity Packages
This directory contains plugin packages and the plugin API for Super Productivity.
Structure
plugin-api/- TypeScript definitions for the plugin APIplugin-dev/- Plugin development examples and toolsapi-test-plugin/- Basic API test pluginprocrastination-buster/- Example SolidJS-based pluginyesterday-tasks-plugin/- Simple plugin showing yesterday's tasksboilerplate-solid-js/- Template for creating new SolidJS plugins (not built)sync-md/- Markdown sync plugin (not built)
Building Packages
All packages are built automatically when running the main build process:
npm run build:packages
This command:
- Builds the plugin-api TypeScript definitions
- Builds plugins that require compilation (e.g., procrastination-buster)
- Copies plugin files to
src/assets/for inclusion in the app
Development
To work on a specific plugin:
cd plugin-dev/[plugin-name]
npm install
npm run dev
Adding a New Plugin
- Create a new directory in
plugin-dev/ - Add the plugin configuration to
/packages/build-packages.js - Run
npm run build:packagesto test the build
Notes
- The
boilerplate-solid-jsandsync-mdplugins are development templates and are not included in production builds - Plugin files are automatically copied to
src/assets/during the build process - The build script handles dependency installation automatically