feat: add magic note tags and a two-pane notes layout
Keep the notes list beside the open note, compact the detail view with a full-width sticky toolbar, and make Back to overview return to a full-width all-notes grid. Add manual note tags with AND filtering, a tag manager for rename, merge and delete, schema 51 tag tables, and tag support in the note Agent tools.
This commit is contained in:
@@ -8,14 +8,24 @@ import '../../src/renderer/src/magic-canvas.css'
|
||||
await i18n.changeLanguage('en-US')
|
||||
const note = {
|
||||
id: 'layout-note', title: 'Layout note', preview: 'Record preview', entryCount: 1,
|
||||
pinned: false, revision: 1, createdAt: '2026-09-19T00:00:00Z', updatedAt: '2026-09-19T00:00:00Z',
|
||||
pinned: false, tags: ['Work', 'Release planning', 'Q4', 'Long tag name here'], revision: 1, createdAt: '2026-09-19T00:00:00Z', updatedAt: '2026-09-19T00:00:00Z',
|
||||
entries: [{ id: 'layout-entry', noteId: 'layout-note', revision: 1,
|
||||
createdAt: '2026-09-19T00:00:00Z', updatedAt: '2026-09-19T00:00:00Z',
|
||||
content: { version: 1, ops: [{ insert: 'Record preview\n' }] }, plainText: 'Record preview', comments: [] }]
|
||||
content: { version: 1, ops: [{ insert: 'Record preview\n'.repeat(60) }] }, plainText: 'Record preview', comments: [] }]
|
||||
}
|
||||
const notes = [note, ...Array.from({ length: 24 }, (_, index) => ({
|
||||
...note, id: `other-note-${index}`, title: `Other note ${index}`, tags: index % 3 === 0 ? ['Work'] : [],
|
||||
entries: note.entries.map(entry => ({ ...entry, id: `other-entry-${index}`, noteId: `other-note-${index}` }))
|
||||
}))]
|
||||
const tags = [
|
||||
{ id: 'tag-work', name: 'Work', noteCount: 9 },
|
||||
{ id: 'tag-release', name: 'Release planning', noteCount: 1 },
|
||||
{ id: 'tag-q4', name: 'Q4', noteCount: 1 },
|
||||
{ id: 'tag-long', name: 'Long tag name here', noteCount: 1 }
|
||||
]
|
||||
window.goodbuddy = {
|
||||
magicNotes: {
|
||||
list: async () => ({ notes: [note] }), get: async () => note, listTodos: async () => ({ todos: [{
|
||||
list: async () => ({ notes, tags }), get: async (id: string) => notes.find(note => note.id === id), listTodos: async () => ({ todos: [{
|
||||
id: 'layout-todo', noteId: note.id, noteTitle: note.title, entryId: 'layout-entry',
|
||||
title: 'Layout task', instructions: 'Task details', completed: false, revision: 1,
|
||||
comments: [], createdAt: note.createdAt, updatedAt: note.updatedAt
|
||||
|
||||
Reference in New Issue
Block a user