@hotmeshio/long-tail 0.18.0 → 0.19.0
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.
- package/build/api/escalations/index.d.ts +1 -1
- package/build/api/escalations/index.js +2 -1
- package/build/api/escalations/list.d.ts +11 -0
- package/build/api/escalations/list.js +31 -2
- package/build/api/settings.js +2 -0
- package/build/api/users.d.ts +11 -0
- package/build/api/users.js +19 -0
- package/build/index.js +6 -0
- package/build/lib/uuid.d.ts +11 -0
- package/build/lib/uuid.js +20 -0
- package/build/modules/search.d.ts +21 -0
- package/build/modules/search.js +55 -0
- package/build/routes/escalations/list.js +10 -1
- package/build/routes/users.js +9 -0
- package/build/scripts/ortho-populate.d.ts +3 -1
- package/build/scripts/ortho-populate.js +15 -5
- package/build/sdk/index.d.ts +1 -0
- package/build/services/escalation/batch.js +3 -0
- package/build/services/escalation/bulk.js +8 -0
- package/build/services/escalation/crud.js +26 -0
- package/build/services/escalation/queries.d.ts +14 -1
- package/build/services/escalation/queries.js +49 -7
- package/build/services/escalation/sql.d.ts +4 -2
- package/build/services/escalation/sql.js +4 -0
- package/build/services/role/types.d.ts +18 -0
- package/build/services/role/types.js +6 -0
- package/build/services/user/auth.js +2 -2
- package/build/services/user/crud.d.ts +13 -0
- package/build/services/user/crud.js +26 -3
- package/build/services/user/index.d.ts +1 -1
- package/build/services/user/index.js +2 -1
- package/build/services/user/sql.d.ts +11 -5
- package/build/services/user/sql.js +18 -6
- package/build/start/adapters.js +2 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/startup.d.ts +12 -1
- package/dashboard/dist/assets/{AdminDashboard-mULAQuHV.js → AdminDashboard-DPkWtPc1.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-mULAQuHV.js.map → AdminDashboard-DPkWtPc1.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-DHdzgXcr.js → AgentConfigPage-DRfnLiQS.js} +6 -6
- package/dashboard/dist/assets/{AgentConfigPage-DHdzgXcr.js.map → AgentConfigPage-DRfnLiQS.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-Du_33U2u.js → AgentDetailPage-CufRZXnT.js} +3 -3
- package/dashboard/dist/assets/{AgentDetailPage-Du_33U2u.js.map → AgentDetailPage-CufRZXnT.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-4KkQO2Hl.js → AgentsPage-CoCWGhUd.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-4KkQO2Hl.js.map → AgentsPage-CoCWGhUd.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-BSqOctep.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-BSqOctep.js.map +1 -0
- package/dashboard/dist/assets/{BotPicker-BaFiLa-H.js → BotPicker-DMojDLlV.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-BaFiLa-H.js.map → BotPicker-DMojDLlV.js.map} +1 -1
- package/dashboard/dist/assets/BulkAssignModal-DYbM_6Or.js +2 -0
- package/dashboard/dist/assets/BulkAssignModal-DYbM_6Or.js.map +1 -0
- package/dashboard/dist/assets/CapabilitiesPage-CDQ5JHNP.js +2 -0
- package/dashboard/dist/assets/{CapabilitiesPage-Cewd6Uku.js.map → CapabilitiesPage-CDQ5JHNP.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-D1WIbyDa.js → CollapsibleSection-D4VlCEbD.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-D1WIbyDa.js.map → CollapsibleSection-D4VlCEbD.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-CQsJUzEa.js → ConfirmDeleteModal-DnNHjJtD.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-CQsJUzEa.js.map → ConfirmDeleteModal-DnNHjJtD.js.map} +1 -1
- package/dashboard/dist/assets/CountdownTimer-DPHMBmgz.js +2 -0
- package/dashboard/dist/assets/CountdownTimer-DPHMBmgz.js.map +1 -0
- package/dashboard/dist/assets/CredentialsPage-CSYZw-rL.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-CwtkQUG3.js.map → CredentialsPage-CSYZw-rL.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-CRC_uNuC.js → CronLabel-CpmqDrlJ.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-CRC_uNuC.js.map → CronLabel-CpmqDrlJ.js.map} +1 -1
- package/dashboard/dist/assets/{DropZone-Pv-v5RAs.js → DropZone-BbXlQnYB.js} +2 -2
- package/dashboard/dist/assets/{DropZone-Pv-v5RAs.js.map → DropZone-BbXlQnYB.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-CxAi0zN0.js → ElapsedCell-Cul22qBS.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-CxAi0zN0.js.map → ElapsedCell-Cul22qBS.js.map} +1 -1
- package/dashboard/dist/assets/EntityTimelinePanel-CtzpJ-j2.js +2 -0
- package/dashboard/dist/assets/EntityTimelinePanel-CtzpJ-j2.js.map +1 -0
- package/dashboard/dist/assets/{EscalationListSchemaPage--yZfsE8s.js → EscalationListSchemaPage-BZQ8Y_UH.js} +3 -3
- package/dashboard/dist/assets/{EscalationListSchemaPage--yZfsE8s.js.map → EscalationListSchemaPage-BZQ8Y_UH.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-CmoVqaS7.js → EscalationSchemaPage-CydTtq_A.js} +3 -3
- package/dashboard/dist/assets/{EscalationSchemaPage-CmoVqaS7.js.map → EscalationSchemaPage-CydTtq_A.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-DDQTW6Jo.js → EscalationsOverview-DSYC0nI7.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-DDQTW6Jo.js.map → EscalationsOverview-DSYC0nI7.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-C5jN7XT7.js → EventTable-s48cTXIw.js} +2 -2
- package/dashboard/dist/assets/{EventTable-C5jN7XT7.js.map → EventTable-s48cTXIw.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-CcIgQH9h.js → FilterBar-B61qKmFD.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-CcIgQH9h.js.map → FilterBar-B61qKmFD.js.map} +1 -1
- package/dashboard/dist/assets/GraphInvokePage-DxZv_KC2.js +2 -0
- package/dashboard/dist/assets/{GraphInvokePage-LACIxaiH.js.map → GraphInvokePage-DxZv_KC2.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-zK3VP_9g.js +2 -0
- package/dashboard/dist/assets/HomePage-zK3VP_9g.js.map +1 -0
- package/dashboard/dist/assets/{ListToolbar-CLwSkmUH.js → ListToolbar-DaxloPQc.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-CLwSkmUH.js.map → ListToolbar-DaxloPQc.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-C2U1XfQw.js → McpOverview-Ciq8r6-p.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-C2U1XfQw.js.map → McpOverview-Ciq8r6-p.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-DYOK8A4D.js → McpQueryDetailPage-DIC0FEEb.js} +3 -3
- package/dashboard/dist/assets/{McpQueryDetailPage-DYOK8A4D.js.map → McpQueryDetailPage-DIC0FEEb.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-BBy0NSNg.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-Ck75ikSd.js.map → McpQueryPage-BBy0NSNg.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-CA9gWQ4L.js → McpRunDetailPage-BqKNmIyW.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-CA9gWQ4L.js.map → McpRunDetailPage-BqKNmIyW.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-BhPshset.js → McpRunsPage-D0RlOpzR.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-BhPshset.js.map → McpRunsPage-D0RlOpzR.js.map} +1 -1
- package/dashboard/dist/assets/NamespacePill-Dbtm9R2T.js +2 -0
- package/dashboard/dist/assets/{NamespacePill-DONj6eUU.js.map → NamespacePill-Dbtm9R2T.js.map} +1 -1
- package/dashboard/dist/assets/OperationsPage-BX0SFizr.js +3 -0
- package/dashboard/dist/assets/OperationsPage-BX0SFizr.js.map +1 -0
- package/dashboard/dist/assets/OperatorDashboard-vXG0TjAQ.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-DZOfHRE7.js.map → OperatorDashboard-vXG0TjAQ.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeader-CFVw67M6.js → PageHeader-xB92ELs3.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-CFVw67M6.js.map → PageHeader-xB92ELs3.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-D9tQxILm.js → PageHeaderWithStats-DVo_qqn1.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-D9tQxILm.js.map → PageHeaderWithStats-DVo_qqn1.js.map} +1 -1
- package/dashboard/dist/assets/PersonaDetailPage-w5TXcn4Q.js +2 -0
- package/dashboard/dist/assets/{PersonaDetailPage-eyHDupL0.js.map → PersonaDetailPage-w5TXcn4Q.js.map} +1 -1
- package/dashboard/dist/assets/PersonasPage-Dzcinl1L.js +2 -0
- package/dashboard/dist/assets/PersonasPage-Dzcinl1L.js.map +1 -0
- package/dashboard/dist/assets/{ProcessDetailPage-CKiAlpOc.js → ProcessDetailPage-BVXieFX1.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-CKiAlpOc.js.map → ProcessDetailPage-BVXieFX1.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-C4ueZJxU.js → ProcessesListPage-CKKNpk4z.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-C4ueZJxU.js.map → ProcessesListPage-CKKNpk4z.js.map} +1 -1
- package/dashboard/dist/assets/RoleDetailPage-BytSo-YE.js +8 -0
- package/dashboard/dist/assets/RoleDetailPage-BytSo-YE.js.map +1 -0
- package/dashboard/dist/assets/{RolePill-Di_5hfvw.js → RolePill-CYpL3a2d.js} +2 -2
- package/dashboard/dist/assets/{RolePill-Di_5hfvw.js.map → RolePill-CYpL3a2d.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-eayR9H4f.js +2 -0
- package/dashboard/dist/assets/{RolesPage-B3-9Ek0F.js.map → RolesPage-eayR9H4f.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-1k1J1_cv.js → RunAsSelector-D7RPwaAl.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-1k1J1_cv.js.map → RunAsSelector-D7RPwaAl.js.map} +1 -1
- package/dashboard/dist/assets/{ScanCodesPage-CeuVKnpu.js → ScanCodesPage-C8-ZBXF5.js} +2 -2
- package/dashboard/dist/assets/{ScanCodesPage-CeuVKnpu.js.map → ScanCodesPage-C8-ZBXF5.js.map} +1 -1
- package/dashboard/dist/assets/ScanSchemeDetailPage-tQhEgFKf.js +2 -0
- package/dashboard/dist/assets/{ScanSchemeDetailPage-BnivPUJY.js.map → ScanSchemeDetailPage-tQhEgFKf.js.map} +1 -1
- package/dashboard/dist/assets/ScanStationPage-CuhqsBKo.js +2 -0
- package/dashboard/dist/assets/{ScanStationPage-DCSA7pcV.js.map → ScanStationPage-CuhqsBKo.js.map} +1 -1
- package/dashboard/dist/assets/{ScopeBadge-CqIIeWjK.js → ScopeBadge-BmNzZlSj.js} +2 -2
- package/dashboard/dist/assets/{ScopeBadge-CqIIeWjK.js.map → ScopeBadge-BmNzZlSj.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-BWuKz8uB.js → StickyPagination-BIVTAMnP.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-BWuKz8uB.js.map → StickyPagination-BIVTAMnP.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-Cq6AGhgJ.js → StreamMessageDetail-CYSC2cO1.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-Cq6AGhgJ.js.map → StreamMessageDetail-CYSC2cO1.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-DM88avgt.js → SwimlaneTimeline-BMZAs_2K.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-DM88avgt.js.map → SwimlaneTimeline-BMZAs_2K.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-BLwxTNsI.js → TagInput-D1uszNd2.js} +2 -2
- package/dashboard/dist/assets/{TagInput-BLwxTNsI.js.map → TagInput-D1uszNd2.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-Caqe3fG8.js → TaskDetailPage-CVUDUU5Q.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-Caqe3fG8.js.map → TaskDetailPage-CVUDUU5Q.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-DVgcqd-h.js → TaskQueuePill-C2H8oRfn.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-DVgcqd-h.js.map → TaskQueuePill-C2H8oRfn.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-DlQwpXOL.js → TasksListPage-DEQymbXC.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-DlQwpXOL.js.map → TasksListPage-DEQymbXC.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-BinTjiVC.js → TimeAgo-CCxP67Rb.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-BinTjiVC.js.map → TimeAgo-CCxP67Rb.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-DDcfSVeQ.js → TimestampCell-CE5ZUYhV.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-DDcfSVeQ.js.map → TimestampCell-CE5ZUYhV.js.map} +1 -1
- package/dashboard/dist/assets/{ToolPill-C6hkOqPx.js → ToolPill-D-h8AoB8.js} +2 -2
- package/dashboard/dist/assets/{ToolPill-C6hkOqPx.js.map → ToolPill-D-h8AoB8.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-BHuQTyBY.js +2 -0
- package/dashboard/dist/assets/{ToolTestPanel-CZvegH_w.js.map → ToolTestPanel-BHuQTyBY.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-CShiCwz8.js → TopicDetailPage-SFuiludx.js} +3 -3
- package/dashboard/dist/assets/{TopicDetailPage-CShiCwz8.js.map → TopicDetailPage-SFuiludx.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-CAYxRRbI.js → TopicsPage-DO8pUmng.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-CAYxRRbI.js.map → TopicsPage-DO8pUmng.js.map} +1 -1
- package/dashboard/dist/assets/UserName-CsLnT75E.js +2 -0
- package/dashboard/dist/assets/UserName-CsLnT75E.js.map +1 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-DNdXEFcB.js → WorkflowExecutionPage-BttnEvOd.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DNdXEFcB.js.map → WorkflowExecutionPage-BttnEvOd.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowPill-CN-952iI.js → WorkflowPill-CZvBbkn4.js} +2 -2
- package/dashboard/dist/assets/{WorkflowPill-CN-952iI.js.map → WorkflowPill-CZvBbkn4.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-D7DPDeuQ.js → WorkflowsDashboard-BRboBhlK.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-D7DPDeuQ.js.map → WorkflowsDashboard-BRboBhlK.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-C7Z0SpDH.js → WorkflowsOverview-CDFTYeQo.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-C7Z0SpDH.js.map → WorkflowsOverview-CDFTYeQo.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Bxklswko.js → YamlWorkflowDetailPage-CmnZFevp.js} +11 -11
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-Bxklswko.js.map → YamlWorkflowDetailPage-CmnZFevp.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-CkArsPbi.js → YamlWorkflowsPage-Qq1jfcrH.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-CkArsPbi.js.map → YamlWorkflowsPage-Qq1jfcrH.js.map} +1 -1
- package/dashboard/dist/assets/{agents-Ca0hOp2Y.js → agents-C7vUIO7e.js} +2 -2
- package/dashboard/dist/assets/{agents-Ca0hOp2Y.js.map → agents-C7vUIO7e.js.map} +1 -1
- package/dashboard/dist/assets/{bots-9GtbGtH9.js → bots-BaOblnW4.js} +2 -2
- package/dashboard/dist/assets/{bots-9GtbGtH9.js.map → bots-BaOblnW4.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-C0RpEvyY.js → capabilities-RZpmDWoy.js} +2 -2
- package/dashboard/dist/assets/{capabilities-C0RpEvyY.js.map → capabilities-RZpmDWoy.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-ClQiKGyQ.js → controlplane-BwGdcwXR.js} +2 -2
- package/dashboard/dist/assets/{controlplane-ClQiKGyQ.js.map → controlplane-BwGdcwXR.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-B4DG_5v8.js +2 -0
- package/dashboard/dist/assets/escalation-columns-B4DG_5v8.js.map +1 -0
- package/dashboard/dist/assets/index-8LIpvj2e.js +3 -0
- package/dashboard/dist/assets/index-8LIpvj2e.js.map +1 -0
- package/dashboard/dist/assets/index-BICLHYJJ.js +2 -0
- package/dashboard/dist/assets/{index-BLLK2mzy.js.map → index-BICLHYJJ.js.map} +1 -1
- package/dashboard/dist/assets/{index-BLCFN3YR.js → index-BQPUlmmz.js} +2 -2
- package/dashboard/dist/assets/{index-BLCFN3YR.js.map → index-BQPUlmmz.js.map} +1 -1
- package/dashboard/dist/assets/index-BaC3sbJH.js +67 -0
- package/dashboard/dist/assets/index-BaC3sbJH.js.map +1 -0
- package/dashboard/dist/assets/index-BuqpU6ow.js +2 -0
- package/dashboard/dist/assets/{index-DEr9QjVv.js.map → index-BuqpU6ow.js.map} +1 -1
- package/dashboard/dist/assets/index-CD6jtND1.css +1 -0
- package/dashboard/dist/assets/{index-Ba3UsZzz.js → index-CsIw-ZLk.js} +4 -4
- package/dashboard/dist/assets/{index-Ba3UsZzz.js.map → index-CsIw-ZLk.js.map} +1 -1
- package/dashboard/dist/assets/index-CtJkvX9e.js +5 -0
- package/dashboard/dist/assets/{index-Ct_8Tpec.js.map → index-CtJkvX9e.js.map} +1 -1
- package/dashboard/dist/assets/index-D9NtDRtp.js +2 -0
- package/dashboard/dist/assets/{index-BoQirCxt.js.map → index-D9NtDRtp.js.map} +1 -1
- package/dashboard/dist/assets/{index-CeHOGQM4.js → index-DU9-flEo.js} +2 -2
- package/dashboard/dist/assets/{index-CeHOGQM4.js.map → index-DU9-flEo.js.map} +1 -1
- package/dashboard/dist/assets/{index-P1g8r09L.js → index-G3NmdMjt.js} +2 -2
- package/dashboard/dist/assets/{index-P1g8r09L.js.map → index-G3NmdMjt.js.map} +1 -1
- package/dashboard/dist/assets/index-IWufkcH9.js +2 -0
- package/dashboard/dist/assets/{index-DlzW75L4.js.map → index-IWufkcH9.js.map} +1 -1
- package/dashboard/dist/assets/index-iegzyfMv.js +2 -0
- package/dashboard/dist/assets/{index-B-Qpr29t.js.map → index-iegzyfMv.js.map} +1 -1
- package/dashboard/dist/assets/index-xNFTmmsv.js +2 -0
- package/dashboard/dist/assets/{index-CG8oLNHo.js.map → index-xNFTmmsv.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-DzueDGkw.js → knowledge-CjwCbm3E.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DzueDGkw.js.map → knowledge-CjwCbm3E.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CCOzN8dH.js → mcp-C-DMktCT.js} +2 -2
- package/dashboard/dist/assets/{mcp-CCOzN8dH.js.map → mcp-C-DMktCT.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-UeMDiM6I.js → mcp-query-KBeBNHb4.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-UeMDiM6I.js.map → mcp-query-KBeBNHb4.js.map} +1 -1
- package/dashboard/dist/assets/{personas-CKcrzaQX.js → personas-B32sSCxm.js} +2 -2
- package/dashboard/dist/assets/{personas-CKcrzaQX.js.map → personas-B32sSCxm.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-orE-1gpj.js → pipelines-DNLwDumm.js} +2 -2
- package/dashboard/dist/assets/{pipelines-orE-1gpj.js.map → pipelines-DNLwDumm.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-ZOmzxynB.js → tasks-DrWSrjmj.js} +2 -2
- package/dashboard/dist/assets/{tasks-ZOmzxynB.js.map → tasks-DrWSrjmj.js.map} +1 -1
- package/dashboard/dist/assets/{topics-CdYaOCi_.js → topics-DgzGU-vR.js} +2 -2
- package/dashboard/dist/assets/{topics-CdYaOCi_.js.map → topics-DgzGU-vR.js.map} +1 -1
- package/dashboard/dist/assets/{useDebouncedValue-D-uGnSj5.js → useDebouncedValue-DG5JOj1F.js} +2 -2
- package/dashboard/dist/assets/{useDebouncedValue-D-uGnSj5.js.map → useDebouncedValue-DG5JOj1F.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-DMrjlrJJ.js → useNamespace-CdgF7Jxo.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-DMrjlrJJ.js.map → useNamespace-CdgF7Jxo.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-ByyQgu8S.js → useYamlActivityEvents-BEaOtgSZ.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-ByyQgu8S.js.map → useYamlActivityEvents-BEaOtgSZ.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-h-jlRSb9.js → vendor-icons-BCWsItQ7.js} +138 -133
- package/dashboard/dist/assets/{vendor-icons-h-jlRSb9.js.map → vendor-icons-BCWsItQ7.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-CLn05FRV.js → workflows-CX_oarls.js} +2 -2
- package/dashboard/dist/assets/{workflows-CLn05FRV.js.map → workflows-CX_oarls.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DFD_HO__.js → yaml-workflows-YASUDPo0.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DFD_HO__.js.map → yaml-workflows-YASUDPo0.js.map} +1 -1
- package/dashboard/dist/index.html +3 -3
- package/docs/dashboard.md +164 -69
- package/docs/faceted-routing.md +38 -0
- package/docs/hitl/x-lt-list-schema.md +3 -0
- package/docs/operations.md +61 -60
- package/docs/scan-codes.md +18 -0
- package/package.json +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-CjcAIm-d.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-CjcAIm-d.js.map +0 -1
- package/dashboard/dist/assets/BulkAssignModal-DNmji4l-.js +0 -2
- package/dashboard/dist/assets/BulkAssignModal-DNmji4l-.js.map +0 -1
- package/dashboard/dist/assets/CapabilitiesPage-Cewd6Uku.js +0 -2
- package/dashboard/dist/assets/CountdownTimer-BKMmFie6.js +0 -2
- package/dashboard/dist/assets/CountdownTimer-BKMmFie6.js.map +0 -1
- package/dashboard/dist/assets/CredentialsPage-CwtkQUG3.js +0 -2
- package/dashboard/dist/assets/EntityTimelinePanel-DzMuV7ZX.js +0 -2
- package/dashboard/dist/assets/EntityTimelinePanel-DzMuV7ZX.js.map +0 -1
- package/dashboard/dist/assets/GraphInvokePage-LACIxaiH.js +0 -2
- package/dashboard/dist/assets/HomePage-DP9Q-x4a.js +0 -2
- package/dashboard/dist/assets/HomePage-DP9Q-x4a.js.map +0 -1
- package/dashboard/dist/assets/McpQueryPage-Ck75ikSd.js +0 -2
- package/dashboard/dist/assets/Modal-BU7No9NH.js +0 -2
- package/dashboard/dist/assets/Modal-BU7No9NH.js.map +0 -1
- package/dashboard/dist/assets/NamespacePill-DONj6eUU.js +0 -2
- package/dashboard/dist/assets/OperationsPage-MlMzl0Bf.js +0 -3
- package/dashboard/dist/assets/OperationsPage-MlMzl0Bf.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-DZOfHRE7.js +0 -2
- package/dashboard/dist/assets/PersonaDetailPage-eyHDupL0.js +0 -2
- package/dashboard/dist/assets/PersonasPage-CCtRkWiP.js +0 -2
- package/dashboard/dist/assets/PersonasPage-CCtRkWiP.js.map +0 -1
- package/dashboard/dist/assets/RoleDetailPage-BOccQCkx.js +0 -8
- package/dashboard/dist/assets/RoleDetailPage-BOccQCkx.js.map +0 -1
- package/dashboard/dist/assets/RolesPage-B3-9Ek0F.js +0 -2
- package/dashboard/dist/assets/ScanSchemeDetailPage-BnivPUJY.js +0 -2
- package/dashboard/dist/assets/ScanStationPage-DCSA7pcV.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CZvegH_w.js +0 -2
- package/dashboard/dist/assets/UserName-BovQxdSY.js +0 -2
- package/dashboard/dist/assets/UserName-BovQxdSY.js.map +0 -1
- package/dashboard/dist/assets/escalation-columns-CZ12_oQF.js +0 -2
- package/dashboard/dist/assets/escalation-columns-CZ12_oQF.js.map +0 -1
- package/dashboard/dist/assets/index-B-Qpr29t.js +0 -2
- package/dashboard/dist/assets/index-BLLK2mzy.js +0 -2
- package/dashboard/dist/assets/index-BoQirCxt.js +0 -2
- package/dashboard/dist/assets/index-C1oOLjdF.js +0 -3
- package/dashboard/dist/assets/index-C1oOLjdF.js.map +0 -1
- package/dashboard/dist/assets/index-CG8oLNHo.js +0 -2
- package/dashboard/dist/assets/index-CdavRyaX.js +0 -67
- package/dashboard/dist/assets/index-CdavRyaX.js.map +0 -1
- package/dashboard/dist/assets/index-Ct_8Tpec.js +0 -5
- package/dashboard/dist/assets/index-DEr9QjVv.js +0 -2
- package/dashboard/dist/assets/index-DlzW75L4.js +0 -2
- package/dashboard/dist/assets/index-fUqvRHOe.css +0 -1
package/docs/operations.md
CHANGED
|
@@ -1,109 +1,104 @@
|
|
|
1
1
|
# Operations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Operations gives anyone managing a process pipeline a live picture of how work is flowing across a segment of roles. It answers the question the COO actually asks: *are we keeping up, and where are things backing up?* It surfaces as two boards that share one selector:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- **Pace Board** (`/pace`) — actual-vs-target throughput across a segment of roles.
|
|
6
|
+
- **Trend Board** (`/trends`) — the entity lens: where an entity's time goes across the roles that handle it.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
`/operations` redirects to `/pace`.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
## What Operations means
|
|
11
|
+
|
|
12
|
+
A process is a directed sequence of **roles** — each a queue where work lands, is claimed, and gets resolved before moving downstream. The ortho manufacturing pipeline is one example: `design → review → print → grind → glue → finish → qa → ship`. Any set of roles with `parent_role` set forms a process graph.
|
|
13
|
+
|
|
14
|
+
A role opts onto the boards by setting `ops_visible = true` (Role Detail → Pace Board → **Show this role on the Pace Board**). Roles without that flag appear in the Roles admin page but not on the boards.
|
|
10
15
|
|
|
11
16
|
## Capacity settings
|
|
12
17
|
|
|
13
|
-
Each
|
|
18
|
+
Each role has three settings that define what "healthy" looks like — knowing any two derives the third (`target_per_hour = worker_count / (sla_minutes / 60)`):
|
|
14
19
|
|
|
15
20
|
| Field | Description |
|
|
16
21
|
|-------|-------------|
|
|
17
22
|
| `sla_minutes` | Target resolution time in minutes. The default age threshold for the priority count. |
|
|
18
|
-
| `target_per_hour` | Intended throughput — how many items should resolve per hour. Used to compute `throughput_pct` and the
|
|
19
|
-
| `worker_count` | Capacity at this
|
|
23
|
+
| `target_per_hour` | Intended throughput — how many items should resolve per hour. Used to compute `throughput_pct` and the role's expected count on the pace chart. |
|
|
24
|
+
| `worker_count` | Capacity at this role — number of staff or machines expected to be active. |
|
|
20
25
|
|
|
21
26
|
These are set via `PATCH /api/roles/:role` or the Roles admin page.
|
|
22
27
|
|
|
23
|
-
##
|
|
28
|
+
## Jeopardy count
|
|
24
29
|
|
|
25
|
-
Every
|
|
30
|
+
Every role carries one age signal: `priority_count`, the number of **pending, unclaimed** items older than the role's threshold — its jeopardy. It is deliberately a count, not a re-sorted queue — the floor rebalances coarsely, pulling the counted items to the front of the rack, rather than continuously re-ordering everything.
|
|
26
31
|
|
|
27
32
|
Two per-role dials shape it, each with a fallback so the count works from `sla_minutes` alone:
|
|
28
33
|
|
|
29
34
|
| Dial | Description |
|
|
30
35
|
|------|-------------|
|
|
31
36
|
| `priority_facet` | `lt_escalations.metadata` key holding each item's age origin as an ISO 8601 UTC timestamp (e.g. `authorized_at`, the date the order was authorized). Blank = age from `created_at`. When set, items missing the key or holding an unparseable value are not counted. |
|
|
32
|
-
| `priority_threshold_minutes` | Max age before an item counts as
|
|
37
|
+
| `priority_threshold_minutes` | Max age before an item counts as jeopardy. Blank = the role's `sla_minutes`. |
|
|
33
38
|
|
|
34
|
-
Claimed items are excluded — they are already in someone's hands; the count is what still needs pulling forward. On the
|
|
39
|
+
Claimed items are excluded — they are already in someone's hands; the count is what still needs pulling forward. On the board the count renders as a jeopardy action on the role (a warning triangle); clicking it opens the role's queue filtered to `jeopardy=1`, ordered oldest-first by the same facet, so the counted items sit at the top.
|
|
35
40
|
|
|
36
41
|
## Pace chart
|
|
37
42
|
|
|
38
|
-
The chart is the centrepiece. It plots **absolute counts for the selected window** across the
|
|
39
|
-
|
|
40
|
-
Two lines cross the stations:
|
|
41
|
-
|
|
42
|
-
- **Target** — a straight red polyline at each station's expected count for the window (`target_per_hour × window hours`; e.g. 22/h over 15m ≈ 5).
|
|
43
|
-
- **Actual** — a smooth curve through each station's resolved count for the window, with a light area fill beneath it. Reading actual against target shows at a glance which stations are keeping pace.
|
|
44
|
-
|
|
45
|
-
Each station appears as a circle on the actual curve, colored by its pace ratio (`actual / target`):
|
|
46
|
-
|
|
47
|
-
- **Green** — met or beat the target (ratio ≥ 1.0).
|
|
48
|
-
- **Amber** — behind (ratio ≥ 0.6).
|
|
49
|
-
- **Red** — well behind (ratio < 0.6).
|
|
50
|
-
- **Grey** — target unset for this station.
|
|
43
|
+
The chart is the centrepiece. It plots **absolute counts for the selected window** across the segment — every role in dependency order (parent before children) on the X axis.
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
Two lines cross the roles:
|
|
53
46
|
|
|
54
|
-
|
|
47
|
+
- **Target** — a muted-gray dashed polyline at each role's expected count for the window (`target_per_hour × window hours`; e.g. 22/h over 15m ≈ 5).
|
|
48
|
+
- **Actual** — a smooth green curve through each role's resolved count for the window, with a light area fill beneath it. Reading actual against target shows at a glance which roles are keeping pace.
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
5↑ · 2● · 12✓
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
- `↑` pending (amber when > 0)
|
|
61
|
-
- `●` active / claimed (indigo when > 0)
|
|
62
|
-
- `✓` resolved in period (green, bold — the "did we hit target" signal)
|
|
50
|
+
Each role appears as a circle on the actual curve, its radius growing modestly with resolved volume; the selected role gets a ring. Beneath the curve, the live queue shows as two faint stacked bands — **claimed/worked** (orange) and **waiting/unclaimed** (sky). A `lin | log` toggle switches the Y axis (log by default, so small and large queues stay legible together).
|
|
63
51
|
|
|
64
|
-
|
|
52
|
+
Roles without a `target_per_hour` still appear on the X axis — the target line has a gap there, and the tooltip prompts you to set a target rate to plot pace.
|
|
65
53
|
|
|
66
|
-
##
|
|
54
|
+
## Role table
|
|
67
55
|
|
|
68
|
-
Below the chart, a flat table lists every
|
|
56
|
+
Below the chart, a flat table lists every role with its live numbers. Columns in order:
|
|
69
57
|
|
|
70
58
|
| Column | Description |
|
|
71
59
|
|--------|-------------|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
60
|
+
| NAME | The role's display title. |
|
|
61
|
+
| ROLE | The role id (wide viewports). |
|
|
62
|
+
| TARGET/H | Intended throughput — edit inline. |
|
|
63
|
+
| SLA/M | SLA in minutes — edit inline. |
|
|
64
|
+
| WORKERS | Derived capacity — `target ÷ (60 ÷ sla)`. |
|
|
65
|
+
| PENDING | Items queued right now — links to the available queue. |
|
|
66
|
+
| CLAIMED | Items currently claimed — links to the claimed queue. |
|
|
67
|
+
| RESOLVED | Items resolved in the selected period — links to the resolved queue. |
|
|
68
|
+
| P99 WAIT | 99th-percentile queue time (created → claimed) in minutes (wide viewports). |
|
|
69
|
+
| P99 WORK | 99th-percentile processing time (claimed → resolved) in minutes (wide viewports). |
|
|
70
|
+
| MIX | A time-in-state bar for the role's current items. |
|
|
71
|
+
| TREND | Mini fill bar + percentage — the pending-to-target ratio (amber above 1.0, gray below 0.2, green between). |
|
|
72
|
+
| ACTIONS | View queue, configure, and a jeopardy count when the role has aging unclaimed work. |
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
The three status columns carry the chart's hues as faint tints. The jeopardy action links to the escalation queue filtered to that role, `jeopardy=1`, ordered oldest-first by the role's priority facet (`created_at` when none is configured), so the counted items sit at the top.
|
|
80
75
|
|
|
81
|
-
Clicking any row opens the
|
|
76
|
+
Clicking any row opens the role detail panel.
|
|
82
77
|
|
|
83
|
-
##
|
|
78
|
+
## Role detail panel
|
|
84
79
|
|
|
85
|
-
A
|
|
80
|
+
A right rail that slides open when a row or chart circle is clicked. It carries:
|
|
86
81
|
|
|
87
82
|
1. **Identity** — role key, title, description, link to edit in Roles.
|
|
88
|
-
2. **Period selector** — `15m | 1h | 24h | 7d | 30d` toggle for this
|
|
89
|
-
3. **Metrics** — pending / resolved /
|
|
83
|
+
2. **Period selector** — a `15m | 1h | 24h | 7d | 30d` toggle for this role only. It opens on the board's selected window, then adjusts independently.
|
|
84
|
+
3. **Metrics** — pending / resolved / claimed counts; wait and work percentiles (P99, P50, avg); SLA target; worker count; the time-in-state mix and per-entity timelines inline; links to the queue.
|
|
90
85
|
|
|
91
86
|
Close the panel with × or by clicking another row.
|
|
92
87
|
|
|
93
|
-
##
|
|
88
|
+
## Trend Board (the entity lens)
|
|
94
89
|
|
|
95
|
-
The board
|
|
90
|
+
The [combined board selector](dashboard.md#pace-board) offers, alongside the Pace Board segments, one **lens** per entity facet the visible roles declare, labeled `by <key>` (e.g. `by serialNumber`). Choosing a lens navigates to the Trend Board (`/trends`), the active lens deep-linked as `?lens=<key>`. The Trend Board is entity-first: roles sharing the facet form the entity's **system**, and each role contributes states per its `entity_state_source`. Three tiers, aggregate → individual:
|
|
96
91
|
|
|
97
|
-
- **
|
|
98
|
-
- **Slice by** — the same
|
|
99
|
-
- **The entity table** — one row per entity, ranked by tracked time: the entity value, its current state, its own dwell band, its total tracked time, and a timeline action
|
|
92
|
+
- **Where the time went** — how the system's time splits across states over the selected period: a ranked-bar legend by total dwell beside an insight (the leader's share as a headline percentage, `<state> is the biggest time sink`, and `across N stages · M <entity> in queue now`).
|
|
93
|
+
- **Slice by** — the same split per value of any metadata key (`?slice=<key>`, e.g. `model` → `p1s` vs `h2s`), as small-multiple columns ranked by dwell; `?sliceValue=<value>` focuses one value with a paginated entity list.
|
|
94
|
+
- **The entity table** — one row per entity, ranked by tracked time: the entity value, its current state, its own dwell band, its total tracked time, and a timeline action. `?entity=<value>` opens that entity's cross-queue interval timeline in the right panel; `?find=<prefix>` prefix-filters the list.
|
|
100
95
|
|
|
101
96
|
The lens is driven by two dials on the role's Pace Board section ([Role Detail](dashboard.md#role-detail)):
|
|
102
97
|
|
|
103
98
|
| Dial | Description |
|
|
104
99
|
|------|-------------|
|
|
105
100
|
| `entity_facet` | The `lt_escalations.metadata` key naming the entity that moves through the role (e.g. `serialNumber`, `orderId`). Roles sharing a key form that entity's system. Blank = the role has no entity notion. |
|
|
106
|
-
| `entity_state_source` | How the role names the entity's state: **
|
|
101
|
+
| `entity_state_source` | How the role names the entity's state: **Role** (`'role'` — being in this role is one state, e.g. a servicing queue) or **Subtypes** (`'subtype'` — the one role holds several states named by each escalation's subtype, e.g. a fleet role parking `idle` / `printing`). Default `'role'`. |
|
|
107
102
|
|
|
108
103
|
The band tiers are counts-only aggregates, readable by any login while the public board flag stands; the slice and per-entity tiers group by facet values and require full (`read_all`) access to the system's queues. Data comes from `POST /api/escalations/aggregate-by-facets` and `POST /api/escalations/timeline-by-facet` — see [escalation-analytics.md](escalation-analytics.md) for the query contract.
|
|
109
104
|
|
|
@@ -115,16 +110,22 @@ All station metrics come from `GET /api/escalations/station-metrics?period=<peri
|
|
|
115
110
|
|
|
116
111
|
## Period selector
|
|
117
112
|
|
|
118
|
-
The
|
|
113
|
+
The period toggle in the page header controls the chart and table together. It is deep-linked as `?period=` (the `1h` default stays out of the URL for clean links) and carries across a Pace↔Trend switch. The role detail panel has its own independent period toggle so you can zoom into a single role without losing the overview.
|
|
119
114
|
|
|
120
115
|
Period options: `15m`, `1h`, `24h`, `7d`, `30d`.
|
|
121
116
|
|
|
122
|
-
##
|
|
117
|
+
## Scoping the board
|
|
118
|
+
|
|
119
|
+
When your roles declare [link variables](faceted-routing.md#link-variables), a scope pill sits in the board header. Its value is your **device binding** — the same one that scopes your role pins — so binding `facility = north` once (avatar menu → Link variables, or the pill itself) narrows the whole board to that facet: the role counts, the "where the time went" mix, and every entity timeline all reflect only matching rows. The pill shows the active scope (`facility = north`) or `All` when nothing is bound; clearing the binding restores the full board.
|
|
120
|
+
|
|
121
|
+
The scope is a metadata `@>` filter (`GET /api/escalations/station-metrics?...&facets={"facility":"north"}`), applied on top of role scope — it narrows within what you may already see, never widens it. The value picker's choices come from `GET /api/escalations/facet-values?key=<facet>` (the distinct values present in your visible rows).
|
|
122
|
+
|
|
123
|
+
## Configuring a role onto the board
|
|
123
124
|
|
|
124
125
|
1. Go to `/admin/roles` and click the role.
|
|
125
|
-
2.
|
|
126
|
-
3. Set `parent_role` to the upstream role this
|
|
127
|
-
4. The role appears on `/
|
|
126
|
+
2. In the Pace Board section, turn on **Show this role on the Pace Board** and set `sla_minutes`, `target_per_hour`, and `worker_count`.
|
|
127
|
+
3. Set **Prior Step** (`parent_role`) to the upstream role this role receives work from. Leave blank for a segment root.
|
|
128
|
+
4. The role appears on `/pace` on the next refresh — settings take effect live.
|
|
128
129
|
|
|
129
130
|
## The ortho pipeline
|
|
130
131
|
|
|
@@ -140,4 +141,4 @@ See [MCP Admin Tools — Ortho Pipeline](api/mcp/admin.md#ortho-pipeline) for th
|
|
|
140
141
|
|
|
141
142
|
## Navigation
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
**Pace Board** and **Trend Board** are both globally surfaced in the choreography sidebar (the Monitor section of the left rail), separate from the Admin sidebar. Both routes admit every authenticated user — the boards are aggregate counts and trends, readonly by nature. Metrics span all roles for any login while the `features.publicPaceBoard` flag (default on) stands; a deployment that sets it false (e.g. one provisioning external one-time accounts) narrows metrics back to role membership and the boards back to admin-type users and superadmins.
|
package/docs/scan-codes.md
CHANGED
|
@@ -240,6 +240,24 @@ Pair kiosk with `x-lt-transition-done` on the role's form schema
|
|
|
240
240
|
resolve lands back on the list rather than walking browser history — see
|
|
241
241
|
[x-lt-transition](./hitl/x-lt-transition.md).
|
|
242
242
|
|
|
243
|
+
### The work surface — edit freely, badge at submit
|
|
244
|
+
|
|
245
|
+
On the work form, the badge belongs to the submission, not the editing. Once
|
|
246
|
+
an item is claimed, anyone at the bench edits the form freely: a grant is not
|
|
247
|
+
required to type. The submit is the state-changing act, so that is where the
|
|
248
|
+
badge is asked for. The form warns up front who the submit will act as — "When
|
|
249
|
+
you submit, you'll scan your badge to confirm you're <claimant>" — and the
|
|
250
|
+
submit opens a badge prompt naming that claimant. The resolve fires the moment
|
|
251
|
+
a matching badge primes; a badge that is not the claimant's is named and the
|
|
252
|
+
submit is held.
|
|
253
|
+
|
|
254
|
+
The gate is on **use**, not on grant lifetime. Acting grants are single-use:
|
|
255
|
+
the claim already spent the grant it was minted with, so the submit owes a
|
|
256
|
+
fresh tap — every write consumes its own grant. A held token proves nothing
|
|
257
|
+
about whether a submit can succeed, so the surface never lets one skip the
|
|
258
|
+
badge. Editing persists nothing locally, so the identity gate sits at the one
|
|
259
|
+
place a record actually changes, once per change.
|
|
260
|
+
|
|
243
261
|
Mutations attribute to the badged person (`assigned_to`, `resolved_by`)
|
|
244
262
|
with the device recorded beside them (`scanStation` in the scan
|
|
245
263
|
provenance) — every action individually owned and geographically placed.
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,a as b}from"./vendor-query-RUZdMvN6.js";import{b as $t,t as Ft,v as _e,w as Rt,x as Lt,y as _t,z as Bt,A as zt,B as Ut,E as qt,G as Dt,H as It,I as Vt,K as Gt,p as Ht,L as Qt,M as Kt,O as Wt,Q as Xt,R as Yt,T as Zt,U as Jt,V as es,W as ts,X as ss,Y as as,Z as ns,_ as rs,$ as is,a0 as ls,a1 as os}from"./index-CdavRyaX.js";import{i as cs}from"./task-queues-7-sHKPsN.js";import{X as se,ag as ds,ah as us,C as xs,c as ms,ai as hs,aj as ps,t as fs,s as gs,ak as bs,B as ys,al as vs,am as js,Q as Ns,h as Cs,an as ks,P as ws,ao as Ss}from"./vendor-icons-h-jlRSb9.js";import{u as Ke,C as Ps,r as Ms,B as Ts,a as As}from"./BulkAssignModal-DNmji4l-.js";import{m as Es,E as Os,a as $s}from"./escalation-columns-CZ12_oQF.js";import{i as We,s as Fs,E as Rs}from"./CountdownTimer-BKMmFie6.js";import{u as Ls}from"./useFilterParams-crmlBw_l.js";import{u as _s}from"./useDebouncedValue-D-uGnSj5.js";import{D as Bs}from"./DataTable-DFPMeqyQ.js";import{S as zs}from"./StickyPagination-BWuKz8uB.js";import{P as Us}from"./constants-BHkpVaqx.js";import{M as Xe}from"./Modal-BU7No9NH.js";import{R as qs,a as Ds}from"./RowActions-eYrzgQSj.js";import{L as Be,u as Is,f as Vs,a as Gs}from"./vendor-react-CdqEC2zv.js";import"./EntityTimelinePanel-DzMuV7ZX.js";import"./FilterBar-CcIgQH9h.js";import"./PriorityBadge-BETdj4M-.js";import"./RolePill-Di_5hfvw.js";import"./WorkflowPill-CN-952iI.js";import"./StatusBadge-BDeUwPtb.js";import"./EmptyState-lpUFYfun.js";const Hs=["<","<=",">",">=","="],Qs=["priority","created_at","updated_at","status","role"],B="input text-xs py-1",ze="select text-xs py-1",J="text-text-tertiary hover:text-text-primary transition-colors";function Ue(t){return t==="true"?!0:t==="false"?!1:t.trim()!==""&&!Number.isNaN(Number(t))?Number(t):t}const Ks=t=>Object.entries(t??{}).map(([s,i])=>({key:s,value:String(i)})),Ws=t=>(t??[]).map(s=>{const[i,r]=Object.entries(s)[0]??["",""];return{key:i,value:String(r)}});function L({title:t,hint:s,children:i}){return e.jsxs("div",{className:"border-t border-surface-border/50 py-3 first:border-t-0 first:pt-1",children:[e.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between",children:[e.jsx("span",{className:"text-2xs font-medium uppercase tracking-wide text-text-tertiary",children:t}),s&&e.jsx("span",{className:"text-2xs font-mono text-text-tertiary/70",children:s})]}),i]})}function ee({value:t,onChange:s,placeholder:i}){return e.jsx("input",{list:"lt-facet-keys",className:`${B} w-40`,placeholder:i,value:t,onChange:r=>s(r.target.value)})}function Xs({value:t,onChange:s,facetKeys:i=[],search:r="",onSearchChange:g}){const x=Ks(t.facets),m=Ws(t.block),p=t.range??[],o=t.exists??[],y=t.orderBy??[],N=n=>{const u={};for(const d of n)d.key&&(u[d.key]=Ue(d.value));s({...t,facets:Object.keys(u).length?u:void 0})},S=n=>{const u=n.filter(d=>d.key).map(d=>({[d.key]:Ue(d.value)}));s({...t,block:u.length?u:void 0})},M=n=>s({...t,range:n.length?n:void 0}),j=n=>s({...t,exists:n.length?n:void 0}),P=n=>s({...t,orderBy:n.length?n:void 0});return e.jsxs("div",{className:"text-xs",children:[e.jsx("datalist",{id:"lt-facet-keys",children:i.map(n=>e.jsx("option",{value:n},n))}),e.jsxs("datalist",{id:"lt-sort-fields",children:[Qs.map(n=>e.jsx("option",{value:n},n)),i.map(n=>e.jsx("option",{value:`metadata.${n}`},n))]}),g&&e.jsx(L,{title:"Match id",hint:"id · workflow · origin",children:e.jsx("input",{className:`${B} w-full`,placeholder:"Exact escalation, workflow, or origin id…",value:r,onChange:n=>g(n.target.value)})}),e.jsx(L,{title:"Has facet",hint:"metadata @>",children:[...x,{key:"",value:""}].map((n,u)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(ee,{value:n.key,placeholder:"key",onChange:d=>{const l=[...x];l[u]={...n,key:d},N(l)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${B} w-40`,placeholder:"value",value:n.value,onChange:d=>{const l=[...x];l[u]={...n,value:d.target.value},N(l)}}),u<x.length&&e.jsx("button",{className:J,onClick:()=>N(x.filter((d,l)=>l!==u)),children:"×"})]},u))}),e.jsx(L,{title:"Range",hint:"numeric",children:[...p,{facet:"",op:"<=",value:0}].map((n,u)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(ee,{value:n.facet,placeholder:"numeric facet",onChange:d=>{const l=[...p];l[u]={...n,facet:d},M(l.filter(c=>c.facet))}}),e.jsx("select",{className:ze,value:n.op,onChange:d=>{const l=[...p];l[u]={...n,op:d.target.value},M(l.filter(c=>c.facet))},children:Hs.map(d=>e.jsx("option",{value:d,children:d},d))}),e.jsx("input",{type:"number",className:`${B} w-24`,value:n.value,onChange:d=>{const l=[...p];l[u]={...n,value:Number(d.target.value)},M(l.filter(c=>c.facet))}}),u<p.length&&e.jsx("button",{className:J,onClick:()=>M(p.filter((d,l)=>l!==u)),children:"×"})]},u))}),e.jsx(L,{title:"Has key",hint:"metadata ? key",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[o.map(n=>e.jsxs("span",{className:"flex items-center gap-1 rounded bg-accent/15 px-1.5 py-0.5 text-accent",children:[n,e.jsx("button",{className:"text-accent/70 hover:text-accent",onClick:()=>j(o.filter(u=>u!==n)),children:"×"})]},n)),e.jsx(ee,{value:"",placeholder:"+ key",onChange:n=>{n&&!o.includes(n)&&j([...o,n])}})]})}),e.jsx(L,{title:"Exclude",hint:"NOT @>",children:[...m,{key:"",value:""}].map((n,u)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(ee,{value:n.key,placeholder:"key",onChange:d=>{const l=[...m];l[u]={...n,key:d},S(l)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${B} w-40`,placeholder:"value",value:n.value,onChange:d=>{const l=[...m];l[u]={...n,value:d.target.value},S(l)}}),u<m.length&&e.jsx("button",{className:J,onClick:()=>S(m.filter((d,l)=>l!==u)),children:"×"})]},u))}),e.jsx(L,{title:"Sort by",children:[...y,{field:"",direction:"asc"}].map((n,u)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx("input",{list:"lt-sort-fields",className:`${B} w-44`,placeholder:"column or metadata.key",value:n.field,onChange:d=>{const l=[...y];l[u]={...n,field:d.target.value},P(l.filter(c=>c.field))}}),e.jsxs("select",{className:ze,value:n.direction??"asc",onChange:d=>{const l=[...y];l[u]={...n,direction:d.target.value},P(l.filter(c=>c.field))},children:[e.jsx("option",{value:"asc",children:"asc"}),e.jsx("option",{value:"desc",children:"desc"})]}),e.jsxs("label",{className:"flex items-center gap-1 text-text-tertiary",children:[e.jsx("input",{type:"checkbox",checked:!!n.numeric,onChange:d=>{const l=[...y];l[u]={...n,numeric:d.target.checked},P(l.filter(c=>c.field))}}),"num"]}),u<y.length&&e.jsx("button",{className:J,onClick:()=>P(y.filter((d,l)=>l!==u)),children:"×"})]},u))})]})}function Ys({value:t,onChange:s,facetKeys:i,search:r,onSearchChange:g,activeFacetCount:x,onClear:m,onClose:p}){return e.jsxs("div",{className:"h-full overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between px-4 py-3 bg-surface-raised border-b border-surface-border/50",children:[e.jsx("span",{className:"text-xs font-semibold text-text-primary",children:"Faceted query"}),e.jsxs("div",{className:"flex items-center gap-2",children:[x>0&&e.jsx("button",{onClick:m,className:"text-2xs text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"}),e.jsx("button",{onClick:p,className:"p-1 rounded hover:bg-surface-hover text-text-tertiary hover:text-text-primary transition-colors",title:"Close",children:e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"px-4 py-2",children:[e.jsxs("p",{className:"mb-2 text-2xs leading-snug text-text-tertiary",children:["Precise metadata facets plus exact correlation-id lookup — they compose in one SQL query. Facet keys are the ones that actually exist in your visible escalations. Set status to ",e.jsx("span",{className:"font-medium",children:"All"})," to find an order across every status; the whole query is shareable via the URL."]}),e.jsx(Xs,{value:t,onChange:s,facetKeys:i,search:r,onSearchChange:g})]})]})}const qe="created_at";function he(t){return t.replace(/^metadata\./,"")}function Zs({orderBy:t,onChange:s}){const i=t==null?void 0:t[0],r=(i==null?void 0:i.field)??qe,g=(i==null?void 0:i.direction)??"desc",x=r===qe,m=p=>s([{...i??{},field:r,direction:p}]);return e.jsxs("div",{className:"flex items-center gap-1.5",children:[!x&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"text-text-quaternary",children:"sort"}),e.jsx("span",{className:"font-mono max-w-[120px] truncate",title:r,children:he(r)}),e.jsx("button",{onClick:()=>s(void 0),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":"Reset sort to created date",children:e.jsx(se,{className:"w-2.5 h-2.5"})})]}),e.jsxs("div",{className:"flex items-center rounded overflow-hidden border border-surface-border",role:"radiogroup","aria-label":"Sort direction",children:[e.jsx("button",{type:"button",role:"radio","aria-checked":g==="desc",onClick:()=>m("desc"),className:`px-1.5 py-1 transition-colors ${g==="desc"?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:x?"Newest first":`${he(r)} descending`,children:e.jsx(ds,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",role:"radio","aria-checked":g==="asc",onClick:()=>m("asc"),className:`px-1.5 py-1 border-l border-surface-border transition-colors ${g==="asc"?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:x?"Oldest first":`${he(r)} ascending`,children:e.jsx(us,{className:"w-3.5 h-3.5"})})]})]})}const Js=t=>t.isPriorityPending||t.isClaimPending||t.isAssignPending||t.isUnassignPending||t.isTriagePending||t.isCancelPending,te="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-text-secondary bg-surface border border-surface-border rounded-[4px] hover:border-accent/50 hover:text-text-primary transition-colors disabled:opacity-50 disabled:hover:border-surface-border",De=`${te} appearance-none cursor-pointer`,ea="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-status-error bg-surface border border-status-error/30 rounded-[4px] hover:border-status-error hover:bg-status-error/5 transition-colors disabled:opacity-50";function ta(t){var p;const s=Js(t),i=Ke(),{data:r}=$t(),g=Ft(),x=g!==null?g:((p=r==null?void 0:r.ai)==null?void 0:p.enabled)===!0,m=t.selectedCount>0;return e.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${m?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0 pointer-events-none"}`,children:e.jsx("div",{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-2.5 pl-3 pr-2 mt-4 mb-3 bg-surface-sunken/60 border-l-2 border-l-accent",children:[e.jsxs("span",{className:"text-2xs font-semibold uppercase tracking-wider text-accent tabular-nums",children:[t.selectedCount," selected"]}),e.jsx("div",{className:"mx-1 h-4 w-px bg-surface-border"}),e.jsxs("select",{onChange:o=>{o.target.value&&(t.onSetPriority(parseInt(o.target.value)),o.target.value="")},disabled:s,className:De,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Priority…"}),Us.map(o=>e.jsx("option",{value:o.value,children:o.label},o.value))]}),e.jsxs("select",{onChange:o=>{o.target.value&&(t.onClaim(parseInt(o.target.value)),o.target.value="")},disabled:s,className:De,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Claim for…"}),i.map(o=>e.jsx("option",{value:o.value,children:o.label},o.value))]}),e.jsx("button",{onClick:t.onAssign,disabled:s,className:te,children:t.isAssignPending?"Assigning…":"Assign to…"}),e.jsx("button",{onClick:t.onUnassign,disabled:s,className:te,children:t.isUnassignPending?"Unassigning…":"Unassign"}),x&&e.jsx("button",{onClick:t.onTriage,disabled:s,className:te,children:t.isTriagePending?"Triaging…":"Triage"}),t.cancelLabel!==!1&&e.jsx("button",{onClick:t.onCancel,disabled:s,className:ea,children:t.isCancelPending?t.cancelLabel?`${t.cancelLabel}…`:"Cancelling…":t.cancelLabel||"Cancel"}),e.jsx("div",{className:"flex-1"}),s&&e.jsx("span",{className:"text-2xs text-text-tertiary animate-pulse",children:"Processing…"}),e.jsx("button",{onClick:t.onClearSelection,className:"px-1 text-2xs font-medium text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"})]})})})}function sa({open:t,onClose:s,selectedCount:i,onSubmit:r,isPending:g}){const[x,m]=b.useState(""),p=()=>{r(x||void 0)};return e.jsx(Xe,{open:t,onClose:s,title:"Submit for AI Triage",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Submit ",e.jsx("span",{className:"font-medium text-text-primary",children:i})," escalation(s) for AI triage? The triage orchestrator will take over resolution."]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-medium text-text-secondary block mb-1",children:["Triage hint ",e.jsx("span",{className:"text-text-tertiary",children:"(optional)"})]}),e.jsx("input",{type:"text",value:x,onChange:o=>m(o.target.value),placeholder:"e.g., image_orientation",className:"input text-xs font-mono w-full"}),e.jsx("p",{className:"text-2xs text-text-tertiary mt-1",children:"Guides the triage workflow on what remediation to apply"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:s,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:p,disabled:g,className:"btn-primary text-xs",children:g?"Submitting...":"Submit for Triage"})]})]})})}function _(t,s,i){return r=>{t.mutate(r,{onSuccess:()=>{s(),i==null||i()}})}}function aa(t){const s=()=>[...t.selectedIds];return{handleSetPriority:o=>{_(t.setPriority,t.clearSelection)({ids:s(),priority:o})},handleBulkClaim:o=>{_(t.bulkClaim,t.clearSelection)({ids:s(),durationMinutes:o})},handleBulkTriage:o=>{_(t.bulkTriage,t.clearSelection,t.closeTriageModal)({ids:s(),hint:o})},handleBulkAssign:(o,y,N)=>{_(t.bulkAssign,t.clearSelection,t.closeAssignModal)({ids:s(),targetUserId:o,durationMinutes:y,reassign:N})},handleBulkUnassign:()=>{_(t.bulkUnassign,t.clearSelection)({ids:s()})},handleBulkCancel:()=>{_(t.bulkCancel,t.clearSelection,t.closeCancelModal)({ids:s()})}}}function na({claimTarget:t,onClose:s,claimDuration:i,onDurationChange:r,claimDurations:g,onCustomClaimChange:x,onClaim:m,isPending:p}){return e.jsx(Xe,{open:!!t,onClose:s,title:"Claim Escalation",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Claim ",e.jsx("span",{className:"font-medium text-text-primary",children:t==null?void 0:t.type})," for:"]}),e.jsxs("select",{value:i,onChange:o=>{r(o.target.value)},className:"select w-full text-sm",children:[g.map(o=>e.jsx("option",{value:o.value,children:o.label},o.value)),e.jsx("option",{value:"custom",children:"Other..."})]}),i==="custom"&&e.jsx(Ps,{onChange:x,autoFocus:!0}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:s,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:m,className:"btn-primary text-xs",disabled:p,children:p?"Claiming...":"Claim"})]})]})})}const Ye={pending:"--lt-status-queued-graphic",claimed:"--lt-status-claimed-graphic",resolved:"--lt-status-success-graphic",cancelled:"--lt-text-quaternary",expired:"--lt-text-tertiary"},Ze="--lt-text-quaternary";function ra(t){return Ye[t]??Ze}const V=Object.fromEntries(Object.entries(Ye).map(([t,s])=>[t,`rgb(var(${s}))`])),Ie=40,ia=64,la=24,Ve=3;function Je(t){return t<6e4?`${Math.round(t/1e3)}s`:t<36e5?`${Math.round(t/6e4)}m`:t<864e5?`${(t/36e5).toFixed(1)}h`:`${(t/864e5).toFixed(1)}d`}function Ge(t){const s=Date.now()-t;return s<6e4?"just now":s<36e5?`${Math.round(s/6e4)}m ago`:s<864e5?`${Math.round(s/36e5)}h ago`:`${Math.round(s/864e5)}d ago`}function He(t){return t.replace(/-/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function oa(t,s){return t?[...s.filter(r=>r in t),...Object.keys(t).filter(r=>!s.includes(r))].map(r=>[r,t[r]]):[]}function ca({e:t}){const s=t.endMs-t.startMs;if(s<=0)return null;const i=V.pending,r=V.claimed,g=t.status==="cancelled"||t.status==="expired"?V.cancelled:V.resolved;let x=100,m=0,p=0;return t.claimedMs!==null?(x=Math.max(0,Math.min(100,(t.claimedMs-t.startMs)/s*100)),t.isOpen?m=100-x:(m=Math.max(0,Math.min(100-x,(t.endMs-t.claimedMs)/s*100)),p=Math.max(0,100-x-m))):t.isOpen||(p=100,x=0),e.jsxs("div",{className:"mt-2 h-0.5 rounded-full overflow-hidden flex bg-surface-sunken",children:[x>0&&e.jsx("div",{style:{width:`${x}%`,backgroundColor:i,opacity:.6}}),m>0&&e.jsx("div",{style:{width:`${m}%`,backgroundColor:r,opacity:.6}}),p>0&&e.jsx("div",{style:{width:`${p}%`,backgroundColor:g,opacity:.6}})]})}function da({gapMs:t,heightPx:s}){return e.jsx("div",{className:"relative flex items-center justify-center",style:{height:s},children:t>=6e4&&e.jsx("span",{className:"text-2xs text-text-quaternary font-mono bg-surface px-2 relative z-10",children:Je(t)})})}function Qe({e:t,highlightKeys:s,onRowClick:i}){const[r,g]=b.useState(!1),x=V[t.displayStatus]??`rgb(var(${Ze}))`,m=oa(t.metadata,s),p=r?m:m.slice(0,Ve),o=m.length-Ve;return e.jsxs("div",{className:"cursor-pointer max-w-[460px] min-w-[260px] w-full bg-surface-raised rounded-lg shadow-sm border border-surface-border/60 px-3.5 pt-2.5 pb-2 hover:shadow-md hover:border-surface-border transition-all duration-150",style:{borderTopWidth:"3px",borderTopColor:x},onClick:()=>i==null?void 0:i(t),children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-1.5",children:[e.jsx("span",{className:"text-2xs font-bold uppercase tracking-widest text-text-quaternary shrink-0",children:He(t.role)}),e.jsxs("span",{className:"text-xs font-semibold text-text-primary truncate",title:t.type,children:[t.type,t.subtype&&t.subtype!==t.type&&t.subtype!==""&&e.jsxs("span",{className:"font-normal text-text-tertiary",children:[" · ",t.subtype]})]})]}),p.length>0&&e.jsxs("div",{className:"border-t border-surface-border/40 pt-1 space-y-px",children:[p.map(([y,N])=>{const S=String(N),M=s.includes(y);return e.jsxs("div",{className:"group/row flex items-center gap-1.5 -mx-1 px-1 py-[2px] rounded",children:[e.jsx("span",{className:`shrink-0 w-[60px] text-2xs font-mono uppercase tracking-wide truncate ${M?"text-accent":"text-text-quaternary"}`,title:y,children:y}),e.jsx("span",{className:`flex-1 min-w-0 text-2xs font-medium truncate ${M?"text-text-primary":"text-text-tertiary"}`,title:S,children:S}),e.jsxs("span",{className:"flex items-center gap-px shrink-0 opacity-0 group-hover/row:opacity-100 transition-opacity",children:[e.jsx(Be,{to:_e(y,N,t.role),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Filter ${He(t.role)}: ${y} = ${S}`,onClick:j=>j.stopPropagation(),children:e.jsx(hs,{className:"w-2.5 h-2.5"})}),e.jsx(Be,{to:_e(y,N),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Search all: ${y} = ${S}`,onClick:j=>j.stopPropagation(),children:e.jsx(ps,{className:"w-2.5 h-2.5"})})]})]},y)}),o>0&&e.jsx("button",{className:"flex items-center gap-0.5 text-2xs text-text-quaternary hover:text-accent transition-colors mt-0.5 -mx-1 px-1 py-px",onClick:y=>{y.stopPropagation(),g(N=>!N)},children:r?e.jsxs(e.Fragment,{children:[e.jsx(fs,{className:"w-2.5 h-2.5"})," less"]}):e.jsxs(e.Fragment,{children:[e.jsx(gs,{className:"w-2.5 h-2.5"})," ",o," more"]})})]}),e.jsx(ca,{e:t})]})}function ua({escalations:t,highlightKeys:s=[],onRowClick:i,total:r,page:g,totalPages:x,onPageChange:m}){var d,l;const p=Date.now(),y=t.map(c=>{const k=new Date(c.created_at).getTime(),w=c.resolved_at?new Date(c.resolved_at).getTime():null,f=c.claimed_at?new Date(c.claimed_at).getTime():null,C=!w&&c.status!=="cancelled"&&c.status!=="expired",$=w??(C?p:k+3e4),E=c.status==="pending"&&We(c)?"claimed":c.status;return{...c,startMs:k,claimedMs:f,endMs:$,isOpen:C,displayStatus:E}});if(y.length===0)return e.jsx("p",{className:"mt-12 text-center text-sm text-text-tertiary",children:"No escalations matched."});const N=y.length,M=Math.max(Math.abs((((d=y[N-1])==null?void 0:d.startMs)??0)-(((l=y[0])==null?void 0:l.startMs)??0)),1)/Math.max(N-1,1),j=ia/Math.max(M,1),n=new Set(y.map(c=>new Date(c.startMs).toDateString())).size>1;function u(c){const k=new Date(c),w=k.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return n?k.toLocaleDateString([],{month:"short",day:"numeric"})+" "+w:w}return e.jsxs("div",{className:"mt-4 pb-24",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-1/2 -translate-x-px inset-y-0 w-px bg-surface-border/80"}),y.map((c,k)=>{const w=y[k-1],f=w?Math.abs(c.startMs-w.startMs):null,C=f!==null?Math.max(la,Math.round(f*j)):0,$=k%2===0,E=ra(c.displayStatus),z=`rgb(var(${E}))`,G=c.endMs-c.startMs,U=c.isOpen?Ge(c.startMs):`${Ge(c.startMs)} · ${Je(G)}`;return e.jsxs("div",{children:[k>0&&e.jsx(da,{gapMs:f,heightPx:C}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-1 flex justify-end items-center",children:$?e.jsxs("div",{className:"flex items-center",children:[e.jsx(Qe,{e:c,highlightKeys:s,onRowClick:i}),e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:Ie}})]}):e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pr-3",children:U})}),e.jsx("div",{className:"relative z-10 flex-shrink-0 w-3.5 h-3.5 rounded-full border-2 border-surface cursor-pointer transition-all duration-150 hover:scale-[1.5]",style:{backgroundColor:z,boxShadow:`0 0 0 3px rgb(var(${E}) / 0.16), 0 1px 3px rgb(var(${E}) / 0.19)`},onClick:()=>i==null?void 0:i(c)}),e.jsx("div",{className:"flex-1 flex justify-start items-center",children:$?e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pl-3",children:U}):e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:Ie}}),e.jsx(Qe,{e:c,highlightKeys:s,onRowClick:i})]})})]}),e.jsx("div",{className:"flex justify-center relative z-10 mt-0.5",children:e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums bg-surface px-1.5",children:u(c.startMs)})})]},c.id)})]}),x>1&&e.jsxs("div",{className:"sticky bottom-0 z-20 bg-surface/95 backdrop-blur-sm border-t border-surface-border -mx-page-x px-page-x pt-2 pb-4 flex items-center justify-between mt-10",children:[e.jsxs("span",{className:"text-2xs text-text-tertiary",children:["Page ",e.jsx("span",{className:"font-medium text-text-secondary",children:g})," ","of ",e.jsx("span",{className:"font-medium text-text-secondary",children:x})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>m(g-1),disabled:g<=1,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(xs,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>m(g+1),disabled:g>=x,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(ms,{className:"w-4 h-4"})})]})]})]})}function Fa(){var Fe,Re,Le;const t=Is(),{filters:s,setFilter:i,pagination:r}=Ls({filters:{role:"",type:"",priority:"",status:"available",search:""}});Rt({role:s.role||null,verbs:["created","claimed"]});const g=_s(s.search),x=Ke(),[m,p]=b.useState(null),[o,y]=b.useState("30"),[N,S]=b.useState(0),M=b.useCallback(a=>S(a),[]),[j,P]=b.useState(new Set),n=b.useRef(null),u=b.useRef(null),d=b.useCallback(a=>{var v;if((v=u.current)==null||v.disconnect(),u.current=null,!a||typeof ResizeObserver>"u")return;const h=new ResizeObserver(()=>{var Z;(Z=n.current)==null||Z.style.setProperty("--lt-sticky-top",`${a.offsetHeight-1}px`)});h.observe(a),u.current=h},[]),[l,c]=b.useState(!1),[k,w]=Vs(),f=b.useMemo(()=>Lt(k),[k]),C=b.useCallback(a=>{w(h=>{const v=new URLSearchParams(h);return _t(v,a),v.delete("page"),v})},[w]),{data:$}=Bt(l),E=zt(f)+(s.search?1:0),z="facet-query",{setPanel:G,closePanel:U,open:et,ownerKey:tt}=Ut();b.useEffect(()=>{if(!l){U(z);return}G(e.jsx(Ys,{value:f,onChange:C,facetKeys:($==null?void 0:$.keys)??[],search:s.search??"",onSearchChange:a=>i("search",a),activeFacetCount:E,onClear:()=>{C({}),i("search","")},onClose:()=>c(!1)}),{width:420,key:z})},[l,f,C,$,s.search,i,E,G,U]);const pe=et&&tt===z,ae=b.useRef(!1);b.useEffect(()=>{if(pe){ae.current=!0;return}ae.current&&(ae.current=!1,c(!1))},[pe]);const[st,ne]=b.useState(!1),[at,re]=b.useState(!1),[nt,ie]=b.useState(!1),rt=b.useCallback(a=>C({...f,orderBy:a}),[f,C]),H=Gs(),{data:Q}=qt(),fe=Dt(),it=b.useCallback(()=>{var v;const a=window.prompt("Pin label:");if(!(a!=null&&a.trim()))return;const h=((v=Q==null?void 0:Q.preferences)==null?void 0:v.pinnedViews)??[];fe.mutate({pinnedViews:[...h,{id:It(),label:a.trim(),url:H.pathname+H.search,badge:!0}]})},[H.pathname,H.search,Q,fe]),{canBulk:lt}=Vt(),{kiosk:le}=Gt(),ge=f.facets?Object.keys(f.facets):[],oe=k.get("view"),ot=b.useCallback(a=>{w(h=>{const v=new URLSearchParams(h);return a?v.set("view",a):v.delete("view"),v},{replace:!0})},[w]),q=oe==="timeline",ct=b.useCallback(a=>{const{[a]:h,...v}=f.facets??{};C({...f,facets:Object.keys(v).length>0?v:void 0})},[f,C]),be=Ht(),ye=Qt(),ve=Kt(),ce=Wt(),je=Xt(),de=Yt(),K=Zt(),{data:ue}=Jt(),{data:F}=es(),{data:xe}=ts(),{user:W,isSuperAdmin:dt,hasRoleType:ut}=ss(),Ne=dt||ut("admin"),Ce=b.useMemo(()=>new Set(((W==null?void 0:W.roles)??[]).map(a=>a.role)),[W]),xt=b.useMemo(()=>{const a=(F==null?void 0:F.roles)??[];return(Ne?a:a.filter(v=>Ce.has(v.role)&&!cs(v.role))).map(v=>({value:v.role,label:as(v)})).sort((v,Z)=>v.label.localeCompare(Z.label))},[F,Ne,Ce]);b.useEffect(()=>{P(new Set)},[s.role,s.type,s.priority,s.status,g,r.page,r.pageSize]);const D=s.status||"",X=D==="available",ke=D==="claimed",mt=ke?"pending":D==="resolved"?"resolved":D==="cancelled"?"cancelled":D==="expired"?"expired":void 0,T=s.role||(((Fe=f.roles)==null?void 0:Fe.length)===1?f.roles[0]:null),we=ns(T??"",void 0,!!T),ht=rs(T??"",void 0,!!T),me=T?Ms((Re=ht.data)==null?void 0:Re.form_schema).cancel:void 0,I=((Le=we.data)==null?void 0:Le.list_schema)??null,Se=!T||we.isFetched,Pe=100,Me={role:s.role||void 0,type:s.type||void 0,priority:s.priority?parseInt(s.priority):void 0,limit:q?Pe:r.pageSize,offset:r.offset,sort_by:"created_at",order:"desc",search:g||void 0,...f,include:Fs(I)?"envelope":void 0},pt=is({...Me,enabled:X&&Se}),ft=ls({status:mt,claimed:ke||void 0,...Me,enabled:!X&&Se}),gt=X?pt:ft,{data:R,isLoading:bt,error:Y,refetch:yt,isFetching:Te}=gt,A=(R==null?void 0:R.escalations)??[],O=(R==null?void 0:R.total)??0,Ae=!!T&&!!I&&!!I["x-lt-layout"]&&I["x-lt-layout"]!=="table",Ee=Ae&&!q&&(oe?oe==="rich":!0),Oe=q?"timeline":Ee?"rich":"table",$e=b.useMemo(()=>{if(!f.jeopardy||!T)return null;const a=((F==null?void 0:F.roles)??[]).find(v=>v.role===T),h=(a==null?void 0:a.priority_threshold_minutes)??(a==null?void 0:a.sla_minutes)??null;return h!=null?os(h*6e4):null},[f.jeopardy,T,F]),vt=b.useMemo(()=>{const a=new Set;for(const h of A)j.has(h.id)&&a.add(h.role);return[...a]},[A,j]),jt=b.useMemo(()=>A.filter(a=>j.has(a.id)&&We(a)).length,[A,j]),Nt=b.useCallback(()=>P(new Set),[]),Ct=()=>{if(!m)return;const a=o==="custom"?N:parseInt(o);!a||a<=0||be.mutate({id:m.id,durationMinutes:a},{onSuccess:()=>{p(null),t(`/escalations/detail/${m.id}`)}})},{handleSetPriority:kt,handleBulkClaim:wt,handleBulkTriage:St,handleBulkAssign:Pt,handleBulkUnassign:Mt,handleBulkCancel:Tt}=aa({selectedIds:j,clearSelection:Nt,setPriority:ye,bulkClaim:ve,bulkTriage:de,bulkAssign:ce,bulkUnassign:je,bulkCancel:K,closeTriageModal:()=>ne(!1),closeAssignModal:()=>re(!1),closeCancelModal:()=>ie(!1)}),At=a=>{const h=new Set(j);h.has(a)?h.delete(a):h.add(a),P(h)},Et=()=>{j.size===A.length?P(new Set):P(new Set(A.map(a=>a.id)))},Ot=[lt?{key:"select",label:e.jsx("input",{type:"checkbox",checked:A.length>0&&j.size===A.length,onChange:Et,className:"rounded"}),render:a=>e.jsx("input",{type:"checkbox",checked:j.has(a.id),onChange:h=>{h.stopPropagation(),At(a.id)},onClick:h=>h.stopPropagation(),className:"rounded"}),className:"w-10",priority:1}:{key:"spacer",label:"",render:()=>null,className:"w-10",priority:3},...Es({highlightKeys:ge}),{key:"actions",label:"",render:a=>e.jsx(qs,{children:e.jsx(Ds,{icon:bs,title:"Claim escalation",onClick:()=>p(a),alwaysVisible:!0,colorClass:"text-accent/40 hover:text-accent",size:"sm"})}),className:"w-10 text-right"}];return e.jsxs("div",{ref:n,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-10 min-w-0",children:[e.jsx(Os,{role:s.role,options:xt,onChange:a=>i("role",a),locked:le}),!le&&e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:all-escalations"},className:"text-text-quaternary hover:text-accent transition-colors mt-1 shrink-0",title:"Open docs for this page",children:e.jsx(ys,{className:"w-4 h-4",strokeWidth:1.5})})]}),e.jsxs("div",{ref:d,className:"sticky top-0 z-20 bg-surface",children:[e.jsx($s,{filters:s,setFilter:i,roles:(ue==null?void 0:ue.roles)??[],types:(xe==null?void 0:xe.types)??[],showStatus:!0,showSearch:!1,showRole:!le,actions:e.jsxs(e.Fragment,{children:[q&&e.jsxs("span",{className:"text-2xs text-text-tertiary whitespace-nowrap",children:[O>100&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-medium text-text-secondary",children:[(r.page-1)*100+1,"–",Math.min(r.page*100,O)]})," of "]}),e.jsx("span",{className:"font-medium text-text-secondary",children:O})," ",O===1?"escalation":"escalations"]}),e.jsx(Zs,{orderBy:f.orderBy,onChange:rt}),e.jsx("div",{role:"radiogroup","aria-label":"List view",className:"flex items-center rounded overflow-hidden border border-surface-border",children:[{key:"table",title:"Table view",Icon:vs},{key:"rich",title:"Rich view",Icon:js},{key:"timeline",title:"Timeline view",Icon:Ns}].filter(a=>a.key!=="rich"||Ae).map(({key:a,title:h,Icon:v})=>e.jsx("button",{role:"radio","aria-checked":Oe===a,onClick:()=>ot(a),className:`px-1.5 py-1 transition-colors ${Oe===a?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:h,children:e.jsx(v,{className:"w-3.5 h-3.5"})},a))}),e.jsxs("button",{onClick:()=>c(a=>!a),"aria-pressed":l,className:`relative rounded border border-surface-border px-1.5 py-1 transition-colors ${l?"bg-accent text-text-inverse":"icon-link hover:bg-surface-hover"}`,title:"Faceted query",children:[e.jsx(Cs,{className:"w-3.5 h-3.5"}),E>0&&e.jsx("span",{className:"absolute -right-1 -top-1 flex h-3.5 min-w-[14px] items-center justify-center rounded-full bg-accent px-0.5 text-2xs font-medium text-text-inverse",children:E})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:()=>yt(),disabled:Te,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover disabled:opacity-50",title:"Refresh",children:e.jsx(ks,{className:`w-4 h-4 ${Te?"animate-spin":""}`})}),e.jsx("button",{onClick:it,className:"inline-flex h-7 w-7 items-center justify-center rounded icon-link hover:bg-surface-hover",title:"Pin this view — save the current filters to your Pinned section","data-testid":"pin-current-view",children:e.jsx(ws,{className:"w-4 h-4"})})]})]})}),e.jsx(ta,{selectedCount:j.size,onClearSelection:()=>P(new Set),onSetPriority:kt,onClaim:wt,onAssign:()=>re(!0),onUnassign:Mt,onTriage:()=>ne(!0),onCancel:()=>ie(!0),isPriorityPending:ye.isPending,isClaimPending:ve.isPending,isAssignPending:ce.isPending,isUnassignPending:je.isPending,isTriagePending:de.isPending,isCancelPending:K.isPending,cancelLabel:me}),(f.facets&&Object.keys(f.facets).length>0||f.jeopardy)&&e.jsxs("div",{className:"bg-surface/98 backdrop-blur-sm border-b border-surface-border/30 -mx-page-x px-page-x py-2 flex items-center gap-1.5 flex-wrap",children:[f.jeopardy&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-status-error px-2.5 py-0.5 text-2xs font-semibold text-text-inverse",children:[e.jsx(Ss,{className:"w-2.5 h-2.5",strokeWidth:2.5}),"in jeopardy",$e&&e.jsxs("span",{className:"font-mono font-normal opacity-90",children:["> ",$e]}),e.jsx("button",{onClick:()=>C({...f,jeopardy:void 0}),className:"ml-0.5 -mr-0.5 flex items-center text-text-inverse/70 hover:text-text-inverse transition-colors","aria-label":"Clear jeopardy filter",children:e.jsx(se,{className:"w-2.5 h-2.5"})})]}),Object.entries(f.facets??{}).map(([a,h])=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2.5 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"font-mono text-text-tertiary",children:a}),e.jsx("span",{className:"text-text-quaternary",children:"="}),e.jsx("span",{className:"font-mono max-w-[160px] truncate",title:String(h),children:String(h)}),e.jsx("button",{onClick:()=>ct(a),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":`Remove ${a} filter`,children:e.jsx(se,{className:"w-2.5 h-2.5"})})]},a)),Object.keys(f.facets??{}).length>1&&e.jsx("button",{onClick:()=>C({...f,facets:void 0}),className:"text-2xs text-text-quaternary hover:text-text-secondary transition-colors px-1",children:"clear all"})]})]}),Y&&e.jsx("div",{className:"mb-4 px-4 py-3 rounded-md bg-status-error/10 border border-status-error/20 text-xs text-status-error",children:Y.message==="Session expired"?"Your session has expired. Please log in again.":`Failed to load escalations: ${Y.message}`}),q?e.jsx(ua,{escalations:A,highlightKeys:ge,onRowClick:a=>t(`/escalations/detail/${a.id}`,{state:{from:"/escalations/available"}}),total:O,page:r.page,totalPages:Math.ceil(O/Pe),onPageChange:r.setPage}):Ee?e.jsx(Rs,{role:T,listSchema:I,activeEscalations:A,onRowClick:a=>t(`/escalations/detail/${a.id}`,{state:{from:"/escalations/available"}}),onOpenGroup:a=>t(a),onAddFacet:(a,h)=>C({...f,facets:{...f.facets??{},[a]:typeof h=="object"&&h!==null?JSON.stringify(h):h}}),total:O,page:r.page,totalPages:r.totalPages(O),pageSize:r.pageSize,onPageChange:r.setPage,onPageSizeChange:r.setPageSize}):e.jsxs(e.Fragment,{children:[e.jsx(Bs,{columns:Ot,data:A,layout:"fixed",keyFn:a=>a.id,onRowClick:a=>t(`/escalations/detail/${a.id}`,{state:{from:"/escalations/available"}}),isLoading:bt,emptyMessage:Y?"Unable to load data":"No escalations"}),e.jsx(zs,{page:r.page,totalPages:r.totalPages(O),onPageChange:r.setPage,total:O,pageSize:r.pageSize,onPageSizeChange:r.setPageSize})]}),e.jsx(na,{claimTarget:m,onClose:()=>p(null),claimDuration:o,onDurationChange:a=>{y(a),S(0)},claimDurations:x,customClaimMinutes:N,onCustomClaimChange:M,onClaim:Ct,isPending:be.isPending}),e.jsx(sa,{open:st,onClose:()=>ne(!1),selectedCount:j.size,onSubmit:St,isPending:de.isPending}),e.jsx(Ts,{open:at,onClose:()=>re(!1),selectedCount:j.size,selectedRoles:vt,claimedCount:jt,onSubmit:Pt,isPending:ce.isPending}),e.jsx(As,{open:nt,onClose:()=>ie(!1),onConfirm:Tt,selectedCount:j.size,isPending:K.isPending,error:K.error,actionLabel:typeof me=="string"?me:void 0})]})}export{Fa as AvailableEscalationsPage};
|
|
2
|
-
//# sourceMappingURL=AvailableEscalationsPage-CjcAIm-d.js.map
|