u/WhoAmI1234532

Bug: pending lasso-copy buffer gets pasted into the page when a plugin creates a programmatic lasso.

Hi all, and particularly the Supernote dev team and u/Mulan-sn,

I found another PluginHost/firmware bug, this time in the lasso pipeline.

if the user has lasso-copied something (copy buffer loaded), any plugin that creates a programmatic lasso (PluginCommAPI.lassoElements() → e.g. setLassoTitle()) triggers a phantom paste: the firmware inserts the copied strokes into the page during the plugin's lasso lifecycle. The user never asked for a paste.

Repro (100% reliable on my A5X):

  1. Handwrite anything on a note page, lasso-select it, tap Copy.
  2. Trigger any plugin that does a programmatic lasso — mine selects a zone with lassoElements(rect) and converts it with setLassoTitle({style}).
  3. The copied strokes reappear inside the plugin's lasso zone. With my plugin the pasted strokes then get styled as a heading but the paste itself is firmware-side.

Notes:

  • "Clear clipboard" does NOT help : the lasso copy buffer is separate from the text clipboard and apparently survives until something consumes it.
  • A finger double-tap alone does NOT paste (tested ×10) : the trigger really is the programmatic lasso lifecycle.
  • Proof it happens mid-pipeline: I log a full-page element census before/after. Before: 16 strokes. After: 24 strokes + my title + my text box : the copied strokes (+8) appear between lassoElements() and the end of the pipeline, and they are NOT part of the lasso snapshot (both getLassoElementTypeCounts reads report the same count).
  • Possibly related: after setLassoTitle() succeeds, setLassoBoxState(2) always fails with code 904: "No lasso action has been performed" : the lasso lifecycle seems to end in an inconsistent state.

For the Ratta team, please:

  1. Don't dispatch a pending lasso-paste when a lasso selection is created or released programmatically by a plugin.
  2. Or expose an API to query/clear the lasso copy buffer so plugins can protect themselves cleanly.

Workaround for plugin developers (ships in my plugin, works reliably, but poor UX): snapshot the page's element numbers before your lasso work, then delete any stroke that appeared during your pipeline, new strokes can only be the phantom paste (your own insertions are text/title elements, and you type-check each candidate so user content is never at risk):

// before your lasso work:
const before = new Set((await PluginFileAPI.getElementNumList(path, page)).result ?? []);

// ... lassoElements() / setLassoTitle() / your inserts ...

// after (save first):
const after = (await PluginFileAPI.getElementNumList(path, page)).result ?? [];
const parasites = [];
for (const n of after.filter(n => !before.has(n))) {
  const el = (await PluginFileAPI.getElement(path, page, n))?.result;
  if (el?.type === 0) parasites.push(n);   // strokes only — never your own title/text
}
if (parasites.length) {
  await PluginFileAPI.deleteElements(path, page, parasites);
  await PluginCommAPI.reloadFile();
}

Setup: Supernote A5X (gen 1), firmware Chauvet 2.26.39, sn-plugin-lib 0.1.43.

Happy to share full logs, the census instrumentation, or a minimal repro plugin.

Thanks!

reddit.com
u/WhoAmI1234532 — 14 hours ago

Bug: PluginHost never deletes old plugin versions. Devs: here's a workaround.

Hi all and particularily Supernote dev team and u/Mulan-sn,

I have found a bug on the Plugin core :

Every plugin install/update writes a new copy of the plugin's files and keeps all the previous ones, so a plugin's storage grows without bound.

This isn't a dev-only edge case: Ratta's own official Sticker plugin reads 46 MB on my rarely-updated A5X but 327 MB on my regularly-updated Manta, same plugin, same version, just more updates, look:

https://preview.redd.it/zcjfm2sv2fbh1.png?width=1404&format=png&auto=webp&s=dd3e20ae3f00bbd20ac99605a1e556adce0bb213

https://preview.redd.it/56txm36x2fbh1.png?width=1920&format=png&auto=webp&s=22bcbb2b20749bb80b1102cc8688eee91a56ad28

My own ~7 MB plugin hit 298 MB after ~19 reinstalls. Remove doesn't reclaim the space either.

What's happening:

Each plugin is installed at:

`/data/user/0/com.ratta.supernote.pluginhost/files/plugins/<pluginID>/`

and every install adds a fresh, versioned set without deleting the old one:

```

app_<timestamp>.npk (~6 MB, bundle + native)

app_<timestamp>_libs/ (extracted .so)

oat/<arch>/app_<timestamp>.{odex,vdex,art} (ART AOT output, ~10 MB)

```

These `app_<ts>.*` + `oat/` artifacts stack up per version, so the folder only ever grows. On my A5X, `.../files/plugins/` totalled 485 MB across all plugins.

Why this matters for everyone (not just devs): official plugins auto-update over time, so a normal user's Sticker/other plugins silently balloon — 327 MB in my case — and there's no user-facing way to reclaim it (Remove doesn't).

For the Ratta/Supernote team — please:

  1. On **update/reinstall**, delete the previous version's `app_<ts>.npk` / `_libs` / `oat` artifacts.

  2. On **Remove**, fully wipe `.../files/plugins/<pluginID>/` so space is actually reclaimed.

  3. Optionally show the real per-plugin footprint (or a "clear plugin cache" action) in Settings → Apps → Plugins.

Workaround for plugin developers (your own plugins only)

A plugin's native module runs **inside the PluginHost process** (same UID), so it can delete files in its own install dir. On load, keep the newest `app_<timestamp>` (the running version) and delete everything older:

```java

u/ReactMethod

public void cleanupOldVersions(String dirPath, Promise promise) { // dirPath = PluginManager.getPluginDirPath()

File dir = new File(dirPath);

File[] files = dir.listFiles();

long maxTs = -1;

for (File f : files)

if (f.getName().startsWith("app_") && f.getName().endsWith(".npk"))

maxTs = Math.max(maxTs, leadingDigits(f.getName().substring(4)));

String keep = Long.toString(maxTs);

long freed = 0;

for (File f : files) // old app_<ts>.npk / _libs

if (f.getName().startsWith("app_") && !f.getName().contains(keep))

freed += deleteRecursively(f);

File oat = new File(dir, "oat"); // old compiled artifacts

if (oat.isDirectory()) freed += cleanOatExcept(oat, keep);

WritableMap m = Arguments.createMap();

m.putDouble("freed", freed); m.putString("kept", keep);

promise.resolve(m);

}

```

```js

// index.js — run once at load

const dir = await PluginManager.getPluginDirPath();

const r = await YourNative.cleanupOldVersions(dir);

console.log(`freed ${(r.freed/1048576).toFixed(1)}MB, kept ${r.kept}`);

```

Only files whose timestamp ≠ the newest are deleted, so the running version is never touched. This dropped my plugin from ~298 MB back to ~15 MB.

But the real fix has to be in PluginHost : the workaround only helps plugins that add this code, and it can't help official plugins like Sticker on regular users' devices.

Happy to share full source, a size-probe, or logs to help triage.

Thanks!

reddit.com
u/WhoAmI1234532 — 21 hours ago

Plugin Dashboard

Hi everyone,

I am glad to present you my very first plugin : Dashboard !

It is solving my main issue with Supernote and hopefully will be usefull for others too, happy to hear your feedback !

The plugin puts a small draggable ⊕ bubble on your screen that floats over everything (notes, folders, apps…). Tap it and it opens a dashboard you build yourself from four kinds of section:

- Shortcuts — jump to a folder, a note, or a PDF in one tap

- Stars — every ★ starred page across your notes, grouped by note (tap a page → it opens right there) [you can filter which folder to scan for each area]

- Keywords — your notes' keywords as tappable chips; each chip opens that exact note and page

- Apps — launch ToDo, Calendar, Document, Search…

https://preview.redd.it/j5g9q9kq5dbh1.png?width=1920&format=png&auto=webp&s=af4fb1e7f63f19cb879797dd8f0471916187a224

Setup is a short guided wizard (layout → theme → sections → content), everything auto-saves, and there are 3 visual themes and a 1- or 2-column layout. It runs fully on-device and offline, no account, no network.

Requirements: the Supernote developer/beta firmware with the plugin system. Tested on A5X and A5X2 (Manta); built to work on Nomad too.

Install: download dashboard.snplg, drop it in your MyStyle folder, then Settings → Apps → Plugins → Add Plugin.

It's free and open source (MIT) — code, releases and a full user guide here:

👉 https://github.com/AgP42/supernote-dashboard

It's still early (v0.9.x), so bugs and rough edges are likely — please tell me what breaks or what you'd want added. A couple of known limits: PDFs open on their last page (no page-jump yet), and stars/keywords inside PDFs aren't listed (the SDK only exposes them for notes).

Hope it's useful to some of you, happy to answer any questions or make changes!

reddit.com
u/WhoAmI1234532 — 1 day ago

Difference between Notes and Meetings ?

Hello, I have received my AIpaper recently and still searching to define my workflow.

I have analyzed the differences between "Notes" and "Meetings", everything in Meetings is also available in "Notes", while Notes also have extra features (the "Marker and Plan", Images, the organization by folder and the PDF).

Did I missed something on "Meetings" that have any added value that I cannot get with Notes ?

If not, why having 2 different concepts and why less features for Meetings ?

Thanks,

reddit.com
u/WhoAmI1234532 — 8 days ago

How to paste ??

Hi everyone,

I feel very stupid to have to ask that, I have even read the user manual before and did a search on this community : how to do a simple stupid copy/paste of handwritten content ?

I lasso to copy or cut, and after ???

I have tried : 1 tap on the screen, long press the screen, double tap the screen, I have searched every single menu...

What's the trick ?

(I have the last sw version : v3.14.5)

Thanks...

reddit.com
u/WhoAmI1234532 — 9 days ago