Back to Logbook
May 20, 2026 Project: #Portfolio

Auto-embed on save.

satisfied

One more thing. Realised KB documents created via the admin were not getting embeddings until I manually clicked the button. Added beforeInsert / beforeUpdate callbacks to KnowledgeBaseModel: new docs are stamped with embedding_status = 'pending'; updates to title, content, keywords, or tags reset the embedding to pending and clear the stored vector so stale embeddings re-enter the queue.

Cleaned up the gap/next-steps list in the project status docs. Three items I had been carrying — auto-trigger embeddings, translate categories, My Account tests — are all done.

Lessons Learned

Model hooks remove an entire class of "I forgot to click the button" bugs.