project-nomad/admin/app
Jake Turner 88b01dd6c1
fix(models): correct inverted belongsTo keys on ChatMessage.session (#921)
foreignKey/localKey were swapped on the ChatMessage → ChatSession
relation. Per Lucid's belongsTo contract, foreignKey is the column
on the child model and localKey is on the parent — so this must be
{ foreignKey: 'session_id', localKey: 'id' }, mirroring the inverse
hasMany on ChatSession.

The relation is not currently preloaded anywhere in the codebase, so
no runtime behavior changes today; this closes a latent bug that
would have broken any future preload('session') call.
2026-05-20 17:15:24 +00:00
..
controllers feat(chat): confirm-on-switch + one-chat-model-at-a-time enforcement 2026-05-20 17:15:21 +00:00
exceptions fix(Docs): documentation renderer fixes 2025-12-23 16:00:33 -08:00
jobs fix(KB): respect Manual ingest policy on post-download dispatch 2026-05-20 17:15:23 +00:00
middleware fix(API): skip compression for Server-Sent Events (#798) 2026-05-20 17:12:38 +00:00
models fix(models): correct inverted belongsTo keys on ChatMessage.session (#921) 2026-05-20 17:15:24 +00:00
services fix(content): show selected tier on cards while downloads are in flight 2026-05-20 17:15:23 +00:00
utils refactor(KB): move FileWarning to shared types/rag following existing convention 2026-05-20 17:14:43 +00:00
validators feat(chat): confirm-on-switch + one-chat-model-at-a-time enforcement 2026-05-20 17:15:21 +00:00