refactor: remove Trash system — delete is now permanent with confirm modal

Remove all vestiges of the abandoned Trash system: trashed/trashedAt fields
from types, frontmatter parsing, sidebar filtering, editor banners, inspector
components, mock data, and all related tests. Delete is already permanent via
useDeleteActions with a confirmation dialog. Notes with trashed:true in
existing vault frontmatter are now treated as normal notes (the flag is
ignored by the parser).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-04-06 12:21:56 +02:00
parent 53072eb4f3
commit d0c3a6b889
123 changed files with 359 additions and 3166 deletions

View File

@@ -7,7 +7,6 @@ function makeEntry(overrides: Partial<VaultEntry> = {}): VaultEntry {
path: '/vault/note/test.md', filename: 'test.md', title: 'Test',
isA: 'Note', aliases: [], belongsTo: [], relatedTo: [],
status: null, organized: false, archived: false,
trashed: false, trashedAt: null,
modifiedAt: null, createdAt: null, fileSize: 0,
snippet: '', wordCount: 0, relationships: {},
icon: null, color: null, order: null, template: null, sort: null, outgoingLinks: [],
@@ -577,11 +576,6 @@ describe('isInboxEntry', () => {
expect(isInboxEntry(note)).toBe(false)
})
it('returns false for a trashed note', () => {
const note = makeEntry({ trashed: true })
expect(isInboxEntry(note)).toBe(false)
})
it('returns false for an archived note', () => {
const note = makeEntry({ archived: true })
expect(isInboxEntry(note)).toBe(false)
@@ -686,7 +680,7 @@ describe('filterEntries — folder selection', () => {
expect(result).toEqual([])
})
it('excludes archived and trashed entries by default', () => {
it('excludes archived entries by default', () => {
const withArchived = [
...entries,
makeEntry({ path: '/vault/projects/laputa/archived.md', title: 'Archived', archived: true }),