fix: always load cluster names from trace profiles (DB)

- Removed auto-generated name check that skipped Person_X names
- loadClusterNames now always updates cluster names from trace profiles
- Added requiresApiKey to register, unregister, merge_groups, update_trace_profile_group
- Ensures consistent names across localhost and DDNS access
This commit is contained in:
2026-10-31 00:36:09 +08:00
parent 48bcd84528
commit 52c3e72167

View File

@@ -335,7 +335,8 @@ export async function pollClusterResults(fileUuid: string, onDone?: (results: an
export async function loadClusterNames(fileUuid: string, clusters: any[]) { export async function loadClusterNames(fileUuid: string, clusters: any[]) {
console.log('[loadClusterNames] loading names for', clusters.length, 'clusters') console.log('[loadClusterNames] loading names for', clusters.length, 'clusters')
const promises = clusters.map(async (c) => { const promises = clusters.map(async (c) => {
// Always load name from trace profile (DB is source of truth for custom names) // Always load name from trace profile (DB is source of truth)
// "Person_X" names from clustering are also replaced with DB names
const repTid = c.representative_trace !== undefined && c.representative_trace !== null ? c.representative_trace : c.trace_ids?.[0] const repTid = c.representative_trace !== undefined && c.representative_trace !== null ? c.representative_trace : c.trace_ids?.[0]
if (repTid != null) { if (repTid != null) {
try { try {