Strata/strata@edu4rdshl.dev
Eduard Tolosa 46ce549b2f feat: lazy full-history search, rendered blink-free
Search now covers the entire stored history (bounded by max-history) instead
of an arbitrary 500-result cap, and renders a page at a time as you scroll
rather than building every match at once - so a broad query on a large
history no longer builds thousands of row widgets up front.

The full match set is snapshotted once (lightweight truncated metadata) and
paged from memory, so scrolling never re-queries and cannot race the search.
The first chunk renders synchronously in the same frame as the list clear, so
the list never paints empty between keystrokes (no "blink").

Concurrency hardening for the render path:
- epoch-ownership of the shared loading guard so a fast new query cannot be
  blocked by, or have its guard cleared by, a superseded render;
- a results-epoch guard so a scroll during a query's fetch window cannot
  render the previous query's stale snapshot;
- removeItem drops the id from the snapshot (adjusting the rendered index) so
  a pruned item in the unrendered tail cannot reappear as a phantom row.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 17:29:18 -05:00
..
schemas feat: light/dark theme support 2026-05-26 14:49:08 -05:00
ui feat: lazy full-history search, rendered blink-free 2026-05-26 17:29:18 -05:00
dbus.js perf: return raw bytes from GetItemContent instead of base64 2026-05-25 04:00:06 -05:00
extension.js feat: light/dark theme support 2026-05-26 14:49:08 -05:00
light.css feat: light/dark theme support 2026-05-26 14:49:08 -05:00
metadata.json chore: bump versions to 0.5.0 2026-05-26 14:50:08 -05:00
prefs.js feat: light/dark theme support 2026-05-26 14:49:08 -05:00
README.md feat: light/dark theme support 2026-05-26 14:49:08 -05:00
stylesheet.css Initial commit 2026-05-25 03:02:34 -05:00

Strata GNOME Shell extension

The GJS front-end for Strata. Renders the panel UI and forwards clipboard events to strata-daemon over D-Bus.

The extension requires strata-daemon to be installed and available in $PATH. See the main README for install instructions. The extension is pure JavaScript - no binary is bundled.

Compatibility: Only tested on GNOME Shell 50. The metadata.json declares support for 4550 since the APIs used (Meta.Selection, St, Gio, Adw) have been stable across that range, but older versions are untested. If you try one and it works, open an issue to let us know.

File layout

strata@edu4rdshl.dev/
├── extension.js       Lifecycle, daemon lookup/supervisor, clipboard ingest
├── prefs.js           Preferences window
├── dbus.js            Generated D-Bus proxy + interface XML
├── stylesheet.css     Panel styles
├── metadata.json      GNOME Shell metadata (tested on Shell 50; declares 4550)
├── schemas/           GSettings schema (max history, size caps, shortcut)
└── ui/
    ├── panel.js       Popup panel: pagination, search, scroll-to-load
    └── clipboardItem.js  Per-item row (text preview or lazy thumbnail)

How it works

  1. On enable, extension.js checks if the D-Bus name is already owned (daemon running via systemd). If not, it looks for strata-daemon in $PATH and spawns it, auto-respawning on crash with exponential backoff.
  2. Meta.Selection notifies us of every clipboard change. We read the raw bytes (allowlisted mimes only, password-manager hint skipped) and ship them to the daemon via SubmitItem(s, ay).
  3. The daemon dedups, stores, indexes, and emits ItemAdded.
  4. ui/panel.js paginates history with GetHistory, debounces search with SearchHistoryAsync, and writes back via St.Clipboard.set_text or Meta.SelectionSourceMemory (never spawn, never launch_uri).

Settings

Open with gnome-extensions prefs strata@edu4rdshl.dev:

History

  • Max history (502000 items)
  • Items per page (20200, rows fetched on open and on each scroll-to-bottom)
  • Maximum text size (1100 MB, larger items are not stored)
  • Maximum image size (1100 MB, larger items are not stored)

Appearance

  • Theme (Automatic / Light / Dark; Automatic follows the system light/dark preference)
  • Panel width (pixels)
  • Panel max height (pixels, list scrolls past this)
  • Move activated item to top
  • Panel position (top-left, top-center, top-right)

Keyboard

  • Open Strata shortcut

Privacy

  • App exclusions (apps whose clipboard is never recorded)

All four history/size limits are pushed to the daemon over D-Bus (SetConfig) as soon as you change them. No restart needed.

Develop

# Build daemon + install extension + recompile schemas
make -C .. install-daemon && make -C .. install

# Live-reload logs
journalctl --user -f /usr/bin/gnome-shell | grep -i strata

If you only change JS, you can re-make install and restart the Shell (Wayland: log out / in; X11: Alt+F2, r).

License

GPL-3.0-or-later.