ResearchOS/Wiki

Trash & History

A recovery window for deletes. When you delete a note, task, project, method, purchase, goal, lab link, mass spec protocol, sequence, molecule, inventory item or stock, or storage location, it does not vanish. It moves into a per-user trash folder where it sits for 30 days. Within that window you can restore it back to its original location with one click. After the window passes, an automatic sweep removes it for good.

Why this exists

Research data has a different relationship to time than consumer data. A note about a PCR run from eight months ago is not “old, who cares,” it is the experimental record. A misclick on the delete button used to be irrecoverable. The new trash flow gives you a safety net without changing how you delete.

How it works

When you delete a note, the file moves fromusers/<you>/notes/<id>.jsonintousers/<you>/_trash/notes/<id>-<slug>.json. A small metadata block is added to the trashed record that records when the delete happened, who issued it, and when the auto-cleanup sweep will permanently remove it.

A sidecar index atusers/<you>/_trash/_index.json keeps a flat summary of every trashed record. The index is rebuilt automatically from the directory listing if it ever goes out of sync (manual file deletion, OneDrive merge conflict, partial crash). The on-disk files are the ground truth. The index is just a read-time optimization.

The /trash page

Open the trash from the small trash-can icon in the top-right corner of the header (just left of your avatar chip) or from the Settings → History & Trash section. Trashed records are grouped into sections by what they are, so all your deleted notes sit together, all your deleted tasks sit together, and so on. The full set of sections is notes, tasks, projects, methods, purchase items, high-level goals, lab links, mass spec protocols, sequences, molecules, inventory items, inventory stocks, and storage locations. A section only appears when it has something in it, so the page stays short when most categories are empty.

Each row shows the following.

  • A checkbox for selecting the row (more on that below).
  • The record’s name (recovered from the original title).
  • Who deleted it and when.
  • A countdown until auto-cleanup (“Expires in 27 days”).
  • A Restore button (returns the record to its original location) and a Permanent delete button (removes the trash file immediately, with a confirmation step).

A sort dropdown in the header switches between Newest first (default), Oldest first, and Expiring soon (urgent-cleanup-first). The sort applies inside each section, so the most relevant rows float to the top of every category at once.

Selecting and acting in bulk

Cleaning up after a big experiment usually means dealing with more than one stray record at a time. Rather than restoring or deleting rows one by one, you can select several and act on them in a single pass. The checkbox on each row drives the selection, and the checkbox on each section header is a shortcut for selecting everything in that category.

  1. Pick your rows. Tick the checkbox on any row you want to act on. Selections can span more than one section, so you can grab two notes and a task in the same go.
  2. Or grab a whole category. The checkbox in a section header selects every row in that section at once. When only some of the rows in a section are selected, the header checkbox shows a dash to tell you the section is partly selected rather than fully selected.
  3. Act from the bar. As soon as something is selected, a bar slides in at the top of the list showing how many items are selected. From there you can Restore all of them, Permanent delete all of them, or Clear selection to start over.
  4. Confirm a bulk delete. Restoring in bulk happens right away. A bulk permanent delete is irreversible, so it asks you to confirm in a dialog first, and only then removes the selected records for good.
Selecting rows reveals a bar with Restore, Permanent delete, and Clear selection.

The cleanup window

Defaults to 30 days. Change it under Settings → History & Trash. Four options, 7 days, 30 days, 90 days, or Never. The Never option means automatic cleanup never fires, but you can still delete from the trash page manually.

The cleanup pass runs once on every folder-connect. If you keep ResearchOS open for weeks at a time, the sweep waits until your next cold start to clear expired entries. Multi-device users get the same behavior on each device when they connect their folder.

Who can delete a record

Only the record owner sees the Delete button. If a labmate has shared edit access to one of your notes, they can edit it, but they cannot delete it. That’s your call as the owner.

The one carve-out is the lab head. A lab head can delete records owned by other lab members, based on a real role check (your account is a lab head), not a temporary unlock. The trash entry records the lab head as the deleter and rides an audit session id along so the audit log groups the action with the rest of that batch.

Restoring a record

Click Restore on the row. The record is written back to its original path with the metadata block stripped off, and the trash file is removed. The record is now live again at the same id.

When restoring a record whose parent (e.g. a Project that contains the task) is also in trash, a prompt asks whether to restore both or just the child. See “Restoring with a trashed parent” below.

Permanent delete

Use Permanent delete on the row to remove a trash entry ahead of the cleanup window. The button asks for confirmation and is final. After permanent delete, the record is gone. There is no second-level recycle bin.

Archive vs trash on Projects

Projects are the one entity type with TWO recovery states, and both coexist on purpose.

  • Archive (the existing button) keeps the project atusers/<you>/projects/<id>.json with is_archived: true. It is hidden from default views but visible in the archived list. Use this for projects you are done with but want to keep on disk for reference.
  • Delete (now routes through trash) moves the project file to _trash/projects/ and the cleanup window starts. The trash entry preserves theis_archived flag, so a project you archived first and then deleted will come back archived on restore.

Restoring with a trashed parent

Records like Tasks (parent: Project), Notes (no parent), Purchase Items (parent: Task), High-level Goals (parent: Project), and a sub-method (parent: its parent Method) record a soft reference to their parent at delete time. When you restore a record whose parent is ALSO in trash, a prompt asks what you want to do.

  • Restore both (default): restores the parent first, then this record.
  • Just this record: leaves the parent in trash. The record will exist but its parent reference will dangle.
  • Cancel: nothing happens.

If the parent is not in trash (the common case), no prompt fires and the restore proceeds straight through.

What trash does not yet do

Per-record edit history (the per-save timeline plus a revert button) is now shipping on a separate track. It is live today on free-form Notes as a rolling-out pilot. See Version History for what is on and where it goes next. The settings panel also surfaces an “Orphaned files” row as a placeholder. Image attachments referenced only by deleted notes stay on disk for now. A cleanup tool that finds and removes unreferenced images ships in a later phase.