perf: memo GridCard, fuse save fns, fix slash tab active color
Some checks failed
CI / Lint, Unit Tests & Build (push) Failing after 1m32s
CI / Deploy production (on server) (push) Has been skipped

This commit is contained in:
Antigravity
2026-06-14 14:06:05 +00:00
parent a8785ed4f1
commit a623454347
120 changed files with 12301 additions and 785 deletions

View File

@@ -557,6 +557,15 @@ export function HomeClient({
emitNoteChange({ type: 'updated', note: fresh })
}, [patchNoteInList])
const handleNoteIllustrationDeleted = useCallback((noteId: string) => {
patchNoteInList(noteId, { illustrationSvg: null })
setNotes((prev) => {
const updated = prev.find((n) => n.id === noteId)
if (updated) emitNoteChange({ type: 'updated', note: { ...updated, illustrationSvg: null } })
return prev
})
}, [patchNoteInList])
const handleGridReorder = useCallback(
async (orderedIds: string[]) => {
setSortOrder('manual')
@@ -1174,6 +1183,7 @@ export function HomeClient({
onMoveToNotebook={handleMoveNoteToNotebook}
onNotePatch={handleNoteContentPatch}
onNoteIllustrationGenerated={handleNoteIllustrationGenerated}
onNoteIllustrationDeleted={handleNoteIllustrationDeleted}
onGridReorder={handleGridReorder}
/>
)}