fix(idaa): resolve BB comment loop and parent mapping issues

- Switched to create_nested_obj_v3 for establishing parent-child links.
- Optimized background load trigger with untrack to prevent infinite loops.
- Resolved MySQL IntegrityError (missing post_id) during comment creation.
- Hardened view component reactivity for Svelte 5.
This commit is contained in:
Scott Idem
2026-02-05 20:10:46 -05:00
parent a3ec7f8c42
commit d6b6e988eb
2 changed files with 11 additions and 8 deletions

View File

@@ -30,16 +30,15 @@
import Comp__post_comment_obj_id_edit from './ae_idaa_comp__post_comment_obj_id_edit.svelte';
import AE_Comp_Hosted_Files_Download_Button from '$lib/ae_core/ae_comp__hosted_files_download_button.svelte';
let ae_promises: key_val = $state({});
import { untrack } from 'svelte';
$effect(() => {
const post_id = $idaa_slct.post_id;
if (post_id) {
if (post_id && post_id !== untrack(() => $idaa_trig.post_id)) {
if (log_lvl) {
console.log(`Post ID selected: ${post_id}`);
console.log(`Post Object selected: `, $lq__post_obj);
}
// Trigger background load
// Trigger background load only if it's a new ID
$idaa_trig.post_id = post_id;
}
});