ADR 0159: Generated plugin settings and plugin-local shortcuts
- Status: Accepted
- Date: 2026-08-13
- Decision owners: PI-Desktop desktop/plugin maintainers
Context
Plugins already declared settings and could read/write their private settings, but users had no standard way to edit those values. The next known setting is a shortcut, and registering plugin shortcuts globally would expand the collision and lifecycle surface before the plugin settings contract is stable.
Decision
contributes.settingsis the source of truth for the generated settings UI. Supported types arestring,number,boolean,select,json, andshortcut.- A shortcut setting declares a plugin command through
commandand has the fixedscope: "plugin". The user may edit it in the installed plugin page. - Plugin shortcuts are handled by the renderer only while the PI-Desktop window is focused. The host re-checks the plugin activation scope before executing the command. They are not Electron/global shortcuts.
- The host validates values, persists them in the plugin-private settings file, and sends
plugin:settingsChangedto the plugin process. - Secret settings remain rejected until a dedicated secure storage contract is designed.
Consequences
- Plugin authors can ship a usable settings surface without bundling a custom configuration page.
- The existing application shortcut map remains authoritative for app-global behavior and plugin shortcuts cannot replace it.
- A future global plugin shortcut feature will require a separate decision for collision handling, OS registration, and disabled/background plugin state.