@tickernelz/wardmote-ui 2026.1118.0 → 2026.1118.2

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 (164) hide show
  1. package/dist/assets/{AdapterManager-Cz1qnS9X.js → AdapterManager-DvntZ2AW.js} +1 -1
  2. package/dist/assets/{AdvancedToolsRoute-7YTRdxju.js → AdvancedToolsRoute-CUW8D9Ux.js} +1 -1
  3. package/dist/assets/{AgentActionButtons-CE0nmrqG.js → AgentActionButtons-CQLGCtfu.js} +1 -1
  4. package/dist/assets/{AgentBubbleActionRow-Dqrx638X.js → AgentBubbleActionRow-CnkfFlB3.js} +1 -1
  5. package/dist/assets/{AgentChat-AunGdpGT.js → AgentChat-DCwwZA2b.js} +1 -1
  6. package/dist/assets/{AgentChats-T9fzOwzH.js → AgentChats-DMMLdo-o.js} +1 -1
  7. package/dist/assets/{AgentDefaults-C0WFwQky.js → AgentDefaults-Cu8O2iTJ.js} +1 -1
  8. package/dist/assets/{AgentDetail-DEmzneVa.js → AgentDetail-BMVWOVp-.js} +7 -7
  9. package/dist/assets/{AgentIconPicker-BJerBmcL.js → AgentIconPicker-DJaVz-Vx.js} +1 -1
  10. package/dist/assets/{AgentTodoCard-D1lORgGy.js → AgentTodoCard-C4BfJg4x.js} +1 -1
  11. package/dist/assets/Agents-C0IDC6KD.js +3 -0
  12. package/dist/assets/{AppDetail-BX1FNfWC.js → AppDetail-DzEGsx94.js} +1 -1
  13. package/dist/assets/{AppNotConnected-7VCE3fbW.js → AppNotConnected-BVL32B49.js} +1 -1
  14. package/dist/assets/{ApprovalCard-BFjlBJIl.js → ApprovalCard-DCQ49PuW.js} +1 -1
  15. package/dist/assets/{ApprovalDetail-nh-aAVQ1.js → ApprovalDetail-B0J70llD.js} +1 -1
  16. package/dist/assets/{ApprovalPayload-CrxNpWYr.js → ApprovalPayload-8lqBw-XQ.js} +1 -1
  17. package/dist/assets/{Approvals-T3qTJIwh.js → Approvals-BkiVjx0M.js} +1 -1
  18. package/dist/assets/{AppsConnect-D7l2xnv-.js → AppsConnect-B_hvpdTB.js} +1 -1
  19. package/dist/assets/{AppsReview-BQpLs2ic.js → AppsReview-CeXp22cE.js} +1 -1
  20. package/dist/assets/{ArtifactCard-9vsmkZzO.js → ArtifactCard-BV82tDLI.js} +1 -1
  21. package/dist/assets/{Artifacts-DN7vvCse.js → Artifacts-CL5ZmZ3m.js} +1 -1
  22. package/dist/assets/{AssistantConnection-DFVB49U5.js → AssistantConnection-C5rmoEsm.js} +1 -1
  23. package/dist/assets/{AttentionInteractionResolver-61BN1ky5.js → AttentionInteractionResolver-DxZpuIIF.js} +1 -1
  24. package/dist/assets/AuditHub-DDPFGvHG.js +1 -0
  25. package/dist/assets/{Auth-D0lGuVnd.js → Auth-CkILt4fl.js} +1 -1
  26. package/dist/assets/{BoardChat-CMIqWEbi.js → BoardChat-DlaNGzcQ.js} +3 -3
  27. package/dist/assets/{BoardClaim-CbYY66Qd.js → BoardClaim-B135Nebr.js} +1 -1
  28. package/dist/assets/{BootstrapSetupUxLab-M3IOGjXI.js → BootstrapSetupUxLab-B2tOIzXd.js} +1 -1
  29. package/dist/assets/{Browse-AYCtuCFi.js → Browse-xEc9mGl7.js} +1 -1
  30. package/dist/assets/{BudgetPolicyCard-Cwm5wpvU.js → BudgetPolicyCard-Ccr3EX5M.js} +1 -1
  31. package/dist/assets/{CaseDetail-CgZ4u934.js → CaseDetail-CvMk_M-F.js} +2 -2
  32. package/dist/assets/{Cases-BvCHo_JJ.js → Cases-H1Y4Oipe.js} +2 -2
  33. package/dist/assets/{ChatEndpointDetail-CM83nK2S.js → ChatEndpointDetail-CjDVQWl8.js} +1 -1
  34. package/dist/assets/{ChatEndpointSetup-Dzm1h4LA.js → ChatEndpointSetup-BfohtKVM.js} +1 -1
  35. package/dist/assets/{ChatIdentityConfirm-Dc4AnYX8.js → ChatIdentityConfirm-tOTIxwjm.js} +1 -1
  36. package/dist/assets/{CliAuth-CatEsBxW.js → CliAuth-CE0EwTW_.js} +1 -1
  37. package/dist/assets/{Companies-BBdNER6U.js → Companies-C4ObCu9j.js} +1 -1
  38. package/dist/assets/{CompanyAccess-CX4qyiXc.js → CompanyAccess-J5Vwnko2.js} +1 -1
  39. package/dist/assets/{CompanyActivity-Csqqnldg.js → CompanyActivity-B7-kMNmz.js} +1 -1
  40. package/dist/assets/{CompanyConnections-Ds1e8fjb.js → CompanyConnections-D2N6UWXk.js} +1 -1
  41. package/dist/assets/{CompanyEnvironments-BQGpdLk1.js → CompanyEnvironments-ChSu4gxW.js} +1 -1
  42. package/dist/assets/{CompanyExport-CBJU6SZ5.js → CompanyExport-B_opHRSJ.js} +1 -1
  43. package/dist/assets/{CompanyImport-BtODUy1v.js → CompanyImport-DZAMEBBy.js} +1 -1
  44. package/dist/assets/{CompanySettings-x6CbuKeE.js → CompanySettings-Rz8cwgKC.js} +1 -1
  45. package/dist/assets/{CompanySettingsPluginPage-CEDKNwLY.js → CompanySettingsPluginPage-CM-ViPwj.js} +1 -1
  46. package/dist/assets/{CompanySkills-C32TKvfI.js → CompanySkills-BnwPuZze.js} +2 -2
  47. package/dist/assets/{ComposerAddMenu-BPPkbm0o.js → ComposerAddMenu-jKf-6Yli.js} +1 -1
  48. package/dist/assets/{ConfigureBuiltInAgentModal-v8kbSAuE.js → ConfigureBuiltInAgentModal-BAfoTveX.js} +1 -1
  49. package/dist/assets/{ConnectionSetupFlow-g6asOGFg.js → ConnectionSetupFlow-8alK3I_h.js} +1 -1
  50. package/dist/assets/{CopyableGatewayUrl-DM4I2CJE.js → CopyableGatewayUrl-D90Bjxj0.js} +1 -1
  51. package/dist/assets/{Dashboard-4TvnZKHQ.js → Dashboard-DepIxrje.js} +2 -2
  52. package/dist/assets/{DecisionDateChips-H3AqvYWG.js → DecisionDateChips-89KkV4mo.js} +1 -1
  53. package/dist/assets/{DecisionModelSettings-HEZJ0E6n.js → DecisionModelSettings-CvVCBVCM.js} +1 -1
  54. package/dist/assets/{DecisionQueuePage-C--TNteA.js → DecisionQueuePage-nU9qXzln.js} +1 -1
  55. package/dist/assets/{DesignGuide-PDM2oacG.js → DesignGuide-40TixHZ-.js} +4 -4
  56. package/dist/assets/{EmailEndpointSetup-B0haS5AA.js → EmailEndpointSetup-D7-8f1XV.js} +1 -1
  57. package/dist/assets/{EntityRow-B24YmFE7.js → EntityRow-jUxCK6IM.js} +1 -1
  58. package/dist/assets/ExecutionWorkspaceDetail-CnUD3jLO.js +19 -0
  59. package/dist/assets/{GatewayDetail-CtpVgcnJ.js → GatewayDetail-Bg7GU-1a.js} +2 -2
  60. package/dist/assets/{GatewaysList-DCuMJisg.js → GatewaysList-4vvZCBkY.js} +1 -1
  61. package/dist/assets/{GoalDetail-B4Iw4vhL.js → GoalDetail-h7WsjaOO.js} +1 -1
  62. package/dist/assets/{GoalTree-Bxei53eI.js → GoalTree-yPtfejUx.js} +1 -1
  63. package/dist/assets/{Goals-CszzFpXF.js → Goals-DOi3E4DX.js} +1 -1
  64. package/dist/assets/{ImageGalleryModal-7mN3BVkG.js → ImageGalleryModal-D_VQgcBt.js} +1 -1
  65. package/dist/assets/{Inbox-Dzj03JZw.js → Inbox-COKxRKhR.js} +2 -2
  66. package/dist/assets/{InlineBanner-DYx7A02D.js → InlineBanner-DeTqU5Gp.js} +1 -1
  67. package/dist/assets/{InlineEditor-BJTE1pyF.js → InlineEditor-4ew5gxf0.js} +1 -1
  68. package/dist/assets/{InstanceAdvanced-HzNvpWAC.js → InstanceAdvanced-DlMlwZbU.js} +1 -1
  69. package/dist/assets/{InstanceFeatures-C1eqcxDI.js → InstanceFeatures-BbDE9waY.js} +1 -1
  70. package/dist/assets/{InviteLanding-BHDk8eVb.js → InviteLanding-BGvJMHKw.js} +1 -1
  71. package/dist/assets/{IssueChatLongThreadPerf-E61LYLEE.js → IssueChatLongThreadPerf-C3U2FZKJ.js} +1 -1
  72. package/dist/assets/{IssueChatThread-DERjeWcT.js → IssueChatThread-CDKaIB6v.js} +10 -10
  73. package/dist/assets/{IssueDetail--oKqoH82.js → IssueDetail-BCwHANTn.js} +6 -6
  74. package/dist/assets/{IssueDocumentAnnotations-DjcRXcEw.js → IssueDocumentAnnotations-DpFXlkRb.js} +1 -1
  75. package/dist/assets/{IssueOutputSection-Dvul0VAn.js → IssueOutputSection-BzXRmoV7.js} +1 -1
  76. package/dist/assets/{IssueRecoveryActionCard-DpJjLu9A.js → IssueRecoveryActionCard-BYtbaP-M.js} +1 -1
  77. package/dist/assets/{IssueReferencePill-DIqTKSRc.js → IssueReferencePill-BT7NBEy_.js} +1 -1
  78. package/dist/assets/{IssueThreadInteractionCard-PnjBaM8M.js → IssueThreadInteractionCard-Btd0rZ23.js} +1 -1
  79. package/dist/assets/{Issues-Dwcvbvvw.js → Issues-XKf7zemQ.js} +3 -3
  80. package/dist/assets/{LiveNowTodoLine-B3GKP4a7.js → LiveNowTodoLine-CoL6ZNuK.js} +1 -1
  81. package/dist/assets/ManagedAiConnectionDetails-CebBi-Tw.js +1 -0
  82. package/dist/assets/{MarkdownBody-D7qCQaU_.js → MarkdownBody-cPGkwwjq.js} +1 -1
  83. package/dist/assets/{McpConnect-CYz1a9lA.js → McpConnect-ByorZN7G.js} +1 -1
  84. package/dist/assets/{MembershipAction-BCf-FK7R.js → MembershipAction-De0MBfgb.js} +1 -1
  85. package/dist/assets/{MetricCard-DlcBTKQs.js → MetricCard-CTOmJVRL.js} +1 -1
  86. package/dist/assets/{MissingPluginTabPlaceholder-l1R-Q4nh.js → MissingPluginTabPlaceholder-D3N0rd-p.js} +1 -1
  87. package/dist/assets/{ModelsAndProviders-CI6zoBD9.js → ModelsAndProviders-BqM4UJc7.js} +1 -1
  88. package/dist/assets/{NewAgent-BWaZTy_v.js → NewAgent-pMTQYNxn.js} +1 -1
  89. package/dist/assets/{OmpAllSettings-DTJLATQL.js → OmpAllSettings-BeXrdLBc.js} +1 -1
  90. package/dist/assets/{PipelineSettings-pFkHM2Ns.js → PipelineSettings-C2k3BzLQ.js} +2 -2
  91. package/dist/assets/Pipelines-Cr6Xs32p.js +1 -0
  92. package/dist/assets/PixelsOffice-Dfd4XKSj.js +2 -0
  93. package/dist/assets/{PluginManager-DkADWuR8.js → PluginManager-7ZdeHrGQ.js} +1 -1
  94. package/dist/assets/{PluginPage-CBAkPwZs.js → PluginPage-fPlWyFSc.js} +1 -1
  95. package/dist/assets/{PluginSettings-CsXh8PMi.js → PluginSettings-X_VHvvo5.js} +1 -1
  96. package/dist/assets/{ProfileDetailRoute-B6mZqIhS.js → ProfileDetailRoute-PAsWmN-1.js} +1 -1
  97. package/dist/assets/{ProfileSettings-BZG_OvIh.js → ProfileSettings-BACxlGZS.js} +1 -1
  98. package/dist/assets/{ProfileWizardRoute-yUXZqjqr.js → ProfileWizardRoute-Dbq0n7If.js} +1 -1
  99. package/dist/assets/ProjectDetail-DOJZUIWu.js +1 -0
  100. package/dist/assets/{ProjectWorkspaceDetail-rSo7mMQc.js → ProjectWorkspaceDetail-ZNnaHnuA.js} +1 -1
  101. package/dist/assets/{ProjectWorkspacesContent-DnGszD3v.js → ProjectWorkspacesContent-DrWfnTJY.js} +1 -1
  102. package/dist/assets/{Projects-kZ7Li_8n.js → Projects-CCzxmEZ8.js} +1 -1
  103. package/dist/assets/{PublicIssueSharePage-DMy8nXt2.js → PublicIssueSharePage-BUSkP1Js.js} +1 -1
  104. package/dist/assets/{QuestionForm-DF6R7lYE.js → QuestionForm-MfSDsey7.js} +1 -1
  105. package/dist/assets/{RepositoryEditor-BuV4JRgV.js → RepositoryEditor-2QyuT99t.js} +1 -1
  106. package/dist/assets/{ReviewQueueCard-Bz8uXwnD.js → ReviewQueueCard-CrCN_30c.js} +1 -1
  107. package/dist/assets/{RichWorkProductCard-BCB8SaZp.js → RichWorkProductCard-DndJn4LV.js} +1 -1
  108. package/dist/assets/{RoutineDetail-C-gt9_NY.js → RoutineDetail-B5MzV_74.js} +2 -2
  109. package/dist/assets/{RoutineRunVariablesDialog-CrKptoDW.js → RoutineRunVariablesDialog-kGyQVBid.js} +1 -1
  110. package/dist/assets/Routines-B2zX9h3J.js +1 -0
  111. package/dist/assets/ScrollToBottom-Dd3SpeJi.js +1 -0
  112. package/dist/assets/{Search-B-8DqpI2.js → Search-D4W3cZZf.js} +1 -1
  113. package/dist/assets/{Secrets-CPNzZnuu.js → Secrets-C4nbuMIh.js} +3 -3
  114. package/dist/assets/{SidebarNavItem-afEXEFeo.js → SidebarNavItem-kYI7H9f3.js} +1 -1
  115. package/dist/assets/{SkillSourceTree-CR8rC1PY.js → SkillSourceTree-BvGzMa2u.js} +1 -1
  116. package/dist/assets/{SkillSources-3haDckt2.js → SkillSources-DL2tNkcr.js} +1 -1
  117. package/dist/assets/{SkillStudio-CXzQR1ws.js → SkillStudio-BnZ2cfDq.js} +1 -1
  118. package/dist/assets/{SourceTrustBadge-DNvpVd9i.js → SourceTrustBadge-CCPQEGrC.js} +1 -1
  119. package/dist/assets/{StatusCards-D-O7dS5f.js → StatusCards-BkE-9R8F.js} +1 -1
  120. package/dist/assets/{StatusIcon-Bx4H7RuA.js → StatusIcon-Cs1RbJGu.js} +1 -1
  121. package/dist/assets/{SummarySlotCard-CYpYMfTa.js → SummarySlotCard-D1EyiciB.js} +1 -1
  122. package/dist/assets/{TaskChatLab-BfxurxKS.js → TaskChatLab-D3PsNRr5.js} +1 -1
  123. package/dist/assets/{TaskChatMarker-Cj8k3l9N.js → TaskChatMarker-DEF88_sr.js} +2 -2
  124. package/dist/assets/{TaskChatProtocolCard-BsdB1fYv.js → TaskChatProtocolCard-Ba_vhDxn.js} +1 -1
  125. package/dist/assets/{TaskChatThreadView-B90tQ4X1.js → TaskChatThreadView-BsPvbxiA.js} +1 -1
  126. package/dist/assets/{TaskTreeControls-zoH_P07l.js → TaskTreeControls-BKOIbilg.js} +2 -2
  127. package/dist/assets/{Terminal-y6EdGsxY.js → Terminal-1uPX7VEe.js} +1 -1
  128. package/dist/assets/{TerminalView-CWvRC4uL.js → TerminalView-DDv6s-R_.js} +1 -1
  129. package/dist/assets/{ToolsAdminGate-C5dQpL4C.js → ToolsAdminGate-BzvfSwod.js} +1 -1
  130. package/dist/assets/{TrustPresetSection-gUExLKOq.js → TrustPresetSection-BDb0N4Pe.js} +1 -1
  131. package/dist/assets/{UserProfile-uUu_7SHc.js → UserProfile-DqPRuGWk.js} +1 -1
  132. package/dist/assets/{WebhookUrlWarning-CbkWHsPb.js → WebhookUrlWarning-CHx5gr2m.js} +1 -1
  133. package/dist/assets/WhatNeedsMe-DtBxgH24.js +1 -0
  134. package/dist/assets/{WorkspaceRuntimeControls-Cp5E1FME.js → WorkspaceRuntimeControls-Clk2nzU6.js} +1 -1
  135. package/dist/assets/{Workspaces-MhwqOigu.js → Workspaces-BQOyG5HK.js} +1 -1
  136. package/dist/assets/{connection-owner-CslVCQSM.js → connection-owner-CPrMcD3t.js} +1 -1
  137. package/dist/assets/{index-D1wQsid4.js → index-QhteFtm-.js} +16 -16
  138. package/dist/assets/{issue-properties-BXissCm1.js → issue-properties--M7WE6Ot.js} +3 -3
  139. package/dist/assets/{issue-workspace-selection-Ey-jzxzA.js → issue-workspace-selection-pUdSkrJA.js} +1 -1
  140. package/dist/assets/{pipeline-stage-presentation-B_etSYde.js → pipeline-stage-presentation-Dv1xgEPW.js} +1 -1
  141. package/dist/assets/router-CJbFZfVR.js +1 -0
  142. package/dist/assets/{shared-CSvxoeyx.js → shared-B75ClBUg.js} +1 -1
  143. package/dist/assets/{slots-DZ1hj5sG.js → slots-B7lwlN1w.js} +1 -1
  144. package/dist/assets/system-notice-comment-D0I6rz8Y.js +1 -0
  145. package/dist/assets/{task-chat-attachments-DNPQ-jOG.js → task-chat-attachments-2KmZkOL7.js} +1 -1
  146. package/dist/assets/{transcript-adapter-CppFOMQA.js → transcript-adapter-ClaGWYVL.js} +1 -1
  147. package/dist/assets/useSummaryDraftStream-BDuMgNcA.js +3 -0
  148. package/dist/index.html +12 -13
  149. package/dist/sw.js +1 -1
  150. package/package.json +1 -1
  151. package/dist/assets/Agents-BwRQ91d5.js +0 -3
  152. package/dist/assets/AuditHub-CPsJe_Bl.js +0 -1
  153. package/dist/assets/ExecutionWorkspaceDetail-BI4rAhvY.js +0 -19
  154. package/dist/assets/ManagedAiConnectionDetails-D7zoLLKJ.js +0 -1
  155. package/dist/assets/Pipelines-C8_wN0Sv.js +0 -1
  156. package/dist/assets/PixelsOffice-GHMNmVjR.js +0 -2
  157. package/dist/assets/ProjectDetail-CTwwSUZn.js +0 -1
  158. package/dist/assets/Routines-D3JG-gCI.js +0 -1
  159. package/dist/assets/ScrollToBottom-CYzcByH1.js +0 -1
  160. package/dist/assets/WhatNeedsMe-JNJ5uJyH.js +0 -1
  161. package/dist/assets/heartbeats-D96c9g2n.js +0 -1
  162. package/dist/assets/router-BKzUF9uf.js +0 -1
  163. package/dist/assets/system-notice-comment-DPCHQ4-Y.js +0 -1
  164. package/dist/assets/useSummaryDraftStream-DQYbVHb7.js +0 -3
@@ -1,4 +1,4 @@
1
- var ct=Object.defineProperty;var o=(t,i)=>ct(t,"name",{value:i,configurable:!0});import{i as Ge}from"./rolldown-runtime-ZpX3ckPj.js";import{en as dt,h as ut,l as w,la as mt,t as pt,ua as ft}from"./createLucideIcon-CgrPXnTY.js";import{a as ht}from"./star-eem0qj3E.js";import{X as xt,d as gt,t as P,u as bt,v as ae}from"./queryKeys-BzT8CD34.js";import{n as Xe}from"./CompanyContext-fQCNWI_f.js";import{M as yt,on as Ye,q as vt,t as wt,tt as kt,zt as fe}from"./router-BKzUF9uf.js";import{c as jt,n as Nt,o as _t,p as It,r as Tt,s as Ct,t as St}from"./dropdown-menu-rUbU8QKw.js";import{t as At}from"./activity-BwGRpduS.js";import{t as Et}from"./arrow-down-C_oYEUXL.js";import{t as Mt}from"./check-Bis3vECb.js";import{t as Rt}from"./chevron-down-nRcQ7bok.js";import{t as Dt}from"./chevron-right-BP8JjEC_.js";import{t as zt}from"./circle-alert-C7T1cdKm.js";import{t as $t}from"./circle-slash-DP3-64k6.js";import{t as _e}from"./MarkdownBody-D7qCQaU_.js";import{t as Ft}from"./package-G5arH6JJ.js";import{t as qt}from"./file-text-CsPKrMTp.js";import{t as Ot}from"./list-filter-BjVYqW16.js";import{r as he,t as de}from"./button-DI4w5WP7.js";import{t as Lt}from"./log-in-C4giPkVk.js";import{t as Pt}from"./message-square-plus-BQNp2QTu.js";import{t as Bt}from"./send-DfQbMfo9.js";import{t as ye}from"./settings-DuRZr7gk.js";import{t as Kt}from"./triangle-alert-CnHMpmva.js";import{t as Je}from"./user-D5V640s5.js";import{t as Ht}from"./MootMark-BZOhYsK8.js";import{i as ve,n as we,t as ke}from"./tooltip-CW50mEoC.js";import{t as Me}from"./AgentAvatar-BZiiDlCN.js";import{t as Ze}from"./agents-B8n-p0aX.js";import{n as Ut,t as Wt}from"./useSharedPolling-CFeiZe2t.js";import{t as Vt}from"./activity-CudcEDwO.js";import{n as Qt}from"./BreadcrumbContext-DNbB7zWn.js";import{t as Ke}from"./attachment-icon-_1iz_saB.js";import{t as Gt}from"./card-BVZvs7aX.js";import{$a as Xt,Ea as Yt,Pa as Jt,Ra as Zt,Tn as es,ba as ts,ct as ss,eo as rs}from"./index-D1wQsid4.js";import{r as as,t as ns}from"./AgentBubbleActionRow-Dqrx638X.js";import{c as is,r as os,t as ls}from"./sheet-D5sUsyfT.js";var et={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};et.node;var cs=pt(et),r=Ge(ft(),1),e=Ge(mt(),1);function Se(t){return typeof t=="string"?t.replace(/_/g," "):String(t??"")}o(Se,"humanize");function ds(t,i,d="chronological"){switch(t){case"issue.created":return"opened";case"issue.updated":{const c=i?.status;if(c==="in_review"&&i?.externalConversationState==="waiting")return"moved to idle";if(typeof c=="string")return`moved to ${Se(c)}`;const p=i?.priority;return typeof p=="string"?`set priority to ${Se(p)} on`:"updated"}case"issue.document_created":return"wrote doc on";case"issue.document_updated":return"edited doc on";case"issue.document_deleted":return"deleted doc from";case"issue.work_product_created":return"delivered work on";case"issue.work_product_updated":return"updated work on";case"issue.work_product_deleted":return"removed work from";case"issue.checked_out":return"picked up";case"issue.released":return"released";case"issue.commented":case"issue.comment_added":return"commented on";case"issue.attachment_added":return"attached a file to";case"issue.attachment_removed":return"removed attachment from";case"issue.deleted":return"deleted";case"approval.created":return d==="pinned"?"needs approval on":"requested approval on";case"approval.approved":return"approved";case"approval.rejected":return"rejected";case"approval.revision_requested":return"requested changes on";case"agent.created":return d==="pinned"?"wants to hire":"hired";case"agent.paused":return"paused";case"agent.resumed":return"resumed";case"agent.updated":return"updated";case"agent.terminated":return"terminated";case"heartbeat.invoked":return"started a run on";case"heartbeat.cancelled":return"cancelled a run on";case"project.created":return"created project";case"project.updated":return"updated project";case"project.deleted":return"deleted project";case"goal.created":return"created goal";case"goal.updated":return"updated goal";case"goal.deleted":return"deleted goal";case"company.created":return"created organization";case"company.updated":return"updated organization";case"company.archived":return"archived organization";case"company.budget_updated":return"updated organization budget";default:return t.replace(/[._]/g," ")}}o(ds,"formatVerb");function us(t,i){switch(t){case"issue.created":return"todo";case"issue.updated":{const d=i?.status;return d==="in_review"&&i?.externalConversationState==="waiting"?"idle":typeof d=="string"?d:null}case"issue.document_created":case"issue.document_updated":return"in_progress";case"issue.work_product_created":return"in_review";case"approval.created":return"in_review";case"approval.approved":return"done";case"approval.rejected":case"approval.revision_requested":return"blocked";default:return null}}o(us,"deriveTaskStatus");function ms(t,i,d){const c=t.action;if(c.startsWith("heartbeat."))return d&&c==="heartbeat.invoked"?{kind:"lucide",Icon:he,color:"text-blue-600 dark:text-blue-400",spin:!0}:{kind:"lucide",Icon:he,color:"text-ink-3"};switch(c){case"approval.created":return{kind:"lucide",Icon:zt,color:"text-amber-600 dark:text-amber-400"};case"approval.approved":return{kind:"lucide",Icon:ht,color:"text-green-600 dark:text-green-400"};case"approval.rejected":return{kind:"lucide",Icon:$t,color:"text-red-600 dark:text-red-400"};case"approval.revision_requested":return{kind:"lucide",Icon:cs,color:"text-amber-600 dark:text-amber-400",filled:!0}}switch(c){case"agent.created":return{kind:"lucide",Icon:Yt,color:"text-purple-600 dark:text-purple-400"};case"agent.paused":return{kind:"lucide",Icon:rs,color:"text-ink-3"};case"agent.resumed":return{kind:"lucide",Icon:Xt,color:"text-ink-3"};case"agent.updated":case"agent.terminated":return{kind:"lucide",Icon:ye,color:"text-ink-3"}}return c==="issue.document_created"||c==="issue.document_updated"?{kind:"lucide",Icon:qt,color:"text-blue-600 dark:text-blue-400"}:c.startsWith("issue.work_product_")?{kind:"lucide",Icon:Ft,color:"text-indigo-600 dark:text-indigo-400"}:c==="issue.commented"||c==="issue.comment_added"?{kind:"lucide",Icon:Zt,color:"text-ink-3"}:c==="issue.checked_out"?{kind:"lucide",Icon:Lt,color:"text-ink-3"}:t.entityType==="issue"?{kind:"status-circle",status:us(c,i)??"backlog"}:t.entityType==="goal"?{kind:"lucide",Icon:vt,color:"text-ink-3"}:{kind:"lucide",Icon:ye,color:"text-ink-3"}}o(ms,"getIconSpec");function ps({status:t}){const i=yt[t]??"text-ink-3 border-ink-3",d=t==="done";return(0,e.jsx)("span",{className:w("relative inline-flex h-4 w-4 shrink-0 rounded-full border-2",i),children:d&&(0,e.jsx)("span",{className:"absolute inset-0 m-auto h-2 w-2 rounded-full bg-current"})})}o(ps,"StatusCircle");function fs({spec:t}){if(t.kind==="status-circle")return(0,e.jsx)(ps,{status:t.status});const{Icon:i,color:d,filled:c,spin:p}=t;return(0,e.jsx)(i,{className:w("h-4 w-4 shrink-0",d,p&&"animate-spin"),fill:c?"currentColor":"none",strokeWidth:c?1.5:2})}o(fs,"EntityIcon");function hs(t,i,d,c){const p=t.details,h=t.actorType==="agent"?i.get(t.actorId)??null:null,b=h?.name??(t.actorType==="system"?"System":t.actorType==="user"?"Board":t.actorId||"Unknown"),S=c?.get(`${t.entityType}:${t.entityId}`)??null,g=t.entityType==="heartbeat_run",m=g?p?.agentId:void 0,f=g?m?d.get(`agent:${m}`)??null:null:d.get(`${t.entityType}:${t.entityId}`)??null,B=p?.key,A=t.action==="issue.document_created"||t.action==="issue.document_updated",E=f??t.entityId,$=p?.hiredAgentId,F=p?.requestedByAgentId,T=F?i.get(F)?.name??null:null,q=p?.type,k=g&&m?`/agents/${m}/runs/${t.entityId}`:t.entityType==="issue"?A&&B?`/issues/${E}#document-${encodeURIComponent(B)}`:`/issues/${E}`:t.entityType==="agent"?`/agents/${t.entityId}`:t.entityType==="approval"?t.action==="approval.approved"&&$?`/agents/${$}`:`/approvals/${t.entityId}`:t.entityType==="project"?`/projects/${dt(f,t.entityId)}`:t.entityType==="goal"?`/goals/${t.entityId}`:null;let y=null,j=!0,I=null;return t.entityType==="issue"?(y=f,I=S):t.entityType==="approval"?(T?y=T:(y=q?Se(q):"approval",j=!1),I=S):t.entityType==="agent"?(y=p?.name??f??t.entityId,I=null):g?(y=f,I=null):(y=f,I=S),{actorName:b,actorType:t.actorType,actor:h,identifier:y,identifierMono:j,title:I,link:k}}o(hs,"resolveContent");function xs({content:t}){return t.actorType==="agent"?(0,e.jsx)(Me,{agent:t.actor,size:16,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):t.actorType==="user"?(0,e.jsx)(Je,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"})}o(xs,"ActorGlyph");function Ae({event:t,agentMap:i,entityNameMap:d,entityTitleMap:c,isActive:p=!1,isMuted:h=!1,isPinned:b=!1,className:S}){const g=t.details,m=hs(t,i,d,c),f=ds(t.action,g,b?"pinned":"chronological"),B=ms(t,g,p),A=h?"text-ink-3/70":"text-(--hex-959596)",E=h?"":"group-hover:text-white",$=(0,e.jsxs)(Gt,{"data-fc":"card",className:w("flex-row group ml-3 mr-3 md:ml-0 my-2 w-(--sz-calc-1) md:w-(--sz-calc-2) items-center gap-2 p-(--sz-18px) text-xs","transition-(--tp-background-color-border-color) duration-150",m.link&&"cursor-pointer hover:bg-bg-3 hover:border-ink-3/30",S),children:[(0,e.jsx)(fs,{spec:B}),(0,e.jsx)(xs,{content:m}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-1 truncate",children:[(0,e.jsx)("span",{"data-fc":"actor",className:w("font-medium",A,E),children:m.actorName}),(0,e.jsx)("span",{"data-fc":"verb",className:A,children:f}),m.identifier&&(0,e.jsx)("span",{"data-fc":"id",className:w(m.identifierMono&&"font-mono",A,E),children:m.identifier}),m.title&&(0,e.jsx)("span",{"data-fc":"title",className:w("truncate",A,E),children:m.title})]}),b&&(0,e.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:"Review →"}),(0,e.jsx)("span",{"data-fc":"time",className:"shrink-0 text-ink-3",children:Ye(t.createdAt)})]});return m.link?(0,e.jsx)(wt,{to:m.link,"data-fc":"link",className:"block w-full no-underline text-inherit",issueQuicklookSide:"left",children:$}):$}o(Ae,"FeedCard");var gs={"issue.created":1,"issue.document_created":1,"approval.created":1,"approval.approved":1,"approval.rejected":1,"approval.revision_requested":1,"agent.created":1,"issue.work_product_created":1,"issue.updated":2,"issue.work_product_updated":2,"issue.work_product_deleted":2,"issue.checked_out":2,"issue.comment_added":2,"issue.commented":2,"heartbeat.invoked":2,"heartbeat.cancelled":2,"agent.paused":2,"agent.resumed":2,"agent.updated":2,"issue.read_marked":3,"issue.read_unmarked":3,"issue.inbox_archived":3,"issue.inbox_unarchived":3,"issue.released":3,"issue.attachment_added":3,"issue.attachment_removed":3,"issue.document_deleted":3,"issue.document_updated":2,"issue.deleted":3,"issue.feedback_vote_saved":3,"agent.key_created":3,"agent.budget_updated":3,"agent.runtime_session_reset":3,"agent.skills_synced":3,"agent.terminated":2,"approval.requester_wakeup_queued":3,"approval.requester_wakeup_failed":3,"company.created":3,"company.updated":3,"company.archived":3,"company.budget_updated":3,"company.skill_created":3,"company.skill_deleted":3,"project.created":2,"project.updated":3,"project.deleted":3,"goal.created":2,"goal.updated":3,"goal.deleted":3,"cost.reported":3,"cost.recorded":3};function Ee(t){return t.action==="issue.updated"&&t.details&&t.details.status==="in_review"?1:gs[t.action]??3}o(Ee,"getEventTier");var bs=[{value:"all",label:"All"},{value:"in-progress",label:"In Progress"},{value:"for-review",label:"In Review"},{value:"completed",label:"Done"}],ys={all:null,"in-progress":new Set(["issue.created","issue.checked_out","heartbeat.invoked"]),"for-review":new Set(["approval.created","issue.document_created","issue.document_updated"]),completed:new Set(["approval.approved"])},vs={all:null,"in-progress":new Set(["in_progress"]),"for-review":new Set(["in_review"]),completed:new Set(["done"])};function ws(t,i){if(i==="all"||ys[i]?.has(t.action))return!0;if(t.action==="issue.updated"&&t.details){const d=vs[i],c=t.details;if(d&&typeof c.status=="string"&&d.has(c.status))return!0}return!1}o(ws,"matchesFilter");var ks=3e5;function js(t){if(t.length===0)return[];const i=[];let d=[t[0]],c=`${t[0].entityType}:${t[0].entityId}`;for(let p=1;p<t.length;p++){const h=t[p],b=`${h.entityType}:${h.entityId}`,S=new Date(d[d.length-1].createdAt).getTime(),g=new Date(h.createdAt).getTime(),m=Math.abs(S-g)<=ks,f=Ee(h);b===c&&m&&f>=2?d.push(h):(He(d,i),d=[h],c=b)}return He(d,i),i}o(js,"collapseSequential");function He(t,i){if(t.length<=2)for(const d of t)i.push(d);else i.push({type:"collapsed",events:t,entityId:t[0].entityId,entityType:t[0].entityType,latestEvent:t[0]})}o(He,"flushGroup");var Ns=3e5;function Ie(t){return Date.now()-new Date(t).getTime()<Ns}o(Ie,"isRecent");var _s=`
1
+ var ct=Object.defineProperty;var o=(t,i)=>ct(t,"name",{value:i,configurable:!0});import{i as Ge}from"./rolldown-runtime-ZpX3ckPj.js";import{en as dt,h as ut,l as w,la as mt,t as pt,ua as ft}from"./createLucideIcon-CgrPXnTY.js";import{a as ht}from"./star-eem0qj3E.js";import{X as xt,d as gt,t as P,u as bt,v as ae}from"./queryKeys-BzT8CD34.js";import{n as Xe}from"./CompanyContext-fQCNWI_f.js";import{M as yt,on as Ye,q as vt,t as wt,tt as kt,zt as fe}from"./router-CJbFZfVR.js";import{c as jt,n as Nt,o as _t,p as It,r as Tt,s as Ct,t as St}from"./dropdown-menu-rUbU8QKw.js";import{t as At}from"./activity-BwGRpduS.js";import{t as Et}from"./arrow-down-C_oYEUXL.js";import{t as Mt}from"./check-Bis3vECb.js";import{t as Rt}from"./chevron-down-nRcQ7bok.js";import{t as Dt}from"./chevron-right-BP8JjEC_.js";import{t as zt}from"./circle-alert-C7T1cdKm.js";import{t as $t}from"./circle-slash-DP3-64k6.js";import{t as _e}from"./MarkdownBody-cPGkwwjq.js";import{t as Ft}from"./package-G5arH6JJ.js";import{t as qt}from"./file-text-CsPKrMTp.js";import{t as Ot}from"./list-filter-BjVYqW16.js";import{r as he,t as de}from"./button-DI4w5WP7.js";import{t as Lt}from"./log-in-C4giPkVk.js";import{t as Pt}from"./message-square-plus-BQNp2QTu.js";import{t as Bt}from"./send-DfQbMfo9.js";import{t as ye}from"./settings-DuRZr7gk.js";import{t as Kt}from"./triangle-alert-CnHMpmva.js";import{t as Je}from"./user-D5V640s5.js";import{t as Ht}from"./MootMark-BZOhYsK8.js";import{i as ve,n as we,t as ke}from"./tooltip-CW50mEoC.js";import{t as Me}from"./AgentAvatar-BZiiDlCN.js";import{t as Ze}from"./agents-B8n-p0aX.js";import{n as Ut,t as Wt}from"./useSharedPolling-CFeiZe2t.js";import{t as Vt}from"./activity-CudcEDwO.js";import{n as Qt}from"./BreadcrumbContext-DNbB7zWn.js";import{t as Ke}from"./attachment-icon-_1iz_saB.js";import{t as Gt}from"./card-BVZvs7aX.js";import{Da as Xt,Fa as Yt,Tn as Jt,ct as Zt,eo as es,to as ts,xa as ss,za as rs}from"./index-QhteFtm-.js";import{r as as,t as ns}from"./AgentBubbleActionRow-CnkfFlB3.js";import{c as is,r as os,t as ls}from"./sheet-D5sUsyfT.js";var et={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};et.node;var cs=pt(et),r=Ge(ft(),1),e=Ge(mt(),1);function Se(t){return typeof t=="string"?t.replace(/_/g," "):String(t??"")}o(Se,"humanize");function ds(t,i,d="chronological"){switch(t){case"issue.created":return"opened";case"issue.updated":{const c=i?.status;if(c==="in_review"&&i?.externalConversationState==="waiting")return"moved to idle";if(typeof c=="string")return`moved to ${Se(c)}`;const p=i?.priority;return typeof p=="string"?`set priority to ${Se(p)} on`:"updated"}case"issue.document_created":return"wrote doc on";case"issue.document_updated":return"edited doc on";case"issue.document_deleted":return"deleted doc from";case"issue.work_product_created":return"delivered work on";case"issue.work_product_updated":return"updated work on";case"issue.work_product_deleted":return"removed work from";case"issue.checked_out":return"picked up";case"issue.released":return"released";case"issue.commented":case"issue.comment_added":return"commented on";case"issue.attachment_added":return"attached a file to";case"issue.attachment_removed":return"removed attachment from";case"issue.deleted":return"deleted";case"approval.created":return d==="pinned"?"needs approval on":"requested approval on";case"approval.approved":return"approved";case"approval.rejected":return"rejected";case"approval.revision_requested":return"requested changes on";case"agent.created":return d==="pinned"?"wants to hire":"hired";case"agent.paused":return"paused";case"agent.resumed":return"resumed";case"agent.updated":return"updated";case"agent.terminated":return"terminated";case"heartbeat.invoked":return"started a run on";case"heartbeat.cancelled":return"cancelled a run on";case"project.created":return"created project";case"project.updated":return"updated project";case"project.deleted":return"deleted project";case"goal.created":return"created goal";case"goal.updated":return"updated goal";case"goal.deleted":return"deleted goal";case"company.created":return"created organization";case"company.updated":return"updated organization";case"company.archived":return"archived organization";case"company.budget_updated":return"updated organization budget";default:return t.replace(/[._]/g," ")}}o(ds,"formatVerb");function us(t,i){switch(t){case"issue.created":return"todo";case"issue.updated":{const d=i?.status;return d==="in_review"&&i?.externalConversationState==="waiting"?"idle":typeof d=="string"?d:null}case"issue.document_created":case"issue.document_updated":return"in_progress";case"issue.work_product_created":return"in_review";case"approval.created":return"in_review";case"approval.approved":return"done";case"approval.rejected":case"approval.revision_requested":return"blocked";default:return null}}o(us,"deriveTaskStatus");function ms(t,i,d){const c=t.action;if(c.startsWith("heartbeat."))return d&&c==="heartbeat.invoked"?{kind:"lucide",Icon:he,color:"text-blue-600 dark:text-blue-400",spin:!0}:{kind:"lucide",Icon:he,color:"text-ink-3"};switch(c){case"approval.created":return{kind:"lucide",Icon:zt,color:"text-amber-600 dark:text-amber-400"};case"approval.approved":return{kind:"lucide",Icon:ht,color:"text-green-600 dark:text-green-400"};case"approval.rejected":return{kind:"lucide",Icon:$t,color:"text-red-600 dark:text-red-400"};case"approval.revision_requested":return{kind:"lucide",Icon:cs,color:"text-amber-600 dark:text-amber-400",filled:!0}}switch(c){case"agent.created":return{kind:"lucide",Icon:Xt,color:"text-purple-600 dark:text-purple-400"};case"agent.paused":return{kind:"lucide",Icon:ts,color:"text-ink-3"};case"agent.resumed":return{kind:"lucide",Icon:es,color:"text-ink-3"};case"agent.updated":case"agent.terminated":return{kind:"lucide",Icon:ye,color:"text-ink-3"}}return c==="issue.document_created"||c==="issue.document_updated"?{kind:"lucide",Icon:qt,color:"text-blue-600 dark:text-blue-400"}:c.startsWith("issue.work_product_")?{kind:"lucide",Icon:Ft,color:"text-indigo-600 dark:text-indigo-400"}:c==="issue.commented"||c==="issue.comment_added"?{kind:"lucide",Icon:rs,color:"text-ink-3"}:c==="issue.checked_out"?{kind:"lucide",Icon:Lt,color:"text-ink-3"}:t.entityType==="issue"?{kind:"status-circle",status:us(c,i)??"backlog"}:t.entityType==="goal"?{kind:"lucide",Icon:vt,color:"text-ink-3"}:{kind:"lucide",Icon:ye,color:"text-ink-3"}}o(ms,"getIconSpec");function ps({status:t}){const i=yt[t]??"text-ink-3 border-ink-3",d=t==="done";return(0,e.jsx)("span",{className:w("relative inline-flex h-4 w-4 shrink-0 rounded-full border-2",i),children:d&&(0,e.jsx)("span",{className:"absolute inset-0 m-auto h-2 w-2 rounded-full bg-current"})})}o(ps,"StatusCircle");function fs({spec:t}){if(t.kind==="status-circle")return(0,e.jsx)(ps,{status:t.status});const{Icon:i,color:d,filled:c,spin:p}=t;return(0,e.jsx)(i,{className:w("h-4 w-4 shrink-0",d,p&&"animate-spin"),fill:c?"currentColor":"none",strokeWidth:c?1.5:2})}o(fs,"EntityIcon");function hs(t,i,d,c){const p=t.details,h=t.actorType==="agent"?i.get(t.actorId)??null:null,b=h?.name??(t.actorType==="system"?"System":t.actorType==="user"?"Board":t.actorId||"Unknown"),S=c?.get(`${t.entityType}:${t.entityId}`)??null,g=t.entityType==="heartbeat_run",m=g?p?.agentId:void 0,f=g?m?d.get(`agent:${m}`)??null:null:d.get(`${t.entityType}:${t.entityId}`)??null,B=p?.key,A=t.action==="issue.document_created"||t.action==="issue.document_updated",E=f??t.entityId,$=p?.hiredAgentId,F=p?.requestedByAgentId,T=F?i.get(F)?.name??null:null,q=p?.type,k=g&&m?`/agents/${m}/runs/${t.entityId}`:t.entityType==="issue"?A&&B?`/issues/${E}#document-${encodeURIComponent(B)}`:`/issues/${E}`:t.entityType==="agent"?`/agents/${t.entityId}`:t.entityType==="approval"?t.action==="approval.approved"&&$?`/agents/${$}`:`/approvals/${t.entityId}`:t.entityType==="project"?`/projects/${dt(f,t.entityId)}`:t.entityType==="goal"?`/goals/${t.entityId}`:null;let y=null,j=!0,I=null;return t.entityType==="issue"?(y=f,I=S):t.entityType==="approval"?(T?y=T:(y=q?Se(q):"approval",j=!1),I=S):t.entityType==="agent"?(y=p?.name??f??t.entityId,I=null):g?(y=f,I=null):(y=f,I=S),{actorName:b,actorType:t.actorType,actor:h,identifier:y,identifierMono:j,title:I,link:k}}o(hs,"resolveContent");function xs({content:t}){return t.actorType==="agent"?(0,e.jsx)(Me,{agent:t.actor,size:16,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):t.actorType==="user"?(0,e.jsx)(Je,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"})}o(xs,"ActorGlyph");function Ae({event:t,agentMap:i,entityNameMap:d,entityTitleMap:c,isActive:p=!1,isMuted:h=!1,isPinned:b=!1,className:S}){const g=t.details,m=hs(t,i,d,c),f=ds(t.action,g,b?"pinned":"chronological"),B=ms(t,g,p),A=h?"text-ink-3/70":"text-(--hex-959596)",E=h?"":"group-hover:text-white",$=(0,e.jsxs)(Gt,{"data-fc":"card",className:w("flex-row group ml-3 mr-3 md:ml-0 my-2 w-(--sz-calc-1) md:w-(--sz-calc-2) items-center gap-2 p-(--sz-18px) text-xs","transition-(--tp-background-color-border-color) duration-150",m.link&&"cursor-pointer hover:bg-bg-3 hover:border-ink-3/30",S),children:[(0,e.jsx)(fs,{spec:B}),(0,e.jsx)(xs,{content:m}),(0,e.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-1 truncate",children:[(0,e.jsx)("span",{"data-fc":"actor",className:w("font-medium",A,E),children:m.actorName}),(0,e.jsx)("span",{"data-fc":"verb",className:A,children:f}),m.identifier&&(0,e.jsx)("span",{"data-fc":"id",className:w(m.identifierMono&&"font-mono",A,E),children:m.identifier}),m.title&&(0,e.jsx)("span",{"data-fc":"title",className:w("truncate",A,E),children:m.title})]}),b&&(0,e.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:"Review →"}),(0,e.jsx)("span",{"data-fc":"time",className:"shrink-0 text-ink-3",children:Ye(t.createdAt)})]});return m.link?(0,e.jsx)(wt,{to:m.link,"data-fc":"link",className:"block w-full no-underline text-inherit",issueQuicklookSide:"left",children:$}):$}o(Ae,"FeedCard");var gs={"issue.created":1,"issue.document_created":1,"approval.created":1,"approval.approved":1,"approval.rejected":1,"approval.revision_requested":1,"agent.created":1,"issue.work_product_created":1,"issue.updated":2,"issue.work_product_updated":2,"issue.work_product_deleted":2,"issue.checked_out":2,"issue.comment_added":2,"issue.commented":2,"heartbeat.invoked":2,"heartbeat.cancelled":2,"agent.paused":2,"agent.resumed":2,"agent.updated":2,"issue.read_marked":3,"issue.read_unmarked":3,"issue.inbox_archived":3,"issue.inbox_unarchived":3,"issue.released":3,"issue.attachment_added":3,"issue.attachment_removed":3,"issue.document_deleted":3,"issue.document_updated":2,"issue.deleted":3,"issue.feedback_vote_saved":3,"agent.key_created":3,"agent.budget_updated":3,"agent.runtime_session_reset":3,"agent.skills_synced":3,"agent.terminated":2,"approval.requester_wakeup_queued":3,"approval.requester_wakeup_failed":3,"company.created":3,"company.updated":3,"company.archived":3,"company.budget_updated":3,"company.skill_created":3,"company.skill_deleted":3,"project.created":2,"project.updated":3,"project.deleted":3,"goal.created":2,"goal.updated":3,"goal.deleted":3,"cost.reported":3,"cost.recorded":3};function Ee(t){return t.action==="issue.updated"&&t.details&&t.details.status==="in_review"?1:gs[t.action]??3}o(Ee,"getEventTier");var bs=[{value:"all",label:"All"},{value:"in-progress",label:"In Progress"},{value:"for-review",label:"In Review"},{value:"completed",label:"Done"}],ys={all:null,"in-progress":new Set(["issue.created","issue.checked_out","heartbeat.invoked"]),"for-review":new Set(["approval.created","issue.document_created","issue.document_updated"]),completed:new Set(["approval.approved"])},vs={all:null,"in-progress":new Set(["in_progress"]),"for-review":new Set(["in_review"]),completed:new Set(["done"])};function ws(t,i){if(i==="all"||ys[i]?.has(t.action))return!0;if(t.action==="issue.updated"&&t.details){const d=vs[i],c=t.details;if(d&&typeof c.status=="string"&&d.has(c.status))return!0}return!1}o(ws,"matchesFilter");var ks=3e5;function js(t){if(t.length===0)return[];const i=[];let d=[t[0]],c=`${t[0].entityType}:${t[0].entityId}`;for(let p=1;p<t.length;p++){const h=t[p],b=`${h.entityType}:${h.entityId}`,S=new Date(d[d.length-1].createdAt).getTime(),g=new Date(h.createdAt).getTime(),m=Math.abs(S-g)<=ks,f=Ee(h);b===c&&m&&f>=2?d.push(h):(He(d,i),d=[h],c=b)}return He(d,i),i}o(js,"collapseSequential");function He(t,i){if(t.length<=2)for(const d of t)i.push(d);else i.push({type:"collapsed",events:t,entityId:t[0].entityId,entityType:t[0].entityType,latestEvent:t[0]})}o(He,"flushGroup");var Ns=3e5;function Ie(t){return Date.now()-new Date(t).getTime()<Ns}o(Ie,"isRecent");var _s=`
2
2
  @keyframes feed-slide-in {
3
3
  from {
4
4
  opacity: 0;
@@ -12,7 +12,7 @@ var ct=Object.defineProperty;var o=(t,i)=>ct(t,"name",{value:i,configurable:!0})
12
12
  .feed-item-new {
13
13
  animation: feed-slide-in 300ms ease-out;
14
14
  }
15
- `,Ue=50,Is=30;function Ts({group:t,agentMap:i,entityNameMap:d,entityTitleMap:c}){const[p,h]=(0,r.useState)(!1),b=t.latestEvent.actorType==="agent"?i.get(t.latestEvent.actorId):null,S=b?.name??(t.latestEvent.actorType==="system"?"System":t.latestEvent.actorType==="user"?"Board":"Unknown"),g=d.get(`${t.entityType}:${t.entityId}`);return(0,e.jsxs)("div",{children:[(0,e.jsxs)("button",{type:"button",onClick:o(()=>h(m=>!m),"onClick"),"data-fc":"card",className:w("group ml-3 mr-3 md:ml-0 my-2 flex w-(--sz-calc-1) md:w-(--sz-calc-2) items-center gap-2 rounded-lg border bg-bg-2 p-(--sz-18px) text-left text-xs transition-(--tp-background-color-border-color) duration-150","cursor-pointer hover:bg-bg-3 hover:border-ink-3/30"),children:[p?(0,e.jsx)(Rt,{className:"h-3 w-3 shrink-0 text-ink-3"}):(0,e.jsx)(Dt,{className:"h-3 w-3 shrink-0 text-ink-3"}),t.latestEvent.actorType==="agent"?(0,e.jsx)(Me,{agent:b,size:16,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):t.latestEvent.actorType==="user"?(0,e.jsx)(Je,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"flex-1 min-w-0 truncate",children:[(0,e.jsx)("span",{"data-fc":"actor",className:"font-medium text-(--hex-959596) group-hover:text-white",children:S}),(0,e.jsxs)("span",{"data-fc":"verb",className:"ml-1 text-(--hex-959596)",children:["made ",t.events.length," updates to"]}),(0,e.jsx)("span",{"data-fc":"title",className:"ml-1 text-(--hex-959596) group-hover:text-white",children:g??t.entityId})]}),(0,e.jsx)("span",{"data-fc":"time",className:"text-ink-3 shrink-0",children:Ye(t.latestEvent.createdAt)})]}),p&&(0,e.jsx)("div",{className:"ml-8",children:t.events.map(m=>(0,e.jsx)(Ae,{event:m,agentMap:i,entityNameMap:d,entityTitleMap:c,isMuted:!0},m.id))})]})}o(Ts,"CollapsedFeedGroup");function We({className:t}){const{selectedCompanyId:i}=Xe(),[d,c]=(0,r.useState)("all"),[p,h]=(0,r.useState)("flat"),[b,S]=(0,r.useState)(!1),[g,m]=(0,r.useState)(Ue),f=(0,r.useRef)(null),B=(0,r.useRef)(new Set),A=(0,r.useRef)(!0);(0,r.useEffect)(()=>{const a="feed-animation-styles";if(document.getElementById(a))return;const n=document.createElement("style");n.id=a,n.textContent=_s,document.head.appendChild(n)},[]);const E=ss({visibleMs:5e3}),$=P.activity(i??""),F=Ut({companyId:i,resourceKey:"activity",queryKey:$,enabled:!!i,refetchInterval:E,leaderOnly:!0}),{data:T,dataUpdatedAt:q}=ae({queryKey:$,queryFn:o(({signal:a})=>Vt.list(i,void 0,{signal:a}),"queryFn"),enabled:F.enabled,refetchInterval:F.refetchInterval});Wt(F,T,q);const{data:k}=ae({queryKey:P.agents.list(i??""),queryFn:o(()=>Ze.list(i),"queryFn"),enabled:!!i}),{data:y}=ae({queryKey:P.issues.list(i??""),queryFn:o(()=>fe.list(i),"queryFn"),enabled:!!i}),j=(0,r.useMemo)(()=>{const a=new Map;for(const n of k??[])a.set(n.id,n);return a},[k]),I=(0,r.useMemo)(()=>{const a=new Map;for(const n of k??[])a.set(`agent:${n.id}`,n.name);for(const n of y??[])a.set(`issue:${n.id}`,n.identifier??n.id);return a},[k,y]),K=(0,r.useMemo)(()=>{const a=new Map;for(const n of y??[])a.set(`issue:${n.id}`,n.title);return a},[y]),Y=(0,r.useMemo)(()=>{const a=new Map;for(const n of y??[])a.set(`issue:${n.id}`,n.status);return a},[y]),J=(0,r.useMemo)(()=>js((T??[]).filter(a=>{const n=Ee(a);return!b&&n===3?!1:ws(a,d)}).sort((a,n)=>new Date(n.createdAt).getTime()-new Date(a.createdAt).getTime())),[T,d,b]),N=J.slice(0,g),H=J.length>g;(0,r.useEffect)(()=>{if(T&&A.current){for(const a of T)B.current.add(a.id);A.current=!1}},[T]);const Z=(0,r.useCallback)(a=>A.current||B.current.has(a)?!1:(B.current.add(a),!0),[]);(0,r.useEffect)(()=>{m(Ue)},[d]);const x=(0,r.useCallback)(()=>{const a=f.current;!a||!H||a.scrollHeight-a.scrollTop-a.clientHeight<100&&m(n=>n+Is)},[H]),M=(0,r.useMemo)(()=>{const a=new Set;for(const n of T??[])n.action==="heartbeat.invoked"&&Ie(n.createdAt)&&a.add(n.entityId);for(const n of T??[])n.action==="heartbeat.cancelled"&&a.delete(n.entityId);return a},[T]),ne=o((a,n,R)=>{let C=null;if(n>0){const L="type"in a?a.latestEvent.createdAt:a.createdAt,D=R[n-1],l=Ie("type"in D?D.latestEvent.createdAt:D.createdAt),Q=Ie(L);l&&!Q&&(C=(0,e.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5",children:[(0,e.jsx)("div",{className:"h-px flex-1 bg-line"}),(0,e.jsx)("span",{className:"text-(length:--text-nano) font-medium text-ink-3 uppercase tracking-wider",children:"Earlier"}),(0,e.jsx)("div",{className:"h-px flex-1 bg-line"})]},`sep-${n}`))}if("type"in a&&a.type==="collapsed"){const L=Z(a.latestEvent.id)?"feed-item-new":"";return(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:L,children:(0,e.jsx)(Ts,{group:a,agentMap:j,entityNameMap:I,entityTitleMap:K})})]},`group-${a.latestEvent.id}`)}const v=a,te=Ee(v),W=Z(v.id)?"feed-item-new":"",V=M.has(v.entityId)&&v.action==="heartbeat.invoked";return te===1?(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:W||void 0,children:(0,e.jsx)(Ae,{event:v,agentMap:j,entityNameMap:I,entityTitleMap:K,entityStatusMap:Y,isActive:V})})]},v.id):(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:W||void 0,children:(0,e.jsx)(Ae,{event:v,agentMap:j,entityNameMap:I,entityTitleMap:K,entityStatusMap:Y,isActive:V,isMuted:!0})})]},v.id)},"renderItem"),oe=o(()=>{const a=new Map;for(const n of N){const R="type"in n||n.entityType==="issue"?n.entityId:"__other__",C=a.get(R)??[];C.push(n),a.set(R,C)}return Array.from(a.entries()).map(([n,R])=>{const C=n==="__other__",v=I.get(`issue:${n}`),te=K.get(`issue:${n}`),W=C?"Other activity":`${v??n}${te?` — ${te}`:""}`;return(0,e.jsxs)("div",{className:"mb-2",children:[(0,e.jsx)("div",{className:"sticky top-0 z-10 bg-bg/95 backdrop-blur-sm border-b px-4 py-1.5",children:(0,e.jsx)("p",{className:"text-xs font-medium text-ink-3 truncate",children:W})}),R.map((V,L)=>ne(V,L,R))]},n)})},"renderGrouped"),O=(0,r.useMemo)(()=>k?k.length===0?{text:"No agents set up yet. Add an agent to get started.",showPulse:!1}:k.every(a=>a.status==="paused")?{text:"All agents are paused. Resume agents from the sidebar to see activity.",showPulse:!1}:{text:"Your agents are running — activity will appear here shortly.",showPulse:!0}:null,[k]),ee=N.length===0;return(0,e.jsxs)("aside",{className:w("flex min-h-0 min-w-0 flex-1 flex-col bg-bg",t),children:[(0,e.jsxs)("div",{className:"relative flex shrink-0 items-start justify-between gap-2 px-4 py-3",children:[(0,e.jsx)("div",{className:"pointer-events-none absolute bottom-0 right-0 left-0 h-px bg-line md:-left-3","aria-hidden":!0}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Agent Feed"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Live activity from your agents"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:p==="by-task"?"secondary":"ghost",size:"icon-sm",className:"shrink-0","aria-label":"group by task",onClick:o(()=>h(a=>a==="flat"?"by-task":"flat"),"onClick"),children:(0,e.jsx)(kt,{className:"h-3.5 w-3.5"})})}),(0,e.jsx)(we,{side:"bottom",children:p==="flat"?"Group by task":"Show flat"})]}),(0,e.jsxs)(St,{children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(It,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:d!=="all"||b?"secondary":"ghost",size:"icon-sm",className:"shrink-0","aria-label":"filter by",children:(0,e.jsx)(Ot,{className:"h-3.5 w-3.5"})})})}),(0,e.jsx)(we,{side:"bottom",children:"Filter by"})]}),(0,e.jsxs)(Tt,{align:"end",className:"w-48",children:[(0,e.jsx)(_t,{value:d,onValueChange:o(a=>c(a),"onValueChange"),children:bs.map(({value:a,label:n})=>(0,e.jsx)(Ct,{value:a,children:n},a))}),(0,e.jsx)(jt,{}),(0,e.jsx)(Nt,{checked:b,onCheckedChange:o(a=>S(!!a),"onCheckedChange"),children:"Show all activity"})]})]})]})]}),(0,e.jsx)("div",{ref:f,className:"flex-1 min-h-0 overflow-y-auto",onScroll:x,children:ee?(0,e.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6 h-full",children:(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 max-w-(--sz-16rem)",children:[O?.showPulse&&(0,e.jsxs)("span",{className:"relative flex h-2.5 w-2.5",children:[(0,e.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-accent/40"}),(0,e.jsx)("span",{className:"relative inline-flex h-2.5 w-2.5 rounded-full bg-accent/60"})]}),(0,e.jsx)("p",{className:"text-center text-sm text-ink-3",children:O?.text??"Activity from your agents will appear here."})]})}):p==="flat"?(0,e.jsx)("div",{className:"py-2",children:N.map((a,n)=>ne(a,n,N))}):oe()})]})}o(We,"ActivityFeed");var Cs=200;function Ss(t){return!t||t<=0?"":t<1024?`${t} B`:t<1048576?`${Math.round(t/1024)} KB`:`${(t/1048576).toFixed(1)} MB`}o(Ss,"formatAttachmentSize");function be(t){const i=t.dataTransfer?.types;return i?Array.from(i).includes("Files"):!1}o(be,"dragHasFiles");var As=(0,r.forwardRef)(o(function({value:i,onChange:d,onSubmit:c,placeholder:p="Message…",disabled:h=!1,submitting:b=!1,submitKey:S="mod-enter",singleLine:g=!1,tone:m="standard",surface:f="card",autoFocus:B=!1,sendLabel:A="Send message",onAttachFiles:E,attachments:$=[],attaching:F=!1,acceptFileTypes:T,leadingTools:q,trailingTools:k,hint:y,className:j,textareaClassName:I,inputTestId:K="chat-composer-input"},Y){const J=(0,r.useRef)(null),N=(0,r.useRef)(null),H=(0,r.useRef)(0),[Z,x]=(0,r.useState)(!1),M=typeof E=="function",ne=m==="ask",oe=m==="planning",O=gt(),ee=!O&&!h&&!b&&i.trim().length>0;(0,r.useImperativeHandle)(Y,()=>({focus:o(()=>J.current?.focus(),"focus")}),[]),(0,r.useLayoutEffect)(()=>{const l=J.current;!l||g||(l.style.height="auto",l.style.height=`${Math.min(l.scrollHeight,Cs)}px`)},[i,g]);function a(l){d(g?l.target.value.replace(/\r?\n/g," "):l.target.value)}o(a,"handleChange");function n(l){l.key==="Enter"&&(S==="mod-enter"?l.metaKey||l.ctrlKey:!l.shiftKey&&!l.metaKey&&!l.ctrlKey)&&(l.preventDefault(),ee&&c())}o(n,"handleKeyDown");function R(){N.current?.click()}o(R,"triggerFilePicker");async function C(l){!E||l.length===0||await E(l)}o(C,"emitFiles");async function v(l){await C(l.target.files?Array.from(l.target.files):[]),N.current&&(N.current.value="")}o(v,"handleFileInputChange");function te(){H.current=0,x(!1)}o(te,"resetDrag");function W(l){!M||!be(l)||(l.preventDefault(),H.current+=1,x(!0))}o(W,"handleDragEnter");function V(l){!M||!be(l)||(l.preventDefault(),l.dataTransfer.dropEffect="copy")}o(V,"handleDragOver");function L(l){!M||!be(l)||(l.preventDefault(),H.current=Math.max(0,H.current-1),H.current===0&&x(!1))}o(L,"handleDragLeave");function D(l){!M||!be(l)||(l.preventDefault(),te(),C(l.dataTransfer?.files?Array.from(l.dataTransfer.files):[]))}return o(D,"handleDrop"),(0,e.jsxs)("div",{"data-testid":"chat-composer","data-tone":m,"data-surface":f,className:w("relative rounded-xl border px-3 pt-2.5 pb-2 transition-colors duration-150 focus-within:border-ink-3/40",f==="translucent"?"border-line/70 bg-bg/95 shadow-(--shadow-extract-4) backdrop-blur supports-[backdrop-filter]:bg-bg/85 dark:shadow-(--shadow-extract-5)":"border-line bg-bg-2",ne&&"border-sky-500/55 bg-sky-50/50 focus-within:border-sky-500/70 dark:border-sky-500/50 dark:bg-sky-500/[0.07]",oe&&"border-amber-500/55 bg-amber-50/50 focus-within:border-amber-500/70 dark:border-amber-500/50 dark:bg-amber-500/[0.07]",Z&&M&&"border-ink-3/50 bg-bg-3/20",h&&"opacity-60",j),onDragEnter:W,onDragOver:V,onDragLeave:L,onDrop:D,children:[Z&&M?(0,e.jsx)("div",{"data-testid":"chat-composer-drop-overlay",className:"pointer-events-none absolute inset-1.5 z-20 flex items-center justify-center rounded-lg border border-dashed border-ink-3/50 bg-bg/80 text-xs text-ink-3 backdrop-blur-(--blur-1px)",children:(0,e.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,e.jsx)(Ke,{className:"h-3.5 w-3.5"}),"Drop to attach"]})}):null,(0,e.jsx)("textarea",{ref:J,"data-testid":K,value:i,onChange:a,onKeyDown:n,placeholder:p,disabled:h,autoFocus:B,rows:1,wrap:g?"off":"soft",className:w("block min-h-(--sz-22px) w-full resize-none border-0 bg-transparent p-0 text-sm leading-6 text-ink outline-none placeholder:text-ink-3 focus:outline-none focus:ring-0",g?"max-h-(--sz-22px) overflow-x-auto whitespace-nowrap":"max-h-(--sz-200px) overflow-y-auto",I)}),$.length>0?(0,e.jsx)("div",{"data-testid":"chat-composer-attachments",className:"mt-2 space-y-1 rounded-md border border-dashed border-line/80 bg-bg-3/20 p-1.5",children:$.map(l=>{const Q=Ss(l.size),ue=l.status==="uploading"?"Uploading…":l.status==="error"?l.error??"Upload failed":l.inline?"Inserted inline":"Attached";return(0,e.jsxs)("div",{className:w("flex min-w-0 items-center gap-2 rounded-sm px-2 py-1 text-xs",l.status==="error"?"bg-bad/10 text-bad":"bg-bg/70 text-ink-3"),children:[l.status==="uploading"?(0,e.jsx)(he,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}):l.status==="attached"?(0,e.jsx)(Mt,{className:"h-3.5 w-3.5 shrink-0 text-green-600 dark:text-green-400"}):(0,e.jsx)(Kt,{className:"h-3.5 w-3.5 shrink-0"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:l.name}),Q?(0,e.jsx)("span",{className:"shrink-0",children:Q}):null,(0,e.jsx)("span",{className:"shrink-0",children:ue})]},l.id)})}):null,y?(0,e.jsx)("div",{className:"mt-2 inline-flex items-center rounded-full border border-line/70 bg-bg-3/30 px-2 py-0.5 text-(length:--text-micro) text-ink-3",children:y}):null,(0,e.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[M?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("input",{ref:N,type:"file",accept:T,className:"hidden",onChange:v}),(0,e.jsx)("button",{type:"button",onClick:R,disabled:h||F,"aria-label":"Attach files",title:"Attach files",className:"grid h-7 w-7 shrink-0 place-items-center rounded-md text-ink-3 transition-colors duration-150 hover:bg-bg-3 hover:text-ink disabled:cursor-not-allowed disabled:opacity-50",children:F?(0,e.jsx)(he,{className:"h-4 w-4 animate-spin"}):(0,e.jsx)(Ke,{className:"h-4 w-4"})})]}):null,q,(0,e.jsx)("span",{className:"flex-1"}),k,(0,e.jsx)(de,{variant:"primary",size:"icon-sm",className:"h-7 w-7 shrink-0",type:"button",onClick:o(()=>{ee&&c()},"onClick"),disabled:!ee,"aria-label":A,title:O?bt:A,children:b?(0,e.jsx)(he,{className:"h-3.5 w-3.5 animate-spin"}):(0,e.jsx)(Bt,{className:"h-3.5 w-3.5"})})]})]})},"ChatComposer")),Ve=12,ce=280,Es=2/3,Te="max-w-full overflow-visible [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_pre]:max-w-full [&_pre]:overflow-x-auto [&_table]:block [&_table]:max-w-full [&_table]:overflow-x-auto",ie="min-w-0 max-w-(--pct-85) break-words px-3 py-2 text-sm overflow-x-auto overflow-y-visible";function Ce({agent:t}){return(0,e.jsxs)("div",{className:"mb-1 flex items-center gap-1.5 pl-1",children:[(0,e.jsx)(Me,{agent:t,size:24}),(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:t.name})]})}o(Ce,"AgentBubbleHeader");function Qe(){return(0,e.jsx)("div",{className:"flex justify-start",children:(0,e.jsx)("div",{className:w(ie,"bg-bg-2 border border-line text-ink [border-radius:14px_14px_14px_4px]"),children:(0,e.jsxs)("span",{className:"typing-dots","aria-label":"typing",children:[(0,e.jsx)("span",{className:"typing-dot"}),(0,e.jsx)("span",{className:"typing-dot"}),(0,e.jsx)("span",{className:"typing-dot"})]})})})}o(Qe,"TypingBubble");function gr(){const{selectedCompanyId:t,selectedCompany:i}=Xe(),{setBreadcrumbs:d}=Qt(),c=xt();(0,r.useEffect)(()=>{d([{label:"Conference Room"}])},[d]);const p=(0,r.useRef)(null),[h,b]=(0,r.useState)(0),[S,g]=(0,r.useState)(Es),m=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{const s=p.current;if(!s)return;const u=new ResizeObserver(()=>{b(s.clientWidth)});return u.observe(s),b(s.clientWidth),()=>u.disconnect()},[]);const f=Math.max(0,h-Ve),B=ce,A=f-ce,E=f>0?Math.min(1,ce/f):0,$=f>0?Math.max(0,1-ce/f):1,F=f>0?A<B?Math.max(0,Math.round(f/2)):Math.round(f*Math.min($,Math.max(E,S))):0,T=(0,r.useCallback)(s=>{s.preventDefault(),m.current=!0;const u=s.clientX,_=F,U=o(X=>{if(!m.current)return;const me=(p.current?.clientWidth??h)-Ve,le=ce,pe=me-ce,Ne=_+X.clientX-u;me<=0||(pe<le?g(.5):g(Math.min(pe,Math.max(le,Ne))/me))},"onMouseMove"),G=o(()=>{m.current=!1,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",G)},"onMouseUp");document.addEventListener("mousemove",U),document.addEventListener("mouseup",G)},[h,F]),[q,k]=(0,r.useState)(""),y=(0,r.useRef)(null),[j,I]=(0,r.useState)(!1),[K,Y]=(0,r.useState)(""),[J,N]=(0,r.useState)(""),[H,Z]=(0,r.useState)(""),[x,M]=(0,r.useState)(null),[ne,oe]=(0,r.useState)(0),[O,ee]=(0,r.useState)(null),a=(0,r.useRef)(null),n=(0,r.useRef)(null),R=(0,r.useRef)(!1),C=(0,r.useRef)(null),v=(0,r.useRef)(null),[te,W]=(0,r.useState)(!1),V=(0,r.useRef)(!0),L=(0,r.useCallback)((s="smooth")=>{a.current?.scrollIntoView({behavior:s,block:"end"}),V.current=!0,W(!1)},[]),[D,l]=(0,r.useState)(!1),[Q,ue]=(0,r.useState)(!1),Re=(0,r.useRef)(t);(0,r.useEffect)(()=>{Re.current!==t&&(x&&c.removeQueries({queryKey:P.issues.comments(x)}),M(null),Y(""),N(""),I(!1),ee(null),Re.current=t)},[t,x,c]),(0,r.useEffect)(()=>{if(t&&y.current!==t){try{const s=sessionStorage.getItem(`wardmote.boardChat.draft.${t}`);k(s??"")}catch{k("")}y.current=t}},[t]),(0,r.useEffect)(()=>{if(t&&y.current===t)try{const s=`wardmote.boardChat.draft.${t}`;q?sessionStorage.setItem(s,q):sessionStorage.removeItem(s)}catch{}},[q,t]);const{data:xe}=ae({queryKey:P.agents.list(t),queryFn:o(()=>Ze.list(t),"queryFn"),enabled:!!t}),se=(0,r.useMemo)(()=>xe?.find(s=>s.role==="ceo"&&s.status!=="terminated"),[xe]),{data:De}=ae({queryKey:P.goals.list(t),queryFn:o(()=>es.list(t),"queryFn"),enabled:!!t}),ze=(0,r.useMemo)(()=>(De??[]).find(s=>s.status==="active")?.title??null,[De]),{data:je}=ae({queryKey:P.issues.list(t),queryFn:o(()=>fe.list(t),"queryFn"),enabled:!!t});(0,r.useEffect)(()=>{if(!je){M(null);return}const s=je.find(u=>u.title==="Board Operations"&&u.status!=="done"&&u.status!=="cancelled");M(s?.id??null)},[je]);const{data:ge}=ae({queryKey:P.issues.comments(x??""),queryFn:o(()=>fe.listComments(x),"queryFn"),enabled:!!x,refetchInterval:3e3}),re=(ge??[]).slice().sort((s,u)=>new Date(s.createdAt).getTime()-new Date(u.createdAt).getTime()),tt=(0,r.useMemo)(()=>new Map((xe??[]).map(s=>[s.id,s])),[xe]),{data:$e}=ae({queryKey:P.issues.feedbackVotes(x??""),queryFn:o(()=>fe.listFeedbackVotes(x),"queryFn"),enabled:!!x}),st=(0,r.useMemo)(()=>{const s=new Map;for(const u of $e??[])u.targetType==="issue_comment"&&s.set(u.targetId,u.vote);return s},[$e]),rt=(0,r.useCallback)(async(s,u,_)=>{x&&(await fe.upsertFeedbackVote(x,{targetType:"issue_comment",targetId:s,vote:u,reason:_?.reason,allowSharing:_?.allowSharing}),c.invalidateQueries({queryKey:P.issues.feedbackVotes(x)}))},[x,c]);(0,r.useEffect)(()=>{l(!1),ue(!1)},[t]);const{onboardingOpen:Fe}=ts(),[qe,at]=(0,r.useState)(()=>document.visibilityState!=="hidden");(0,r.useEffect)(()=>{const s=o(()=>at(document.visibilityState!=="hidden"),"onVisibilityChange");return document.addEventListener("visibilitychange",s),()=>document.removeEventListener("visibilitychange",s)},[]);const Oe=!!se&&!!i;(0,r.useEffect)(()=>{if(!Oe||D||Fe||!qe)return;const s=setTimeout(()=>l(!0),2e3);return()=>clearTimeout(s)},[Oe,D,Fe,qe]),(0,r.useEffect)(()=>{if(!D||Q)return;const s=setTimeout(()=>ue(!0),700);return()=>clearTimeout(s)},[D,Q]),(0,r.useEffect)(()=>{D&&Q||ge&&ge.some(s=>!s.authorAgentId&&s.authorUserId!=="board-concierge")&&(l(!0),ue(!0))},[ge,D,Q]),(0,r.useEffect)(()=>{O&&re.length>0&&[...re].reverse().find(s=>!s.authorAgentId&&s.authorUserId!=="board-concierge")?.body===O&&ee(null)},[re,O]),(0,r.useEffect)(()=>{if(R.current||re.length===0)return;const s=n.current;if(s){try{const u=sessionStorage.getItem("wardmote.boardChat.scrollTop");if(u!=null){const _=Number(u);if(Number.isFinite(_)){s.scrollTop=_,R.current=!0;return}}}catch{}s.scrollTop=s.scrollHeight,R.current=!0}},[re.length]),(0,r.useEffect)(()=>{O&&L("smooth")},[O,L]),(0,r.useEffect)(()=>{R.current&&(V.current?L("smooth"):W(!0))},[re.length,K,J,L]),(0,r.useEffect)(()=>{const s=n.current;if(!s)return;let u=null;const _=o(()=>{const U=s.scrollHeight-s.scrollTop-s.clientHeight<=80;V.current=U,U&&W(!1),u==null&&(u=requestAnimationFrame(()=>{u=null;try{sessionStorage.setItem("wardmote.boardChat.scrollTop",String(s.scrollTop))}catch{}}))},"handleScroll");return s.addEventListener("scroll",_,{passive:!0}),()=>{s.removeEventListener("scroll",_),u!=null&&cancelAnimationFrame(u)}},[]),(0,r.useEffect)(()=>{if(j){oe(0);const s=Date.now();v.current=setInterval(()=>{oe((Date.now()-s)/1e3)},100)}else v.current&&(clearInterval(v.current),v.current=null);return()=>{v.current&&clearInterval(v.current)}},[j]);const Le=(0,r.useCallback)(async s=>{const u=s.trim();if(!(!u||j||!t)){ee(u),I(!0),k(""),Y(""),Z(""),N("Connecting...");try{const _=new AbortController,U=setTimeout(()=>_.abort(),13e4),G=await fetch("/api/board/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t,message:u,taskId:x??void 0}),signal:_.signal});if(clearTimeout(U),!G.ok||!G.body)throw new Error("Board chat stream not available");N("Thinking...");const X=G.body.getReader(),me=new TextDecoder;let le="",pe="";for(;;){const{done:Ne,value:lt}=await X.read();if(Ne)break;le+=me.decode(lt,{stream:!0});const Pe=le.split(`
16
- `);le=Pe.pop()??"";for(const Be of Pe)if(Be.startsWith("data: "))try{const z=JSON.parse(Be.slice(6));z.type==="chunk"&&z.text?(pe+=z.text,Y(pe),N("")):z.type==="status"&&z.text?N(z.text):z.type==="start"&&z.issueId?M(z.issueId):z.type==="error"?(Z(z.message||"The board assistant couldn't respond. Please try again."),N("")):z.type==="done"&&z.issueId&&(c.invalidateQueries({queryKey:P.issues.comments(z.issueId)}),c.invalidateQueries({queryKey:P.issues.list(t)}))}catch{}}Y(""),N(""),x&&c.invalidateQueries({queryKey:P.issues.comments(x)})}catch{N(""),Z("The board assistant is unavailable right now. Please try again in a moment.")}finally{I(!1),C.current?.focus()}}},[j,t,x,c]),nt=(0,r.useCallback)(()=>{Le(q)},[q,Le]),[it,ot]=(0,r.useState)(!1);return t?(0,e.jsxs)("div",{className:"flex h-(--sz-calc-29) flex-col -m-6",children:[(0,e.jsxs)("div",{ref:p,className:"flex min-h-0 min-w-0 flex-1 flex-row",children:[(0,e.jsxs)("div",{className:w("relative flex min-h-0 min-w-0 shrink-0 flex-col bg-bg","w-full md:w-auto",f<=0&&"md:w-2/3"),style:f>0&&h>=572?{width:F}:void 0,children:[(0,e.jsxs)("div",{className:"relative flex shrink-0 items-center justify-between gap-2 px-4 py-3",children:[(0,e.jsx)("div",{className:"pointer-events-none absolute bottom-0 left-0 right-0 h-px bg-line","aria-hidden":!0}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:se?.name??"Conference Room"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:i?.name??"Your organization"})]}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"chat history",children:(0,e.jsx)(Jt,{className:"h-4 w-4"})})}),(0,e.jsx)(we,{side:"bottom",children:"chat history"})]}),(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"new chat",children:(0,e.jsx)(Pt,{className:"h-4 w-4"})})}),(0,e.jsx)(we,{side:"bottom",children:"new chat"})]})]})]}),(0,e.jsx)("div",{className:"relative min-h-0 min-w-0 flex-1",children:(0,e.jsx)("div",{ref:n,className:"scrollbar-auto-hide absolute inset-0 overflow-y-auto overflow-x-hidden",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4 px-6 pt-3 pb-32",children:[!D&&(0,e.jsx)(Qe,{}),D&&se&&i&&(()=>{const s=se.name,u=i.name,_=`Welcome to **${u}**! I'm ${s}, your team lead. I've read through what you shared in the wizard${ze?` — your mission is "${ze}".`:"."}
15
+ `,Ue=50,Is=30;function Ts({group:t,agentMap:i,entityNameMap:d,entityTitleMap:c}){const[p,h]=(0,r.useState)(!1),b=t.latestEvent.actorType==="agent"?i.get(t.latestEvent.actorId):null,S=b?.name??(t.latestEvent.actorType==="system"?"System":t.latestEvent.actorType==="user"?"Board":"Unknown"),g=d.get(`${t.entityType}:${t.entityId}`);return(0,e.jsxs)("div",{children:[(0,e.jsxs)("button",{type:"button",onClick:o(()=>h(m=>!m),"onClick"),"data-fc":"card",className:w("group ml-3 mr-3 md:ml-0 my-2 flex w-(--sz-calc-1) md:w-(--sz-calc-2) items-center gap-2 rounded-lg border bg-bg-2 p-(--sz-18px) text-left text-xs transition-(--tp-background-color-border-color) duration-150","cursor-pointer hover:bg-bg-3 hover:border-ink-3/30"),children:[p?(0,e.jsx)(Rt,{className:"h-3 w-3 shrink-0 text-ink-3"}):(0,e.jsx)(Dt,{className:"h-3 w-3 shrink-0 text-ink-3"}),t.latestEvent.actorType==="agent"?(0,e.jsx)(Me,{agent:b,size:16,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):t.latestEvent.actorType==="user"?(0,e.jsx)(Je,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,e.jsx)(ye,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,e.jsxs)("span",{className:"flex-1 min-w-0 truncate",children:[(0,e.jsx)("span",{"data-fc":"actor",className:"font-medium text-(--hex-959596) group-hover:text-white",children:S}),(0,e.jsxs)("span",{"data-fc":"verb",className:"ml-1 text-(--hex-959596)",children:["made ",t.events.length," updates to"]}),(0,e.jsx)("span",{"data-fc":"title",className:"ml-1 text-(--hex-959596) group-hover:text-white",children:g??t.entityId})]}),(0,e.jsx)("span",{"data-fc":"time",className:"text-ink-3 shrink-0",children:Ye(t.latestEvent.createdAt)})]}),p&&(0,e.jsx)("div",{className:"ml-8",children:t.events.map(m=>(0,e.jsx)(Ae,{event:m,agentMap:i,entityNameMap:d,entityTitleMap:c,isMuted:!0},m.id))})]})}o(Ts,"CollapsedFeedGroup");function We({className:t}){const{selectedCompanyId:i}=Xe(),[d,c]=(0,r.useState)("all"),[p,h]=(0,r.useState)("flat"),[b,S]=(0,r.useState)(!1),[g,m]=(0,r.useState)(Ue),f=(0,r.useRef)(null),B=(0,r.useRef)(new Set),A=(0,r.useRef)(!0);(0,r.useEffect)(()=>{const a="feed-animation-styles";if(document.getElementById(a))return;const n=document.createElement("style");n.id=a,n.textContent=_s,document.head.appendChild(n)},[]);const E=Zt({visibleMs:5e3}),$=P.activity(i??""),F=Ut({companyId:i,resourceKey:"activity",queryKey:$,enabled:!!i,refetchInterval:E,leaderOnly:!0}),{data:T,dataUpdatedAt:q}=ae({queryKey:$,queryFn:o(({signal:a})=>Vt.list(i,void 0,{signal:a}),"queryFn"),enabled:F.enabled,refetchInterval:F.refetchInterval});Wt(F,T,q);const{data:k}=ae({queryKey:P.agents.list(i??""),queryFn:o(()=>Ze.list(i),"queryFn"),enabled:!!i}),{data:y}=ae({queryKey:P.issues.list(i??""),queryFn:o(()=>fe.list(i),"queryFn"),enabled:!!i}),j=(0,r.useMemo)(()=>{const a=new Map;for(const n of k??[])a.set(n.id,n);return a},[k]),I=(0,r.useMemo)(()=>{const a=new Map;for(const n of k??[])a.set(`agent:${n.id}`,n.name);for(const n of y??[])a.set(`issue:${n.id}`,n.identifier??n.id);return a},[k,y]),K=(0,r.useMemo)(()=>{const a=new Map;for(const n of y??[])a.set(`issue:${n.id}`,n.title);return a},[y]),Y=(0,r.useMemo)(()=>{const a=new Map;for(const n of y??[])a.set(`issue:${n.id}`,n.status);return a},[y]),J=(0,r.useMemo)(()=>js((T??[]).filter(a=>{const n=Ee(a);return!b&&n===3?!1:ws(a,d)}).sort((a,n)=>new Date(n.createdAt).getTime()-new Date(a.createdAt).getTime())),[T,d,b]),N=J.slice(0,g),H=J.length>g;(0,r.useEffect)(()=>{if(T&&A.current){for(const a of T)B.current.add(a.id);A.current=!1}},[T]);const Z=(0,r.useCallback)(a=>A.current||B.current.has(a)?!1:(B.current.add(a),!0),[]);(0,r.useEffect)(()=>{m(Ue)},[d]);const x=(0,r.useCallback)(()=>{const a=f.current;!a||!H||a.scrollHeight-a.scrollTop-a.clientHeight<100&&m(n=>n+Is)},[H]),M=(0,r.useMemo)(()=>{const a=new Set;for(const n of T??[])n.action==="heartbeat.invoked"&&Ie(n.createdAt)&&a.add(n.entityId);for(const n of T??[])n.action==="heartbeat.cancelled"&&a.delete(n.entityId);return a},[T]),ne=o((a,n,R)=>{let C=null;if(n>0){const L="type"in a?a.latestEvent.createdAt:a.createdAt,D=R[n-1],l=Ie("type"in D?D.latestEvent.createdAt:D.createdAt),Q=Ie(L);l&&!Q&&(C=(0,e.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5",children:[(0,e.jsx)("div",{className:"h-px flex-1 bg-line"}),(0,e.jsx)("span",{className:"text-(length:--text-nano) font-medium text-ink-3 uppercase tracking-wider",children:"Earlier"}),(0,e.jsx)("div",{className:"h-px flex-1 bg-line"})]},`sep-${n}`))}if("type"in a&&a.type==="collapsed"){const L=Z(a.latestEvent.id)?"feed-item-new":"";return(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:L,children:(0,e.jsx)(Ts,{group:a,agentMap:j,entityNameMap:I,entityTitleMap:K})})]},`group-${a.latestEvent.id}`)}const v=a,te=Ee(v),W=Z(v.id)?"feed-item-new":"",V=M.has(v.entityId)&&v.action==="heartbeat.invoked";return te===1?(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:W||void 0,children:(0,e.jsx)(Ae,{event:v,agentMap:j,entityNameMap:I,entityTitleMap:K,entityStatusMap:Y,isActive:V})})]},v.id):(0,e.jsxs)("div",{children:[C,(0,e.jsx)("div",{className:W||void 0,children:(0,e.jsx)(Ae,{event:v,agentMap:j,entityNameMap:I,entityTitleMap:K,entityStatusMap:Y,isActive:V,isMuted:!0})})]},v.id)},"renderItem"),oe=o(()=>{const a=new Map;for(const n of N){const R="type"in n||n.entityType==="issue"?n.entityId:"__other__",C=a.get(R)??[];C.push(n),a.set(R,C)}return Array.from(a.entries()).map(([n,R])=>{const C=n==="__other__",v=I.get(`issue:${n}`),te=K.get(`issue:${n}`),W=C?"Other activity":`${v??n}${te?` — ${te}`:""}`;return(0,e.jsxs)("div",{className:"mb-2",children:[(0,e.jsx)("div",{className:"sticky top-0 z-10 bg-bg/95 backdrop-blur-sm border-b px-4 py-1.5",children:(0,e.jsx)("p",{className:"text-xs font-medium text-ink-3 truncate",children:W})}),R.map((V,L)=>ne(V,L,R))]},n)})},"renderGrouped"),O=(0,r.useMemo)(()=>k?k.length===0?{text:"No agents set up yet. Add an agent to get started.",showPulse:!1}:k.every(a=>a.status==="paused")?{text:"All agents are paused. Resume agents from the sidebar to see activity.",showPulse:!1}:{text:"Your agents are running — activity will appear here shortly.",showPulse:!0}:null,[k]),ee=N.length===0;return(0,e.jsxs)("aside",{className:w("flex min-h-0 min-w-0 flex-1 flex-col bg-bg",t),children:[(0,e.jsxs)("div",{className:"relative flex shrink-0 items-start justify-between gap-2 px-4 py-3",children:[(0,e.jsx)("div",{className:"pointer-events-none absolute bottom-0 right-0 left-0 h-px bg-line md:-left-3","aria-hidden":!0}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Agent Feed"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Live activity from your agents"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:p==="by-task"?"secondary":"ghost",size:"icon-sm",className:"shrink-0","aria-label":"group by task",onClick:o(()=>h(a=>a==="flat"?"by-task":"flat"),"onClick"),children:(0,e.jsx)(kt,{className:"h-3.5 w-3.5"})})}),(0,e.jsx)(we,{side:"bottom",children:p==="flat"?"Group by task":"Show flat"})]}),(0,e.jsxs)(St,{children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(It,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:d!=="all"||b?"secondary":"ghost",size:"icon-sm",className:"shrink-0","aria-label":"filter by",children:(0,e.jsx)(Ot,{className:"h-3.5 w-3.5"})})})}),(0,e.jsx)(we,{side:"bottom",children:"Filter by"})]}),(0,e.jsxs)(Tt,{align:"end",className:"w-48",children:[(0,e.jsx)(_t,{value:d,onValueChange:o(a=>c(a),"onValueChange"),children:bs.map(({value:a,label:n})=>(0,e.jsx)(Ct,{value:a,children:n},a))}),(0,e.jsx)(jt,{}),(0,e.jsx)(Nt,{checked:b,onCheckedChange:o(a=>S(!!a),"onCheckedChange"),children:"Show all activity"})]})]})]})]}),(0,e.jsx)("div",{ref:f,className:"flex-1 min-h-0 overflow-y-auto",onScroll:x,children:ee?(0,e.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6 h-full",children:(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 max-w-(--sz-16rem)",children:[O?.showPulse&&(0,e.jsxs)("span",{className:"relative flex h-2.5 w-2.5",children:[(0,e.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-accent/40"}),(0,e.jsx)("span",{className:"relative inline-flex h-2.5 w-2.5 rounded-full bg-accent/60"})]}),(0,e.jsx)("p",{className:"text-center text-sm text-ink-3",children:O?.text??"Activity from your agents will appear here."})]})}):p==="flat"?(0,e.jsx)("div",{className:"py-2",children:N.map((a,n)=>ne(a,n,N))}):oe()})]})}o(We,"ActivityFeed");var Cs=200;function Ss(t){return!t||t<=0?"":t<1024?`${t} B`:t<1048576?`${Math.round(t/1024)} KB`:`${(t/1048576).toFixed(1)} MB`}o(Ss,"formatAttachmentSize");function be(t){const i=t.dataTransfer?.types;return i?Array.from(i).includes("Files"):!1}o(be,"dragHasFiles");var As=(0,r.forwardRef)(o(function({value:i,onChange:d,onSubmit:c,placeholder:p="Message…",disabled:h=!1,submitting:b=!1,submitKey:S="mod-enter",singleLine:g=!1,tone:m="standard",surface:f="card",autoFocus:B=!1,sendLabel:A="Send message",onAttachFiles:E,attachments:$=[],attaching:F=!1,acceptFileTypes:T,leadingTools:q,trailingTools:k,hint:y,className:j,textareaClassName:I,inputTestId:K="chat-composer-input"},Y){const J=(0,r.useRef)(null),N=(0,r.useRef)(null),H=(0,r.useRef)(0),[Z,x]=(0,r.useState)(!1),M=typeof E=="function",ne=m==="ask",oe=m==="planning",O=gt(),ee=!O&&!h&&!b&&i.trim().length>0;(0,r.useImperativeHandle)(Y,()=>({focus:o(()=>J.current?.focus(),"focus")}),[]),(0,r.useLayoutEffect)(()=>{const l=J.current;!l||g||(l.style.height="auto",l.style.height=`${Math.min(l.scrollHeight,Cs)}px`)},[i,g]);function a(l){d(g?l.target.value.replace(/\r?\n/g," "):l.target.value)}o(a,"handleChange");function n(l){l.key==="Enter"&&(S==="mod-enter"?l.metaKey||l.ctrlKey:!l.shiftKey&&!l.metaKey&&!l.ctrlKey)&&(l.preventDefault(),ee&&c())}o(n,"handleKeyDown");function R(){N.current?.click()}o(R,"triggerFilePicker");async function C(l){!E||l.length===0||await E(l)}o(C,"emitFiles");async function v(l){await C(l.target.files?Array.from(l.target.files):[]),N.current&&(N.current.value="")}o(v,"handleFileInputChange");function te(){H.current=0,x(!1)}o(te,"resetDrag");function W(l){!M||!be(l)||(l.preventDefault(),H.current+=1,x(!0))}o(W,"handleDragEnter");function V(l){!M||!be(l)||(l.preventDefault(),l.dataTransfer.dropEffect="copy")}o(V,"handleDragOver");function L(l){!M||!be(l)||(l.preventDefault(),H.current=Math.max(0,H.current-1),H.current===0&&x(!1))}o(L,"handleDragLeave");function D(l){!M||!be(l)||(l.preventDefault(),te(),C(l.dataTransfer?.files?Array.from(l.dataTransfer.files):[]))}return o(D,"handleDrop"),(0,e.jsxs)("div",{"data-testid":"chat-composer","data-tone":m,"data-surface":f,className:w("relative rounded-xl border px-3 pt-2.5 pb-2 transition-colors duration-150 focus-within:border-ink-3/40",f==="translucent"?"border-line/70 bg-bg/95 shadow-(--shadow-extract-4) backdrop-blur supports-[backdrop-filter]:bg-bg/85 dark:shadow-(--shadow-extract-5)":"border-line bg-bg-2",ne&&"border-sky-500/55 bg-sky-50/50 focus-within:border-sky-500/70 dark:border-sky-500/50 dark:bg-sky-500/[0.07]",oe&&"border-amber-500/55 bg-amber-50/50 focus-within:border-amber-500/70 dark:border-amber-500/50 dark:bg-amber-500/[0.07]",Z&&M&&"border-ink-3/50 bg-bg-3/20",h&&"opacity-60",j),onDragEnter:W,onDragOver:V,onDragLeave:L,onDrop:D,children:[Z&&M?(0,e.jsx)("div",{"data-testid":"chat-composer-drop-overlay",className:"pointer-events-none absolute inset-1.5 z-20 flex items-center justify-center rounded-lg border border-dashed border-ink-3/50 bg-bg/80 text-xs text-ink-3 backdrop-blur-(--blur-1px)",children:(0,e.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,e.jsx)(Ke,{className:"h-3.5 w-3.5"}),"Drop to attach"]})}):null,(0,e.jsx)("textarea",{ref:J,"data-testid":K,value:i,onChange:a,onKeyDown:n,placeholder:p,disabled:h,autoFocus:B,rows:1,wrap:g?"off":"soft",className:w("block min-h-(--sz-22px) w-full resize-none border-0 bg-transparent p-0 text-sm leading-6 text-ink outline-none placeholder:text-ink-3 focus:outline-none focus:ring-0",g?"max-h-(--sz-22px) overflow-x-auto whitespace-nowrap":"max-h-(--sz-200px) overflow-y-auto",I)}),$.length>0?(0,e.jsx)("div",{"data-testid":"chat-composer-attachments",className:"mt-2 space-y-1 rounded-md border border-dashed border-line/80 bg-bg-3/20 p-1.5",children:$.map(l=>{const Q=Ss(l.size),ue=l.status==="uploading"?"Uploading…":l.status==="error"?l.error??"Upload failed":l.inline?"Inserted inline":"Attached";return(0,e.jsxs)("div",{className:w("flex min-w-0 items-center gap-2 rounded-sm px-2 py-1 text-xs",l.status==="error"?"bg-bad/10 text-bad":"bg-bg/70 text-ink-3"),children:[l.status==="uploading"?(0,e.jsx)(he,{className:"h-3.5 w-3.5 shrink-0 animate-spin"}):l.status==="attached"?(0,e.jsx)(Mt,{className:"h-3.5 w-3.5 shrink-0 text-green-600 dark:text-green-400"}):(0,e.jsx)(Kt,{className:"h-3.5 w-3.5 shrink-0"}),(0,e.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:l.name}),Q?(0,e.jsx)("span",{className:"shrink-0",children:Q}):null,(0,e.jsx)("span",{className:"shrink-0",children:ue})]},l.id)})}):null,y?(0,e.jsx)("div",{className:"mt-2 inline-flex items-center rounded-full border border-line/70 bg-bg-3/30 px-2 py-0.5 text-(length:--text-micro) text-ink-3",children:y}):null,(0,e.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[M?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("input",{ref:N,type:"file",accept:T,className:"hidden",onChange:v}),(0,e.jsx)("button",{type:"button",onClick:R,disabled:h||F,"aria-label":"Attach files",title:"Attach files",className:"grid h-7 w-7 shrink-0 place-items-center rounded-md text-ink-3 transition-colors duration-150 hover:bg-bg-3 hover:text-ink disabled:cursor-not-allowed disabled:opacity-50",children:F?(0,e.jsx)(he,{className:"h-4 w-4 animate-spin"}):(0,e.jsx)(Ke,{className:"h-4 w-4"})})]}):null,q,(0,e.jsx)("span",{className:"flex-1"}),k,(0,e.jsx)(de,{variant:"primary",size:"icon-sm",className:"h-7 w-7 shrink-0",type:"button",onClick:o(()=>{ee&&c()},"onClick"),disabled:!ee,"aria-label":A,title:O?bt:A,children:b?(0,e.jsx)(he,{className:"h-3.5 w-3.5 animate-spin"}):(0,e.jsx)(Bt,{className:"h-3.5 w-3.5"})})]})]})},"ChatComposer")),Ve=12,ce=280,Es=2/3,Te="max-w-full overflow-visible [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_pre]:max-w-full [&_pre]:overflow-x-auto [&_table]:block [&_table]:max-w-full [&_table]:overflow-x-auto",ie="min-w-0 max-w-(--pct-85) break-words px-3 py-2 text-sm overflow-x-auto overflow-y-visible";function Ce({agent:t}){return(0,e.jsxs)("div",{className:"mb-1 flex items-center gap-1.5 pl-1",children:[(0,e.jsx)(Me,{agent:t,size:24}),(0,e.jsx)("span",{className:"text-sm font-medium text-ink",children:t.name})]})}o(Ce,"AgentBubbleHeader");function Qe(){return(0,e.jsx)("div",{className:"flex justify-start",children:(0,e.jsx)("div",{className:w(ie,"bg-bg-2 border border-line text-ink [border-radius:14px_14px_14px_4px]"),children:(0,e.jsxs)("span",{className:"typing-dots","aria-label":"typing",children:[(0,e.jsx)("span",{className:"typing-dot"}),(0,e.jsx)("span",{className:"typing-dot"}),(0,e.jsx)("span",{className:"typing-dot"})]})})})}o(Qe,"TypingBubble");function gr(){const{selectedCompanyId:t,selectedCompany:i}=Xe(),{setBreadcrumbs:d}=Qt(),c=xt();(0,r.useEffect)(()=>{d([{label:"Conference Room"}])},[d]);const p=(0,r.useRef)(null),[h,b]=(0,r.useState)(0),[S,g]=(0,r.useState)(Es),m=(0,r.useRef)(!1);(0,r.useLayoutEffect)(()=>{const s=p.current;if(!s)return;const u=new ResizeObserver(()=>{b(s.clientWidth)});return u.observe(s),b(s.clientWidth),()=>u.disconnect()},[]);const f=Math.max(0,h-Ve),B=ce,A=f-ce,E=f>0?Math.min(1,ce/f):0,$=f>0?Math.max(0,1-ce/f):1,F=f>0?A<B?Math.max(0,Math.round(f/2)):Math.round(f*Math.min($,Math.max(E,S))):0,T=(0,r.useCallback)(s=>{s.preventDefault(),m.current=!0;const u=s.clientX,_=F,U=o(X=>{if(!m.current)return;const me=(p.current?.clientWidth??h)-Ve,le=ce,pe=me-ce,Ne=_+X.clientX-u;me<=0||(pe<le?g(.5):g(Math.min(pe,Math.max(le,Ne))/me))},"onMouseMove"),G=o(()=>{m.current=!1,document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",G)},"onMouseUp");document.addEventListener("mousemove",U),document.addEventListener("mouseup",G)},[h,F]),[q,k]=(0,r.useState)(""),y=(0,r.useRef)(null),[j,I]=(0,r.useState)(!1),[K,Y]=(0,r.useState)(""),[J,N]=(0,r.useState)(""),[H,Z]=(0,r.useState)(""),[x,M]=(0,r.useState)(null),[ne,oe]=(0,r.useState)(0),[O,ee]=(0,r.useState)(null),a=(0,r.useRef)(null),n=(0,r.useRef)(null),R=(0,r.useRef)(!1),C=(0,r.useRef)(null),v=(0,r.useRef)(null),[te,W]=(0,r.useState)(!1),V=(0,r.useRef)(!0),L=(0,r.useCallback)((s="smooth")=>{a.current?.scrollIntoView({behavior:s,block:"end"}),V.current=!0,W(!1)},[]),[D,l]=(0,r.useState)(!1),[Q,ue]=(0,r.useState)(!1),Re=(0,r.useRef)(t);(0,r.useEffect)(()=>{Re.current!==t&&(x&&c.removeQueries({queryKey:P.issues.comments(x)}),M(null),Y(""),N(""),I(!1),ee(null),Re.current=t)},[t,x,c]),(0,r.useEffect)(()=>{if(t&&y.current!==t){try{const s=sessionStorage.getItem(`wardmote.boardChat.draft.${t}`);k(s??"")}catch{k("")}y.current=t}},[t]),(0,r.useEffect)(()=>{if(t&&y.current===t)try{const s=`wardmote.boardChat.draft.${t}`;q?sessionStorage.setItem(s,q):sessionStorage.removeItem(s)}catch{}},[q,t]);const{data:xe}=ae({queryKey:P.agents.list(t),queryFn:o(()=>Ze.list(t),"queryFn"),enabled:!!t}),se=(0,r.useMemo)(()=>xe?.find(s=>s.role==="ceo"&&s.status!=="terminated"),[xe]),{data:De}=ae({queryKey:P.goals.list(t),queryFn:o(()=>Jt.list(t),"queryFn"),enabled:!!t}),ze=(0,r.useMemo)(()=>(De??[]).find(s=>s.status==="active")?.title??null,[De]),{data:je}=ae({queryKey:P.issues.list(t),queryFn:o(()=>fe.list(t),"queryFn"),enabled:!!t});(0,r.useEffect)(()=>{if(!je){M(null);return}const s=je.find(u=>u.title==="Board Operations"&&u.status!=="done"&&u.status!=="cancelled");M(s?.id??null)},[je]);const{data:ge}=ae({queryKey:P.issues.comments(x??""),queryFn:o(()=>fe.listComments(x),"queryFn"),enabled:!!x,refetchInterval:3e3}),re=(ge??[]).slice().sort((s,u)=>new Date(s.createdAt).getTime()-new Date(u.createdAt).getTime()),tt=(0,r.useMemo)(()=>new Map((xe??[]).map(s=>[s.id,s])),[xe]),{data:$e}=ae({queryKey:P.issues.feedbackVotes(x??""),queryFn:o(()=>fe.listFeedbackVotes(x),"queryFn"),enabled:!!x}),st=(0,r.useMemo)(()=>{const s=new Map;for(const u of $e??[])u.targetType==="issue_comment"&&s.set(u.targetId,u.vote);return s},[$e]),rt=(0,r.useCallback)(async(s,u,_)=>{x&&(await fe.upsertFeedbackVote(x,{targetType:"issue_comment",targetId:s,vote:u,reason:_?.reason,allowSharing:_?.allowSharing}),c.invalidateQueries({queryKey:P.issues.feedbackVotes(x)}))},[x,c]);(0,r.useEffect)(()=>{l(!1),ue(!1)},[t]);const{onboardingOpen:Fe}=ss(),[qe,at]=(0,r.useState)(()=>document.visibilityState!=="hidden");(0,r.useEffect)(()=>{const s=o(()=>at(document.visibilityState!=="hidden"),"onVisibilityChange");return document.addEventListener("visibilitychange",s),()=>document.removeEventListener("visibilitychange",s)},[]);const Oe=!!se&&!!i;(0,r.useEffect)(()=>{if(!Oe||D||Fe||!qe)return;const s=setTimeout(()=>l(!0),2e3);return()=>clearTimeout(s)},[Oe,D,Fe,qe]),(0,r.useEffect)(()=>{if(!D||Q)return;const s=setTimeout(()=>ue(!0),700);return()=>clearTimeout(s)},[D,Q]),(0,r.useEffect)(()=>{D&&Q||ge&&ge.some(s=>!s.authorAgentId&&s.authorUserId!=="board-concierge")&&(l(!0),ue(!0))},[ge,D,Q]),(0,r.useEffect)(()=>{O&&re.length>0&&[...re].reverse().find(s=>!s.authorAgentId&&s.authorUserId!=="board-concierge")?.body===O&&ee(null)},[re,O]),(0,r.useEffect)(()=>{if(R.current||re.length===0)return;const s=n.current;if(s){try{const u=sessionStorage.getItem("wardmote.boardChat.scrollTop");if(u!=null){const _=Number(u);if(Number.isFinite(_)){s.scrollTop=_,R.current=!0;return}}}catch{}s.scrollTop=s.scrollHeight,R.current=!0}},[re.length]),(0,r.useEffect)(()=>{O&&L("smooth")},[O,L]),(0,r.useEffect)(()=>{R.current&&(V.current?L("smooth"):W(!0))},[re.length,K,J,L]),(0,r.useEffect)(()=>{const s=n.current;if(!s)return;let u=null;const _=o(()=>{const U=s.scrollHeight-s.scrollTop-s.clientHeight<=80;V.current=U,U&&W(!1),u==null&&(u=requestAnimationFrame(()=>{u=null;try{sessionStorage.setItem("wardmote.boardChat.scrollTop",String(s.scrollTop))}catch{}}))},"handleScroll");return s.addEventListener("scroll",_,{passive:!0}),()=>{s.removeEventListener("scroll",_),u!=null&&cancelAnimationFrame(u)}},[]),(0,r.useEffect)(()=>{if(j){oe(0);const s=Date.now();v.current=setInterval(()=>{oe((Date.now()-s)/1e3)},100)}else v.current&&(clearInterval(v.current),v.current=null);return()=>{v.current&&clearInterval(v.current)}},[j]);const Le=(0,r.useCallback)(async s=>{const u=s.trim();if(!(!u||j||!t)){ee(u),I(!0),k(""),Y(""),Z(""),N("Connecting...");try{const _=new AbortController,U=setTimeout(()=>_.abort(),13e4),G=await fetch("/api/board/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t,message:u,taskId:x??void 0}),signal:_.signal});if(clearTimeout(U),!G.ok||!G.body)throw new Error("Board chat stream not available");N("Thinking...");const X=G.body.getReader(),me=new TextDecoder;let le="",pe="";for(;;){const{done:Ne,value:lt}=await X.read();if(Ne)break;le+=me.decode(lt,{stream:!0});const Pe=le.split(`
16
+ `);le=Pe.pop()??"";for(const Be of Pe)if(Be.startsWith("data: "))try{const z=JSON.parse(Be.slice(6));z.type==="chunk"&&z.text?(pe+=z.text,Y(pe),N("")):z.type==="status"&&z.text?N(z.text):z.type==="start"&&z.issueId?M(z.issueId):z.type==="error"?(Z(z.message||"The board assistant couldn't respond. Please try again."),N("")):z.type==="done"&&z.issueId&&(c.invalidateQueries({queryKey:P.issues.comments(z.issueId)}),c.invalidateQueries({queryKey:P.issues.list(t)}))}catch{}}Y(""),N(""),x&&c.invalidateQueries({queryKey:P.issues.comments(x)})}catch{N(""),Z("The board assistant is unavailable right now. Please try again in a moment.")}finally{I(!1),C.current?.focus()}}},[j,t,x,c]),nt=(0,r.useCallback)(()=>{Le(q)},[q,Le]),[it,ot]=(0,r.useState)(!1);return t?(0,e.jsxs)("div",{className:"flex h-(--sz-calc-29) flex-col -m-6",children:[(0,e.jsxs)("div",{ref:p,className:"flex min-h-0 min-w-0 flex-1 flex-row",children:[(0,e.jsxs)("div",{className:w("relative flex min-h-0 min-w-0 shrink-0 flex-col bg-bg","w-full md:w-auto",f<=0&&"md:w-2/3"),style:f>0&&h>=572?{width:F}:void 0,children:[(0,e.jsxs)("div",{className:"relative flex shrink-0 items-center justify-between gap-2 px-4 py-3",children:[(0,e.jsx)("div",{className:"pointer-events-none absolute bottom-0 left-0 right-0 h-px bg-line","aria-hidden":!0}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:se?.name??"Conference Room"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:i?.name??"Your organization"})]}),(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"chat history",children:(0,e.jsx)(Yt,{className:"h-4 w-4"})})}),(0,e.jsx)(we,{side:"bottom",children:"chat history"})]}),(0,e.jsxs)(ke,{children:[(0,e.jsx)(ve,{asChild:!0,children:(0,e.jsx)(de,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"new chat",children:(0,e.jsx)(Pt,{className:"h-4 w-4"})})}),(0,e.jsx)(we,{side:"bottom",children:"new chat"})]})]})]}),(0,e.jsx)("div",{className:"relative min-h-0 min-w-0 flex-1",children:(0,e.jsx)("div",{ref:n,className:"scrollbar-auto-hide absolute inset-0 overflow-y-auto overflow-x-hidden",children:(0,e.jsxs)("div",{className:"flex flex-col gap-4 px-6 pt-3 pb-32",children:[!D&&(0,e.jsx)(Qe,{}),D&&se&&i&&(()=>{const s=se.name,u=i.name,_=`Welcome to **${u}**! I'm ${s}, your team lead. I've read through what you shared in the wizard${ze?` — your mission is "${ze}".`:"."}
17
17
 
18
18
  Here are a few things I can help you put on paper right now. Pick one below and I'll draft it for you using everything you told us.`,U=re.some(X=>!X.authorAgentId&&X.authorUserId!=="board-concierge"),G=[{label:"Draft an Organization Brief",prompt:`Draft a one-page Organization Brief for ${u} — include our mission, team roster, and first priorities.`},{label:"Create a hiring plan",prompt:`Create a hiring plan for ${u}. List the next roles to hire, in priority order, with a short rationale for each.`},{label:"Outline our first 30 days",prompt:"Outline our first 30 days. Break it into weekly priorities with who owns what."},{label:"Write an intro pitch",prompt:`Write a short intro pitch for ${u} that I could reuse for investors, customers, or recruits.`}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"flex flex-col items-start",children:[(0,e.jsx)(Ce,{agent:{...se,name:s}}),(0,e.jsx)("div",{className:w(ie,"bg-bg-2 border border-line text-ink [border-radius:14px_14px_14px_4px]"),children:(0,e.jsx)(_e,{className:Te,children:_})})]}),!U&&Q&&(0,e.jsx)("div",{className:"flex flex-wrap gap-2 pl-1",children:G.map(X=>(0,e.jsx)("button",{type:"button",onClick:o(()=>{k(X.prompt),C.current?.focus()},"onClick"),className:"rounded-full border border-line bg-bg-2 px-3 py-1.5 text-xs text-ink-3 transition-colors duration-150 hover:bg-bg-3 hover:text-ink",children:X.label},X.label))})]})})(),re.map(s=>{if(!s.authorAgentId&&s.authorUserId!=="board-concierge")return(0,e.jsx)("div",{className:"flex justify-end",children:(0,e.jsx)("div",{className:w(ie,"bg-blue-600 text-white [border-radius:14px_14px_4px_14px]"),children:s.body??""})},s.id);const u=s.authorAgentId?tt.get(s.authorAgentId)??null:se??null,_=u?.name??"Assistant";return u?.icon,(0,e.jsxs)("div",{className:"flex flex-col items-start",children:[(0,e.jsx)(Ce,{agent:u??{id:s.authorAgentId??void 0,name:_}}),(0,e.jsx)("div",{className:w(ie,"bg-bg-2 border border-line text-ink [border-radius:14px_14px_14px_4px]"),children:(0,e.jsx)(_e,{className:Te,children:s.body??""})}),(0,e.jsx)(ns,{copyText:s.body??"",dateLabel:as(s.createdAt),dateTitle:ut(s.createdAt),anchorHref:`#comment-${s.id}`,feedback:x?{activeVote:st.get(s.id)??null,sharingPreference:"prompt",termsUrl:null,onVote:o((U,G)=>rt(s.id,U,G),"onVote")}:null})]},s.id)}),O&&(0,e.jsx)("div",{className:"flex justify-end",children:(0,e.jsx)("div",{className:w(ie,"bg-blue-600 text-white [border-radius:14px_14px_4px_14px]"),children:O})}),K&&(0,e.jsxs)("div",{className:"flex flex-col items-start",children:[se&&(0,e.jsx)(Ce,{agent:se}),(0,e.jsx)("div",{className:w(ie,"bg-bg-2 border border-line text-ink [border-radius:14px_14px_14px_4px]"),children:(0,e.jsx)(_e,{className:Te,children:K})})]}),j&&!K&&(0,e.jsx)(Qe,{}),j&&(0,e.jsxs)("div",{className:"flex items-center gap-2 pl-1 text-xs text-ink-3",children:[(0,e.jsx)(Ht,{animated:!0,className:"size-3.5 shrink-0"}),(0,e.jsx)("span",{children:J||"Thinking..."}),ne>0&&(0,e.jsxs)("span",{className:"opacity-50",children:[ne.toFixed(1),"s"]})]}),H&&!j&&(0,e.jsx)("div",{role:"alert",className:"flex justify-start",children:(0,e.jsx)("div",{className:w(ie,"bg-bad/10 border border-bad/30 text-bad [border-radius:14px_14px_14px_4px]"),children:H})}),(0,e.jsx)("div",{ref:a})]})})}),te&&(0,e.jsx)("button",{type:"button",onClick:o(()=>L("smooth"),"onClick"),"aria-label":"Jump to latest messages",className:"absolute bottom-24 left-1/2 z-20 grid h-8 w-8 -translate-x-1/2 place-items-center rounded-full border border-line bg-bg-2 text-ink shadow-md transition-colors duration-150 hover:bg-bg-3 hover:border-ink-3/30",children:(0,e.jsx)(Et,{className:"h-4 w-4"})}),(0,e.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 z-10 bg-gradient-to-t from-bg via-bg/95 to-bg/0 px-6 pt-6 pb-5",children:(0,e.jsx)(As,{ref:C,value:q,onChange:k,onSubmit:nt,placeholder:"Ask anything about your organization...",submitKey:"enter",surface:"translucent",submitting:j,disabled:j,sendLabel:"Send message",className:"pointer-events-auto"})})]}),(0,e.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize board chat and agent feed",className:"group relative hidden w-3 shrink-0 cursor-col-resize bg-bg md:flex",onMouseDown:T,children:(0,e.jsx)("div",{className:"pointer-events-none absolute top-0 bottom-0 left-0 w-px bg-line transition-colors group-hover:bg-ink/20","aria-hidden":!0})}),(0,e.jsx)("div",{className:"hidden md:flex md:min-h-0 md:min-w-0 md:flex-1",children:(0,e.jsx)(We,{})})]}),(0,e.jsx)("div",{className:"md:hidden",children:(0,e.jsxs)(ls,{open:it,onOpenChange:ot,children:[(0,e.jsx)(is,{asChild:!0,children:(0,e.jsx)(de,{type:"button",size:"icon",variant:"secondary",className:"fixed bottom-20 right-4 z-20 h-10 w-10 rounded-full shadow-lg","aria-label":"Open agent feed",children:(0,e.jsx)(At,{className:"h-4 w-4"})})}),(0,e.jsx)(os,{side:"bottom",className:"h-(--sz-70vh) p-0 rounded-t-xl",children:(0,e.jsx)(We,{})})]})})]}):(0,e.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,e.jsxs)("div",{className:"text-center max-w-sm",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"No organization selected"}),(0,e.jsx)("p",{className:"text-sm text-ink-3 mt-2",children:"Select an organization to start chatting with your board concierge."})]})})}o(gr,"BoardChat");export{gr as BoardChat};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var t=(r,m)=>f(r,"name",{value:m,configurable:!0});import{i as y}from"./rolldown-runtime-ZpX3ckPj.js";import{la as N,ua as b}from"./createLucideIcon-CgrPXnTY.js";import{v as w,y as v}from"./star-eem0qj3E.js";import{X as C,_ as k,t as o,v as x}from"./queryKeys-BzT8CD34.js";import{o as q}from"./companies-query-BEdFiAhG.js";import{t as h}from"./router-BKzUF9uf.js";import{t as c}from"./button-DI4w5WP7.js";import{t as p}from"./access-DhB95qNC.js";import{t as l}from"./card-BVZvs7aX.js";var _=y(b(),1),e=y(N(),1);function U(){const r=C(),m=w(),[g]=v(),s=(m.token??"").trim(),a=(g.get("code")??"").trim(),j=(0,_.useMemo)(()=>`/board-claim/${encodeURIComponent(s)}${a?`?code=${encodeURIComponent(a)}`:""}`,[s,a]),d=x({queryKey:o.auth.session,queryFn:t(()=>q.getSession(),"queryFn"),retry:!1}),i=x({queryKey:["board-claim",s,a],queryFn:t(()=>p.getBoardClaimStatus(s,a),"queryFn"),enabled:s.length>0&&a.length>0,retry:!1}),n=k({mutationFn:t(()=>p.claimBoard(s,a),"mutationFn"),onSuccess:t(async()=>{await r.invalidateQueries({queryKey:o.auth.session}),await r.invalidateQueries({queryKey:o.health}),await r.invalidateQueries({queryKey:o.companies.all}),await r.invalidateQueries({queryKey:o.companies.stats}),await i.refetch()},"onSuccess")});if(!s||!a)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-bad",children:"Invalid board claim URL."});if(i.isLoading||d.isLoading)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-ink-3",children:"Loading claim challenge..."});if(i.error)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Claim challenge unavailable"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:i.error instanceof Error?i.error.message:"Challenge is invalid or expired."})]})});const u=i.data;return u?u.status==="claimed"?(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Board ownership claimed"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance is now linked to your authenticated user."}),(0,e.jsx)(c,{asChild:!0,className:"mt-4",children:(0,e.jsx)(h,{to:"/",children:"Open board"})})]})}):d.data?(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Claim Board ownership"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This will promote your user to instance admin and migrate organization ownership access from local trusted mode."}),n.error&&(0,e.jsx)("p",{className:"mt-3 text-sm text-bad",children:n.error instanceof Error?n.error.message:"Failed to claim board ownership"}),(0,e.jsx)(c,{className:"mt-5",onClick:t(()=>n.mutate(),"onClick"),disabled:n.isPending,children:n.isPending?"Claiming…":"Claim ownership"})]})}):(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Sign in required"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Sign in or create an account, then return to this page to claim Board ownership."}),(0,e.jsx)(c,{asChild:!0,className:"mt-4",children:(0,e.jsx)(h,{to:`/auth?next=${encodeURIComponent(j)}`,children:"Sign in / Create account"})})]})}):(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-bad",children:"Claim challenge unavailable."})}t(U,"BoardClaimPage");export{U as BoardClaimPage};
1
+ var f=Object.defineProperty;var t=(r,m)=>f(r,"name",{value:m,configurable:!0});import{i as y}from"./rolldown-runtime-ZpX3ckPj.js";import{la as N,ua as b}from"./createLucideIcon-CgrPXnTY.js";import{v as w,y as v}from"./star-eem0qj3E.js";import{X as C,_ as k,t as o,v as x}from"./queryKeys-BzT8CD34.js";import{o as q}from"./companies-query-BEdFiAhG.js";import{t as h}from"./router-CJbFZfVR.js";import{t as c}from"./button-DI4w5WP7.js";import{t as p}from"./access-DhB95qNC.js";import{t as l}from"./card-BVZvs7aX.js";var _=y(b(),1),e=y(N(),1);function U(){const r=C(),m=w(),[g]=v(),s=(m.token??"").trim(),a=(g.get("code")??"").trim(),j=(0,_.useMemo)(()=>`/board-claim/${encodeURIComponent(s)}${a?`?code=${encodeURIComponent(a)}`:""}`,[s,a]),d=x({queryKey:o.auth.session,queryFn:t(()=>q.getSession(),"queryFn"),retry:!1}),i=x({queryKey:["board-claim",s,a],queryFn:t(()=>p.getBoardClaimStatus(s,a),"queryFn"),enabled:s.length>0&&a.length>0,retry:!1}),n=k({mutationFn:t(()=>p.claimBoard(s,a),"mutationFn"),onSuccess:t(async()=>{await r.invalidateQueries({queryKey:o.auth.session}),await r.invalidateQueries({queryKey:o.health}),await r.invalidateQueries({queryKey:o.companies.all}),await r.invalidateQueries({queryKey:o.companies.stats}),await i.refetch()},"onSuccess")});if(!s||!a)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-bad",children:"Invalid board claim URL."});if(i.isLoading||d.isLoading)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-ink-3",children:"Loading claim challenge..."});if(i.error)return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Claim challenge unavailable"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:i.error instanceof Error?i.error.message:"Challenge is invalid or expired."})]})});const u=i.data;return u?u.status==="claimed"?(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Board ownership claimed"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance is now linked to your authenticated user."}),(0,e.jsx)(c,{asChild:!0,className:"mt-4",children:(0,e.jsx)(h,{to:"/",children:"Open board"})})]})}):d.data?(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Claim Board ownership"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This will promote your user to instance admin and migrate organization ownership access from local trusted mode."}),n.error&&(0,e.jsx)("p",{className:"mt-3 text-sm text-bad",children:n.error instanceof Error?n.error.message:"Failed to claim board ownership"}),(0,e.jsx)(c,{className:"mt-5",onClick:t(()=>n.mutate(),"onClick"),disabled:n.isPending,children:n.isPending?"Claiming…":"Claim ownership"})]})}):(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsxs)(l,{className:"block p-6",children:[(0,e.jsx)("h1",{className:"text-lg font-semibold",children:"Sign in required"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Sign in or create an account, then return to this page to claim Board ownership."}),(0,e.jsx)(c,{asChild:!0,className:"mt-4",children:(0,e.jsx)(h,{to:`/auth?next=${encodeURIComponent(j)}`,children:"Sign in / Create account"})})]})}):(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10 text-sm text-bad",children:"Claim challenge unavailable."})}t(U,"BoardClaimPage");export{U as BoardClaimPage};
@@ -1 +1 @@
1
- var c=Object.defineProperty;var t=(s,l)=>c(s,"name",{value:l,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{la as d}from"./createLucideIcon-CgrPXnTY.js";import{r,t as a}from"./button-DI4w5WP7.js";import{t as o}from"./shield-check-RPyaLAc-.js";import{t as x}from"./terminal-i6UlT3R6.js";import{t as h}from"./triangle-alert-CnHMpmva.js";import{t as p}from"./card-BVZvs7aX.js";import{Ht as u}from"./index-D1wQsid4.js";var e=m(d(),1),j={"signed-out-private":"1 · authenticated/private — signed out (browser claim available)","signed-in-private":"2 · authenticated/private — signed in (claim CTA primary)",claiming:"3 · authenticated/private — claim in flight","claim-error":"4 · authenticated/private — claim error (e.g. 409 already claimed)","claim-success":"5 · authenticated/private — claim succeeded, redirect pending","public-invite-only":"6 · authenticated/public — invite-only (no browser claim)"},f=["signed-out-private","signed-in-private","claiming","claim-error","claim-success","public-invite-only"];function n({hasActiveInvite:s}){return(0,e.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,e.jsx)(x,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,e.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:s?"A bootstrap invite is already active. Check your Wardmote startup logs for the first‑admin URL, or run this command on the host to rotate it:":"Run this command on the host that runs Wardmote to print a one‑time first‑admin invite URL:"}),(0,e.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:u})]})}t(n,"CliFallback");function i({children:s}){return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsx)(p,{className:"block p-6",children:s})})}t(i,"StateChrome");function b(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Sign in or create your Wardmote account to become the first admin from this browser."}),(0,e.jsx)("div",{className:"mt-5",children:(0,e.jsx)(a,{asChild:!0,children:(0,e.jsx)("a",{href:"/auth?next=/",children:"Sign in / Create account"})})}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(b,"SignedOutPrivate");function g(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsx)(a,{children:"Claim this instance"}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,e.jsx)("a",{href:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(g,"SignedInPrivate");function N(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsxs)(a,{disabled:!0,children:[(0,e.jsx)(r,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),"Claiming…"]}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(N,"ClaimingPrivate");function v(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsx)(a,{children:"Claim this instance"}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsxs)("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad",children:[(0,e.jsx)(h,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"font-medium",children:"Someone else has already claimed this instance."}),(0,e.jsxs)("p",{className:"mt-1 text-bad/90",children:["Refresh to sign in, or ask the existing admin to invite you from"," ",(0,e.jsx)("span",{className:"font-mono",children:"Settings → Access"}),"."]})]})]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(v,"ClaimErrorPrivate");function k(){return(0,e.jsxs)(i,{children:[(0,e.jsxs)("div",{className:"flex items-start gap-3",children:[(0,e.jsx)("div",{className:"mt-0.5 flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",children:(0,e.jsx)(o,{className:"size-5","aria-hidden":!0})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"You’re the instance admin"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization…"})]})]}),(0,e.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,e.jsx)(r,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting…"})]}),(0,e.jsx)("div",{className:"mt-5",children:(0,e.jsx)(a,{asChild:!0,variant:"secondary",children:(0,e.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]})}t(k,"ClaimSuccess");function y(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance runs in invite‑only mode. The operator must generate a one‑time first‑admin invite URL from the host. Once you have the link, open it from this browser to finish setup."}),(0,e.jsx)(n,{hasActiveInvite:!0}),(0,e.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Browser‑based claim is intentionally disabled in public mode so anyone on the network can’t promote themselves."})]})}t(y,"PublicInviteOnly");var C={"signed-out-private":(0,e.jsx)(b,{}),"signed-in-private":(0,e.jsx)(g,{}),claiming:(0,e.jsx)(N,{}),"claim-error":(0,e.jsx)(v,{}),"claim-success":(0,e.jsx)(k,{}),"public-invite-only":(0,e.jsx)(y,{})};function L(){return(0,e.jsxs)("div",{className:"bg-bg min-h-screen pb-16",children:[(0,e.jsx)("header",{className:"border-b border-line bg-bg-3/20",children:(0,e.jsxs)("div",{className:"mx-auto max-w-3xl px-6 py-6",children:[(0,e.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-ink-3",children:"UX Lab"}),(0,e.jsx)("h1",{className:"mt-1 text-2xl font-semibold",children:"Bootstrap-pending setup states"}),(0,e.jsxs)("p",{className:"mt-2 max-w-2xl text-sm text-ink-3",children:["Fixtures for the bootstrap-pending screen in ",(0,e.jsx)("span",{className:"font-mono",children:"CloudAccessGate"}),". Used as the UX spec for"," ",(0,e.jsx)("a",{className:"underline underline-offset-2",href:"/PAP/issues/PAP-10113",children:"PAP-10113"})," ","and the implementation reference for"," ",(0,e.jsx)("a",{className:"underline underline-offset-2",href:"/PAP/issues/PAP-10114",children:"PAP-10114"}),". The browser claim CTA only appears when"," ",(0,e.jsx)("span",{className:"font-mono",children:'deploymentMode === "authenticated"'})," and"," ",(0,e.jsx)("span",{className:"font-mono",children:'deploymentExposure === "private"'}),"."]})]})}),(0,e.jsx)("main",{className:"mx-auto max-w-3xl space-y-12 px-6 pt-10",children:f.map(s=>(0,e.jsxs)("section",{"aria-labelledby":`lab-${s}`,children:[(0,e.jsx)("h2",{id:`lab-${s}`,className:"mb-3 text-xs font-medium uppercase tracking-wider text-ink-3",children:j[s]}),(0,e.jsx)("div",{className:"rounded-lg border border-dashed border-line/70 bg-bg-3/10 p-2",children:C[s]})]},s))})]})}t(L,"BootstrapSetupUxLab");export{L as BootstrapSetupUxLab};
1
+ var c=Object.defineProperty;var t=(s,l)=>c(s,"name",{value:l,configurable:!0});import{i as m}from"./rolldown-runtime-ZpX3ckPj.js";import{la as d}from"./createLucideIcon-CgrPXnTY.js";import{r,t as a}from"./button-DI4w5WP7.js";import{t as o}from"./shield-check-RPyaLAc-.js";import{t as x}from"./terminal-i6UlT3R6.js";import{t as h}from"./triangle-alert-CnHMpmva.js";import{t as p}from"./card-BVZvs7aX.js";import{Ht as u}from"./index-QhteFtm-.js";var e=m(d(),1),j={"signed-out-private":"1 · authenticated/private — signed out (browser claim available)","signed-in-private":"2 · authenticated/private — signed in (claim CTA primary)",claiming:"3 · authenticated/private — claim in flight","claim-error":"4 · authenticated/private — claim error (e.g. 409 already claimed)","claim-success":"5 · authenticated/private — claim succeeded, redirect pending","public-invite-only":"6 · authenticated/public — invite-only (no browser claim)"},f=["signed-out-private","signed-in-private","claiming","claim-error","claim-success","public-invite-only"];function n({hasActiveInvite:s}){return(0,e.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,e.jsx)(x,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,e.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:s?"A bootstrap invite is already active. Check your Wardmote startup logs for the first‑admin URL, or run this command on the host to rotate it:":"Run this command on the host that runs Wardmote to print a one‑time first‑admin invite URL:"}),(0,e.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:u})]})}t(n,"CliFallback");function i({children:s}){return(0,e.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,e.jsx)(p,{className:"block p-6",children:s})})}t(i,"StateChrome");function b(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Sign in or create your Wardmote account to become the first admin from this browser."}),(0,e.jsx)("div",{className:"mt-5",children:(0,e.jsx)(a,{asChild:!0,children:(0,e.jsx)("a",{href:"/auth?next=/",children:"Sign in / Create account"})})}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(b,"SignedOutPrivate");function g(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsx)(a,{children:"Claim this instance"}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,e.jsx)("a",{href:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(g,"SignedInPrivate");function N(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsxs)(a,{disabled:!0,children:[(0,e.jsx)(r,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),"Claiming…"]}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(N,"ClaimingPrivate");function v(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,e.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,e.jsx)(a,{children:"Claim this instance"}),(0,e.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,e.jsx)("span",{className:"font-medium text-ink",children:"jane@appliance.local"})]})]}),(0,e.jsxs)("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad",children:[(0,e.jsx)(h,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,e.jsxs)("div",{children:[(0,e.jsx)("p",{className:"font-medium",children:"Someone else has already claimed this instance."}),(0,e.jsxs)("p",{className:"mt-1 text-bad/90",children:["Refresh to sign in, or ask the existing admin to invite you from"," ",(0,e.jsx)("span",{className:"font-mono",children:"Settings → Access"}),"."]})]})]}),(0,e.jsx)(n,{hasActiveInvite:!1})]})}t(v,"ClaimErrorPrivate");function k(){return(0,e.jsxs)(i,{children:[(0,e.jsxs)("div",{className:"flex items-start gap-3",children:[(0,e.jsx)("div",{className:"mt-0.5 flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",children:(0,e.jsx)(o,{className:"size-5","aria-hidden":!0})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"You’re the instance admin"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization…"})]})]}),(0,e.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,e.jsx)(r,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,e.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting…"})]}),(0,e.jsx)("div",{className:"mt-5",children:(0,e.jsx)(a,{asChild:!0,variant:"secondary",children:(0,e.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]})}t(k,"ClaimSuccess");function y(){return(0,e.jsxs)(i,{children:[(0,e.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,e.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance runs in invite‑only mode. The operator must generate a one‑time first‑admin invite URL from the host. Once you have the link, open it from this browser to finish setup."}),(0,e.jsx)(n,{hasActiveInvite:!0}),(0,e.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Browser‑based claim is intentionally disabled in public mode so anyone on the network can’t promote themselves."})]})}t(y,"PublicInviteOnly");var C={"signed-out-private":(0,e.jsx)(b,{}),"signed-in-private":(0,e.jsx)(g,{}),claiming:(0,e.jsx)(N,{}),"claim-error":(0,e.jsx)(v,{}),"claim-success":(0,e.jsx)(k,{}),"public-invite-only":(0,e.jsx)(y,{})};function L(){return(0,e.jsxs)("div",{className:"bg-bg min-h-screen pb-16",children:[(0,e.jsx)("header",{className:"border-b border-line bg-bg-3/20",children:(0,e.jsxs)("div",{className:"mx-auto max-w-3xl px-6 py-6",children:[(0,e.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-ink-3",children:"UX Lab"}),(0,e.jsx)("h1",{className:"mt-1 text-2xl font-semibold",children:"Bootstrap-pending setup states"}),(0,e.jsxs)("p",{className:"mt-2 max-w-2xl text-sm text-ink-3",children:["Fixtures for the bootstrap-pending screen in ",(0,e.jsx)("span",{className:"font-mono",children:"CloudAccessGate"}),". Used as the UX spec for"," ",(0,e.jsx)("a",{className:"underline underline-offset-2",href:"/PAP/issues/PAP-10113",children:"PAP-10113"})," ","and the implementation reference for"," ",(0,e.jsx)("a",{className:"underline underline-offset-2",href:"/PAP/issues/PAP-10114",children:"PAP-10114"}),". The browser claim CTA only appears when"," ",(0,e.jsx)("span",{className:"font-mono",children:'deploymentMode === "authenticated"'})," and"," ",(0,e.jsx)("span",{className:"font-mono",children:'deploymentExposure === "private"'}),"."]})]})}),(0,e.jsx)("main",{className:"mx-auto max-w-3xl space-y-12 px-6 pt-10",children:f.map(s=>(0,e.jsxs)("section",{"aria-labelledby":`lab-${s}`,children:[(0,e.jsx)("h2",{id:`lab-${s}`,className:"mb-3 text-xs font-medium uppercase tracking-wider text-ink-3",children:j[s]}),(0,e.jsx)("div",{className:"rounded-lg border border-dashed border-line/70 bg-bg-3/10 p-2",children:C[s]})]},s))})]})}t(L,"BootstrapSetupUxLab");export{L as BootstrapSetupUxLab};