chore(idaa): note updated_on side effect on favorites toggle
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,12 @@ async function toggle_favorite(event_obj: Record<string, unknown>) {
|
||||
// Optimistic IDB update — liveQuery reactively re-renders the card instantly
|
||||
await db_events.event.update(obj_id, { mod_meetings_json: new_json });
|
||||
|
||||
// NOTE: This PATCH triggers ae_event.updated_on to update (MariaDB ON UPDATE
|
||||
// current_timestamp() fires on every row write). Side effect: starring a meeting
|
||||
// shifts its position when sorted by updated_on, and admins see a spurious "last modified"
|
||||
// timestamp. Long-term fix: either bypass ON UPDATE for this specific write (pass
|
||||
// updated_on = updated_on in the SET clause server-side), or store favorites in a
|
||||
// dedicated per-user table that doesn't touch the event row at all.
|
||||
try {
|
||||
await events_func.update_ae_obj__event({
|
||||
api_cfg: $ae_api,
|
||||
|
||||
Reference in New Issue
Block a user