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:
@@ -47,8 +47,6 @@ const makeEntry = (overrides: Partial<VaultEntry> = {}): VaultEntry => ({
|
||||
relatedTo: [],
|
||||
status: 'Active',
|
||||
archived: false,
|
||||
trashed: false,
|
||||
trashedAt: null,
|
||||
modifiedAt: 1700000000,
|
||||
createdAt: 1700000000,
|
||||
fileSize: 100,
|
||||
@@ -125,7 +123,6 @@ describe('buildNewEntry', () => {
|
||||
expect(entry.isA).toBe('Note')
|
||||
expect(entry.status).toBe('Active')
|
||||
expect(entry.archived).toBe(false)
|
||||
expect(entry.trashed).toBe(false)
|
||||
expect(entry.modifiedAt).toBeGreaterThan(0)
|
||||
expect(entry.createdAt).toBe(entry.modifiedAt)
|
||||
})
|
||||
@@ -339,7 +336,6 @@ describe('frontmatterToEntryPatch', () => {
|
||||
['icon', 'star', { icon: 'star' }],
|
||||
['sidebar_label', 'Projects', { sidebarLabel: 'Projects' }],
|
||||
['archived', true, { archived: true }],
|
||||
['trashed', true, { trashed: true }],
|
||||
['order', 5, { order: 5 }],
|
||||
['template', '## Heading\n\n', { template: '## Heading\n\n' }],
|
||||
['visible', false, { visible: false }],
|
||||
|
||||
Reference in New Issue
Block a user