Fixed Event File data mapping for V3 API and updated AGENT_TODO.
Mapped prefixed backend fields 'hosted_file_hash_sha256' and 'hosted_file_size' to flat 'hash_sha256' and 'file_size' properties in the Event File data layer. This resolves component crashes (TypeError: slice on null) by ensuring IndexedDB is populated with valid hash strings. Updated AGENT_TODO.md to reflect recently completed tasks.
This commit is contained in:
@@ -555,6 +555,14 @@ export async function process_ae_obj__event_file_props({
|
||||
obj_type: 'event_file',
|
||||
log_lvl,
|
||||
specific_processor: (obj) => {
|
||||
// SYNC: Map prefixed Hosted File fields to flat names for UI consistency
|
||||
if (obj.hosted_file_hash_sha256 && !obj.hash_sha256) {
|
||||
obj.hash_sha256 = obj.hosted_file_hash_sha256;
|
||||
}
|
||||
if (obj.hosted_file_size && !obj.file_size) {
|
||||
obj.file_size = obj.hosted_file_size;
|
||||
}
|
||||
|
||||
// SYNC: Ensure for_id matches the specific object ID it was linked to
|
||||
if (obj.for_type && !obj.for_id) {
|
||||
const specific_id_key = `${obj.for_type}_id`;
|
||||
|
||||
Reference in New Issue
Block a user