Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f008e1a531 | ||
|
|
0b37880ca5 | ||
|
|
11d6386723 | ||
|
|
2d9b217d2f | ||
|
|
61c26874df | ||
|
|
6d7a217eb7 | ||
|
|
c216dcc5a1 | ||
|
|
1e22cf3df5 | ||
|
|
a0c1801460 | ||
|
|
17ce9422ae | ||
|
|
80401dad36 | ||
|
|
cfc4a805a4 | ||
|
|
312843246a | ||
|
|
6c7f8fb743 | ||
|
|
f2b0e6ea74 | ||
|
|
ffa2b6a06d | ||
|
|
d2b39efb4b | ||
|
|
9f3f714077 | ||
|
|
5d560e6092 | ||
|
|
ea50f64021 | ||
|
|
6b0af26855 | ||
|
|
0662e26630 | ||
|
|
004ad26a2c | ||
|
|
aaca0d55f3 | ||
|
|
bdfad5d747 | ||
|
|
89ae584526 | ||
|
|
4c2d9fe71d | ||
|
|
1c2b2cdd43 | ||
|
|
665a544e67 | ||
|
|
9025e0e06a | ||
|
|
b6d072271d | ||
|
|
9dd3e8faea | ||
|
|
bdbd2f8d71 | ||
|
|
ee2f8cc448 | ||
|
|
b7ff95e5d4 | ||
|
|
17aca9f729 | ||
|
|
9b6f3ae55b | ||
|
|
82f1feaa26 | ||
|
|
374b0432c3 | ||
|
|
595b6541da | ||
|
|
11896dcd9f | ||
|
|
77deeb9ef0 | ||
|
|
550cb61f28 | ||
|
|
42367e2ae6 | ||
|
|
db7c71a650 | ||
|
|
2129482287 | ||
|
|
a9e3832b27 | ||
|
|
e7ac50ed44 | ||
|
|
8dcd1335dd | ||
|
|
9b3c88702b | ||
|
|
923d00c59a | ||
|
|
8ed3fdbd70 | ||
|
|
e77a63f580 | ||
|
|
9de71b766d | ||
|
|
7156864da9 | ||
|
|
22f24d901d | ||
|
|
3006176027 | ||
|
|
1fe4ce1bba | ||
|
|
8390d7b8ee | ||
|
|
6924d35497 | ||
|
|
f4d8c5817c | ||
|
|
38d7530362 | ||
|
|
7fb4a0bb03 | ||
|
|
df5b04eb09 | ||
|
|
65381675c5 | ||
|
|
6848870cb1 | ||
|
|
26f5dd0a18 | ||
|
|
205930db2e | ||
|
|
2120419c69 | ||
|
|
5f893088a5 | ||
|
|
862125e60c | ||
|
|
fbab988cfb | ||
|
|
1490a48d2d | ||
|
|
761c939249 | ||
|
|
a67069e692 | ||
|
|
ba5747fb01 | ||
|
|
6b5eced0ba | ||
|
|
a1d1dfad6c | ||
|
|
518b5b4ea9 | ||
|
|
fdd4cc0e8d | ||
|
|
0f6517674e | ||
|
|
9e7bc26bff | ||
|
|
9fe732fe32 | ||
|
|
8f30d0fce6 | ||
|
|
d1982fb071 | ||
|
|
d9d1d90ab3 | ||
|
|
65a2e13f24 | ||
|
|
af022b5c16 | ||
|
|
c1c27d6cc0 | ||
|
|
634f8ed2f8 | ||
|
|
8a08073b96 | ||
|
|
602a99efaf | ||
|
|
e00a5da74b | ||
|
|
3af27ddaf2 | ||
|
|
000d6158ae | ||
|
|
bb1586001a | ||
|
|
56463d5147 | ||
|
|
1ebaa165bd | ||
|
|
55899d9cab | ||
|
|
0d2e6c73a7 | ||
|
|
3067b88ecc | ||
|
|
c6e9c82ae5 |
@@ -46,7 +46,13 @@ jobs:
|
|||||||
grep '"version"' package.json | head -1
|
grep '"version"' package.json | head -1
|
||||||
|
|
||||||
echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
|
echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# [skip build] runs the checks workflow but skips the mobile build.
|
||||||
|
if echo "${{ github.event.head_commit.message }}" | grep -qi '\[skip build\]'; then
|
||||||
|
echo "SHOULD_BUILD=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
echo "SHOULD_BUILD=true" >> $GITHUB_OUTPUT
|
echo "SHOULD_BUILD=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Commit and push version bump
|
- name: Commit and push version bump
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Plugin development instructions
|
||||||
|
|
||||||
|
Instructions for opencode agents working on the Paarrot plugin system in this repo.
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
- Plugin host: `overlay/src/app/utils/pluginHost.ts`. Electron uses `window.electron.plugins`, Android uses the Capacitor `PluginStorage` plugin, web returns null.
|
||||||
|
- Native Android host: `android/app/src/main/java/com/paarrot/app/PluginStoragePlugin.kt` (download zip, unzip with zip-slip guard, list, uninstall, readPluginCode). Registered in `MainActivity.java`.
|
||||||
|
- Loader: `cinny/src/app/features/settings/plugins/PluginLoader.tsx`, mounted in `ClientRoot.tsx`. It evaluates `index.js` with `new Function` for CommonJS and falls back to a data-URL import for ESM.
|
||||||
|
- Registry and marketplace: `PluginAPI.ts` persists both to `localStorage`. Enabled state survives restarts. Plugins load at app start, so enabling a plugin requires an app restart.
|
||||||
|
|
||||||
|
## Plugin context contract
|
||||||
|
|
||||||
|
- `createPluginContext` from `@paarrot/plugin-manager` provides: `commands`, `messages`, `ui`, `settings`, `themes`, `events`, `timers`, `log`, `warn`, `error`.
|
||||||
|
- `PluginLoader` adds compat fields on top: `matrixClient`, `matrix`, `React`, `lucide`. Plugins destructure these directly (for example `const { Link } = ctx.lucide`), so a missing field throws at `onLoad` and the plugin never runs. Keep the compat fields in sync between `cinny` and `overlay`. A missing `lucide` caused silent plugin failure on mobile, fixed in commit `1f16f5d`.
|
||||||
|
|
||||||
|
## UI locations
|
||||||
|
|
||||||
|
- Valid `UILocation` values: `room-header`, `message-actions`, `user-menu`, `room-menu`, `composer-actions`, `channel-list`, `direct-messages`, `home-section`, `search-notification-section`, `text-composer-toolbar`, `sidebar-actions`.
|
||||||
|
- Button slots render at all screen sizes. Nav-only locations (`channel-list`, `direct-messages`, `home-section`, `sidebar-actions`) have no surface in the single-column mobile UI, so plugins that only register there are invisible on phones.
|
||||||
|
|
||||||
|
## Mobile quirks
|
||||||
|
|
||||||
|
- Capacitor injects plugins on `Capacitor.Plugins` after the bridge is ready, and `registerPlugin` is often missing on Android. The `waitForBridge` fallback pattern in `overlay/src/app/utils/backgroundSync.ts` is the reference.
|
||||||
|
- No CSP is configured in `capacitor.config.json`, so `new Function` and data-URL imports work. Adding CSP would break plugin evaluation.
|
||||||
|
- WebView console logs reach logcat under the tag `Capacitor/Console`.
|
||||||
|
|
||||||
|
## Debugging on device
|
||||||
|
|
||||||
|
- Wireless adb: `adb connect <ip>:<port>`. The `adb tcpip` port persists until reboot, then resets to 5555. Android 11+ wireless debugging randomizes the port per reboot by design. Pinning needs root (`persist.adb.tcp.port`).
|
||||||
|
- Plugin files: `adb shell run-as com.paarrot.app cat files/plugins/<id>/index.js` works on debuggable builds.
|
||||||
|
- Enabled state: localStorage lives in `app_webview/Local Storage/leveldb`. Search for `plugin-manager:installed-plugins`.
|
||||||
|
- Live eval: the WebView devtools socket is `@webview_devtools_remote_<pid>`. Forward with `adb forward tcp:9222 localsocket:webview_devtools_remote_<pid>`. The socket may refuse HTTP and WebSocket requests from non-localhost hosts.
|
||||||
|
- To trigger plugin load logs: force-stop, start, then `logcat -d | grep PluginLoader`.
|
||||||
|
- Hotpatching the installed copy with `run-as` plus an app restart tests plugin changes without reinstalling.
|
||||||
|
|
||||||
|
## Marketplace
|
||||||
|
|
||||||
|
- Directory: `Paarrot/Plugin-Directory`. Entries are static JSON files. The `version` field is a manual snapshot and is never synced from the plugin repo.
|
||||||
|
- Updates go through PRs. `validate-pr.yml` validates and auto-merges. `update-index.yml` regenerates `index.json` from committed entries only.
|
||||||
|
- A plugin repo needs `index.js` and `plugin-metadata.json`. The directory `downloadUrl` is the GitHub archive zip.
|
||||||
|
- Bump the version in both the plugin repo metadata and the directory entry when shipping changes.
|
||||||
|
|
||||||
|
## Repo conventions
|
||||||
|
|
||||||
|
- Edit `overlay/` files, not `cinny` directly. `scripts/apply-overlay.mjs` layers the overlay onto the cinny submodule before every Android build.
|
||||||
|
- `android/gradlew` is not executable. Run it as `sh gradlew`.
|
||||||
|
- Use `scripts/push.sh` for commits. It skips the cinny submodule pointer and `gradlew`.
|
||||||
+1
-1
Submodule cinny updated: f0495cccca...ec7b4f04c5
@@ -2,6 +2,11 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/app": "8.0.1",
|
"@capacitor/app": "8.0.1",
|
||||||
"@capacitor/browser": "8.0.1",
|
"@capacitor/browser": "8.0.1",
|
||||||
"@capacitor/status-bar": "8.0.1"
|
"@capacitor/status-bar": "8.0.1",
|
||||||
|
"@tauri-apps/plugin-dialog": "2.7.1",
|
||||||
|
"@tauri-apps/plugin-notification": "2.3.3",
|
||||||
|
"@tauri-apps/plugin-opener": "2",
|
||||||
|
"@tauri-apps/plugin-process": "2.3.1",
|
||||||
|
"@tauri-apps/plugin-updater": "2.10.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ export function PageRoot({ nav, children }: PageRootProps) {
|
|||||||
// Master list routes: only the channel/space list is interactive.
|
// Master list routes: only the channel/space list is interactive.
|
||||||
// Never mount the detail/underlay stack here — an empty detail layer would
|
// Never mount the detail/underlay stack here — an empty detail layer would
|
||||||
// sit above the list with pointer-events and freeze taps (DM → space bug).
|
// sit above the list with pointer-events and freeze taps (DM → space bug).
|
||||||
if (compact && showCompactMaster) {
|
// When nav is empty there is no master list to protect, so fall through to the
|
||||||
|
// detail branch. Settings is a modal, not a route: opening it from /home keeps
|
||||||
|
// the pathname a list route while Settings passes nav as undefined on mobile.
|
||||||
|
if (compact && showCompactMaster && nav) {
|
||||||
return (
|
return (
|
||||||
<Box grow="Yes" className={ContainerColor({ variant: 'Background' })}>
|
<Box grow="Yes" className={ContainerColor({ variant: 'Background' })}>
|
||||||
{nav}
|
{nav}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "paarrot",
|
"name": "paarrot",
|
||||||
"version": "4.11.186",
|
"version": "4.11.236",
|
||||||
"description": "Paarrot - A Matrix client based on Cinny",
|
"description": "Paarrot - A Matrix client based on Cinny",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user