@memberjunction/ng-dashboards 6.2.0-edge.5 → 6.2.0-edge.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/README.md +28 -0
  2. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts +1 -1
  3. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.d.ts.map +1 -1
  4. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +15 -7
  5. package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
  6. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts +7 -1
  7. package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
  8. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +209 -57
  9. package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
  10. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts +12 -11
  11. package/dist/AI/components/duplicates/duplicate-detection-run-scope.d.ts.map +1 -1
  12. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js +15 -15
  13. package/dist/AI/components/duplicates/duplicate-detection-run-scope.js.map +1 -1
  14. package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
  15. package/dist/AI/components/execution-monitoring.component.js +28 -16
  16. package/dist/AI/components/execution-monitoring.component.js.map +1 -1
  17. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +1 -0
  18. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
  19. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +30 -6
  20. package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js.map +1 -1
  21. package/dist/AI/components/tags/tags-resource.component.d.ts +1 -1
  22. package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
  23. package/dist/AI/components/tags/tags-resource.component.js +15 -7
  24. package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
  25. package/dist/AI/components/vectors/sensitive-fields.d.ts +9 -4
  26. package/dist/AI/components/vectors/sensitive-fields.d.ts.map +1 -1
  27. package/dist/AI/components/vectors/sensitive-fields.js +39 -14
  28. package/dist/AI/components/vectors/sensitive-fields.js.map +1 -1
  29. package/dist/AI/components/vectors/vector-document-rules.d.ts +13 -0
  30. package/dist/AI/components/vectors/vector-document-rules.d.ts.map +1 -1
  31. package/dist/AI/components/vectors/vector-document-rules.js +14 -0
  32. package/dist/AI/components/vectors/vector-document-rules.js.map +1 -1
  33. package/dist/AI/components/vectors/vector-management-resource.component.d.ts +34 -14
  34. package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
  35. package/dist/AI/components/vectors/vector-management-resource.component.js +127 -50
  36. package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
  37. package/dist/AI/components/vectors/vector-store-selection.d.ts +32 -0
  38. package/dist/AI/components/vectors/vector-store-selection.d.ts.map +1 -0
  39. package/dist/AI/components/vectors/vector-store-selection.js +57 -0
  40. package/dist/AI/components/vectors/vector-store-selection.js.map +1 -0
  41. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +236 -0
  42. package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -0
  43. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +374 -0
  44. package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -0
  45. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +195 -0
  46. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +1 -0
  47. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +2910 -0
  48. package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +1 -0
  49. package/dist/ChiefOfStaff/index.d.ts +3 -0
  50. package/dist/ChiefOfStaff/index.d.ts.map +1 -0
  51. package/dist/ChiefOfStaff/index.js +3 -0
  52. package/dist/ChiefOfStaff/index.js.map +1 -0
  53. package/dist/Communication/communication-logs-resource.component.d.ts.map +1 -1
  54. package/dist/Communication/communication-logs-resource.component.js +2 -1
  55. package/dist/Communication/communication-logs-resource.component.js.map +1 -1
  56. package/dist/Communication/communication-monitor-resource.component.d.ts.map +1 -1
  57. package/dist/Communication/communication-monitor-resource.component.js +23 -18
  58. package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
  59. package/dist/Communication/communication-runs-resource.component.d.ts.map +1 -1
  60. package/dist/Communication/communication-runs-resource.component.js +11 -10
  61. package/dist/Communication/communication-runs-resource.component.js.map +1 -1
  62. package/dist/DashboardEditor/dashboard-editor.component.d.ts +17 -2
  63. package/dist/DashboardEditor/dashboard-editor.component.d.ts.map +1 -1
  64. package/dist/DashboardEditor/dashboard-editor.component.js +94 -43
  65. package/dist/DashboardEditor/dashboard-editor.component.js.map +1 -1
  66. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +24 -0
  67. package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
  68. package/dist/DataExplorer/data-explorer-dashboard.component.js +146 -50
  69. package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
  70. package/dist/DataExplorer/models/explorer-state.interface.d.ts +2 -0
  71. package/dist/DataExplorer/models/explorer-state.interface.d.ts.map +1 -1
  72. package/dist/DataExplorer/models/explorer-state.interface.js.map +1 -1
  73. package/dist/LoginStudio/login-studio-resource.component.d.ts +10 -2
  74. package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
  75. package/dist/LoginStudio/login-studio-resource.component.js +110 -77
  76. package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
  77. package/dist/MCP/mcp-dashboard.component.d.ts +24 -4
  78. package/dist/MCP/mcp-dashboard.component.d.ts.map +1 -1
  79. package/dist/MCP/mcp-dashboard.component.js +118 -65
  80. package/dist/MCP/mcp-dashboard.component.js.map +1 -1
  81. package/dist/PredictiveStudio/business-predictions.view-models.d.ts +1 -1
  82. package/dist/PredictiveStudio/business-predictions.view-models.d.ts.map +1 -1
  83. package/dist/PredictiveStudio/business-predictions.view-models.js +3 -3
  84. package/dist/PredictiveStudio/business-predictions.view-models.js.map +1 -1
  85. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts +6 -63
  86. package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
  87. package/dist/PredictiveStudio/components/ps-experiments.component.js +256 -521
  88. package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
  89. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts +0 -18
  90. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.d.ts.map +1 -1
  91. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +122 -249
  92. package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js.map +1 -1
  93. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts +5 -9
  94. package/dist/PredictiveStudio/components/ps-pipelines.component.d.ts.map +1 -1
  95. package/dist/PredictiveStudio/components/ps-pipelines.component.js +98 -130
  96. package/dist/PredictiveStudio/components/ps-pipelines.component.js.map +1 -1
  97. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts +53 -4
  98. package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
  99. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +335 -326
  100. package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
  101. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts +19 -0
  102. package/dist/PredictiveStudio/components/ps-row-drivers.component.d.ts.map +1 -0
  103. package/dist/PredictiveStudio/components/ps-row-drivers.component.js +85 -0
  104. package/dist/PredictiveStudio/components/ps-row-drivers.component.js.map +1 -0
  105. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts +19 -1
  106. package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
  107. package/dist/PredictiveStudio/engine/predictive-studio.engine.js +51 -2
  108. package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
  109. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts +3 -1
  110. package/dist/PredictiveStudio/predictive-studio-agent-context.d.ts.map +1 -1
  111. package/dist/PredictiveStudio/predictive-studio-agent-context.js +3 -0
  112. package/dist/PredictiveStudio/predictive-studio-agent-context.js.map +1 -1
  113. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts +27 -4
  114. package/dist/PredictiveStudio/predictive-studio-score-history.service.d.ts.map +1 -1
  115. package/dist/PredictiveStudio/predictive-studio-score-history.service.js +94 -61
  116. package/dist/PredictiveStudio/predictive-studio-score-history.service.js.map +1 -1
  117. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts +29 -5
  118. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
  119. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +185 -103
  120. package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
  121. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js +1 -1
  122. package/dist/PredictiveStudio/resources/ps-studio-resource.component.js.map +1 -1
  123. package/dist/ai-dashboards.module.d.ts +22 -21
  124. package/dist/ai-dashboards.module.d.ts.map +1 -1
  125. package/dist/ai-dashboards.module.js +8 -2
  126. package/dist/ai-dashboards.module.js.map +1 -1
  127. package/dist/public-api.d.ts +2 -0
  128. package/dist/public-api.d.ts.map +1 -1
  129. package/dist/public-api.js +3 -0
  130. package/dist/public-api.js.map +1 -1
  131. package/package.json +71 -71
  132. package/dist/PredictiveStudio/at-risk.view-models.d.ts +0 -120
  133. package/dist/PredictiveStudio/at-risk.view-models.d.ts.map +0 -1
  134. package/dist/PredictiveStudio/at-risk.view-models.js +0 -261
  135. package/dist/PredictiveStudio/at-risk.view-models.js.map +0 -1
  136. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts +0 -109
  137. package/dist/PredictiveStudio/components/ps-confirm-modal.component.d.ts.map +0 -1
  138. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js +0 -323
  139. package/dist/PredictiveStudio/components/ps-confirm-modal.component.js.map +0 -1
  140. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts +0 -137
  141. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.d.ts.map +0 -1
  142. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js +0 -826
  143. package/dist/PredictiveStudio/components/ps-run-experiment-modal.component.js.map +0 -1
@@ -191,6 +191,11 @@ export declare class DuplicateDetectionResourceComponent extends BaseResourceCom
191
191
  DetectionStage: string;
192
192
  /** Raw stage key from the last progress event — used to detect phase transitions */
193
193
  private detectionRawStage;
194
+ /** Run IDs that were found unresponsive so reconnectToActiveRun does not loop on them */
195
+ private staleRunIDs;
196
+ private activeProgressSub;
197
+ private idleTimer;
198
+ private closeComparisonTimer;
194
199
  /** Runtime threshold overrides — initialized from entity doc, adjustable via sliders */
195
200
  RunPotentialThreshold: number;
196
201
  RunAbsoluteThreshold: number;
@@ -315,7 +320,7 @@ export declare class DuplicateDetectionResourceComponent extends BaseResourceCom
315
320
  /**
316
321
  * Check if there's an in-progress detection run and reconnect to its
317
322
  * progress subscription. This handles the case where the user navigated
318
- * away and came back while a run was active.
323
+ * away and came back while a run was active, while ignoring abandoned/stale runs.
319
324
  */
320
325
  private reconnectToActiveRun;
321
326
  /**
@@ -554,6 +559,7 @@ export declare class DuplicateDetectionResourceComponent extends BaseResourceCom
554
559
  RejectIndividualMatch(matchInfo: ComparisonMatchInfo): Promise<void>;
555
560
  /** Undo a rejected individual match (restore to Pending) */
556
561
  UndoRejectIndividualMatch(matchInfo: ComparisonMatchInfo): Promise<void>;
562
+ private updateIndividualMatchStatus;
557
563
  /**
558
564
  * Load the actual entity records for the source + all matches in one RunView call.
559
565
  * Record IDs are stored as composite key strings (e.g., "ID|uuid") — we parse each
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-detection-resource.component.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-resource.component.ts"],"names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IACzC,qBAAqB,CAAC,SAAS,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjF,4DAA4D;IAC/C,yBAAyB,CAAC,SAAS,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQrF;;;;;OAKG;YACW,qBAAqB;IAkDnC;;;OAGG;YACW,0BAA0B;IAyBxC,0EAA0E;IAC1E,OAAO,CAAC,mBAAmB;IAwB3B,uDAAuD;IACvD,OAAO,CAAC,mBAAmB;IA0E3B,8DAA8D;IAC9D,OAAO,CAAC,mBAAmB;IAS3B,+DAA+D;IAC/D,OAAO,CAAC,sBAAsB;IAoB9B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAoCzB;;;;;;OAMG;IACH,OAAO,CAAC,6BAA6B;IAarC,6DAA6D;IAC7D,OAAO,CAAC,sBAAsB;IAW9B,8DAA8D;IAC9D,OAAO,CAAC,YAAY;IAsCpB,2EAA2E;YAC7D,yBAAyB;yCAvtE9B,mCAAmC;2CAAnC,mCAAmC;CAuvE/C;AAED,wBAAgB,8BAA8B,IAAI,IAAI,CAErD"}
1
+ {"version":3,"file":"duplicate-detection-resource.component.d.ts","sourceRoot":"","sources":["../../../../src/AI/components/duplicates/duplicate-detection-resource.component.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgC,SAAS,EAAE,aAAa,EAAkD,MAAM,eAAe,CAAC;AACvI,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAa,gBAAgB,EAA+B,MAAM,sBAAsB,CAAC;AAE9G,OAAO,EACH,YAAY,EACZ,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAGlC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAmB,MAAM,2BAA2B,CAAC;;AAiBtG;;;GAGG;AACH,UAAU,kB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1E,OAAO,CAAC,mBAAmB;IAwB3B,uDAAuD;IACvD,OAAO,CAAC,mBAAmB;IA0E3B,8DAA8D;IAC9D,OAAO,CAAC,mBAAmB;IAS3B,+DAA+D;IAC/D,OAAO,CAAC,sBAAsB;IAoB9B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IAoCzB;;;;;;OAMG;IACH,OAAO,CAAC,6BAA6B;IAarC,6DAA6D;IAC7D,OAAO,CAAC,sBAAsB;IAW9B,8DAA8D;IAC9D,OAAO,CAAC,YAAY;IAsCpB,2EAA2E;YAC7D,yBAAyB;yCA/3E9B,mCAAmC;2CAAnC,mCAAmC;CA+5E/C;AAED,wBAAgB,8BAA8B,IAAI,IAAI,CAErD"}
@@ -19,10 +19,10 @@ import { debounceTime, takeUntil } from 'rxjs/operators';
19
19
  import { CompositeKey, LogStatus, RecordMergeRequest, RunView } from '@memberjunction/core';
20
20
  import { MJNotificationService } from '@memberjunction/ng-notifications';
21
21
  import { KnowledgeHubMetadataEngine } from '@memberjunction/core-entities';
22
- import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
22
+ import { EscapeSQLString, RegisterClass, UUIDsEqual } from '@memberjunction/global';
23
23
  import { BaseResourceComponent, NavigationService, ActivityService } from '@memberjunction/ng-shared';
24
24
  import { BuildDuplicateAgentContext, ResolveEntityDoc, ResolveEntityFilter, } from './duplicate-detection-agent-context';
25
- import { BuildMatchQueriesForDetailIDs, BuildRunScopedDetailsQuery, GroupMatchesByDetail, PickDefaultEntityDocument, SelectCurrentRunForEntity, } from './duplicate-detection-run-scope';
25
+ import { BuildMatchQueriesForDetailIDs, BuildRunScopedDetailsQuery, GroupMatchesByDetail, PickDefaultEntityDocument, SelectCurrentRunForDocument, } from './duplicate-detection-run-scope';
26
26
  import { ValidateStringParam } from '../../../shared/agent-tool-validation';
27
27
  import * as i0 from "@angular/core";
28
28
  import * as i1 from "./compare-value.component";
@@ -1530,6 +1530,11 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
1530
1530
  DetectionStage = '';
1531
1531
  /** Raw stage key from the last progress event — used to detect phase transitions */
1532
1532
  detectionRawStage = '';
1533
+ /** Run IDs that were found unresponsive so reconnectToActiveRun does not loop on them */
1534
+ staleRunIDs = new Set();
1535
+ activeProgressSub = null;
1536
+ idleTimer = null;
1537
+ closeComparisonTimer = null;
1533
1538
  /** Runtime threshold overrides — initialized from entity doc, adjustable via sliders */
1534
1539
  RunPotentialThreshold = 0.70;
1535
1540
  RunAbsoluteThreshold = 0.95;
@@ -1601,9 +1606,7 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
1601
1606
  FilterByEntity(entityName) {
1602
1607
  this.SelectedEntityFilter = entityName;
1603
1608
  this.Filters.EntityName = entityName;
1604
- this.autoSelectDisplayMode();
1605
- this.emitAgentContext();
1606
- this.cdr.detectChanges();
1609
+ this.applyFilters();
1607
1610
  }
1608
1611
  /** Get paged groups for table view */
1609
1612
  GetPagedGroups() {
@@ -1826,6 +1829,16 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
1826
1829
  }
1827
1830
  ngOnDestroy() {
1828
1831
  super.ngOnDestroy();
1832
+ if (this.idleTimer) {
1833
+ clearTimeout(this.idleTimer);
1834
+ this.idleTimer = null;
1835
+ }
1836
+ if (this.closeComparisonTimer) {
1837
+ clearTimeout(this.closeComparisonTimer);
1838
+ this.closeComparisonTimer = null;
1839
+ }
1840
+ this.activeProgressSub?.unsubscribe();
1841
+ this.activeProgressSub = null;
1829
1842
  this.destroy$.next();
1830
1843
  this.destroy$.complete();
1831
1844
  }
@@ -1936,7 +1949,7 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
1936
1949
  * current (see reviewLoadGeneration).
1937
1950
  */
1938
1951
  async fetchReviewRowsForSelectedDocument() {
1939
- const run = SelectCurrentRunForEntity(this.Runs, this.SelectedDocumentThresholds?.EntityID);
1952
+ const run = SelectCurrentRunForDocument(this.Runs, this.SelectedEntityDocumentID);
1940
1953
  if (!run) {
1941
1954
  return { run: null, details: [], matches: [] };
1942
1955
  }
@@ -2001,17 +2014,31 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2001
2014
  /**
2002
2015
  * Check if there's an in-progress detection run and reconnect to its
2003
2016
  * progress subscription. This handles the case where the user navigated
2004
- * away and came back while a run was active.
2017
+ * away and came back while a run was active, while ignoring abandoned/stale runs.
2005
2018
  */
2006
2019
  reconnectToActiveRun() {
2007
2020
  if (this.IsDetecting)
2008
2021
  return; // Already tracking a run
2009
- const activeRun = this.Runs.find(r => r.ProcessingStatus === 'In Progress');
2022
+ const now = Date.now();
2023
+ const maxStaleAgeMs = 5 * 60 * 1000; // 5 minutes without a DB update
2024
+ const activeRun = this.Runs.find(r => {
2025
+ if (r.ProcessingStatus !== 'In Progress' || r.EndedAt != null || r.CancellationRequested) {
2026
+ return false;
2027
+ }
2028
+ if (this.staleRunIDs.has(r.ID)) {
2029
+ return false;
2030
+ }
2031
+ const lastActivity = r.__mj_UpdatedAt ?? r.StartedAt;
2032
+ const lastTime = lastActivity ? new Date(lastActivity).getTime() : 0;
2033
+ return lastTime > 0 && (now - lastTime) < maxStaleAgeMs;
2034
+ });
2010
2035
  if (!activeRun)
2011
2036
  return;
2012
2037
  LogStatus(`[DuplicateDetection] Reconnecting to in-progress run ${activeRun.ID}`);
2013
2038
  this.IsDetecting = true;
2014
- this.DetectionProgress = 0;
2039
+ this.DetectionProgress = (activeRun.TotalItemCount && activeRun.TotalItemCount > 0 && activeRun.ProcessedItemCount != null)
2040
+ ? Math.min(99, Math.round((activeRun.ProcessedItemCount / activeRun.TotalItemCount) * 100))
2041
+ : 0;
2015
2042
  this.DetectionStage = 'Reconnecting...';
2016
2043
  this.cdr.detectChanges();
2017
2044
  this.subscribeToPipelineProgress(activeRun.ID);
@@ -2034,10 +2061,8 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2034
2061
  this.cdr.detectChanges();
2035
2062
  try {
2036
2063
  const md = this.ProviderToUse;
2037
- const dupeRun = await md.GetEntityObject('MJ: Duplicate Runs');
2038
- dupeRun.NewRecord();
2039
2064
  // Look up the EntityID from the entity document's entity name
2040
- const entityInfo = md.Entities.find(e => e.Name === selectedDoc.EntityName);
2065
+ const entityInfo = md.EntityByName(selectedDoc.EntityName);
2041
2066
  if (!entityInfo) {
2042
2067
  MJNotificationService.Instance.CreateSimpleNotification(`Entity "${selectedDoc.EntityName}" not found in metadata`, 'error', 5000);
2043
2068
  this.IsDetecting = false;
@@ -2046,16 +2071,43 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2046
2071
  this.cdr.detectChanges();
2047
2072
  return;
2048
2073
  }
2074
+ // Persist threshold slider overrides onto the selected Entity Document so the
2075
+ // server hook (which reads thresholds from MJ: Entity Documents) uses them.
2076
+ if (this.RunPotentialThreshold !== selectedDoc.PotentialMatchThreshold ||
2077
+ this.RunAbsoluteThreshold !== selectedDoc.AbsoluteMatchThreshold) {
2078
+ const ed = await md.GetEntityObject('MJ: Entity Documents', md.CurrentUser);
2079
+ if (await ed.Load(selectedDoc.ID)) {
2080
+ ed.PotentialMatchThreshold = this.RunPotentialThreshold;
2081
+ ed.AbsoluteMatchThreshold = this.RunAbsoluteThreshold;
2082
+ if (await ed.Save()) {
2083
+ selectedDoc.PotentialMatchThreshold = this.RunPotentialThreshold;
2084
+ selectedDoc.AbsoluteMatchThreshold = this.RunAbsoluteThreshold;
2085
+ }
2086
+ }
2087
+ }
2049
2088
  // DD-1: Track whether merging is available for the selected entity
2050
2089
  this.MergeEnabled = entityInfo.AllowRecordMerge;
2051
2090
  this.ShowMergeWarningBanner = !entityInfo.AllowRecordMerge;
2091
+ const dupeRun = await md.GetEntityObject('MJ: Duplicate Runs');
2092
+ dupeRun.NewRecord();
2052
2093
  dupeRun.EntityID = entityInfo.ID;
2094
+ // The run uses the document picked here, not whichever document the entity updated last.
2095
+ dupeRun.EntityDocumentID = selectedDoc.ID;
2053
2096
  dupeRun.StartedByUserID = this.ProviderToUse.CurrentUser.ID;
2054
2097
  dupeRun.StartedAt = new Date();
2055
2098
  dupeRun.ProcessingStatus = 'In Progress';
2056
2099
  dupeRun.ApprovalStatus = 'Pending';
2100
+ this.detectionActivityID = this.activityService.Start('Duplicate detection', {
2101
+ icon: 'fa-solid fa-clone',
2102
+ detail: selectedDoc.EntityName,
2103
+ progress: 0,
2104
+ });
2057
2105
  const saved = await dupeRun.Save();
2058
2106
  if (!saved) {
2107
+ if (this.detectionActivityID) {
2108
+ this.activityService.Complete(this.detectionActivityID, 'error');
2109
+ this.detectionActivityID = null;
2110
+ }
2059
2111
  console.error('Failed to create duplicate run:', dupeRun.LatestResult?.Message || 'unknown error');
2060
2112
  MJNotificationService.Instance.CreateSimpleNotification(`Failed to start detection: ${dupeRun.LatestResult?.Message || 'unknown error'}`, 'error', 5000);
2061
2113
  this.IsDetecting = false;
@@ -2064,17 +2116,28 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2064
2116
  this.cdr.detectChanges();
2065
2117
  return;
2066
2118
  }
2067
- this.detectionActivityID = this.activityService.Start('Duplicate detection', {
2068
- icon: 'fa-solid fa-clone',
2069
- detail: selectedDoc.EntityName,
2070
- progress: 0,
2071
- });
2072
- // Subscribe to progress using the run ID as PipelineRunID
2119
+ // Subscribe only now, with the saved ID. A new record's create request carries no
2120
+ // primary key, so the server assigns the run's ID and the ID NewRecord() generated
2121
+ // in the browser never matches it: a subscription opened before Save() listens for a
2122
+ // run that never publishes, and its status check finds no such run. A run that
2123
+ // finishes during Save() publishes before this subscription exists, so
2124
+ // subscribeToPipelineProgress checks the run's status right away to catch it.
2073
2125
  this.subscribeToPipelineProgress(dupeRun.ID);
2074
2126
  }
2075
2127
  catch (error) {
2076
2128
  const msg = error instanceof Error ? error.message : String(error);
2077
2129
  console.error('[DuplicateDetection] Error starting detection:', msg);
2130
+ if (this.idleTimer) {
2131
+ clearTimeout(this.idleTimer);
2132
+ this.idleTimer = null;
2133
+ }
2134
+ this.activeProgressSub?.unsubscribe();
2135
+ this.activeProgressSub = null;
2136
+ if (this.detectionActivityID) {
2137
+ this.activityService.Complete(this.detectionActivityID, 'error');
2138
+ this.detectionActivityID = null;
2139
+ }
2140
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to start duplicate detection: ${msg}`, 'error', 5000);
2078
2141
  this.IsDetecting = false;
2079
2142
  this.DetectionStage = '';
2080
2143
  this.emitAgentContext();
@@ -2384,11 +2447,21 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2384
2447
  }
2385
2448
  }
2386
2449
  `;
2387
- let idleTimer = null;
2388
- const finishDetection = (success) => {
2389
- if (idleTimer)
2390
- clearTimeout(idleTimer);
2391
- rxSub?.unsubscribe();
2450
+ if (this.idleTimer) {
2451
+ clearTimeout(this.idleTimer);
2452
+ this.idleTimer = null;
2453
+ }
2454
+ this.activeProgressSub?.unsubscribe();
2455
+ this.activeProgressSub = null;
2456
+ let consecutiveUnchangedPolls = 0;
2457
+ let lastPolledProcessed = -1;
2458
+ const finishDetection = (success, errorMessage) => {
2459
+ if (this.idleTimer) {
2460
+ clearTimeout(this.idleTimer);
2461
+ this.idleTimer = null;
2462
+ }
2463
+ this.activeProgressSub?.unsubscribe();
2464
+ this.activeProgressSub = null;
2392
2465
  Promise.resolve().then(async () => {
2393
2466
  this.IsDetecting = false;
2394
2467
  this.DetectionStage = success ? 'Complete' : 'Error';
@@ -2397,6 +2470,9 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2397
2470
  this.activityService.Complete(this.detectionActivityID, success ? 'success' : 'error');
2398
2471
  this.detectionActivityID = null;
2399
2472
  }
2473
+ if (!success && errorMessage) {
2474
+ MJNotificationService.Instance.CreateSimpleNotification(errorMessage, 'error', 6000);
2475
+ }
2400
2476
  if (success) {
2401
2477
  await this.LoadData();
2402
2478
  }
@@ -2404,16 +2480,72 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2404
2480
  this.cdr.detectChanges();
2405
2481
  });
2406
2482
  };
2407
- const resetIdleTimer = () => {
2408
- if (idleTimer)
2409
- clearTimeout(idleTimer);
2410
- idleTimer = setTimeout(() => {
2411
- if (this.IsDetecting) {
2412
- finishDetection(true);
2483
+ const checkRunStatusOnIdle = async () => {
2484
+ if (!this.IsDetecting)
2485
+ return;
2486
+ try {
2487
+ const rv = RunView.FromMetadataProvider(this.ProviderToUse);
2488
+ const res = await rv.RunView({
2489
+ EntityName: 'MJ: Duplicate Runs',
2490
+ ExtraFilter: `ID='${EscapeSQLString(pipelineRunID)}'`,
2491
+ MaxRows: 1,
2492
+ ResultType: 'entity_object'
2493
+ });
2494
+ if (!this.IsDetecting)
2495
+ return;
2496
+ if (res.Success && res.Results.length > 0) {
2497
+ const run = res.Results[0];
2498
+ if (run.ProcessingStatus === 'Complete') {
2499
+ finishDetection(true);
2500
+ return;
2501
+ }
2502
+ if (run.ProcessingStatus === 'Failed') {
2503
+ finishDetection(false, run.ProcessingErrorMessage || 'Duplicate detection run failed');
2504
+ return;
2505
+ }
2506
+ if (run.EndedAt != null) {
2507
+ finishDetection(true);
2508
+ return;
2509
+ }
2510
+ if (run.TotalItemCount && run.TotalItemCount > 0 && run.ProcessedItemCount != null) {
2511
+ const dbPct = Math.min(99, Math.round((run.ProcessedItemCount / run.TotalItemCount) * 100));
2512
+ if (dbPct > this.DetectionProgress) {
2513
+ this.DetectionProgress = dbPct;
2514
+ this.cdr.detectChanges();
2515
+ }
2516
+ }
2517
+ const currentProcessed = run.ProcessedItemCount ?? 0;
2518
+ if (currentProcessed === lastPolledProcessed) {
2519
+ consecutiveUnchangedPolls++;
2520
+ }
2521
+ else {
2522
+ lastPolledProcessed = currentProcessed;
2523
+ consecutiveUnchangedPolls = 0;
2524
+ }
2525
+ }
2526
+ else {
2527
+ consecutiveUnchangedPolls++;
2528
+ }
2529
+ if (consecutiveUnchangedPolls >= 8) {
2530
+ // 8 consecutive 15s checks (2 minutes) with zero DB or WS progress
2531
+ this.staleRunIDs.add(pipelineRunID);
2532
+ finishDetection(false, 'Duplicate detection timed out with no progress from the server.');
2533
+ return;
2413
2534
  }
2414
- }, 60000); // 60s timeout for duplicate detection (can be very long)
2535
+ resetIdleTimer();
2536
+ }
2537
+ catch (err) {
2538
+ console.error('[DuplicateDetection] Error polling run status:', err);
2539
+ resetIdleTimer();
2540
+ }
2541
+ };
2542
+ const resetIdleTimer = () => {
2543
+ if (this.idleTimer)
2544
+ clearTimeout(this.idleTimer);
2545
+ this.idleTimer = setTimeout(() => {
2546
+ void checkRunStatusOnIdle();
2547
+ }, 15000); // Check DB status after 15s of subscription silence
2415
2548
  };
2416
- resetIdleTimer();
2417
2549
  // Reset phase tracking for this new subscription
2418
2550
  this.detectionRawStage = '';
2419
2551
  const sub = provider.subscribe(subscriptionQuery, { pipelineRunID });
@@ -2425,37 +2557,42 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2425
2557
  const stage = progress['Stage'];
2426
2558
  const pct = Math.max(0, Math.min(100, progress['PercentComplete']));
2427
2559
  const currentItem = progress['CurrentItem'];
2428
- // Detect phase transitions vs. within-phase updates
2429
- const isNewPhase = stage !== this.detectionRawStage;
2430
- if (isNewPhase) {
2431
- // New phase: reset progress and update display
2432
- this.detectionRawStage = stage;
2560
+ // Only reset progress when transitioning out of 'vectorize' into the detection pass;
2561
+ // within the detection pass ('extract' and 'autotag' share the global record counter),
2562
+ // keep progress strictly monotonic so the bar never jumps backward.
2563
+ const isLeavingVectorize = this.detectionRawStage === 'vectorize' && stage !== 'vectorize';
2564
+ this.detectionRawStage = stage;
2565
+ this.DetectionStage = this.formatDetectionStage(stage);
2566
+ if (isLeavingVectorize) {
2433
2567
  this.DetectionProgress = pct;
2434
- this.DetectionStage = this.formatDetectionStage(stage);
2435
2568
  }
2436
- else {
2437
- // Same phase: only move forward (never backward)
2438
- if (pct >= this.DetectionProgress) {
2439
- this.DetectionProgress = pct;
2440
- }
2569
+ else if (pct >= this.DetectionProgress) {
2570
+ this.DetectionProgress = pct;
2441
2571
  }
2442
2572
  this.DetectionCurrentItem = currentItem ?? '';
2573
+ consecutiveUnchangedPolls = 0;
2443
2574
  this.cdr.detectChanges();
2444
2575
  if (stage === 'complete') {
2445
2576
  finishDetection(true);
2446
2577
  }
2447
2578
  else if (stage === 'error') {
2448
- finishDetection(false);
2579
+ finishDetection(false, currentItem || 'Duplicate detection failed');
2449
2580
  }
2450
2581
  else {
2451
2582
  resetIdleTimer();
2452
2583
  }
2453
2584
  },
2454
2585
  error: (err) => {
2586
+ const msg = err instanceof Error ? err.message : String(err);
2455
2587
  console.error('[DuplicateDetection] Pipeline subscription error:', err);
2456
- finishDetection(false);
2588
+ finishDetection(false, `Progress stream error: ${msg}`);
2457
2589
  }
2458
2590
  });
2591
+ this.activeProgressSub = rxSub;
2592
+ // Read the run's status now rather than after the first 15s of silence: a run that
2593
+ // completed or failed before this subscription connected publishes nothing more, and
2594
+ // this check is what finishes it. The check re-arms the idle timer itself.
2595
+ void checkRunStatusOnIdle();
2459
2596
  }
2460
2597
  /** Format detection stage names for display */
2461
2598
  formatDetectionStage(stage) {
@@ -2546,6 +2683,10 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2546
2683
  // ════════════════════════════════════════════
2547
2684
  /** Open the comparison slide-in panel for a group — loads real entity records */
2548
2685
  async OpenComparison(group) {
2686
+ if (this.closeComparisonTimer) {
2687
+ clearTimeout(this.closeComparisonTimer);
2688
+ this.closeComparisonTimer = null;
2689
+ }
2549
2690
  this.ComparisonGroup = group;
2550
2691
  this.ComparisonShowAllFields = true;
2551
2692
  this.SurvivorColumnIndex = 0;
@@ -2577,7 +2718,11 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
2577
2718
  this.ShowMergeConfirm = false;
2578
2719
  this.ComparisonClosing = true;
2579
2720
  this.cdr.detectChanges();
2580
- setTimeout(() => {
2721
+ if (this.closeComparisonTimer) {
2722
+ clearTimeout(this.closeComparisonTimer);
2723
+ }
2724
+ this.closeComparisonTimer = setTimeout(() => {
2725
+ this.closeComparisonTimer = null;
2581
2726
  this.ComparisonGroup = null;
2582
2727
  this.ComparisonClosing = false;
2583
2728
  this.ComparisonFields = [];
@@ -3132,26 +3277,33 @@ let DuplicateDetectionResourceComponent = class DuplicateDetectionResourceCompon
3132
3277
  }
3133
3278
  /** Approve an individual match */
3134
3279
  async ApproveIndividualMatch(matchInfo) {
3135
- this.IsSaving = true;
3136
- matchInfo.Match.ApprovalStatus = 'Approved';
3137
- await matchInfo.Match.Save();
3138
- this.IsSaving = false;
3139
- this.cdr.detectChanges();
3280
+ await this.updateIndividualMatchStatus(matchInfo, 'Approved');
3140
3281
  }
3141
3282
  /** Reject an individual match (skip it from merge) */
3142
3283
  async RejectIndividualMatch(matchInfo) {
3143
- this.IsSaving = true;
3144
- matchInfo.Match.ApprovalStatus = 'Rejected';
3145
- await matchInfo.Match.Save();
3146
- this.IsSaving = false;
3147
- this.cdr.detectChanges();
3284
+ await this.updateIndividualMatchStatus(matchInfo, 'Rejected');
3148
3285
  }
3149
3286
  /** Undo a rejected individual match (restore to Pending) */
3150
3287
  async UndoRejectIndividualMatch(matchInfo) {
3288
+ await this.updateIndividualMatchStatus(matchInfo, 'Pending');
3289
+ }
3290
+ async updateIndividualMatchStatus(matchInfo, status) {
3291
+ const previousStatus = matchInfo.Match.ApprovalStatus;
3151
3292
  this.IsSaving = true;
3152
- matchInfo.Match.ApprovalStatus = 'Pending';
3153
- await matchInfo.Match.Save();
3293
+ matchInfo.Match.ApprovalStatus = status;
3294
+ const saved = await matchInfo.Match.Save();
3154
3295
  this.IsSaving = false;
3296
+ if (!saved) {
3297
+ matchInfo.Match.ApprovalStatus = previousStatus;
3298
+ MJNotificationService.Instance.CreateSimpleNotification(`Failed to update match status to ${status}`, 'error', 4000);
3299
+ this.cdr.detectChanges();
3300
+ return;
3301
+ }
3302
+ if (this.ComparisonGroup) {
3303
+ this.ComparisonGroup.ApprovalStatus = this.computeDominantApprovalStatus(this.ComparisonGroup.Matches);
3304
+ this.applyFilters();
3305
+ this.emitAgentContext();
3306
+ }
3155
3307
  this.cdr.detectChanges();
3156
3308
  }
3157
3309
  /**