You are browsing as a guest. Sign up (or log in) to start making projects!

5h 57m 57s logged

(i genuinely have no idea what to show in the devlog attachment, nothing’s changed visually. so have this stupid ass screenshot.)

Massive refactor, breaking changes

now that i’ve given myself the liberty to rethink and redesign Squirrel’s data models and storage in a breaking fashion for v1, we have managed to make a good amount of improvements across the board. database schema has been modified to better suit current needs and make it possible to implement the features I desire for v1. it has been a very satisfying refactor.

What’s new:

  • use UNIX microsecond timestamp for event ids instead of relying on sqlite autoincrement. this allows us to immediately send a captured event to the frontend without having to await a db write to obtain the event id. this also eliminates the timestamp column for events since the id is also the timestamp.
  • a dedicated BLOB column for image entries to store raw image bytes instead of b64 encoded strings. this makes images weigh about ~33% lighter. decent perf boost.
  • new expires_at column to store when an entry expires. pinned entries have an expiry of NULL. provides the base to actually implement expiring entries.
  • get rid of ClipboardEventNotice since we no longer do the notify frontend -> write to db -> send data to frontend dance. it is now simply send whole event to frontend -> write to db. we enjoy simplifications.
  • (!) as it stands now, old data (if it exists) would immediately be wiped when launching Squirrel v1. i could write some migration code but we’ll see. maybe clipboard data isn’t important enough to bother with migration.

Next:

  • actually implement entry expiration: should be trivial, just delete expired entries on launch.
  • ephemeral/persistent toggle: this one is a bit tricky, and will involve some in memory database shenanigans. more details in the devlog when i implement this.
0
2

Comments 0

No comments yet. Be the first!