@made-by-moonlight/athene-web 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +241 -219
  3. package/.next/app-path-routes-manifest.json +10 -7
  4. package/.next/build-manifest.json +6 -6
  5. package/.next/prerender-manifest.json +23 -23
  6. package/.next/react-loadable-manifest.json +5 -5
  7. package/.next/required-server-files.json +4 -4
  8. package/.next/routes-manifest.json +16 -0
  9. package/.next/server/app/_not-found/page.js +2 -2
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +9 -9
  14. package/.next/server/app/api/backlog/route.js +1 -1
  15. package/.next/server/app/api/backlog/route.js.nft.json +1 -1
  16. package/.next/server/app/api/backlog/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/browse-directory/route.js +1 -1
  18. package/.next/server/app/api/browse-directory/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/filesystem/browse/route.js +1 -1
  20. package/.next/server/app/api/filesystem/browse/route.js.nft.json +1 -1
  21. package/.next/server/app/api/filesystem/browse/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/issues/route.js +1 -1
  23. package/.next/server/app/api/issues/route.js.nft.json +1 -1
  24. package/.next/server/app/api/issues/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/meta/[name]/start/route.js +1 -0
  26. package/.next/server/app/api/meta/[name]/start/route.js.nft.json +1 -0
  27. package/.next/server/app/api/meta/[name]/start/route_client-reference-manifest.js +1 -0
  28. package/.next/server/app/api/meta/route.js +1 -0
  29. package/.next/server/app/api/meta/route.js.nft.json +1 -0
  30. package/.next/server/app/api/meta/route_client-reference-manifest.js +1 -0
  31. package/.next/server/app/api/observability/route.js +1 -1
  32. package/.next/server/app/api/observability/route.js.nft.json +1 -1
  33. package/.next/server/app/api/observability/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/orchestrators/route.js +1 -1
  35. package/.next/server/app/api/orchestrators/route.js.nft.json +1 -1
  36. package/.next/server/app/api/orchestrators/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/projects/[id]/route.js +2 -2
  38. package/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/projects/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/projects/reload/route.js +1 -1
  41. package/.next/server/app/api/projects/reload/route.js.nft.json +1 -1
  42. package/.next/server/app/api/projects/reload/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/projects/route.js +1 -1
  44. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  45. package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/prs/[id]/merge/route.js +1 -1
  47. package/.next/server/app/api/prs/[id]/merge/route.js.nft.json +1 -1
  48. package/.next/server/app/api/prs/[id]/merge/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/reviews/execute/route.js +1 -1
  50. package/.next/server/app/api/reviews/execute/route.js.nft.json +1 -1
  51. package/.next/server/app/api/reviews/execute/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/reviews/findings/route.js +1 -1
  53. package/.next/server/app/api/reviews/findings/route.js.nft.json +1 -1
  54. package/.next/server/app/api/reviews/findings/route_client-reference-manifest.js +1 -1
  55. package/.next/server/app/api/reviews/route.js +1 -1
  56. package/.next/server/app/api/reviews/route.js.nft.json +1 -1
  57. package/.next/server/app/api/reviews/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/reviews/send/route.js +1 -1
  59. package/.next/server/app/api/reviews/send/route.js.nft.json +1 -1
  60. package/.next/server/app/api/reviews/send/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/runtime/terminal/route.js +1 -1
  62. package/.next/server/app/api/runtime/terminal/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/sessions/[id]/kill/route.js +1 -1
  64. package/.next/server/app/api/sessions/[id]/kill/route.js.nft.json +1 -1
  65. package/.next/server/app/api/sessions/[id]/kill/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/sessions/[id]/message/route.js +1 -1
  67. package/.next/server/app/api/sessions/[id]/message/route.js.nft.json +1 -1
  68. package/.next/server/app/api/sessions/[id]/message/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/sessions/[id]/remap/route.js +1 -1
  70. package/.next/server/app/api/sessions/[id]/remap/route.js.nft.json +1 -1
  71. package/.next/server/app/api/sessions/[id]/remap/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/sessions/[id]/restore/route.js +1 -1
  73. package/.next/server/app/api/sessions/[id]/restore/route.js.nft.json +1 -1
  74. package/.next/server/app/api/sessions/[id]/restore/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  76. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  77. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/sessions/[id]/send/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/send/route.js.nft.json +1 -1
  80. package/.next/server/app/api/sessions/[id]/send/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/sessions/patches/route.js +1 -1
  82. package/.next/server/app/api/sessions/patches/route.js.nft.json +1 -1
  83. package/.next/server/app/api/sessions/patches/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/sessions/route.js +1 -1
  85. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  86. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/setup-labels/route.js +1 -1
  88. package/.next/server/app/api/setup-labels/route.js.nft.json +1 -1
  89. package/.next/server/app/api/setup-labels/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/spawn/route.js +1 -1
  91. package/.next/server/app/api/spawn/route.js.nft.json +1 -1
  92. package/.next/server/app/api/spawn/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/update/route.js +1 -1
  94. package/.next/server/app/api/update/route.js.nft.json +1 -1
  95. package/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/verify/route.js +1 -1
  97. package/.next/server/app/api/verify/route.js.nft.json +1 -1
  98. package/.next/server/app/api/verify/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/version/route.js +1 -1
  100. package/.next/server/app/api/version/route.js.nft.json +1 -1
  101. package/.next/server/app/api/version/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/webhooks/[...slug]/route.js +1 -1
  103. package/.next/server/app/api/webhooks/[...slug]/route.js.nft.json +1 -1
  104. package/.next/server/app/api/webhooks/[...slug]/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/apple-icon/route.js +1 -1
  106. package/.next/server/app/apple-icon/route.js.nft.json +1 -1
  107. package/.next/server/app/apple-icon/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/apple-icon.body +0 -0
  109. package/.next/server/app/dev/terminal-test/page.js +2 -2
  110. package/.next/server/app/dev/terminal-test/page.js.nft.json +1 -1
  111. package/.next/server/app/dev/terminal-test/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/dev/terminal-test.html +1 -1
  113. package/.next/server/app/dev/terminal-test.rsc +10 -10
  114. package/.next/server/app/icon/route.js +1 -1
  115. package/.next/server/app/icon/route.js.nft.json +1 -1
  116. package/.next/server/app/icon/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/icon-192/route.js +1 -1
  118. package/.next/server/app/icon-192/route.js.nft.json +1 -1
  119. package/.next/server/app/icon-192/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/icon-512/route.js +1 -1
  121. package/.next/server/app/icon-512/route.js.nft.json +1 -1
  122. package/.next/server/app/icon-512/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/icon.body +0 -0
  124. package/.next/server/app/manifest.webmanifest/route.js +1 -1
  125. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  126. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/manifest.webmanifest.body +1 -1
  128. package/.next/server/app/meta/[name]/page.js +2 -0
  129. package/.next/server/app/meta/[name]/page.js.nft.json +1 -0
  130. package/.next/server/app/meta/[name]/page_client-reference-manifest.js +1 -0
  131. package/.next/server/app/page.js +2 -2
  132. package/.next/server/app/page.js.nft.json +1 -1
  133. package/.next/server/app/page_client-reference-manifest.js +1 -1
  134. package/.next/server/app/projects/[projectId]/page.js +2 -2
  135. package/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
  136. package/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
  137. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js +2 -2
  138. package/.next/server/app/projects/[projectId]/sessions/[id]/page.js.nft.json +1 -1
  139. package/.next/server/app/projects/[projectId]/sessions/[id]/page_client-reference-manifest.js +1 -1
  140. package/.next/server/app/projects/[projectId]/settings/page.js +2 -2
  141. package/.next/server/app/projects/[projectId]/settings/page.js.nft.json +1 -1
  142. package/.next/server/app/projects/[projectId]/settings/page_client-reference-manifest.js +1 -1
  143. package/.next/server/app/prs/page.js +2 -2
  144. package/.next/server/app/prs/page.js.nft.json +1 -1
  145. package/.next/server/app/prs/page_client-reference-manifest.js +1 -1
  146. package/.next/server/app/review/page.js +2 -2
  147. package/.next/server/app/review/page.js.nft.json +1 -1
  148. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  149. package/.next/server/app/reviews/page.js +2 -2
  150. package/.next/server/app/reviews/page.js.nft.json +1 -1
  151. package/.next/server/app/reviews/page_client-reference-manifest.js +1 -1
  152. package/.next/server/app/sessions/[id]/page.js +2 -2
  153. package/.next/server/app/sessions/[id]/page.js.nft.json +1 -1
  154. package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -1
  155. package/.next/server/app/test-direct/page.js +2 -2
  156. package/.next/server/app/test-direct/page.js.nft.json +1 -1
  157. package/.next/server/app/test-direct/page_client-reference-manifest.js +1 -1
  158. package/.next/server/app/test-direct.html +1 -1
  159. package/.next/server/app/test-direct.rsc +10 -10
  160. package/.next/server/app-paths-manifest.json +10 -7
  161. package/.next/server/chunks/1215.js +1 -1
  162. package/.next/server/chunks/1271.js +1 -1
  163. package/.next/server/chunks/1351.js +3 -0
  164. package/.next/server/chunks/1612.js +1 -0
  165. package/.next/server/chunks/2899.js +1 -1
  166. package/.next/server/chunks/5053.js +1 -1
  167. package/.next/server/chunks/5684.js +942 -0
  168. package/.next/server/chunks/6148.js +2 -2
  169. package/.next/server/chunks/{4033.js → 6319.js} +1 -1
  170. package/.next/server/chunks/7486.js +3 -3
  171. package/.next/server/chunks/9472.js +102 -40
  172. package/.next/server/middleware-build-manifest.js +1 -1
  173. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  174. package/.next/server/next-font-manifest.js +1 -1
  175. package/.next/server/next-font-manifest.json +1 -1
  176. package/.next/server/pages/404.html +1 -1
  177. package/.next/server/pages/500.html +1 -1
  178. package/.next/server/server-reference-manifest.json +1 -1
  179. package/.next/static/TSIgyOuEpSp86lKtHn-Y4/_buildManifest.js +1 -0
  180. package/.next/static/chunks/1089-89713836690dc384.js +1 -0
  181. package/.next/static/chunks/{9876-de0c5a1a319b4e8e.js → 1145-b66ea7e0df4f6842.js} +1 -1
  182. package/.next/static/chunks/1160-0ae37be89137bb48.js +1 -0
  183. package/.next/static/chunks/{2073-4192de0bb00cc993.js → 2554-dbb4cd7dd7f11245.js} +1 -1
  184. package/.next/static/chunks/3764.9c44a4ac0ede4088.js +1 -0
  185. package/.next/static/chunks/5204.0d460c9e7de8b015.js +1 -0
  186. package/.next/static/chunks/8759-2ef1cec1061e251a.js +1 -0
  187. package/.next/static/chunks/9531-6d130ea1232ee102.js +1 -0
  188. package/.next/static/chunks/app/_not-found/page-5634011a1475aa0d.js +1 -0
  189. package/.next/static/chunks/app/api/backlog/route-5634011a1475aa0d.js +1 -0
  190. package/.next/static/chunks/app/api/browse-directory/route-5634011a1475aa0d.js +1 -0
  191. package/.next/static/chunks/app/api/filesystem/browse/route-5634011a1475aa0d.js +1 -0
  192. package/.next/static/chunks/app/api/issues/route-5634011a1475aa0d.js +1 -0
  193. package/.next/static/chunks/app/api/meta/[name]/start/route-5634011a1475aa0d.js +1 -0
  194. package/.next/static/chunks/app/api/meta/route-5634011a1475aa0d.js +1 -0
  195. package/.next/static/chunks/app/api/observability/route-5634011a1475aa0d.js +1 -0
  196. package/.next/static/chunks/app/api/orchestrators/route-5634011a1475aa0d.js +1 -0
  197. package/.next/static/chunks/app/api/projects/[id]/route-5634011a1475aa0d.js +1 -0
  198. package/.next/static/chunks/app/api/projects/reload/route-5634011a1475aa0d.js +1 -0
  199. package/.next/static/chunks/app/api/projects/route-5634011a1475aa0d.js +1 -0
  200. package/.next/static/chunks/app/api/prs/[id]/merge/route-5634011a1475aa0d.js +1 -0
  201. package/.next/static/chunks/app/api/reviews/execute/route-5634011a1475aa0d.js +1 -0
  202. package/.next/static/chunks/app/api/reviews/findings/route-5634011a1475aa0d.js +1 -0
  203. package/.next/static/chunks/app/api/reviews/route-5634011a1475aa0d.js +1 -0
  204. package/.next/static/chunks/app/api/reviews/send/route-5634011a1475aa0d.js +1 -0
  205. package/.next/static/chunks/app/api/runtime/terminal/route-5634011a1475aa0d.js +1 -0
  206. package/.next/static/chunks/app/api/sessions/[id]/kill/route-5634011a1475aa0d.js +1 -0
  207. package/.next/static/chunks/app/api/sessions/[id]/message/route-5634011a1475aa0d.js +1 -0
  208. package/.next/static/chunks/app/api/sessions/[id]/remap/route-5634011a1475aa0d.js +1 -0
  209. package/.next/static/chunks/app/api/sessions/[id]/restore/route-5634011a1475aa0d.js +1 -0
  210. package/.next/static/chunks/app/api/sessions/[id]/route-5634011a1475aa0d.js +1 -0
  211. package/.next/static/chunks/app/api/sessions/[id]/send/route-5634011a1475aa0d.js +1 -0
  212. package/.next/static/chunks/app/api/sessions/patches/route-5634011a1475aa0d.js +1 -0
  213. package/.next/static/chunks/app/api/sessions/route-5634011a1475aa0d.js +1 -0
  214. package/.next/static/chunks/app/api/setup-labels/route-5634011a1475aa0d.js +1 -0
  215. package/.next/static/chunks/app/api/spawn/route-5634011a1475aa0d.js +1 -0
  216. package/.next/static/chunks/app/api/update/route-5634011a1475aa0d.js +1 -0
  217. package/.next/static/chunks/app/api/verify/route-5634011a1475aa0d.js +1 -0
  218. package/.next/static/chunks/app/api/version/route-5634011a1475aa0d.js +1 -0
  219. package/.next/static/chunks/app/api/webhooks/[...slug]/route-5634011a1475aa0d.js +1 -0
  220. package/.next/static/chunks/app/apple-icon/route-5634011a1475aa0d.js +1 -0
  221. package/.next/static/chunks/app/dev/terminal-test/page-2a26b5fc208a0a35.js +1 -0
  222. package/.next/static/chunks/app/error-362a1ff5db756e6f.js +1 -0
  223. package/.next/static/chunks/app/{global-error-f6bef179169bcdae.js → global-error-ca208f2a552a271f.js} +1 -1
  224. package/.next/static/chunks/app/icon/route-5634011a1475aa0d.js +1 -0
  225. package/.next/static/chunks/app/icon-192/route-5634011a1475aa0d.js +1 -0
  226. package/.next/static/chunks/app/icon-512/route-5634011a1475aa0d.js +1 -0
  227. package/.next/static/chunks/app/layout-3937228484f6c652.js +1 -0
  228. package/.next/static/chunks/app/loading-5634011a1475aa0d.js +1 -0
  229. package/.next/static/chunks/app/manifest.webmanifest/route-5634011a1475aa0d.js +1 -0
  230. package/.next/static/chunks/app/meta/[name]/page-305f42c2c391f520.js +1 -0
  231. package/.next/static/chunks/app/{not-found-cba3f587e1f98dcb.js → not-found-3d7a362f3eaf10aa.js} +1 -1
  232. package/.next/static/chunks/app/page-305f42c2c391f520.js +1 -0
  233. package/.next/static/chunks/app/projects/[projectId]/layout-5634011a1475aa0d.js +1 -0
  234. package/.next/static/chunks/app/projects/[projectId]/loading-5634011a1475aa0d.js +1 -0
  235. package/.next/static/chunks/app/projects/[projectId]/page-daf2aefa15d58404.js +1 -0
  236. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-e3e30f31bc5a683f.js +1 -0
  237. package/.next/static/chunks/app/projects/[projectId]/settings/{page-63572555892d7a61.js → page-804b824af9b9d550.js} +1 -1
  238. package/.next/static/chunks/app/projects/layout-f7f6bc8388761510.js +1 -0
  239. package/.next/static/chunks/app/prs/page-220d66ff3931dad7.js +1 -0
  240. package/.next/static/chunks/app/review/{page-022b2d2c326ff413.js → page-13ec034d995001ab.js} +1 -1
  241. package/.next/static/chunks/app/reviews/page-5634011a1475aa0d.js +1 -0
  242. package/.next/static/chunks/app/sessions/[id]/{error-67c0d27f977a1cc1.js → error-419d086d9f9cee0d.js} +1 -1
  243. package/.next/static/chunks/app/sessions/[id]/loading-5634011a1475aa0d.js +1 -0
  244. package/.next/static/chunks/app/sessions/[id]/{not-found-cba3f587e1f98dcb.js → not-found-3d7a362f3eaf10aa.js} +1 -1
  245. package/.next/static/chunks/app/sessions/[id]/page-9879b78853fe3a80.js +1 -0
  246. package/.next/static/chunks/app/test-direct/{page-8b80ed180c0f2f42.js → page-ca223477414cb95d.js} +1 -1
  247. package/.next/static/chunks/{main-app-162601c3f1c01b19.js → main-app-bd2a1b10332da5d9.js} +1 -1
  248. package/.next/static/chunks/{webpack-f9566aaa604a1b07.js → webpack-cc5626a562806e84.js} +1 -1
  249. package/.next/static/css/0863eb7d19a9924a.css +1 -0
  250. package/.next/static/css/3effacfd2e5df88c.css +1 -0
  251. package/dist-server/mux-websocket.js +46 -25
  252. package/dist-server/single-port-server.js +2 -2
  253. package/dist-server/start-all.js +3 -3
  254. package/package.json +33 -33
  255. package/.next/server/chunks/2347.js +0 -3
  256. package/.next/server/chunks/4148.js +0 -942
  257. package/.next/server/chunks/5689.js +0 -1
  258. package/.next/server/chunks/9493.js +0 -1
  259. package/.next/static/chunks/1089-c6d7995c7c19039a.js +0 -1
  260. package/.next/static/chunks/3764.4c736d9a181489a4.js +0 -1
  261. package/.next/static/chunks/4115-1a4fa80ec67a29d3.js +0 -1
  262. package/.next/static/chunks/5204.7de7e266895bced7.js +0 -1
  263. package/.next/static/chunks/8204-7c7837ed694da99c.js +0 -1
  264. package/.next/static/chunks/8759-490573536f93f85c.js +0 -1
  265. package/.next/static/chunks/9531-a5175e55fa0db48d.js +0 -1
  266. package/.next/static/chunks/app/_not-found/page-6add9dacf1870b4b.js +0 -1
  267. package/.next/static/chunks/app/api/backlog/route-6add9dacf1870b4b.js +0 -1
  268. package/.next/static/chunks/app/api/browse-directory/route-6add9dacf1870b4b.js +0 -1
  269. package/.next/static/chunks/app/api/filesystem/browse/route-6add9dacf1870b4b.js +0 -1
  270. package/.next/static/chunks/app/api/issues/route-6add9dacf1870b4b.js +0 -1
  271. package/.next/static/chunks/app/api/observability/route-6add9dacf1870b4b.js +0 -1
  272. package/.next/static/chunks/app/api/orchestrators/route-6add9dacf1870b4b.js +0 -1
  273. package/.next/static/chunks/app/api/projects/[id]/route-6add9dacf1870b4b.js +0 -1
  274. package/.next/static/chunks/app/api/projects/reload/route-6add9dacf1870b4b.js +0 -1
  275. package/.next/static/chunks/app/api/projects/route-6add9dacf1870b4b.js +0 -1
  276. package/.next/static/chunks/app/api/prs/[id]/merge/route-6add9dacf1870b4b.js +0 -1
  277. package/.next/static/chunks/app/api/reviews/execute/route-6add9dacf1870b4b.js +0 -1
  278. package/.next/static/chunks/app/api/reviews/findings/route-6add9dacf1870b4b.js +0 -1
  279. package/.next/static/chunks/app/api/reviews/route-6add9dacf1870b4b.js +0 -1
  280. package/.next/static/chunks/app/api/reviews/send/route-6add9dacf1870b4b.js +0 -1
  281. package/.next/static/chunks/app/api/runtime/terminal/route-6add9dacf1870b4b.js +0 -1
  282. package/.next/static/chunks/app/api/sessions/[id]/kill/route-6add9dacf1870b4b.js +0 -1
  283. package/.next/static/chunks/app/api/sessions/[id]/message/route-6add9dacf1870b4b.js +0 -1
  284. package/.next/static/chunks/app/api/sessions/[id]/remap/route-6add9dacf1870b4b.js +0 -1
  285. package/.next/static/chunks/app/api/sessions/[id]/restore/route-6add9dacf1870b4b.js +0 -1
  286. package/.next/static/chunks/app/api/sessions/[id]/route-6add9dacf1870b4b.js +0 -1
  287. package/.next/static/chunks/app/api/sessions/[id]/send/route-6add9dacf1870b4b.js +0 -1
  288. package/.next/static/chunks/app/api/sessions/patches/route-6add9dacf1870b4b.js +0 -1
  289. package/.next/static/chunks/app/api/sessions/route-6add9dacf1870b4b.js +0 -1
  290. package/.next/static/chunks/app/api/setup-labels/route-6add9dacf1870b4b.js +0 -1
  291. package/.next/static/chunks/app/api/spawn/route-6add9dacf1870b4b.js +0 -1
  292. package/.next/static/chunks/app/api/update/route-6add9dacf1870b4b.js +0 -1
  293. package/.next/static/chunks/app/api/verify/route-6add9dacf1870b4b.js +0 -1
  294. package/.next/static/chunks/app/api/version/route-6add9dacf1870b4b.js +0 -1
  295. package/.next/static/chunks/app/api/webhooks/[...slug]/route-6add9dacf1870b4b.js +0 -1
  296. package/.next/static/chunks/app/apple-icon/route-6add9dacf1870b4b.js +0 -1
  297. package/.next/static/chunks/app/dev/terminal-test/page-d0132109f9d8524e.js +0 -1
  298. package/.next/static/chunks/app/error-d632d0714b987864.js +0 -1
  299. package/.next/static/chunks/app/icon/route-6add9dacf1870b4b.js +0 -1
  300. package/.next/static/chunks/app/icon-192/route-6add9dacf1870b4b.js +0 -1
  301. package/.next/static/chunks/app/icon-512/route-6add9dacf1870b4b.js +0 -1
  302. package/.next/static/chunks/app/layout-5cac6fe817194d7a.js +0 -1
  303. package/.next/static/chunks/app/loading-6add9dacf1870b4b.js +0 -1
  304. package/.next/static/chunks/app/manifest.webmanifest/route-6add9dacf1870b4b.js +0 -1
  305. package/.next/static/chunks/app/page-cf7bccb75990950d.js +0 -1
  306. package/.next/static/chunks/app/projects/[projectId]/layout-6add9dacf1870b4b.js +0 -1
  307. package/.next/static/chunks/app/projects/[projectId]/loading-6add9dacf1870b4b.js +0 -1
  308. package/.next/static/chunks/app/projects/[projectId]/page-039a93b16089ed57.js +0 -1
  309. package/.next/static/chunks/app/projects/[projectId]/sessions/[id]/page-043b525bedb8f0f7.js +0 -1
  310. package/.next/static/chunks/app/projects/layout-d43b2e38d46221bd.js +0 -1
  311. package/.next/static/chunks/app/prs/page-e447852fbe0c6ee4.js +0 -1
  312. package/.next/static/chunks/app/reviews/page-6add9dacf1870b4b.js +0 -1
  313. package/.next/static/chunks/app/sessions/[id]/loading-6add9dacf1870b4b.js +0 -1
  314. package/.next/static/chunks/app/sessions/[id]/page-863cf8dd2c76d06d.js +0 -1
  315. package/.next/static/css/0c9b7451c2ce7c02.css +0 -1
  316. package/.next/static/css/b4a15f23f468892a.css +0 -1
  317. package/.next/static/pROr0laPuZIdA4NYNygMD/_buildManifest.js +0 -1
  318. package/LICENSE +0 -22
  319. /package/.next/static/{pROr0laPuZIdA4NYNygMD → TSIgyOuEpSp86lKtHn-Y4}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8759],{1712:(e,s,r)=>{Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return t}});let n=r(1903)._(r(5864));function t(e,s){var r;let t={};"function"==typeof e&&(t.loader=e);let a={...t,...s};return(0,n.default)({...a,modules:null==(r=a.loadableGenerated)?void 0:r.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),e.exports=s.default)},2537:(e,s,r)=>{r.d(s,{X:()=>l});var n=r(3817),t=r(8713),a=r.n(t);function l(e){let{ariaLabel:s,activeTab:r,dashboardHref:t,prsHref:l,showOrchestrator:i=!0,orchestratorHref:o=null}=e;return(0,n.jsxs)("nav",{className:"mobile-bottom-nav","aria-label":s,children:[(0,n.jsxs)(a(),{href:t,className:"mobile-bottom-nav__item","data-active":"dashboard"===r?"true":"false","aria-current":"dashboard"===r?"page":void 0,children:[(0,n.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M3 13h8V3H3zm10 8h8V11h-8zM3 21h8v-6H3zm10-10h8V3h-8z"})}),(0,n.jsx)("span",{children:"Dashboard"})]}),(0,n.jsxs)(a(),{href:l,className:"mobile-bottom-nav__item","data-active":"prs"===r?"true":"false","aria-current":"prs"===r?"page":void 0,children:[(0,n.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"})}),(0,n.jsx)("span",{children:"PRs"})]}),i?o?(0,n.jsxs)(a(),{href:o,className:"mobile-bottom-nav__item","data-active":"orchestrator"===r?"true":"false","aria-current":"orchestrator"===r?"page":void 0,children:[(0,n.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,n.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,n.jsx)("span",{children:"Orchestrator"})]}):(0,n.jsxs)("button",{type:"button",className:"mobile-bottom-nav__item",disabled:!0,children:[(0,n.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M9 3H5a2 2 0 0 0-2 2v4m16 0V5a2 2 0 0 0-2-2h-4m0 18h4a2 2 0 0 0 2-2v-4M3 15v4a2 2 0 0 0 2 2h4"}),(0,n.jsx)("path",{d:"M9 9h6v6H9z"})]}),(0,n.jsx)("span",{children:"Orchestrator"})]}):null]})}},3916:(e,s,r)=>{r.d(s,{G:()=>B});var n=r(3817),t=r(6749),a=r(7594),l=r(9120),i=r(545),o=r(9891),c=r(7387),d=r(2466),u=r(8450),h=r(2537),m=r(5425),p=r(4901),x=r(1550);function b(e){if(!e)return"just now";let s=new Date(e).getTime();if(!Number.isFinite(s))return"just now";let r=Date.now()-s;if(r<=0)return"just now";let n=Math.floor(r/6e4),t=Math.floor(n/60);return n<1?"just now":n<60?"".concat(n,"m ago"):t<24?"".concat(t,"h ago"):"".concat(Math.floor(t/24),"d ago")}function j(e){if(e.includes("\x3c!-- DESCRIPTION START --\x3e")||e.includes("### ")){let s=e.match(/###\s+(.+?)(?:\n|$)/),r=s?s[1].replace(/\*\*/g,"").trim():"Comment",n=e.match(/<!-- DESCRIPTION START -->\s*([\s\S]*?)\s*<!-- DESCRIPTION END -->/);return{title:r,description:n?n[1].trim():e.split("\n")[0]||"No description"}}return{title:"Comment",description:e.trim()}}function v(e){let{comments:s,unresolvedThreads:r,sendingUrls:t,sentUrls:a,errorUrls:l,onAskAgentToFix:i}=e;return 0===s.length?null:(0,n.jsxs)("details",{className:"session-detail-comments-strip",children:[(0,n.jsx)("summary",{children:(0,n.jsxs)("div",{className:"session-detail-comments-strip__toggle",children:[(0,n.jsx)("svg",{className:"session-detail-comments-strip__chevron",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M9 5l7 7-7 7"})}),(0,n.jsx)("span",{className:"session-detail-comments-strip__label",children:"Unresolved Comments"}),(0,n.jsx)("span",{className:"session-detail-comments-strip__count",children:r}),(0,n.jsx)("span",{className:"session-detail-comments-strip__hint",children:"click to expand"})]})}),(0,n.jsx)("div",{className:"session-detail-comments-strip__body",children:s.map((e,s)=>{let{title:r,description:o}=j(e.body),c=t.has(e.url),d=a.has(e.url),u=l.has(e.url);return(0,n.jsxs)("details",{className:"session-detail-comment",open:0===s,children:[(0,n.jsx)("summary",{children:(0,n.jsxs)("div",{className:"session-detail-comment__row",children:[(0,n.jsx)("svg",{className:"session-detail-comment__chevron",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M9 5l7 7-7 7"})}),(0,n.jsx)("span",{className:"session-detail-comment__title",children:r}),(0,n.jsxs)("span",{className:"session-detail-comment__author",children:["\xb7 ",e.author]}),(0,n.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"session-detail-comment__view",children:"view →"})]})}),(0,n.jsxs)("div",{className:"session-detail-comment__body",children:[(0,n.jsx)("div",{className:"session-detail-comment__file",children:e.path}),(0,n.jsx)("p",{className:"session-detail-comment__text",children:o}),(0,n.jsx)("button",{onClick:()=>i(e),disabled:c,className:(0,p.cn)("session-detail-comment__fix-btn",d&&"session-detail-comment__fix-btn--sent",u&&"session-detail-comment__fix-btn--error"),children:c?"Sending…":d?"Sent ✓":u?"Failed":"Ask Agent to Fix"})]})]},e.url)})})]})}function f(e){return!(0,i.sZ)(e)&&!(0,i.fZ)(e)&&"merged"!==e.state&&!e.mergeability.noConflicts}function g(e){var s;let{pr:r,metadata:a,lifecyclePrReason:l,onAskAgentToFix:o}=e,[c,d]=(0,t.useState)(new Set),[u,h]=(0,t.useState)(new Set),[x,b]=(0,t.useState)(new Set),[j,g]=(0,t.useState)(!1),y=(0,t.useRef)(new Map);(0,t.useEffect)(()=>()=>{y.current.forEach(e=>clearTimeout(e)),y.current.clear()},[]);let _=async e=>{h(s=>{let r=new Set(s);return r.delete(e.url),r}),b(s=>{let r=new Set(s);return r.delete(e.url),r}),d(s=>new Set(s).add(e.url)),await o(e,()=>{d(s=>{let r=new Set(s);return r.delete(e.url),r}),h(s=>new Set(s).add(e.url));let s=y.current.get(e.url);s&&clearTimeout(s);let r=setTimeout(()=>{h(s=>{let r=new Set(s);return r.delete(e.url),r}),y.current.delete(e.url)},3e3);y.current.set(e.url,r)},()=>{d(s=>{let r=new Set(s);return r.delete(e.url),r}),b(s=>new Set(s).add(e.url));let s=y.current.get(e.url);s&&clearTimeout(s);let r=setTimeout(()=>{b(s=>{let r=new Set(s);return r.delete(e.url),r}),y.current.delete(e.url)},3e3);y.current.set(e.url,r)})},N=(0,i.QN)(r),w=function(e,s,r){let n=[],t=!!s.lastCIFailureDispatchHash,a="true"===s.lastMergeConflictDispatched,l=!!s.lastPendingReviewDispatchHash,i=s.status,o=e.ciStatus===m.U1.FAILING||"ci_failing"===r||"ci_failed"===i,c="changes_requested"===e.reviewDecision||"changes_requested"===r||"changes_requested"===i,d=f(e);if(o){let s=e.ciChecks.filter(e=>"failed"===e.status).length;n.push({icon:"✗",variant:"fail",text:s>0?"".concat(s," check").concat(1!==s?"s":""," failing"):"CI failing",notified:t})}else e.ciStatus===m.U1.PENDING&&n.push({icon:"●",variant:"warn",text:"CI pending"});return c?n.push({icon:"✗",variant:"fail",text:"Changes requested",notified:l}):e.mergeability.approved||n.push({icon:"○",variant:"muted",text:"Awaiting reviewer"}),d&&n.push({icon:"✗",variant:"fail",text:"Merge conflicts",notified:a}),e.isDraft&&n.push({icon:"○",variant:"muted",text:"Draft"}),n}(r,a,l),k=null!=(s=r.changedFiles)?s:0,C=!(0,i.sZ)(r),M=f(r)&&"open"===r.state,S=M?function(e){let s=encodeURIComponent(e.owner),r=encodeURIComponent(e.repo),n=encodeURIComponent(e.baseBranch),t=encodeURIComponent(e.branch);return"https://github.com/".concat(s,"/").concat(r,"/compare/").concat(n,"...").concat(t)}(r):"";return(0,n.jsxs)("div",{className:(0,p.cn)("session-detail-pr-card",N&&"session-detail-pr-card--green"),children:[(0,n.jsxs)("div",{className:"session-detail-pr-card__row",children:[(0,n.jsxs)("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"session-detail-pr-card__title-link",children:["PR #",r.number,": ",r.title]}),C?(0,n.jsxs)("span",{className:"session-detail-pr-card__diff-stats",children:[(0,n.jsxs)("span",{className:"session-detail-diff--add",children:["+",r.additions]})," ",(0,n.jsxs)("span",{className:"session-detail-diff--del",children:["-",r.deletions]})]}):null,k>0?(0,n.jsxs)("span",{className:"session-detail-pr-card__diff-label",children:[k," file",1!==k?"s":""]}):null,r.isDraft?(0,n.jsx)("span",{className:"session-detail-pr-card__diff-label",children:"Draft"}):null,"merged"===r.state?(0,n.jsx)("span",{className:"session-detail-pr-card__diff-label",children:"Merged"}):null]}),M?(0,n.jsxs)("div",{className:"session-detail-pr-card__merge-actions",role:"group","aria-label":"Resolve merge conflicts",children:[(0,n.jsx)("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"session-detail-pr-merge-action",children:"Compare with base branch"}),(0,n.jsx)("button",{type:"button",onClick:()=>{var e;let s=null==(e=navigator.clipboard)?void 0:e.writeText(r.branch);s&&s.then(()=>{g(!0);let e="__copy-branch",s=y.current.get(e);s&&clearTimeout(s);let r=setTimeout(()=>{g(!1),y.current.delete(e)},2e3);y.current.set(e,r)}).catch(()=>{})},"aria-label":j?"Head branch name copied":"Copy head branch name",className:"session-detail-pr-merge-action session-detail-pr-merge-action--btn",children:j?"Copied branch name":"Copy head branch name"})]}):null,(0,n.jsxs)("div",{className:"session-detail-pr-card__details",children:[N?(0,n.jsxs)("div",{className:"session-detail-merge-banner",children:[(0,n.jsx)("svg",{width:"11",height:"11",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})}),"Ready to merge"]}):w.map(e=>(0,n.jsxs)("span",{className:(0,p.cn)("session-detail-blocker-chip","fail"===e.variant&&"session-detail-blocker-chip--fail","warn"===e.variant&&"session-detail-blocker-chip--warn","muted"===e.variant&&"session-detail-blocker-chip--muted"),children:[e.icon," ",e.text,e.notified?(0,n.jsx)("span",{className:"session-detail-blocker-chip__note",children:"\xb7 notified"}):null]},e.text)),r.ciChecks.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"session-detail-pr-sep"}),r.ciChecks.map((e,s)=>{var r;let t=null!=(r=e.url)?r:"".concat(e.name,"-").concat(s),a=(0,n.jsxs)("span",{className:(0,p.cn)("session-detail-ci-chip","passed"===e.status&&"session-detail-ci-chip--pass","failed"===e.status&&"session-detail-ci-chip--fail","pending"===e.status&&"session-detail-ci-chip--pending","passed"!==e.status&&"failed"!==e.status&&"pending"!==e.status&&"session-detail-ci-chip--queued"),children:["passed"===e.status?"✓":"failed"===e.status?"✗":"pending"===e.status?"●":"○"," ",e.name]});return e.url?(0,n.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"hover:no-underline",onClick:e=>e.stopPropagation(),children:a},t):(0,n.jsx)("span",{children:a},t)})]}):null]}),(0,n.jsx)(v,{comments:r.unresolvedComments,unresolvedThreads:r.unresolvedThreads,sendingUrls:c,sentUrls:u,errorUrls:x,onAskAgentToFix:_})]})}function y(e,s){let r=e.trim();return r.length<=s?r:"".concat(r.slice(0,Math.max(0,s-1)).trimEnd(),"…")}async function _(e,s,r,n){try{let n=function(e){let{title:s,description:r}=j(e.body),n=["Please address this review comment:\n","File: ".concat(y(e.path,500)),"Comment: ".concat(y(s,240)),"Description: ".concat(y(r,7500)),"","Resolve the comment at ".concat(e.url," after fixing it.")].join("\n");return y(n,9500)}(s),t=await fetch("/api/sessions/".concat(encodeURIComponent(e),"/message"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:n})});if(!t.ok)throw Error("HTTP ".concat(t.status));r()}catch(e){console.error("Failed to send message to agent:",e),n()}}var N=r(3210),w=r(6704);function k(){return(0,n.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,n.jsx)("line",{x1:"6",y1:"4",x2:"6",y2:"14"}),(0,n.jsx)("circle",{cx:"6",cy:"17",r:"2.3"}),(0,n.jsx)("circle",{cx:"18",cy:"7",r:"2.3"}),(0,n.jsx)("path",{d:"M18 9.3a8 8 0 0 1-8 8"})]})}function C(e){let{zones:s}=e,r=[{value:s.merge,label:"merge",toneClass:"topbar-zone-pill--merge"},{value:s.respond,label:"respond",toneClass:"topbar-zone-pill--respond"},{value:s.review,label:"review",toneClass:"topbar-zone-pill--review"},{value:s.working,label:"working",toneClass:"topbar-zone-pill--working"},{value:s.pending,label:"pending",toneClass:"topbar-zone-pill--pending"},{value:s.done,label:"done",toneClass:"topbar-zone-pill--done"}].filter(e=>e.value>0);return 0===r.length?null:(0,n.jsxs)("span",{className:"topbar-fleet-pills","aria-label":"Fleet session counts",children:[(0,n.jsx)("span",{className:"topbar-fleet-pills__label",children:"Fleet"}),r.map(e=>(0,n.jsxs)("span",{className:(0,p.cn)("topbar-zone-pill",e.toneClass),children:[(0,n.jsx)("span",{className:"topbar-zone-pill__value",children:e.value}),(0,n.jsx)("span",{className:"topbar-zone-pill__label",children:e.label})]},e.label))]})}function M(e){var s,r,a,l,o,c;let{session:d,isOrchestrator:h,isMobile:b,terminalEnded:j,isRestorable:v,headline:f,projects:y,orchestratorHref:M,orchestratorZones:S,selectedPRIndex:P,onSelectPR:R,onToggleSidebar:I,onRestore:T,onKill:O}=e,D=null!=(a=d.prs)?a:[],A=Math.min(P,Math.max(0,D.length-1)),W=null!=(l=D[A])?l:d.pr,E=!!W&&(0,i.QN)(W),[F,B]=(0,t.useState)(!1),L=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!F)return;let e=e=>{L.current&&!L.current.contains(e.target)&&B(!1)},s=e=>{"Escape"===e.key&&B(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[F]);let H=null!=(o=null==(s=y.find(e=>e.id===d.projectId))?void 0:s.name)?o:d.projectId;return(0,n.jsxs)("header",{className:"dashboard-app-header session-topbar",children:[b&&y.length>0?(0,n.jsx)("button",{type:"button",className:"dashboard-app-sidebar-toggle",onClick:I,"aria-label":"Toggle sidebar",children:(0,n.jsx)("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,h?null:(0,n.jsxs)("a",{className:"session-board-btn",href:(0,u.bn)(d.projectId),title:"Back to Kanban",children:[(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M15 18l-6-6 6-6"})}),(0,n.jsx)("span",{className:"topbar-btn-label",children:"Kanban"})]}),h?null:(0,n.jsx)("span",{className:"session-topbar__vdiv","aria-hidden":"true"}),h?(0,n.jsxs)("div",{className:"topbar-project-pills-group",children:[(0,n.jsxs)("div",{className:"topbar-project-line",children:[(0,n.jsx)("span",{className:"dashboard-app-header__project",children:H}),(0,n.jsx)("span",{className:"topbar-identity-sep","aria-hidden":"true",children:"\xb7"}),(0,n.jsxs)("span",{className:"session-detail-mode-badge session-detail-mode-badge--neutral",children:[(0,n.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,n.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,n.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,n.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,n.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Orchestrator"]})]}),(0,n.jsxs)("div",{className:"topbar-session-pills",children:[(0,n.jsx)(N.W,{session:d,variant:"pill"}),(0,n.jsx)(w.H,{contextWindow:d.contextWindow}),S?(0,n.jsx)(C,{zones:S}):null]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"session-topbar__id",children:[(0,n.jsx)("span",{className:"session-topbar__title",title:f,children:f}),d.branch?W?(0,n.jsxs)("a",{href:function(e){let s="https://github.com";try{s=new URL(e.url).origin}catch(e){}return"".concat(s,"/").concat(e.owner,"/").concat(e.repo,"/tree/").concat(e.branch)}(W),target:"_blank",rel:"noopener noreferrer",className:"session-topbar__branch session-topbar__branch--link",title:d.branch,children:[(0,n.jsx)("span",{className:"session-topbar__branch-icon",children:(0,n.jsx)(k,{})}),d.branch]}):(0,n.jsxs)("span",{className:"session-topbar__branch",title:d.branch,children:[(0,n.jsx)("span",{className:"session-topbar__branch-icon",children:(0,n.jsx)(k,{})}),d.branch]}):null]}),(0,n.jsx)(N.W,{session:d,variant:"pill"}),(0,n.jsx)(w.H,{contextWindow:d.contextWindow}),(0,n.jsx)("span",{className:"dashboard-app-header__session-id topbar-mobile-only",children:d.id})]}),(0,n.jsx)("div",{className:"dashboard-app-header__spacer"}),(0,n.jsxs)("div",{className:"dashboard-app-header__actions",children:[(0,n.jsx)(x.e,{}),!h&&W?(0,n.jsxs)("div",{className:"topbar-pr-btn-wrap",ref:L,children:[(0,n.jsxs)("a",{href:W.url,target:"_blank",rel:"noopener noreferrer",className:(0,p.cn)("dashboard-app-btn topbar-pr-btn",F&&"topbar-pr-btn--open"),onClick:e=>{e.metaKey||e.ctrlKey||e.shiftKey||1===e.button||(e.preventDefault(),B(e=>!e))},"aria-expanded":F,"aria-label":"PR #".concat(W.number),children:[(0,n.jsx)("span",{className:(0,p.cn)("topbar-pr-dot",E?"topbar-pr-dot--green":W.ciStatus===m.U1.FAILING||"changes_requested"===W.reviewDecision?"topbar-pr-dot--red":"topbar-pr-dot--amber")}),"PR #",W.number,(0,n.jsx)("svg",{width:"10",height:"10",fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,n.jsx)("path",{d:F?"M18 15l-6-6-6 6":"M6 9l6 6 6-6"})})]}),F&&(0,n.jsxs)("div",{className:"topbar-pr-popover",children:[D.length>1&&(0,n.jsx)("div",{className:"flex gap-0.5 px-3 pt-2 pb-1.5 border-b border-[var(--color-border-subtle)]",children:D.map((e,s)=>(0,n.jsxs)("button",{type:"button",onClick:()=>R(s),className:(0,p.cn)("flex items-center gap-1.5 px-2 py-0.5 rounded text-xs",A===s?"bg-[var(--color-bg-subtle)] text-[var(--color-text-primary)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)] hover:bg-[var(--color-bg-hover)]"),children:[(0,n.jsx)("span",{className:(0,p.cn)("topbar-pr-dot",(0,i.QN)(e)?"topbar-pr-dot--green":e.ciStatus===m.U1.FAILING||"changes_requested"===e.reviewDecision?"topbar-pr-dot--red":"topbar-pr-dot--amber")}),"PR #",e.number]},e.url))}),(0,n.jsx)(g,{pr:W,metadata:d.metadata,lifecyclePrReason:null!=(c=null==(r=d.lifecycle)?void 0:r.prReason)?c:void 0,onAskAgentToFix:(e,s,r)=>_(d.id,e,s,r)})]})]}):null,!h&&v?(0,n.jsxs)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--restore",onClick:T,children:[(0,n.jsxs)("svg",{className:"topbar-action-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M20 11a8 8 0 0 0-14.9-3.98"}),(0,n.jsx)("path",{d:"M4 5v4h4"}),(0,n.jsx)("path",{d:"M4 13a8 8 0 0 0 14.9 3.98"}),(0,n.jsx)("path",{d:"M20 19v-4h-4"})]}),(0,n.jsx)("span",{className:"topbar-btn-label",children:"Restore"})]}):h||j?null:(0,n.jsxs)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--danger",onClick:O,children:[(0,n.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{d:"M4 7h16"}),(0,n.jsx)("path",{d:"M9 7V5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"}),(0,n.jsx)("path",{d:"M6 7l1 13a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-13"}),(0,n.jsx)("line",{x1:"10",y1:"11.5",x2:"10",y2:"17.5"}),(0,n.jsx)("line",{x1:"14",y1:"11.5",x2:"14",y2:"17.5"})]}),(0,n.jsx)("span",{className:"topbar-btn-label",children:"Kill"})]}),M?(0,n.jsxs)("a",{href:M,className:"dashboard-app-btn dashboard-app-btn--primary topbar-desktop-only","aria-label":"Orchestrator",children:[(0,n.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,n.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,n.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,n.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,n.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),(0,n.jsx)("span",{className:"topbar-btn-label",children:"Orchestrator"})]}):null,h?(0,n.jsxs)("a",{href:(0,u.bn)(d.projectId),className:"dashboard-app-btn dashboard-app-btn--amber","aria-label":"Open Kanban",children:[(0,n.jsxs)("svg",{className:"topbar-action-icon",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("rect",{x:"4",y:"4",width:"4",height:"16",rx:"1.2"}),(0,n.jsx)("rect",{x:"10",y:"4",width:"4",height:"16",rx:"1.2"}),(0,n.jsx)("rect",{x:"16",y:"4",width:"4",height:"16",rx:"1.2"})]}),(0,n.jsx)("span",{className:"topbar-btn-label",children:"Open Kanban"})]}):null]})]})}function S(e){var s,r,t,a,l,i,o,d,u,h,m;let{session:p,headline:x,pr:b,dashboardHref:j,isRestorable:v,onRestore:f}=e,g=(null==(m=p.lifecycle)?void 0:m.runtime.reasonLabel)?p.lifecycle.runtime.reasonLabel:"killed"===p.status?"Manually stopped":"terminated"===p.status?"Runtime unavailable":"done"===p.status||"merged"===p.status?"Work completed":"Terminal ended",y=function(e,s){var r;let n=e.metadata.pinnedSummary;return n||(e.summary&&!e.summaryIsFallback?e.summary:(null==(r=e.lifecycle)?void 0:r.summary)?e.lifecycle.summary:e.userPrompt?e.userPrompt:e.summary?e.summary:s)}(p,x),_=null!=(d=null!=(o=null!=(i=null==(s=p.lifecycle)?void 0:s.session.terminatedAt)?i:null==(r=p.lifecycle)?void 0:r.session.completedAt)?o:null==(t=p.lifecycle)?void 0:t.session.lastTransitionAt)?d:p.lastActivityAt,N=null!=(u=null==(a=p.lifecycle)?void 0:a.runtime.label)?u:"Unavailable",w=null!=(h=p.prs)?h:[],k=null!=b?b:w[0],C=w.length>0&&w.every(e=>"merged"===e.state),M=w.some(e=>"open"===e.state),S=w.length>1?C?"All merged":M?"In progress":"Closed":k?"merged"===k.state?"Merged":"closed"===k.state?"Closed":k.mergeability.mergeable?"Open, merge-ready":"Open":"No PR",P=w.length;return(0,n.jsx)("section",{className:"session-ended-summary","aria-label":"Session ended summary",children:(0,n.jsxs)("div",{className:"session-ended-summary__panel",children:[(0,n.jsx)("div",{className:"session-ended-summary__eyebrow",children:"Terminal ended"}),(0,n.jsxs)("div",{className:"session-ended-summary__header",children:[(0,n.jsx)("div",{className:"session-ended-summary__icon","aria-hidden":"true",children:(0,n.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,n.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"3"}),(0,n.jsx)("path",{d:"M7 10l3 2-3 2"}),(0,n.jsx)("path",{d:"M13 15h4"})]})}),(0,n.jsxs)("div",{className:"session-ended-summary__title-group",children:[(0,n.jsx)("h2",{className:"session-ended-summary__title",children:x}),(0,n.jsxs)("p",{className:"session-ended-summary__subtitle",children:[g,". The live terminal is gone, but the session context is still available."]})]})]}),(0,n.jsxs)("div",{className:"session-ended-summary__body",children:[(0,n.jsxs)("div",{className:"session-ended-summary__section",children:[(0,n.jsx)("div",{className:"session-ended-summary__label",children:"What happened"}),(0,n.jsx)("p",{className:"session-ended-summary__copy",children:y})]}),(0,n.jsxs)("div",{className:"session-ended-summary__facts","aria-label":"Session facts",children:[(0,n.jsxs)("div",{className:"session-ended-summary__fact",children:[(0,n.jsx)("span",{children:"Session"}),(0,n.jsx)("strong",{children:p.id})]}),(0,n.jsxs)("div",{className:"session-ended-summary__fact",children:[(0,n.jsx)("span",{children:"Ended"}),(0,n.jsx)("strong",{children:function(e){if(!e)return"Unknown";let s=new Date(e).getTime();return Number.isFinite(s)?(0,c.fw)(s):"Unknown"}(_)})]}),(0,n.jsxs)("div",{className:"session-ended-summary__fact",children:[(0,n.jsx)("span",{children:"Runtime"}),(0,n.jsx)("strong",{children:N})]}),(0,n.jsxs)("div",{className:"session-ended-summary__fact",children:[(0,n.jsx)("span",{children:P>1?"PRs (".concat(P,")"):"PR"}),(0,n.jsx)("strong",{children:S})]})]}),(0,n.jsxs)("div",{className:"session-ended-summary__links",children:[v?(0,n.jsx)("button",{type:"button",onClick:f,className:"session-ended-summary__primary",children:"Restore session"}):null,w.length>0?w.map(e=>(0,n.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:v?"session-ended-summary__secondary":"session-ended-summary__primary",children:["Open PR #",e.number]},e.url)):b?(0,n.jsxs)("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",className:v?"session-ended-summary__secondary":"session-ended-summary__primary",children:["Open PR #",b.number]}):null,(0,n.jsx)("a",{href:j,className:"session-ended-summary__secondary",children:"Back to dashboard"})]}),(null==(l=p.lifecycle)?void 0:l.evidence)?(0,n.jsxs)("div",{className:"session-ended-summary__evidence",children:[(0,n.jsx)("span",{children:"Evidence"}),(0,n.jsx)("code",{children:p.lifecycle.evidence})]}):null]})]})})}var P=r(3517);let R=[{id:"summary",label:"Summary",icon:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7","aria-hidden":"true",children:[(0,n.jsx)("line",{x1:"8",y1:"7",x2:"20",y2:"7"}),(0,n.jsx)("line",{x1:"8",y1:"12",x2:"20",y2:"12"}),(0,n.jsx)("line",{x1:"8",y1:"17",x2:"16",y2:"17"}),(0,n.jsx)("circle",{cx:"4",cy:"7",r:"1"}),(0,n.jsx)("circle",{cx:"4",cy:"12",r:"1"}),(0,n.jsx)("circle",{cx:"4",cy:"17",r:"1"})]})},{id:"changes",label:"Changes",icon:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7","aria-hidden":"true",children:[(0,n.jsx)("path",{d:"M12 3v6"}),(0,n.jsx)("path",{d:"M9 6h6"}),(0,n.jsx)("path",{d:"M11 18H7a2 2 0 0 1-2-2V6"}),(0,n.jsx)("path",{d:"M13 15h4"}),(0,n.jsx)("path",{d:"M19 9v7a2 2 0 0 1-2 2h-2"})]})},{id:"browser",label:"Browser",icon:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,n.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,n.jsx)("path",{d:"M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18"})]})}];function I(e){let{session:s}=e,[r,a]=(0,t.useState)("summary"),{onPointerDown:l,onDoubleClick:i}=(0,P.$)({cssVar:"--ao-inspector-w",storageKey:"ao-inspector-w",defaultWidth:344,min:280,max:560,edge:"left"});return(0,n.jsxs)("aside",{className:"session-inspector","aria-label":"Session inspector",children:[(0,n.jsx)("div",{className:"resize-handle resize-handle--left",onPointerDown:l,onDoubleClick:i,role:"separator","aria-orientation":"vertical","aria-label":"Resize inspector"}),(0,n.jsx)("div",{className:"session-inspector__tabs",role:"tablist",children:R.map(e=>(0,n.jsxs)("button",{type:"button",role:"tab","aria-selected":r===e.id,className:(0,p.cn)("session-inspector__tab",r===e.id&&"is-active"),onClick:()=>a(e.id),children:[(0,n.jsx)("span",{className:"session-inspector__tab-icon",children:e.icon}),(0,n.jsx)("span",{className:"session-inspector__tab-label",children:e.label})]},e.id))}),(0,n.jsxs)("div",{className:"session-inspector__body",children:["summary"===r?(0,n.jsx)(O,{session:s}):null,"changes"===r?(0,n.jsx)(A,{session:s}):null,"browser"===r?(0,n.jsx)(W,{}):null]})]})}function T(e){let{title:s,action:r,children:t}=e;return(0,n.jsxs)("section",{className:"inspector-section",children:[(0,n.jsxs)("div",{className:"inspector-section__head",children:[(0,n.jsx)("span",{children:s}),null!=r?r:null]}),t]})}function O(e){var s,r;let{session:t}=e,a=t.pr;return(0,n.jsxs)("div",{role:"tabpanel",children:[(0,n.jsx)(T,{title:"Pull request",action:a?(0,n.jsx)("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"inspector-section__link",children:"Open ↗"}):void 0,children:a?(0,n.jsx)(g,{pr:a,metadata:t.metadata,lifecyclePrReason:null!=(r=null==(s=t.lifecycle)?void 0:s.prReason)?r:void 0,onAskAgentToFix:(e,s,r)=>_(t.id,e,s,r)}):(0,n.jsx)("p",{className:"inspector-empty",children:"No pull request opened yet."})}),(0,n.jsx)(T,{title:"Activity",children:(0,n.jsx)(D,{session:t})}),(0,n.jsx)(T,{title:"Overview",children:(0,n.jsxs)("dl",{className:"inspector-kv",children:[t.metadata.agent?(0,n.jsx)(E,{k:"Agent",v:t.metadata.agent,mono:!0}):null,t.branch?(0,n.jsx)(E,{k:"Branch",v:t.branch,mono:!0}):null,t.issueLabel?(0,n.jsx)(E,{k:"Issue",v:t.issueLabel,mono:!0}):null,(0,n.jsx)(E,{k:"Started",v:b(t.createdAt),mono:!0}),(0,n.jsx)(E,{k:"Session",v:t.id,mono:!0})]})})]})}function D(e){var s;let{session:r}=e,t=[];return t.push({tone:"now",node:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"inspector-timeline__badge",children:(0,n.jsx)(N.W,{session:r,variant:"pill"})}),(null==(s=r.lifecycle)?void 0:s.summary)?(0,n.jsxs)("span",{className:"inspector-timeline__detail",children:[" — ",r.lifecycle.summary]}):null]}),ts:b(r.lastActivityAt)}),r.pr&&t.push({tone:"good",node:(0,n.jsxs)(n.Fragment,{children:["Opened ",(0,n.jsxs)("b",{children:["PR #",r.pr.number]}),r.pr.baseBranch?" against ".concat(r.pr.baseBranch):""]}),ts:null}),t.push({tone:"neutral",node:(0,n.jsx)(n.Fragment,{children:"Created worktree & branch"}),ts:b(r.createdAt)}),(0,n.jsx)("div",{className:"inspector-timeline",children:t.map((e,s)=>(0,n.jsxs)("div",{className:(0,p.cn)("inspector-timeline__ev","now"===e.tone&&"inspector-timeline__ev--now","good"===e.tone&&"inspector-timeline__ev--good","warn"===e.tone&&"inspector-timeline__ev--warn"),children:[(0,n.jsx)("span",{className:"inspector-timeline__node","aria-hidden":"true"}),(0,n.jsx)("div",{className:"inspector-timeline__et",children:e.node}),e.ts?(0,n.jsx)("div",{className:"inspector-timeline__ets",children:e.ts}):null]},s))})}function A(e){var s;let{session:r}=e,t=r.pr;if(!t||0===t.additions&&0===t.deletions)return(0,n.jsx)("div",{role:"tabpanel",children:(0,n.jsx)("p",{className:"inspector-empty",children:"No changes pushed yet."})});let a=null!=(s=t.changedFiles)?s:0;return(0,n.jsx)("div",{role:"tabpanel",children:(0,n.jsxs)(T,{title:"Working tree",action:(0,n.jsx)("a",{href:"".concat(t.url,"/files"),target:"_blank",rel:"noopener noreferrer",className:"inspector-section__link",children:"View diff ↗"}),children:[(0,n.jsxs)("div",{className:"inspector-diff-sum",children:[a>0?(0,n.jsx)("span",{children:"".concat(a," file").concat(1===a?"":"s")}):null,(0,n.jsxs)("span",{className:"session-detail-diff--add",children:["+",t.additions]}),(0,n.jsxs)("span",{className:"session-detail-diff--del",children:["−",t.deletions]})]}),(0,n.jsx)("p",{className:"inspector-hint",children:"The full diff opens on GitHub. Inline diff rendering is a future inspector view."})]})})}function W(){return(0,n.jsx)("div",{role:"tabpanel",children:(0,n.jsxs)("div",{className:"inspector-empty inspector-empty--browser",children:[(0,n.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,n.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,n.jsx)("path",{d:"M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18"})]}),(0,n.jsx)("p",{children:"No live browser preview."}),(0,n.jsx)("span",{children:"A browser plugin (web preview / Playwright) will render what the agent is viewing here."})]})})}function E(e){let{k:s,v:r,mono:t}=e;return(0,n.jsxs)("div",{className:"inspector-kv__row",children:[(0,n.jsx)("dt",{className:"inspector-kv__k",children:s}),(0,n.jsx)("dd",{className:(0,p.cn)("inspector-kv__v",t&&"inspector-kv__v--mono"),children:r})]})}let F=(0,o.default)(()=>Promise.all([r.e(8623),r.e(3764)]).then(r.bind(r,3764)).then(e=>({default:e.DirectTerminal})),{loadableGenerated:{webpack:()=>[3764]},ssr:!1,loading:()=>(0,n.jsx)("div",{className:"h-full w-full animate-pulse rounded bg-[var(--color-bg-primary)]"})});function B(e){var s,r,o,m;let{session:p,isOrchestrator:x=!1,orchestratorZones:b,projectOrchestratorId:j=null,projects:v=[]}=e,f=(0,a.useRouter)(),g=(0,a.useSearchParams)(),y=(0,l.U)(l.D),_=(0,d.V)(),N="true"===g.get("fullscreen"),[w,k]=(0,t.useState)(!1),[C,P]=(0,t.useState)(0),R=null!=(r=p.prs)?r:[],T=Math.min(C,Math.max(0,R.length-1)),O=null!=(o=R[T])?o:p.pr,D=(0,i.nH)(p),A=(0,i.wy)(p),W=(0,c.Pn)(p),E=x?"orchestrator":"agent",B="opencode"===p.metadata.agent,L="string"==typeof p.metadata.opencodeSessionId&&p.metadata.opencodeSessionId.length>0?p.metadata.opencodeSessionId:void 0,H=p.projectId?(0,u.bn)(p.projectId):"/",U=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/sessions/".concat(encodeURIComponent(p.id),"/kill"),{method:"POST"});if(!e.ok)throw Error("HTTP ".concat(e.status));if(j)return void f.push((0,u.Nc)(p.projectId,j));f.push(H)}catch(e){console.error("Failed to kill session:",e)}},[H,j,f,p.id,p.projectId]),z=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/sessions/".concat(encodeURIComponent(p.id),"/restore"),{method:"POST"});if(!e.ok){let s=await e.text().catch(()=>"");throw Error(s||"HTTP ".concat(e.status))}window.location.reload()}catch(e){console.error("Failed to restore session:",e)}},[p.id]),q=(0,t.useMemo)(()=>x?null:j?(0,u.Nc)(p.projectId,j):null,[x,j,p.projectId]);return(0,t.useEffect)(()=>{P(0)},[p.id]),(0,t.useEffect)(()=>{let e=window.requestAnimationFrame(()=>k(!0));return()=>{window.cancelAnimationFrame(e),k(!1)}},[p.id]),(0,n.jsxs)("div",{className:"dashboard-main--desktop",children:[(0,n.jsx)(M,{session:p,isOrchestrator:x,isMobile:y,terminalEnded:D,isRestorable:A,headline:W,projects:v,orchestratorHref:q,orchestratorZones:b,selectedPRIndex:T,onSelectPR:P,onToggleSidebar:null!=(m=null==_?void 0:_.onToggleSidebar)?m:()=>{},onRestore:z,onKill:U}),(0,n.jsxs)("main",{className:"session-detail-page session-workspace flex-1 min-h-0 flex bg-[var(--color-bg-base)]",children:[(0,n.jsx)("div",{className:"session-workspace__main flex-1 min-h-0 flex flex-col",children:w?D?(0,n.jsx)(S,{session:p,headline:W,pr:O,dashboardHref:H,isRestorable:A,onRestore:z}):(0,n.jsx)(F,{sessionId:p.id,projectId:p.projectId,tmuxName:null==(s=p.metadata)?void 0:s.tmuxName,startFullscreen:N,variant:E,appearance:"theme",height:"100%",isOpenCodeSession:B,reloadCommand:B&&L?"/exit\nopencode --session ".concat(L,"\n"):void 0,autoFocus:!0}):(0,n.jsx)("div",{className:"session-detail-terminal-placeholder h-full"})}),y||D||x?null:(0,n.jsx)(I,{session:p})]}),(0,n.jsx)(h.X,{ariaLabel:"Session navigation",activeTab:x?"orchestrator":void 0,dashboardHref:H,prsHref:p.projectId?"/?project=".concat(encodeURIComponent(p.projectId),"&tab=prs"):"/",showOrchestrator:!!q,orchestratorHref:q})]})}},4723:(e,s,r)=>{r.d(s,{f:()=>a});var n=r(6749),t=r(5184);function a(e){let s=(0,t.eT)(),r=null==s?void 0:s.sessions.find(s=>s.id===e);return(0,n.useMemo)(()=>{var e;return r?{activity:null!=(e=r.activity)?e:null}:null},[r])}},5468:(e,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),!function(e,s){for(var r in s)Object.defineProperty(e,r,{enumerable:!0,get:s[r]})}(s,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return a},createSnapshot:function(){return i}});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class n{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let t="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function a(){return t?new t:new n}function l(e){return t?t.bind(e):n.bind(e)}function i(){return t?t.snapshot():function(e,...s){return e(...s)}}},5864:(e,s,r)=>{Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return o}});let n=r(3817),t=r(6749),a=r(6943);function l(e){return{default:e&&"default"in e?e.default:e}}r(6418);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},o=function(e){let s={...i,...e},r=(0,t.lazy)(()=>s.loader().then(l)),o=s.loading;function c(e){let l=o?(0,n.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!s.ssr||!!s.loading,c=i?t.Suspense:t.Fragment,d=s.ssr?(0,n.jsxs)(n.Fragment,{children:[null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(c,{...i?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},6313:(e,s,r)=>{Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=r(8394)},6418:(e,s,r)=>{function n(e){let{moduleIds:s}=e;return null}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return n}}),r(3817),r(4768),r(6313),r(5152)},6943:(e,s,r)=>{function n(e){let{reason:s,children:r}=e;return r}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return n}}),r(1763)},8394:(e,s,r)=>{Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,r(5468).createAsyncLocalStorage)()},9678:(e,s,r)=>{r.d(s,{R:()=>n});let n={active:"⚡",ready:"\uD83D\uDFE2",idle:"\uD83D\uDCA4",waiting_input:"❓",blocked:"\uD83D\uDEA7",exited:"\uD83D\uDC80"}},9789:(e,s,r)=>{r.d(s,{ErrorDisplay:()=>c});var n=r(3817),t=r(8713),a=r.n(t);let l={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function i(e){let{accent:s}=e;return(0,n.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(s," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(s," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,n.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:s},viewBox:"0 0 24 24",children:[(0,n.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,n.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function o(e){let{action:s,primary:r=!1}=e,t=r?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",l=r?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return s.href?(0,n.jsx)(a(),{href:s.href,className:t,style:l,children:s.label}):(0,n.jsx)("button",{type:"button",onClick:s.onClick,className:t,style:l,children:s.label})}function c(e){let{title:s,message:r,tone:t="error",detailsTitle:a="Technical details",error:c,primaryAction:d,secondaryAction:u,compact:h=!1,chrome:m="page",children:p}=e,x=l[t],b=!!((null==c?void 0:c.digest)||(null==c?void 0:c.message)||(null==c?void 0:c.stack));return(0,n.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(h?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,n.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,n.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,n.jsx)(i,{accent:x.accent}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:x.accent,background:x.bg,borderColor:x.border},children:x.label}),(0,n.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:s}),(0,n.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:r})]})]}),(d||u)&&(0,n.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,n.jsx)(o,{action:d,primary:!0}):null,u?(0,n.jsx)(o,{action:u}):null]}),p,b?(0,n.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,n.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,n.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==c?void 0:c.digest)?(0,n.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",c.digest]}):null,(null==c?void 0:c.message)?(0,n.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:c.message}):null,(null==c?void 0:c.stack)?(0,n.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:c.stack}):null]})]}):null]})})})}},9891:(e,s,r)=>{r.d(s,{default:()=>t.a});var n=r(1712),t=r.n(n)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9531],{9531:(e,t,s)=>{s.d(t,{Dashboard:()=>J});var r=s(3817),a=s(6749),n=s(8713),o=s.n(n),l=s(7594),i=s(9120),c=s(545),d=s(4901),h=s(7387),u=s(3210),m=s(6704),x=s(4906),p=s(1237),b=s(8450),v=s(2647);function g(e){let{slot:t,name:s}=e;return(0,r.jsxs)("span",{className:"session-card__project-chip",title:s,children:[(0,r.jsx)("span",{className:(0,d.cn)("session-card__project-dot shrink-0 rounded-full",(0,v.A_)(t)),"aria-hidden":"true"}),(0,r.jsx)("span",{className:"session-card__project-name",children:s})]})}function j(e){let{session:t,onRestore:s,projectAccent:n}=e,[o,l]=(0,a.useState)(!1),i=t.pr,u=!!i&&(0,c.fZ)(i),m=!!i&&(0,c.sZ)(i),v=(0,c.wy)(t),j=(0,h.Pn)(t),f=function(e){var t,s,a,n;let o=e.activity,l=e.status,i=null!=(n=null==(t=e.lifecycle)?void 0:t.prState)?n:null==(s=e.pr)?void 0:s.state;return"merged"===i||"merged"===l?{label:"merged",pillClass:"done-status-pill--merged",icon:(0,r.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,r.jsx)("path",{d:"M20 6 9 17l-5-5"})})}:"closed"===i?{label:"closed",pillClass:"done-status-pill--exited",icon:(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M9 12h6"})]})}:(null==(a=e.lifecycle)?void 0:a.sessionState)==="terminated"||"killed"===l||"terminated"===l?{label:(0,c.Ou)(e),pillClass:"done-status-pill--killed",icon:(0,r.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2.5",viewBox:"0 0 24 24",className:"h-3 w-3",children:(0,r.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})}:{label:"exited"===o?"exited":(0,c.Ou)(e),pillClass:"done-status-pill--exited",icon:(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,r.jsx)("path",{d:"M9 12h6"})]})}}(t);return(0,r.jsxs)("div",{className:(0,d.cn)("session-card-done",o&&"done-expanded"),onClick:e=>{e.target.closest("a, button, textarea")||l(!o)},children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-3 pb-1.5",children:[(0,r.jsxs)("span",{className:(0,d.cn)("done-status-pill",f.pillClass),children:[f.icon,f.label]}),(0,r.jsx)("span",{className:"font-[var(--font-mono)] text-[10px] tracking-wide text-[var(--color-text-muted)]",children:t.id}),n?(0,r.jsx)(g,{slot:n.slot,name:n.name}):null,(0,r.jsx)("div",{className:"flex-1"}),v&&(0,r.jsxs)("button",{onClick:e=>{e.stopPropagation(),null==s||s(t.id)},className:"done-card__restore",children:[(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-3 w-3",children:[(0,r.jsx)("polyline",{points:"1 4 1 10 7 10"}),(0,r.jsx)("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]}),"restore"]})]}),(0,r.jsx)("div",{className:"px-3.5 pb-2",children:(0,r.jsx)("p",{className:"session-card-done__title text-[13px] font-semibold leading-snug [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] overflow-hidden",children:j})}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 px-3.5 pb-3",children:[t.branch&&(0,r.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",className:"h-2.5 w-2.5 opacity-50",children:[(0,r.jsx)("path",{d:"M6 3v12M18 9a3 3 0 0 1-3 3H9a3 3 0 0 0-3 3"}),(0,r.jsx)("circle",{cx:"18",cy:"6",r:"3"})]}),t.branch]}),i&&(0,r.jsxs)("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-bold text-[var(--color-text-primary)] no-underline underline-offset-2 hover:underline",children:["#",i.number]}),i&&!u&&(m?(0,r.jsx)("span",{className:"inline-block h-[14px] w-16 animate-pulse rounded-full bg-[var(--color-bg-subtle)]"}):(0,r.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,r.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",i.additions]})," ",(0,r.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",i.deletions]})," ",(0,p.i_)(i.additions,i.deletions),(0,r.jsx)("span",{className:"sr-only",children:"+".concat(i.additions," -").concat(i.deletions," ").concat((0,p.i_)(i.additions,i.deletions))})]})),(0,r.jsx)("a",{href:(0,b.Nc)(t.projectId,t.id),onClick:e=>e.stopPropagation(),className:"done-meta-chip font-[var(--font-mono)] font-semibold text-[var(--color-accent)] no-underline hover:underline",children:"View current context"})]}),o&&(0,r.jsxs)("div",{className:"done-expand-section px-3.5 py-3",children:[t.summary&&(null==i?void 0:i.title)&&t.summary!==i.title&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"done-detail-heading",children:[(0,r.jsx)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M4 6h16M4 12h16M4 18h10"})}),"Summary"]}),(0,r.jsx)("p",{className:"text-[12px] leading-relaxed text-[var(--color-text-secondary)]",children:t.summary})]}),t.issueUrl&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"done-detail-heading",children:[(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"Issue"]}),(0,r.jsxs)("a",{href:t.issueUrl,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"text-[12px] text-[var(--color-accent)] hover:underline",children:[t.issueLabel||t.issueUrl,t.issueTitle&&": ".concat(t.issueTitle)]})]}),i&&i.ciChecks.length>0&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"done-detail-heading",children:[(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M9 12l2 2 4-4"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"})]}),"CI Checks"]}),(0,r.jsx)(x.zm,{checks:i.ciChecks})]}),i&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"done-detail-heading",children:[(0,r.jsxs)("svg",{fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65S8.93 17.38 9 18v4"}),(0,r.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]}),"PR"]}),(0,r.jsxs)("p",{className:"text-[12px] text-[var(--color-text-secondary)]",children:[(0,r.jsx)("a",{href:i.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"hover:underline",children:i.title}),m?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2 text-[10px] text-[var(--color-text-muted)]",children:[(0,r.jsx)("span",{className:"inline-block h-3 w-12 animate-pulse rounded bg-[var(--color-bg-subtle)]"}),(0,r.jsx)("span",{children:"PR details loading..."})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"mt-1 inline-flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"done-meta-chip font-[var(--font-mono)]",children:[(0,r.jsxs)("span",{className:"text-[var(--color-status-ready)]",children:["+",i.additions]})," ",(0,r.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",i.deletions]})]}),(0,r.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["mergeable: ",i.mergeability.mergeable?"yes":"no"]}),(0,r.jsx)("span",{className:"text-[var(--color-text-muted)]",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["review: ",i.reviewDecision]})]})]})]})]}),!i&&(0,r.jsx)("p",{className:"text-[12px] text-[var(--color-text-tertiary)]",children:"No PR associated with this session."})]})]})}let f=new Set,_=(0,a.memo)(function(e){var t,s,n;let{session:o,onKill:l,onMerge:i,onRestore:x,projectAccent:p}=e,[_,N]=(0,a.useState)(!1),[w]=(0,a.useState)(()=>f.has(o.id));(0,a.useEffect)(()=>{if(w)return;let e=window.requestAnimationFrame(()=>{f.add(o.id)});return()=>{window.cancelAnimationFrame(e)}},[w,o.id]);let y=(0,c.ng)(o),k=o.pr,C=null!=(t=o.prs)?t:[],M=new Set(C.map(e=>e.repo)).size>1,[S,P]=(0,a.useState)(0);(0,a.useEffect)(()=>P(0),[o.id]);let I=Math.min(S,Math.max(0,C.length-1)),R=C.length>1&&null!=(s=C[I])?s:k,W=C.length>1?R:k,D=!!W&&(0,c.fZ)(W),T=!!W&&(0,c.sZ)(W),A=!D&&(null==W?void 0:W.mergeability.mergeable)&&"open"===W.state,B=(0,c.nH)(o),E=(0,c.wy)(o),O=(0,h.Pn)(o),F=function(e,t,s,r){var a,n;let o=e.pr;if(!o)return(null==(n=e.lifecycle)?void 0:n.sessionState)==="detecting"?{text:"detecting…",tone:void 0}:{text:"no PR yet",tone:void 0};if(s)return{text:"PR data rate limited",tone:void 0};if(r)return{text:"loading…",tone:void 0};if(o.ciStatus===c.U1.FAILING||(null==(a=e.lifecycle)?void 0:a.prReason)==="ci_failing"||"ci_failed"===e.status){let e=o.ciChecks.filter(e=>"failed"===e.status).length;return{text:e>0?"".concat(e," check").concat(1===e?"":"s"," failed"):"CI failed",tone:"fail"}}return"changes_requested"===o.reviewDecision?{text:"changes requested",tone:"amber"}:o.unresolvedThreads>0?{text:"".concat(o.unresolvedThreads," comment").concat(1===o.unresolvedThreads?"":"s"),tone:"amber"}:t&&"approved"===o.reviewDecision?{text:"approved",tone:"green"}:o.ciStatus===c.U1.PASSING?{text:"CI passed",tone:"green"}:o.ciStatus===c.U1.PENDING?{text:"CI running",tone:void 0}:{text:"review pending",tone:void 0}}(o,!!A,D,T);return(0,c.dG)(o)||"done"===y?(0,r.jsx)(j,{session:o,onRestore:x,projectAccent:p}):(0,r.jsxs)("div",{className:(0,d.cn)("session-card border",!w&&"kanban-card-enter",p&&"border-l-2",p&&(0,v.$Z)(p.slot)),children:[(0,r.jsxs)("div",{className:"session-card__header",children:[(0,r.jsx)(u.W,{session:o}),p?(0,r.jsx)(g,{slot:p.slot,name:p.name}):null,(0,r.jsx)("div",{className:"flex-1"}),(0,r.jsx)("span",{className:"card__id",children:o.id}),E&&(0,r.jsxs)("button",{onClick:e=>{e.stopPropagation(),null==x||x(o.id)},className:"session-card__control session-card__restore-control",children:[(0,r.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M20 11a8 8 0 0 0-14.9-3.98"}),(0,r.jsx)("path",{d:"M4 5v4h4"}),(0,r.jsx)("path",{d:"M4 13a8 8 0 0 0 14.9 3.98"}),(0,r.jsx)("path",{d:"M20 19v-4h-4"})]}),"restore"]}),!B&&(0,r.jsxs)("a",{href:(0,b.$l)(o.projectId,o.id,"#session-terminal-section"),onClick:e=>e.stopPropagation(),className:"session-card__terminal-link",children:[(0,r.jsxs)("svg",{className:"session-card__terminal-link-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"m4 17 6-6-6-6"}),(0,r.jsx)("path",{d:"M12 19h8"})]}),"terminal"]})]}),(0,r.jsxs)("div",{className:"session-card__body flex min-h-0 flex-1 flex-col",children:[(0,r.jsx)("div",{className:"card__title-wrap",children:(0,r.jsx)("p",{className:"card__title",children:O})}),(0,r.jsxs)("div",{className:"card__meta",children:[o.branch&&(0,r.jsx)("span",{className:"card__branch",children:o.branch}),1===C.length&&(0,r.jsxs)(r.Fragment,{children:[o.branch&&(0,r.jsx)("span",{className:"card__meta-sep","aria-hidden":"true",children:"\xb7"}),(0,r.jsxs)("a",{href:C[0].url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"card__pr inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:(0,d.cn)("inline-block h-1.5 w-1.5 shrink-0 rounded-full",(n=C[0]).enriched?"merged"===n.state?"bg-[var(--color-status-merge)]":"closed"===n.state?"bg-[var(--color-text-muted)]":"failing"===n.ciStatus||"changes_requested"===n.reviewDecision?"bg-[var(--color-status-error)]":n.isDraft?"bg-[var(--color-text-muted)]":"passing"===n.ciStatus?"bg-[var(--color-status-merge)]":"pending"===n.ciStatus?"bg-[var(--color-status-pending)]":"bg-[var(--color-text-tertiary)] opacity-30":"bg-[var(--color-text-tertiary)] opacity-30")}),"#",C[0].number]})]})]}),C.length>1&&(0,r.jsx)("div",{className:"px-[10px] pb-[5px] flex flex-col gap-[2px]",children:C.map((e,t)=>{let s=e.enriched?"merged"===e.state?"merged":"closed"===e.state?"closed":"failing"===e.ciStatus?"CI failing":"changes_requested"===e.reviewDecision?"changes requested":e.isDraft?"draft":"approved"===e.reviewDecision?"approved":"passing"===e.ciStatus?"needs review":"pending"===e.ciStatus?"CI running":"":"",a=t===I;return(0,r.jsxs)("div",{role:"button",tabIndex:0,className:(0,d.cn)("flex items-center gap-1.5 min-w-0 rounded px-1 -mx-1 cursor-pointer transition-colors",a?"bg-[var(--color-bg-subtle)] border-l-2 border-[var(--color-accent)] pl-[2px]":"hover:bg-[var(--color-bg-subtle)] border-l-2 border-transparent pl-[2px]"),onClick:e=>{e.stopPropagation(),P(t)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.stopPropagation(),P(t))},children:[M&&(0,r.jsx)("span",{className:"shrink-0 font-[var(--font-mono)] text-[9px] text-[var(--color-text-tertiary)] bg-[var(--color-bg-subtle)] px-1 py-0.5 rounded leading-none",children:e.repo.split("-").map(e=>{var t,s;return null!=(s=null==(t=e[0])?void 0:t.toUpperCase())?s:""}).join("").slice(0,3)}),(0,r.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>{e.stopPropagation(),P(t)},className:(0,d.cn)("shrink-0 inline-flex items-center font-[var(--font-mono)] text-[10px] font-bold px-1.5 py-0.5 rounded leading-none no-underline",e.enriched?"merged"===e.state?"bg-[color-mix(in_srgb,var(--color-status-merge)_15%,transparent)] text-[var(--color-status-merge)]":"closed"===e.state?"bg-[var(--color-bg-subtle)] text-[var(--color-text-muted)]":"failing"===e.ciStatus||"changes_requested"===e.reviewDecision?"bg-[color-mix(in_srgb,var(--color-status-error)_15%,transparent)] text-[var(--color-status-error)]":e.isDraft?"bg-[var(--color-bg-subtle)] text-[var(--color-text-muted)]":"passing"===e.ciStatus?"bg-[color-mix(in_srgb,var(--color-status-merge)_15%,transparent)] text-[var(--color-status-merge)]":"pending"===e.ciStatus?"bg-[color-mix(in_srgb,var(--color-status-pending)_15%,transparent)] text-[var(--color-status-pending)]":"bg-[var(--color-bg-subtle)] text-[var(--color-text-muted)]":"bg-[var(--color-bg-subtle)] text-[var(--color-text-muted)]"),children:["#",e.number]}),e.title?(0,r.jsx)("span",{className:"flex-1 truncate text-[11px] text-[var(--color-text-secondary)]",title:e.title,children:e.title}):(0,r.jsx)("span",{className:"flex-1"}),e.enriched&&(0,r.jsxs)("span",{className:"shrink-0 font-[var(--font-mono)] text-[10px]",children:[(0,r.jsxs)("span",{className:"text-[var(--color-status-merge)]",children:["+",e.additions]})," ",(0,r.jsxs)("span",{className:"text-[var(--color-status-error)]",children:["-",e.deletions]})]}),s&&"needs review"!==s&&(0,r.jsxs)("span",{className:"shrink-0 text-[10px] text-[var(--color-text-tertiary)]",children:["\xb7 ",s]})]},e.url)})}),(0,r.jsxs)("div",{className:"session-card__footer",children:[(0,r.jsxs)("div",{className:"session-card__footer-info",children:[k?(0,r.jsxs)("a",{href:k.url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"card__pr",children:["PR #",k.number]}):null,k&&F?(0,r.jsx)("span",{className:"card__meta-sep","aria-hidden":"true",children:"\xb7"}):null,F?(0,r.jsx)("span",{className:"session-card__footer-detail","data-tone":F.tone,children:F.text}):null,(0,r.jsx)(m.H,{contextWindow:o.contextWindow})]}),(0,r.jsxs)("div",{className:"session-card__footer-actions",children:[A&&W?(0,r.jsxs)("button",{onClick:e=>{e.stopPropagation(),null==i||i(W.number,W.owner,W.repo)},className:"session-card__control session-card__merge-control",children:[(0,r.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"18",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"6",r:"2"}),(0,r.jsx)("path",{d:"M8 6h5a3 3 0 0 1 3 3v7"})]}),"Merge PR #",W.number]}):null,B?null:(0,r.jsx)("button",{onClick:e=>{if(e.stopPropagation(),!_)return void N(!0);N(!1),null==l||l(o.id)},onMouseLeave:()=>N(!1),onBlur:()=>N(!1),"aria-label":_?"Confirm terminate session":"Terminate session",className:(0,d.cn)("session-card__control session-card__terminate btn--danger",_&&"is-confirming"),children:_?(0,r.jsx)("span",{className:"font-mono text-[10px] font-semibold tracking-[0.04em]",children:"kill?"}):(0,r.jsxs)("svg",{className:"session-card__control-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{d:"M3 6h18"}),(0,r.jsx)("path",{d:"M8 6V4h8v2"}),(0,r.jsx)("path",{d:"M19 6l-1 14H6L5 6"})]})})]})]})]})]})},function(e,t){return e.session===t.session&&e.onKill===t.onKill&&e.onMerge===t.onMerge&&e.onRestore===t.onRestore}),N={merge:{label:"Ready to merge",emptyMessage:"Nothing cleared to land yet."},action:{label:"Needs you",emptyMessage:"No agents need your input."},respond:{label:"Needs you",emptyMessage:"No agents need your input."},review:{label:"Review",emptyMessage:"No code waiting for review."},pending:{label:"In review",emptyMessage:"Nothing blocked."},working:{label:"Working",emptyMessage:"No agents running."},done:{label:"Done",emptyMessage:"No completed sessions."}},w=(0,a.memo)(function(e){let{level:t,sessions:s,onKill:n,onMerge:o,onRestore:l,collapsed:i,onToggle:c,compactMobile:d,onPreview:h,resetKey:u,resolveProjectAccent:m}=e,x=N[t],p=void 0!==c,[b,v]=(0,a.useState)(!1),g=p&&d&&!b?s.slice(0,5):s,j=s.length-g.length;return((0,a.useEffect)(()=>{i&&v(!1)},[i]),(0,a.useEffect)(()=>{v(!1)},[u]),p)?(0,r.jsxs)("div",{className:"accordion-section".concat(i?" accordion-section--collapsed":" accordion-section--expanded"),"data-level":t,children:[(0,r.jsxs)("button",{type:"button",className:"accordion-header",onClick:()=>c(t),"aria-expanded":!i,"aria-controls":"accordion-body-".concat(t),children:[(0,r.jsx)("span",{className:"accordion-header__dot","data-level":t}),(0,r.jsx)("span",{className:"accordion-header__label",children:x.label}),(0,r.jsx)("span",{className:"accordion-header__count",children:s.length}),(0,r.jsx)("span",{className:"accordion-header__chevron","aria-hidden":"true",children:"▶"})]}),(0,r.jsx)("div",{id:"accordion-body-".concat(t),className:"accordion-body",children:s.length>0?(0,r.jsxs)("div",{className:d?"mobile-session-list":"flex flex-col gap-2 p-3",children:[g.map(e=>d?(0,r.jsx)(y,{session:e,level:t,onPreview:h},e.id):(0,r.jsx)(_,{session:e,onKill:n,onMerge:o,onRestore:l,projectAccent:null==m?void 0:m(e.projectId)},e.id)),d&&j>0?(0,r.jsxs)("button",{type:"button",className:"mobile-session-list__view-all",onClick:()=>v(!0),children:["View all ",s.length]}):null]}):d?(0,r.jsx)("div",{className:"mobile-session-list",children:(0,r.jsx)("div",{className:"mobile-session-list__empty",children:x.emptyMessage})}):null})]}):(0,r.jsxs)("div",{className:"kanban-column","data-level":t,children:[(0,r.jsx)("div",{className:"kanban-column__header",children:(0,r.jsxs)("div",{className:"kanban-column__title-row",children:[(0,r.jsx)("div",{className:"kanban-column__dot","data-level":t}),(0,r.jsx)("span",{className:"kanban-column__title",children:x.label}),(0,r.jsx)("span",{className:"kanban-column__count",children:s.length})]})}),(0,r.jsx)("div",{className:"kanban-column-body",children:s.length>0?(0,r.jsx)("div",{className:"kanban-column__stack",children:s.map(e=>(0,r.jsx)(_,{session:e,onKill:n,onMerge:o,onRestore:l,projectAccent:null==m?void 0:m(e.projectId)},e.id))}):null})]})},function(e,t){return e.level===t.level&&e.collapsed===t.collapsed&&e.onToggle===t.onToggle&&e.onKill===t.onKill&&e.onMerge===t.onMerge&&e.onRestore===t.onRestore&&e.compactMobile===t.compactMobile&&e.onPreview===t.onPreview&&e.resetKey===t.resetKey&&e.sessions.length===t.sessions.length&&e.sessions.every((e,s)=>e===t.sessions[s])});function y(e){let{session:t,level:s,onPreview:a}=e,n=[t.branch,t.pr?"PR #".concat(t.pr.number):null,t.issueLabel].filter(Boolean);return(0,r.jsxs)("div",{className:"mobile-session-row",children:[(0,r.jsxs)("button",{type:"button",className:"mobile-session-row__preview",onClick:()=>null==a?void 0:a(t),"aria-label":"Open ".concat((0,h.Pn)(t)),children:[(0,r.jsxs)("div",{className:"mobile-session-row__line",children:[(0,r.jsx)("span",{className:"mobile-session-row__dot","data-level":s,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"mobile-session-row__title",children:(0,h.Pn)(t)})]}),(0,r.jsx)("div",{className:"mobile-session-row__meta",children:n.length>0?n.join(" \xb7 "):"No branch or PR metadata"})]}),(0,r.jsxs)("div",{className:"mobile-session-row__side",children:[(0,r.jsx)(k,{session:t,level:s}),(0,r.jsx)("a",{href:(0,b.Nc)(t.projectId,t.id),className:"mobile-session-row__open","aria-label":"Go to ".concat((0,h.Pn)(t)),children:(0,r.jsxs)("svg",{className:"mobile-session-row__open-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M4 17V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"}),(0,r.jsx)("path",{d:"m8 10 2 2-2 2M12 14h4"})]})})]})]})}function k(e){let{session:t,level:s}=e,a=N[s].label.toLowerCase(),n=t.prs.length>0?t.prs:t.pr?[t.pr]:[];return"merge"===s&&n.length>0&&n.every(e=>(0,c.QN)(e))?a="ready":"action"===s?a=function(e){if("needs_input"===e.status)return"needs input";if("stuck"===e.status)return"stuck";if("errored"===e.status)return"errored";if("waiting_input"===e.activity)return"waiting";if("exited"===e.activity)return"crashed";if("blocked"===e.activity)return"blocked";if("ci_failed"===e.status)return"ci failed";if("changes_requested"===e.status)return"changes";let t=e.prs.length>0?e.prs:e.pr?[e.pr]:[];return t.some(e=>"failing"===e.ciStatus)?"ci failed":t.some(e=>"changes_requested"===e.reviewDecision)?"changes":t.some(e=>!e.mergeability.noConflicts)?"conflicts":"action"}(t):"respond"===s?a="waiting_input"===t.activity?"waiting":"needs input":"review"===s?a=n.some(e=>"changes_requested"===e.reviewDecision)?"changes":"review":"pending"===s?a=n.some(e=>e.unresolvedThreads)?"threads":"pending":"working"===s&&(a="idle"===t.activity?"idle":"active"),(0,r.jsx)("span",{className:"mobile-session-row__chip",children:a})}var C=s(7848),M=s(5309),S=s(5184);let P=["Working","Needs you","In review","Ready to merge"];function I(e){let{message:t,orchestratorHref:s,onSpawnOrchestrator:a=null,spawnLabel:n="Spawn Orchestrator",spawnDisabled:o=!1}=e;return(0,r.jsxs)("div",{className:"board-wrapper",children:[(0,r.jsx)("div",{className:"kanban-ghost","aria-hidden":"true",children:P.map(e=>(0,r.jsx)("div",{className:"kanban-ghost__col",children:(0,r.jsx)("div",{className:"kanban-ghost__head",children:e})},e))}),(0,r.jsx)("div",{className:"board-center",children:(0,r.jsxs)("div",{className:"empty-state",role:"status",children:[(0,r.jsx)("div",{className:"empty-state__icon",children:(0,r.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"5.5",r:"2.5",fill:"color-mix(in srgb, var(--color-accent) 18%, transparent)",stroke:"var(--color-accent)",strokeWidth:"1.5"}),(0,r.jsx)("circle",{cx:"5.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,r.jsx)("circle",{cx:"18.5",cy:"17",r:"2.5",fill:"var(--color-bg-subtle)",stroke:"var(--color-border-strong)",strokeWidth:"1.5"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"6.7",y2:"14.8",stroke:"color-mix(in srgb, var(--color-accent) 22%, transparent)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,r.jsx)("line",{x1:"12",y1:"8",x2:"17.3",y2:"14.8",stroke:"color-mix(in srgb, var(--color-accent) 22%, transparent)",strokeWidth:"1",strokeDasharray:"2.5 2"}),(0,r.jsx)("line",{x1:"7.8",y1:"17",x2:"16.2",y2:"17",stroke:"var(--color-border-subtle)",strokeWidth:"1",strokeDasharray:"2.5 2"})]})}),t?(0,r.jsx)("p",{className:"empty-state__text",children:t}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"empty-state__headline",children:"Ready to orchestrate"}),(0,r.jsx)("p",{className:"empty-state__hint",children:"Open the main orchestrator to start a session and fan out parallel agents across your codebase."}),s?(0,r.jsxs)("a",{href:s,className:"empty-state__cta",children:[(0,r.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,r.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,r.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Open Orchestrator"]}):a?(0,r.jsxs)("button",{type:"button",className:"empty-state__cta",onClick:a,disabled:o,children:[(0,r.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,r.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,r.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),n]}):null]})]})})]})}var R=s(2446);function W(e){let{status:t}=e;return"connected"===t?null:"disconnected"===t?(0,r.jsx)("button",{type:"button",className:"connection-bar connection-bar--disconnected","aria-live":"assertive","aria-atomic":"true",onClick:()=>window.location.reload(),children:"Offline \xb7 tap to retry"}):(0,r.jsx)("div",{className:"connection-bar connection-bar--reconnecting",role:"status","aria-live":"polite","aria-atomic":"true",children:"Reconnecting…"})}let D="ao.updateBanner.dismissedFor";function T(){let[e,t]=(0,a.useState)(null),[s,n]=(0,a.useState)("idle"),[o,l]=(0,a.useState)(null),[i,c]=(0,a.useState)(null);(0,a.useEffect)(()=>{try{c(window.localStorage.getItem(D))}catch(e){}},[]),(0,a.useEffect)(()=>{if("function"!=typeof fetch)return;let e=!1;return Promise.resolve(fetch("/api/version",{cache:"no-store"})).then(e=>e&&e.ok?e.json():null).then(s=>{e||t(s)}).catch(()=>{}),()=>{e=!0}},[]);let d=(0,a.useCallback)(()=>{if(null==e?void 0:e.latest){try{window.localStorage.setItem(D,e.latest)}catch(e){}c(e.latest),n("idle"),l(null)}},[e]),h=(0,a.useCallback)(async()=>{n("starting"),l(null);try{var e;let t=await fetch("/api/update",{method:"POST"}),s=await t.json();if(t.ok)return void n("started");if(409===t.status){n("blocked"),l(s.message);return}n("error"),l(null!=(e=s.message)?e:"Update failed")}catch(e){n("error"),l(e instanceof Error?e.message:String(e))}},[]);if(!e||!e.isOutdated||!e.latest||"manual"===e.channel||i===e.latest&&"idle"===s||"started"===s)return null;let u="nightly"===e.channel?" (nightly)":"";return(0,r.jsxs)("div",{role:"status","aria-live":"polite",className:"flex w-full items-center justify-between gap-3 border-b border-[var(--color-border-default)] bg-[var(--color-accent-amber-dim)] px-4 py-2 text-sm text-[var(--color-text-primary)]",children:[(0,r.jsxs)("div",{className:"flex flex-1 items-center gap-3",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 flex-shrink-0 rounded-full bg-[var(--color-accent-amber)]"}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5 sm:flex-row sm:items-baseline sm:gap-2",children:[(0,r.jsxs)("span",{className:"font-medium",children:["Update available",u,": ",e.current," → ",e.latest]}),"blocked"===s&&o||"error"===s&&o?(0,r.jsx)("span",{className:"text-xs text-[var(--color-status-error)]",children:o}):"starting"===s?(0,r.jsx)("span",{className:"text-xs text-[var(--color-text-secondary)]",children:"Starting…"}):(0,r.jsx)("span",{className:"text-xs text-[var(--color-text-secondary)]",children:"Click Update to install. The dashboard will restart."})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>void h(),disabled:"starting"===s,className:"rounded-sm border border-[var(--color-accent-amber-border)] bg-[var(--color-accent-amber)] px-3 py-1 text-xs font-medium text-[var(--color-text-inverse)] hover:bg-[color-mix(in_srgb,var(--color-accent-amber)_85%,black)] disabled:cursor-wait disabled:opacity-60",children:"starting"===s?"Updating…":"Update"}),(0,r.jsx)("button",{type:"button",onClick:d,"aria-label":"Dismiss",className:"rounded-sm px-2 py-1 text-xs text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)]",children:"Dismiss"})]})]})}let A=[/\bBearer\s+[A-Za-z0-9._\-+/=]+\b/gi,/\bsk-[A-Za-z0-9]{10,}\b/g,/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g];function B(e){let{projectId:t}=e,{showToast:s}=(0,R.d)(),[n,o]=(0,a.useState)(!1),l=(0,a.useCallback)(async()=>{if(!n){o(!0);try{let e,r=await fetch("/api/observability",{credentials:"same-origin"});if(!r.ok)return void s("Could not fetch observability snapshot","error");let a=r.headers.get("x-correlation-id");try{e=await r.json()}catch(e){s("Could not parse observability snapshot","error");return}let n=function e(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakSet;if("string"==typeof t)return A.reduce((e,t)=>e.replace(t,"[REDACTED]"),t);if(Array.isArray(t))return t.map(t=>e(t,s));if(t&&"object"==typeof t){if(s.has(t))return"[Circular]";s.add(t);let r={};for(let[a,n]of Object.entries(t))r[a]=e(n,s);return r}return t}(function(e,t){if(!t||!e||"object"!=typeof e)return e;let s={...e},r=s.projects;if(r&&"object"==typeof r&&!Array.isArray(r)){let e=r[t];s.projects=void 0===e?{}:{[t]:e}}return s}(e,t)),o={copiedAt:new Date().toISOString(),pageHref:"".concat(window.location.origin).concat(window.location.pathname),projectId:null!=t?t:null,correlationId:a,userAgent:navigator.userAgent,observability:n};await navigator.clipboard.writeText(JSON.stringify(o,null,2)),s("Debug bundle copied to clipboard","success")}catch(e){s("Could not copy debug bundle","error")}finally{o(!1)}}},[n,t,s]);return(0,r.jsx)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--icon",onClick:()=>void l(),disabled:n,title:"Copy debug bundle","aria-label":"Copy debug bundle for issue reports",children:(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})}var E=s(1550),O=s(2466),F=s(1160);function L(e){let t=Date.now(),s=Math.floor((t-new Date(e).getTime())/1e3);if(s<60)return"".concat(s,"s ago");let r=Math.floor(s/60);if(r<60)return"".concat(r,"m ago");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h ago");let n=Math.floor(a/24);return"".concat(n,"d ago")}function U(e){return e.replaceAll("_"," ")}function H(e){return null!==e}function Z(e){var t,s;let{session:n,mode:o,onCancel:l,onConfirm:i,onRequestKill:d,onMerge:u,isMergeReady:m=!1}=e,x=(0,a.useRef)(null),p=(0,a.useRef)(null),v=(0,a.useRef)(null),g=null!=(s=null==n||null==(t=n.pr)?void 0:t.number)?s:null;if((0,a.useEffect)(()=>{if(!n){v.current=null;return}function e(e){"Escape"===e.key&&l()}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[n,l]),(0,a.useEffect)(()=>{if(!n||!p.current)return;let e=p.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===e.length)return;let t=e[0],s=e[e.length-1],r=v.current!==n.id;function a(e){"Tab"===e.key&&(e.shiftKey&&document.activeElement===t?(e.preventDefault(),s.focus()):e.shiftKey||document.activeElement!==s||(e.preventDefault(),t.focus()))}v.current=n.id,r&&t.focus();let o=p.current;return o.addEventListener("keydown",a),()=>o.removeEventListener("keydown",a)},[n,o]),!n)return null;let j=(0,h.Pn)(n),f=(0,c.ng)(n),_=n.summary&&!n.summaryIsFallback?n.summary:null,N="done"!==f&&"merge"!==f&&!(0,c.y8)(n),w=n.pr,y=!!(w&&!(0,c.fZ)(w)&&!(0,c.sZ)(w)),k="done"===f||(0,c.nH)(n),C=[{label:U(f),tone:"accent"},{label:U(n.status),tone:"neutral"},n.activity?{label:U(n.activity),tone:"neutral"}:null,n.branch?{label:n.branch,tone:"mono"}:null,n.pr?{label:"PR #".concat(n.pr.number),tone:"neutral"}:null,n.issueLabel?{label:n.issueLabel,tone:"neutral"}:null].filter(H);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"bottom-sheet-backdrop",onClick:l,"aria-hidden":"true"}),(0,r.jsxs)("div",{ref:p,className:"bottom-sheet",role:"dialog","aria-modal":"true","aria-labelledby":"bottom-sheet-title",onTouchStart:function(e){var t,s;x.current=null!=(s=null==(t=e.touches[0])?void 0:t.clientY)?s:null},onTouchEnd:function(e){var t,s;if(null===x.current)return;let r=(null!=(s=null==(t=e.changedTouches[0])?void 0:t.clientY)?s:0)-x.current;x.current=null,r>80&&l()},children:[(0,r.jsx)("div",{className:"bottom-sheet__handle","aria-hidden":"true"}),"confirm-kill"===o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"bottom-sheet__header",children:[(0,r.jsx)("h2",{id:"bottom-sheet-title",className:"bottom-sheet__title",children:"Terminate session?"}),(0,r.jsx)("p",{className:"bottom-sheet__subtitle",children:"This action cannot be undone."})]}),(0,r.jsxs)("div",{className:"bottom-sheet__session-info",children:[(0,r.jsx)("div",{className:"bottom-sheet__session-name",children:j}),(0,r.jsx)("div",{className:"bottom-sheet__session-meta",children:C.map(e=>(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--".concat(e.tone),children:e.label},"".concat(e.tone,"-").concat(e.label)))}),_?(0,r.jsx)("p",{className:"bottom-sheet__summary",children:_}):null]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"bottom-sheet__preview-card",children:[(0,r.jsx)("div",{className:"bottom-sheet__preview-strip","data-level":f}),(0,r.jsxs)("div",{className:"bottom-sheet__preview-content",children:[(0,r.jsxs)("div",{className:"bottom-sheet__preview-header",children:[(0,r.jsx)("span",{className:"bottom-sheet__preview-id",children:n.id}),(0,r.jsx)("span",{className:"bottom-sheet__preview-time",children:L(n.lastActivityAt)})]}),(0,r.jsx)("h2",{id:"bottom-sheet-title",className:"bottom-sheet__title",children:j}),(0,r.jsxs)("p",{className:"bottom-sheet__subtitle",children:[U(f)," \xb7 started ",L(n.createdAt)]}),(0,r.jsxs)("div",{className:"bottom-sheet__preview-meta",children:[n.branch?(0,r.jsx)("span",{className:"bottom-sheet__preview-branch",children:n.branch}):null,w?(0,r.jsxs)("span",{className:"bottom-sheet__preview-pr",children:["#",w.number]}):null,y&&w?(0,r.jsxs)("span",{className:"bottom-sheet__preview-diff",children:[(0,r.jsxs)("span",{className:"bottom-sheet__preview-diff-add",children:["+",w.additions]})," ",(0,r.jsxs)("span",{className:"bottom-sheet__preview-diff-del",children:["-",w.deletions]})]}):null]}),y&&w?(0,r.jsxs)("div",{className:"bottom-sheet__preview-pills",children:[(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--neutral",children:"passing"===w.ciStatus?"CI passing":"failing"===w.ciStatus?"CI failed":"CI pending"}),(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--accent",children:"approved"===w.reviewDecision?"approved":"changes_requested"===w.reviewDecision?"changes requested":"needs review"}),k?(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--accent",children:U(n.status)}):null,k&&n.activity?(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--neutral",children:U(n.activity)}):null]}):(0,r.jsxs)("div",{className:"bottom-sheet__preview-pills",children:[(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--accent",children:U(n.status)}),n.activity?(0,r.jsx)("span",{className:"bottom-sheet__tag bottom-sheet__tag--neutral",children:U(n.activity)}):null]})]})]}),_?(0,r.jsx)("p",{className:"bottom-sheet__summary",children:_}):null]}),(0,r.jsx)("div",{className:"bottom-sheet__actions",children:"confirm-kill"===o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:"bottom-sheet__btn bottom-sheet__btn--cancel",onClick:l,children:"Cancel"}),(0,r.jsx)("button",{type:"button",className:"bottom-sheet__btn bottom-sheet__btn--danger",onClick:i,children:"Terminate"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("a",{href:(0,b.Nc)(n.projectId,n.id),className:"bottom-sheet__btn bottom-sheet__btn--primary",children:"Open session"}),m&&n.pr&&u?(0,r.jsx)("button",{type:"button",className:"bottom-sheet__btn bottom-sheet__btn--secondary",onClick:()=>{if(null!==g){var e,t;u(g,null==(e=n.pr)?void 0:e.owner,null==(t=n.pr)?void 0:t.repo)}},children:"Merge"}):N&&d?(0,r.jsxs)("button",{type:"button",className:"bottom-sheet__btn bottom-sheet__btn--danger",onClick:d,children:[(0,r.jsxs)("svg",{className:"bottom-sheet__btn-icon",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M3 6h18"}),(0,r.jsx)("path",{d:"M8 6V4h8v2"}),(0,r.jsx)("path",{d:"M19 6l-1 14H6L5 6"}),(0,r.jsx)("path",{d:"M10 11v6M14 11v6"})]}),"Terminate"]}):null]})})]})]})}let q=["working","action","pending","merge"],K=["working","respond","review","pending","merge"],z=[];function V(e){var t;let{session:s,onRestore:a,projectAccent:n}=e,o=!s.summaryIsFallback&&s.summary||s.issueTitle||s.summary||s.id,l=(null==(t=s.pr)?void 0:t.state)==="merged"||"merged"===s.status,i=(0,c.y8)(s),d=(0,c.wy)(s);return(0,r.jsxs)("div",{className:"done-card",children:[(0,r.jsx)("p",{className:"done-card__title",children:o}),(0,r.jsxs)("div",{className:"done-card__meta",children:[(0,r.jsx)("span",{className:"done-card__badge ".concat(i?"done-card__badge--terminated":"done-card__badge--merged"),children:l?"merged":i?"terminated":"done"}),n?(0,r.jsx)(g,{slot:n.slot,name:n.name}):null,s.pr?(0,r.jsxs)("a",{href:s.pr.url,target:"_blank",rel:"noopener noreferrer",className:"done-card__pr",onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("svg",{width:"9",height:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"18",cy:"18",r:"3"}),(0,r.jsx)("circle",{cx:"6",cy:"6",r:"3"}),(0,r.jsx)("path",{d:"M6 9v3a6 6 0 0 0 6 6h3"})]}),"#",s.pr.number]}):null,(0,r.jsx)("span",{className:"done-card__age",children:function(e){if(!e)return"just now";let t=new Date(e).getTime();if(!Number.isFinite(t))return"just now";let s=Date.now()-t;if(s<=0)return"just now";let r=Math.floor(s/1e3),a=Math.floor(r/60),n=Math.floor(a/60),o=Math.floor(n/24);return r<60?"".concat(r,"s ago"):a<60?"".concat(a,"m ago"):n<24?"".concat(n,"h ago"):"".concat(o,"d ago")}(s.lastActivityAt)}),d?(0,r.jsx)("button",{type:"button",className:"done-card__restore",onClick:e=>{e.stopPropagation(),a(s.id)},children:"Restore"}):null]})]})}function G(e){var t,s,n;let{initialSessions:d,projectId:h,projectName:u,projects:m=[],orchestrators:x,metaOrchestrators:p,sidebarOrchestrators:g,metaOwner:j,attentionZones:f="simple",dashboardLoadError:_}=e,N=null!=x?x:z,y=(0,S.eT)(),k="detailed"===f?K:q,P=(0,a.useMemo)(()=>{let e={};for(let t of d)e[t.id]=(0,c.ng)(t,f);return e},[d,f]),{sessions:D,attentionLevels:A,liveSessionsResolved:L,loadError:U}=(0,M.D)({initialSessions:d,muxSessions:(null==y?void 0:y.status)==="connected"?y.sessions:void 0,muxLastError:null==y?void 0:y.lastError,initialAttentionLevels:P,attentionZones:f}),H=(0,a.useMemo)(()=>j?D.filter(e=>e.metaOwner===j):h?D.filter(e=>e.projectId===h):D,[D,h,j]),G=(0,a.useMemo)(()=>{if(m.length<=1)return;let e=m.map(e=>e.id),t=new Map(m.map(e=>[e.id,e.name]));return s=>{let r=t.get(s);if(r)return{slot:(0,v.fQ)(s,e).slot,name:r}}},[m]),J=(null==y?void 0:y.status)==="disconnected"?"disconnected":(null==y?void 0:y.status)==="connected"?"connected":"reconnecting",Y=null!=U?U:_&&L?void 0:_,$=(0,l.useSearchParams)(),X=(0,l.useRouter)(),ee=(0,a.useRef)(X);ee.current=X;let et=null!=(t=$.get("session"))?t:void 0,[es,er]=(0,a.useState)(!1),[ea,en]=(0,a.useState)(N),[eo,el]=(0,a.useState)([]),[ei,ec]=(0,a.useState)({}),ed=(0,i.U)(i.D),eh=(0,O.V)(),eu=null!==eh,[em,ex]=(0,a.useState)(!1),[ep,eb]=(0,a.useState)(!1),ev=(0,a.useCallback)(()=>{if(eu&&eh)return void eh.onToggleSidebar();ed?eb(e=>!e):ex(e=>!e)},[ed,eu,eh]),[eg,ej]=(0,a.useState)(()=>new Set(["done","working"])),[ef,e_]=(0,a.useState)(null),[eN,ew]=(0,a.useState)("preview"),ey=$.get("debug"),ek=!ed&&("1"===ey||"true"===ey),{showToast:eC}=(0,R.d)(),[eM,eS]=(0,a.useState)(!1),eP=(0,a.useRef)(D);eP.current=D;let eI=m.length>1&&void 0===h&&!j,eR=h?(0,b.bn)(h):"/?project=all",eW=(0,b.nF)(h),eD=(0,a.useMemo)(()=>{var e;return h&&null!=(e=ea.find(e=>e.projectId===h))?e:null},[ea,h]),eT=eD?(0,b.Nc)(eD.projectId,eD.id):null,eA=!eI&&!!h&&m.some(e=>e.id===h&&!e.resolveError)&&!eT,eB=h&&null!=(s=m.find(e=>e.id===h))?s:null,eE=!!h&&eo.includes(h),eO=h&&null!=(n=ei[h])?n:null,eF=(0,a.useMemo)(()=>eI||!et?H:H.filter(e=>e.id===et),[H,eI,et]);(0,a.useEffect)(()=>{en(e=>(function(e,t){let s=new Map(e.map(e=>[e.projectId,e]));for(let e of t)s.set(e.projectId,e);return[...s.values()]})(e,N))},[N]),(0,a.useEffect)(()=>{let e=(0,C.S)(A),t=null!=u?u:"ao";document.title=e>0?"".concat(t," (").concat(e," need attention)"):t},[A,u]);let eL=(0,a.useMemo)(()=>{let e={merge:[],action:[],respond:[],review:[],pending:[],working:[],done:[]};for(let t of eF)e[(0,c.ng)(t,f)].push(t);return e},[eF,f]),eU=(0,a.useMemo)(()=>{let e=new Map;for(let t of D){let s=e.get(t.projectId);if(s){s.push(t);continue}e.set(t.projectId,[t])}return e},[D]),eH=(0,a.useMemo)(()=>eI?m.map(e=>{var t,s;let r=null!=(t=eU.get(e.id))?t:[],a={merge:0,action:0,respond:0,review:0,pending:0,working:0,done:0};for(let e of r)a[(0,c.ng)(e,f)]++;return{project:e,orchestrator:null!=(s=ea.find(t=>t.projectId===e.id))?s:null,sessionCount:r.length,openPRCount:r.filter(e=>{var t;return(null==(t=e.pr)?void 0:t.state)==="open"}).length,counts:a}}):[],[ea,eI,f,m,eU]),eZ=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/sessions/".concat(encodeURIComponent(e),"/kill"),{method:"POST"});if(t.ok)eC("Session terminated","success");else{let s=await t.text();console.error("Failed to kill ".concat(e,":"),s),eC("Terminate failed: ".concat(s),"error")}}catch(t){console.error("Network error killing ".concat(e,":"),t),eC("Network error while terminating session","error")}},[eC]),eq=(0,a.useCallback)(e=>{var t;let s=null!=(t=eP.current.find(t=>t.id===e))?t:null;s&&eZ(s.id)},[eZ]),eK=(0,a.useCallback)(e=>{e_(e),ew("preview")},[]),ez=(0,a.useCallback)(()=>{ew("confirm-kill")},[]),eV=(0,a.useCallback)(()=>{e_(null),ew("preview")},[]),eG=(0,a.useCallback)(()=>{ef&&eZ(ef.id),e_(null),ew("preview")},[ef,eZ]),eJ=(0,a.useCallback)(async(e,t,s)=>{try{let r=new URLSearchParams;t&&r.set("owner",t),s&&r.set("repo",s);let a=r.size>0?"?".concat(r.toString()):"",n=await fetch("/api/prs/".concat(e,"/merge").concat(a),{method:"POST"});if(n.ok)eC("PR #".concat(e," merged"),"success");else{let t=await n.text();console.error("Failed to merge PR #".concat(e,":"),t),eC("Merge failed: ".concat(t),"error");return}}catch(t){console.error("Network error merging PR #".concat(e,":"),t),eC("Network error while merging PR","error")}},[eC]),eQ=(0,a.useCallback)(async e=>{try{let t=await fetch("/api/sessions/".concat(encodeURIComponent(e),"/restore"),{method:"POST"});if(t.ok)eC("Session restored","success"),ee.current.refresh();else{let s=await t.text();console.error("Failed to restore ".concat(e,":"),s),eC("Restore failed: ".concat(s),"error")}}catch(t){console.error("Network error restoring ".concat(e,":"),t),eC("Network error while restoring session","error")}},[eC]),eY=async e=>{el(t=>t.includes(e.id)?t:[...t,e.id]),ec(t=>{let{[e.id]:s,...r}=t;return r});try{let s=await fetch("/api/orchestrators",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:e.id})}),r=await s.json().catch(()=>null);if(!s.ok||!(null==r?void 0:r.orchestrator)){var t;throw Error(null!=(t=null==r?void 0:r.error)?t:"Failed to spawn orchestrator for ".concat(e.name))}let a=r.orchestrator;en(t=>{let s=t.filter(t=>t.projectId!==e.id);return s.push(a),s})}catch(s){let t=s instanceof Error?s.message:"Failed to spawn orchestrator";ec(s=>({...s,[e.id]:t})),console.error("Failed to spawn orchestrator for ".concat(e.id,":"),s)}finally{el(t=>t.filter(t=>t!==e.id))}},e$=k.some(e=>eL[e].length>0),eX=!eI&&!e$&&!Y,e0=Y?(0,r.jsxs)("div",{className:"dashboard-alert mb-6 flex flex-col gap-1.5 border border-[color-mix(in_srgb,var(--color-status-error)_28%,transparent)] bg-[color-mix(in_srgb,var(--color-status-error)_10%,transparent)] px-3.5 py-2.5 text-[11px] md:mb-4",role:"alert","aria-live":"assertive",children:[(0,r.jsx)("span",{className:"font-semibold text-[var(--color-status-error)]",children:"Orchestrator failed to load"}),(0,r.jsx)("span",{className:"break-words text-[var(--color-text-secondary)]",children:Y}),(0,r.jsxs)("span",{className:"text-[var(--color-text-secondary)]",children:["Confirm ",(0,r.jsx)("span",{className:"font-mono text-[10px]",children:"agent-orchestrator.yaml"})," exists and is valid, then run ",(0,r.jsx)("span",{className:"font-mono text-[10px]",children:"athene doctor"})," for diagnostics."]})]}):null,e1=(0,a.useMemo)(()=>D.some(e=>e.pr&&(0,c.fZ)(e.pr)),[D]),e2=null!=u?u:eI?"All projects":"Dashboard",e4=!eI&&e2.trim().length>0,e3=e=>{ej(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},e5=(0,r.jsxs)("div",{className:"dashboard-main--desktop",children:[(0,r.jsxs)("header",{className:"dashboard-app-header",children:[ed?(0,r.jsx)("button",{type:"button",className:"dashboard-app-sidebar-toggle",onClick:ev,"aria-label":"Toggle sidebar",children:(0,r.jsx)("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})}):null,e4?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"dashboard-app-header__sep topbar-desktop-only","aria-hidden":"true"}),(0,r.jsxs)("div",{className:"topbar-project-pills-group",children:[(0,r.jsxs)("div",{className:"topbar-project-line",children:[(0,r.jsx)("span",{className:"dashboard-app-header__project",children:e2}),(0,r.jsxs)("nav",{className:"workspace-mode-switch","aria-label":"Workspace mode",children:[(0,r.jsx)(o(),{href:eR,className:"workspace-mode-switch__item workspace-mode-switch__item--active","aria-current":"page",children:"Coding"}),(0,r.jsx)(o(),{href:eW,className:"workspace-mode-switch__item",children:"Reviews"})]})]}),!eI&&H.length>0?(0,r.jsxs)("div",{className:"topbar-session-pills",children:[eL.working.length>0?(0,r.jsxs)("div",{className:"topbar-status-pill topbar-status-pill--active",children:[(0,r.jsx)("span",{className:"topbar-status-pill__dot topbar-status-pill__dot--working"}),(0,r.jsxs)("span",{className:"topbar-status-pill__label",children:[eL.working.length," working"]})]}):null,eL.merge.length+eL.action.length+eL.respond.length+eL.review.length>0?(0,r.jsxs)("div",{className:"topbar-status-pill topbar-status-pill--waiting-for-input",children:[(0,r.jsx)("span",{className:"topbar-status-pill__dot topbar-status-pill__dot--attention"}),(0,r.jsxs)("span",{className:"topbar-status-pill__label",children:[eL.merge.length+eL.action.length+eL.respond.length+eL.review.length," ","need attention"]})]}):null]}):null]})]}):null,(0,r.jsx)("div",{className:"dashboard-app-header__spacer"}),(0,r.jsxs)("div",{className:"dashboard-app-header__actions",children:[ek?(0,r.jsx)(B,{projectId:h}):null,(0,r.jsx)(E.e,{}),!eI&&eT?(0,r.jsxs)(o(),{href:eT,className:"dashboard-app-btn dashboard-app-btn--primary","aria-label":"Orchestrator",children:[(0,r.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,r.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,r.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),"Orchestrator"]}):eA&&eB?(0,r.jsxs)("button",{type:"button",className:"dashboard-app-btn dashboard-app-btn--primary","aria-label":"Spawn Orchestrator",onClick:()=>void eY(eB),disabled:eE,children:[(0,r.jsxs)("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",strokeWidth:"1.6",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"12",cy:"5",r:"2",fill:"currentColor",stroke:"none"}),(0,r.jsx)("path",{d:"M12 7v4M12 11H6M12 11h6M6 11v3M12 11v3M18 11v3"}),(0,r.jsx)("circle",{cx:"6",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"12",cy:"17",r:"2"}),(0,r.jsx)("circle",{cx:"18",cy:"17",r:"2"})]}),eE?"Spawning...":"Spawn Orchestrator"]}):null]})]}),(0,r.jsxs)("main",{className:"dashboard-main flex flex-col flex-1 min-h-0 overflow-hidden",children:[(0,r.jsx)(C.u,{attentionLevels:A,projectName:u}),(0,r.jsxs)("div",{className:"dashboard-main__subhead",children:[(0,r.jsx)("h1",{className:"dashboard-main__title",children:"Board"}),(0,r.jsx)("p",{className:"dashboard-main__subtitle",children:"Live agent sessions flowing from work → review → merge."})]}),(0,r.jsxs)("div",{className:"dashboard-main__body",children:[e0,e1&&!es&&(0,r.jsxs)("div",{className:"dashboard-alert mb-4 flex items-center gap-2.5 border border-[color-mix(in_srgb,var(--color-status-attention)_25%,transparent)] bg-[var(--color-tint-yellow)] px-3.5 py-2.5 text-[11px] text-[var(--color-status-attention)]",children:[(0,r.jsxs)("svg",{className:"h-3.5 w-3.5 shrink-0",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),(0,r.jsx)("span",{className:"flex-1",children:"GitHub API rate limited — PR data (CI status, review state, sizes) may be stale. Will retry automatically on next refresh."}),(0,r.jsx)("button",{onClick:()=>er(!0),className:"ml-1 shrink-0 opacity-60 hover:opacity-100","aria-label":"Dismiss",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M18 6 6 18M6 6l12 12"})})})]}),eI&&(0,r.jsx)(Q,{overviews:eH,onSpawnOrchestrator:eY,spawningProjectIds:eo,spawnErrors:ei,attentionZones:f}),!eI&&e$&&(0,r.jsx)("div",{className:"kanban-board-wrap",children:(0,r.jsx)("div",{className:"kanban-board","data-columns":k.length,style:{"--kanban-column-count":k.length},children:k.map(e=>(0,r.jsx)(w,{level:e,sessions:eL[e],onKill:eq,onRestore:eQ,compactMobile:ed,collapsed:ed&&eg.has(e),onToggle:ed?e3:void 0,onPreview:ed?eK:void 0,resolveProjectAccent:G},e))})}),eX?(0,r.jsx)(I,{orchestratorHref:eT,onSpawnOrchestrator:eA&&eB?()=>{eY(eB)}:null,spawnLabel:eE?"Spawning...":"Spawn Orchestrator",spawnDisabled:eE}):null,!eI&&eO?(0,r.jsx)("p",{className:"mt-3 text-[11px] text-[var(--color-status-error)]",children:eO}):null,!eI&&eL.done.length>0&&(0,r.jsxs)("div",{className:"done-bar mt-6",children:[(0,r.jsxs)("button",{type:"button",className:"done-bar__toggle",onClick:()=>eS(e=>!e),"aria-expanded":eM,children:[(0,r.jsx)("svg",{className:"done-bar__chevron".concat(eM?" done-bar__chevron--open":""),fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"m9 18 6-6-6-6"})}),(0,r.jsx)("span",{className:"done-bar__label",children:"Done / Terminated"}),(0,r.jsx)("span",{className:"done-bar__count",children:eL.done.length})]}),eM&&(0,r.jsx)("div",{className:"done-bar__cards",children:eL.done.map(e=>(0,r.jsx)(V,{session:e,onRestore:eQ,projectAccent:null==G?void 0:G(e.projectId)},e.id))})]})]})]})]}),e6=(0,r.jsx)(Z,{session:ef,mode:eN,onCancel:eV,onConfirm:eG,onRequestKill:ez,onMerge:eJ,isMergeReady:!!ef&&"merge"===A[ef.id]});return eu?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(T,{}),(0,r.jsx)(W,{status:J}),e5,e6]}):(0,r.jsxs)(O.I.Provider,{value:{onToggleSidebar:ev,mobileSidebarOpen:ep},children:[(0,r.jsx)(T,{}),(0,r.jsx)(W,{status:J}),(0,r.jsx)("div",{className:"dashboard-app-shell",children:(0,r.jsxs)("div",{className:"dashboard-shell--desktop".concat(em?" dashboard-shell--sidebar-collapsed":""),children:[(0,r.jsx)("div",{className:"sidebar-wrapper".concat(ep?" sidebar-wrapper--mobile-open":""),children:(0,r.jsx)(F.u,{projects:m,sessions:D,orchestrators:g,metaOrchestrators:p,activeProjectId:h,activeSessionId:et,loading:!L,collapsed:em,onToggleCollapsed:()=>ex(e=>!e),onMobileClose:()=>eb(!1)})}),ep&&(0,r.jsx)("div",{className:"sidebar-mobile-backdrop",onClick:()=>eb(!1)}),e5]})}),e6]})}function J(e){return(0,r.jsx)(R.t,{children:(0,r.jsx)(G,{...e})})}function Q(e){let{overviews:t,onSpawnOrchestrator:s,spawningProjectIds:a,spawnErrors:n,attentionZones:l}=e;return(0,r.jsx)("div",{className:"mb-8 grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:t.map(e=>{let{project:t,orchestrator:i,sessionCount:c,openPRCount:d,counts:h}=e,u=!!t.resolveError,m=(0,b.bn)(t.id);return(0,r.jsxs)("section",{className:"border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-[14px] font-semibold text-[var(--color-text-primary)]",children:t.name}),(0,r.jsx)("div",{className:"mt-1 text-[11px] text-[var(--color-text-muted)]",children:u?"Config needs repair":(0,r.jsxs)(r.Fragment,{children:[c," active session",1!==c?"s":"",d>0?" \xb7 ".concat(d," open PR").concat(1!==d?"s":""):""]})})]}),(0,r.jsx)(o(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Open project"})]}),(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,r.jsx)(Y,{label:"Merge",value:h.merge,tone:"ready"}),"detailed"===l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Y,{label:"Respond",value:h.respond,tone:"error"}),(0,r.jsx)(Y,{label:"Review",value:h.review,tone:"orange"})]}):(0,r.jsx)(Y,{label:"Action",value:h.action,tone:"orange"}),(0,r.jsx)(Y,{label:"Pending",value:h.pending,tone:"attention"}),(0,r.jsx)(Y,{label:"Working",value:h.working,tone:"working"})]}),(0,r.jsxs)("div",{className:"border-t border-[var(--color-border-subtle)] pt-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,r.jsx)("div",{className:"text-[11px] text-[var(--color-text-muted)]",children:u?"Project config could not be resolved":i?"Per-project orchestrator available":"No running orchestrator"}),u?(0,r.jsx)(o(),{href:m,className:"border border-[var(--color-border-default)] px-3 py-1.5 text-[11px] font-semibold text-[var(--color-text-secondary)] hover:bg-[var(--color-bg-hover)] hover:no-underline",children:"Repair project"}):i?(0,r.jsxs)(o(),{href:(0,b.Nc)(i.projectId,i.id),className:"orchestrator-btn flex items-center gap-2 px-3 py-1.5 text-[11px] font-semibold hover:no-underline",children:[(0,r.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--color-accent)] opacity-80"}),"orchestrator"]}):(0,r.jsx)("button",{type:"button",onClick:()=>void s(t),disabled:a.includes(t.id),className:"orchestrator-btn px-3 py-1.5 text-[11px] font-semibold disabled:cursor-wait disabled:opacity-70",children:a.includes(t.id)?"Spawning...":"Spawn Orchestrator"})]}),n[t.id]?(0,r.jsx)("p",{className:"mt-2 text-[11px] text-[var(--color-status-error)]",children:n[t.id]}):null]})]},t.id)})})}function Y(e){let{label:t,value:s,tone:a}=e;return(0,r.jsxs)("div",{className:"min-w-[78px] border border-[var(--color-border-subtle)] px-2.5 py-2",children:[(0,r.jsx)("div",{className:"text-[10px] uppercase tracking-[0.08em] text-[var(--color-text-tertiary)]",children:t}),(0,r.jsx)("div",{className:"project-metric__value mt-1 text-[18px] font-semibold tabular-nums","data-tone":a,children:s})]})}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9170],{1712:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return a}});let t=s(1903)._(s(5864));function a(e,r){var s;let a={};"function"==typeof e&&(a.loader=e);let n={...a,...r};return(0,t.default)({...n,modules:null==(s=n.loadableGenerated)?void 0:s.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),e.exports=r.default)},4255:(e,r,s)=>{"use strict";s.r(r),s.d(r,{default:()=>x,dynamic:()=>c});var t=s(3817),a=s(9891),n=s(7594),l=s(6749);let i=(0,a.default)(()=>Promise.all([s.e(8623),s.e(3764),s.e(5204)]).then(s.bind(s,3764)).then(e=>({default:e.DirectTerminal})),{loadableGenerated:{webpack:()=>[3764]},ssr:!1}),o=(0,a.default)(()=>s.e(7317).then(s.bind(s,7317)).then(e=>({default:e.Terminal})),{loadableGenerated:{webpack:()=>[7317]},ssr:!1}),c="force-dynamic";function d(){let e=(0,n.useSearchParams)(),[r,s]=(0,l.useState)([]),[a,c]=(0,l.useState)(!0);(0,l.useEffect)(()=>{fetch("/api/sessions?active=true").then(e=>e.json()).then(e=>{e.sessions&&Array.isArray(e.sessions)&&s(e.sessions.map(e=>e.id))}).catch(e=>{console.error("Failed to fetch sessions:",e)})},[]);let d=e.get("session"),x=e.get("old_session"),m=e.get("new_session"),h=r[0]||"ao-orchestrator",p=r[1]||r[0]||"ao-orchestrator",u=x||d||h,b=m||d||p;return(0,t.jsx)("div",{className:"min-h-screen bg-[var(--color-bg-primary)] p-8",children:(0,t.jsxs)("div",{className:"mx-auto max-w-7xl",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mb-2 text-3xl font-bold text-[var(--color-text-primary)]",children:"Terminal Implementation Test & Documentation"}),(0,t.jsxs)("p",{className:"text-sm text-[var(--color-text-muted)]",children:["Comparing sessions:",(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-red)]",children:["OLD: ",u]}),(0,t.jsxs)("span",{className:"ml-2 font-mono text-[var(--color-accent-green)]",children:["NEW: ",b]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDC1B The Problem"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Issue:"})," Browser clipboard (Cmd+C/Ctrl+C) only worked when an iTerm2 client was attached to the tmux session."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Impact:"})," Users had to keep iTerm2 tabs open in the background for clipboard to work in the web dashboard."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Investigation time:"})," 12+ hours of debugging across tmux, ttyd, xterm.js, and macOS clipboard systems."]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD0D Root Cause Analysis"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"1. How tmux Clipboard Works (OSC 52)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux uses OSC 52 escape sequences to synchronize clipboard with terminals"}),(0,t.jsxs)("li",{children:["Format:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"\\x1b]52;c;<base64>\\x07"})]}),(0,t.jsx)("li",{children:"Terminal must support OSC 52 and have proper capabilities declared"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"2. tmux Capability Detection (XDA)"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"tmux queries terminal capabilities using Device Attributes (DA/XDA)"}),(0,t.jsxs)("li",{children:["XDA query: ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," ","(also called XTVERSION)"]}),(0,t.jsx)("li",{children:'Terminal responds with identification string containing terminal type (e.g., "XTerm(370)", "iTerm2 ")'}),(0,t.jsx)("li",{children:"Based on response, tmux enables features like TTYC_MS (clipboard support)"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"3. The Missing Piece"}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-red)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"xterm.js does NOT implement XDA (Extended Device Attributes)"}),(0,t.jsxs)("ul",{className:"ml-6 mt-2 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["XDA is marked as TODO in xterm.js codebase:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsx)("li",{children:"Without XDA response, tmux doesn't recognize the terminal as clipboard-capable"}),(0,t.jsx)("li",{children:"tmux never emits OSC 52 sequences → clipboard doesn't work"})]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:'4. Why iTerm2 "Fixed" It'}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["iTerm2 sends proper XDA response identifying itself as"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:'"iTerm2 "'})]}),(0,t.jsx)("li",{children:"tmux detects this and enables clipboard for the entire session"}),(0,t.jsx)("li",{children:"OSC 52 sequences are then sent to ALL clients, including browser (ttyd/xterm.js)"}),(0,t.jsx)("li",{children:'This is why clipboard "magically worked" when iTerm2 was attached'})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"✅ The Solution"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal Implementation"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Created custom terminal component that registers an XDA handler using xterm.js parser API:"}),(0,t.jsx)("pre",{className:"overflow-x-auto rounded-[2px] bg-black p-4 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" }, // CSI > q is XDA query\n () => {\n // Respond with XTerm identification\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"What This Does"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Intercepts XDA queries from tmux"}),(0,t.jsxs)("li",{children:["Responds with"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"XTerm(370)"})," ","identification"]}),(0,t.jsx)("li",{children:'tmux detects "XTerm(" in response and enables TTYC_MS capability'}),(0,t.jsx)("li",{children:"OSC 52 sequences now flow: tmux → WebSocket → xterm.js → navigator.clipboard"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-accent-green)]",children:"Clipboard works without iTerm2!"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Architecture Changes"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Old:"})," Browser → ttyd (iframe) → tmux"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"New:"})," Browser → Custom WebSocket (node-pty) → tmux"]}),(0,t.jsx)("li",{children:"Bypasses ttyd for direct control over terminal initialization"}),(0,t.jsx)("li",{children:"Full control over escape sequence handling and capabilities"})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"⚠️ Node Version Requirement"}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsx)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-orange)]",children:"CRITICAL: This implementation requires Node 20.x (currently 20.20.0)"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"Why Node 20?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:(0,t.jsx)("strong",{children:"node-pty 1.1.0 is incompatible with Node 25+"})}),(0,t.jsxs)("li",{children:["Error on Node 25.6.1:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})]}),(0,t.jsx)("li",{children:"Root cause: node-pty's native module (darwin-arm64 prebuild) fails to spawn processes on Node 25"}),(0,t.jsx)("li",{children:"No darwin-arm64 prebuilds available that work with Node 25"}),(0,t.jsx)("li",{children:"Building from source also fails with the same error"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"When Can We Upgrade?"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 1:"})," Wait for node-pty 1.2.0 stable release with Node 25+ support"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 2:"})," Test node-pty beta versions (currently 1.2.0-beta.11)"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Option 3:"})," Switch to alternative PTY library (e.g., xterm-pty, node-child-pty)"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ Testing Instructions for Upgrades"}),(0,t.jsx)("p",{className:"mb-2 text-[var(--color-text-secondary)]",children:"Before upgrading Node or node-pty:"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:["Test node-pty directly:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"node -e \"const pty = require('node-pty'); pty.spawn('/bin/bash', [], {})\""})]}),(0,t.jsxs)("li",{children:["If no"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"posix_spawnp failed"})," ","error, proceed"]}),(0,t.jsx)("li",{children:"Start dev servers and open this page"}),(0,t.jsx)("li",{children:"Test DirectTerminal: verify connection, clipboard, resize"}),(0,t.jsx)("li",{children:"Test multiple sessions to ensure stability"}),(0,t.jsx)("li",{children:"If all tests pass, upgrade is safe"})]})]})]})]}),(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("button",{onClick:()=>c(!a),className:"rounded-[2px] bg-[var(--color-accent-blue)] px-4 py-2 text-sm font-semibold text-white transition-opacity hover:opacity-80",children:[a?"Hide":"Show"," Side-by-Side Comparison"]}),(0,t.jsx)("span",{className:"text-sm text-[var(--color-text-secondary)]",children:"Compare old (ttyd iframe) vs new (DirectTerminal with XDA)"})]}),u===b&&(0,t.jsxs)("div",{className:"mt-2 rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["⚠️ Using same session for both terminals. To avoid port conflicts, use different sessions:",(0,t.jsx)("code",{className:"ml-1 rounded-[2px] bg-black px-1",children:"?old_session=ao-orchestrator&new_session=ao-20"})]})]}),a&&(0,t.jsxs)("section",{className:"mb-8",children:[(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-red)] px-2 py-1 text-xs font-semibold text-white",children:"OLD"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"ttyd iframe (no XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["❌ Clipboard requires iTerm2 attached",(0,t.jsx)("br",{}),"✅ Battle-tested (ttyd)",(0,t.jsx)("br",{}),"❌ No control over capabilities"]}),(0,t.jsx)(o,{sessionId:u})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"rounded-[2px] bg-[var(--color-accent-green)] px-2 py-1 text-xs font-semibold text-white",children:"NEW"}),(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--color-text-primary)]",children:"DirectTerminal (with XDA)"})]}),(0,t.jsxs)("div",{className:"mb-2 rounded bg-[var(--color-bg-tertiary)] p-2 text-xs text-[var(--color-text-secondary)]",children:["✅ Clipboard works standalone",(0,t.jsx)("br",{}),"✅ Full control over terminal",(0,t.jsx)("br",{}),"⚠️ Requires Node 20.x (node-pty)"]}),(0,t.jsx)(i,{sessionId:b,tmuxName:b})]})]}),(0,t.jsxs)("div",{className:"mt-4 rounded-[2px] border border-[var(--color-accent-blue)] bg-[var(--color-bg-secondary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 text-sm font-semibold text-[var(--color-text-primary)]",children:"\uD83E\uDDEA How to Test Clipboard"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("li",{children:"Drag-select text in BOTH terminals above"}),(0,t.jsx)("li",{children:"Press Cmd+C (macOS) or Ctrl+Shift+C (Linux/Windows)"}),(0,t.jsx)("li",{children:"Paste in another application (Notes, VS Code, etc.)"}),(0,t.jsx)("li",{children:(0,t.jsx)("strong",{className:"text-[var(--color-text-primary)]",children:"Expected: RIGHT terminal works, LEFT may not (unless iTerm2 is attached)"})})]})]})]}),(0,t.jsxs)("section",{className:"rounded-[2px] border border-[var(--color-accent)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDD2C The Debugging Journey"}),(0,t.jsxs)("div",{className:"space-y-4 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsx)("div",{className:"rounded-[2px] bg-[var(--color-bg-tertiary)] p-4",children:(0,t.jsx)("p",{className:"font-semibold text-[var(--color-accent-red)]",children:"Total Time Wasted: 12+ hours across Feb 15-16, 2026"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"❌ What We Tried (That Didn't Work)"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected ttyd clipboard handling"})," - Spent hours analyzing ttyd source code, checking OSC 52 passthrough. ttyd was innocent - it passes escape sequences correctly."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Blamed xterm.js configuration"})," - Tried every possible xterm.js option, clipboard addon configurations, terminal type settings. None made a difference."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Investigated macOS clipboard permissions"})," - Checked browser permissions, sandbox attributes, navigator.clipboard API. All were correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Suspected WebSocket encoding issues"})," - Checked binary vs text mode, UTF-8 encoding, base64 handling. All correct."]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Tried force-enabling tmux clipboard"})," - Used"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"set-option -s set-clipboard on"})," ","in tmux.conf. Didn't help - tmux needs the terminal to declare support."]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCA1 The Breakthrough"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"What finally worked:"})," Registering an XDA (Extended Device Attributes) handler in xterm.js using"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"terminal.parser.registerCsiHandler()"})]}),(0,t.jsx)("pre",{className:"mt-2 overflow-x-auto rounded-[2px] bg-black p-3 text-xs",children:(0,t.jsx)("code",{className:"text-[var(--color-accent-green)]",children:'terminal.parser.registerCsiHandler(\n { prefix: ">", final: "q" },\n () => {\n terminal.write("\\x1bP>|XTerm(370)\\x1b\\\\");\n return true;\n }\n);'})}),(0,t.jsx)("p",{className:"mt-2",children:"This single handler made tmux recognize our terminal as clipboard-capable. Clipboard immediately started working."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83C\uDFAF How We Finally Figured It Out"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Deep-dive into tmux source code"})," - Used DeepWiki.com to analyze tmux's terminal capability detection logic in"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"})," and"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty.c"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Discovered XDA queries"})," - Found that tmux sends"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"CSI > q"})," (XTVERSION) to detect terminal type"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:'Traced the "iTerm2 magic"'})," - Realized why clipboard worked when iTerm2 was attached: iTerm2 responds to XDA queries, enabling clipboard for the entire tmux session"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Checked xterm.js implementation"})," - Found that XDA is marked as TODO in xterm.js tests:"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"test.skip('CSI > Ps q - Report xterm name and version (XTVERSION)')"})]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Implemented custom handler"})," - Used xterm.js parser API to register our own XDA handler"]})]})]}),(0,t.jsxs)("div",{className:"rounded-[2px] border border-[var(--color-accent-orange)] bg-[var(--color-bg-tertiary)] p-4",children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"⚡ How We Could Have Figured It Out Faster"}),(0,t.jsxs)("ol",{className:"ml-6 list-decimal space-y-2 text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Start with tmux source code first"})," - Instead of debugging xterm.js and ttyd, we should have immediately checked how tmux detects terminal capabilities"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Monitor escape sequences"})," - Running"," ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tmux -vvv"})," or using a terminal protocol analyzer would have revealed the XDA queries being sent"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Compare working vs broken scenarios"})," - Should have captured and diffed the escape sequences when iTerm2 was attached vs not attached earlier"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Check xterm.js issues/limitations first"}),' - A GitHub search for "xterm.js XDA" or "xterm.js device attributes" would have revealed it\'s unimplemented']}),(0,t.jsxs)("li",{children:[(0,t.jsx)("strong",{children:"Read tmux documentation on terminal types"})," - tmux man page mentions terminal capability detection, but we focused on clipboard settings instead"]})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"mb-2 font-semibold text-[var(--color-text-primary)]",children:"\uD83D\uDCDA Key Resources"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1",children:[(0,t.jsx)("li",{children:"tmux source analysis: DeepWiki.com (Feb 15, 2026)"}),(0,t.jsx)("li",{children:"xterm.js parser API documentation"}),(0,t.jsx)("li",{children:"XTerm Control Sequences: XTVERSION / Device Attributes"}),(0,t.jsxs)("li",{children:["tmux ",(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"tty-keys.c"}),": Terminal type detection logic"]})]})]})]})]}),(0,t.jsxs)("section",{className:"mt-6 rounded-[2px] border border-[var(--color-border-default)] bg-[var(--color-bg-secondary)] p-6",children:[(0,t.jsx)("h2",{className:"mb-4 text-xl font-bold text-[var(--color-text-primary)]",children:"\uD83D\uDCC1 Implementation Files"}),(0,t.jsxs)("ul",{className:"ml-6 list-disc space-y-1 text-sm text-[var(--color-text-secondary)]",children:[(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/components/DirectTerminal.tsx"})," ","- Main component with XDA handler"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/server/direct-terminal-ws.ts"})," ","- WebSocket server using node-pty"]}),(0,t.jsxs)("li",{children:[(0,t.jsx)("code",{className:"rounded-[2px] bg-black px-1 py-0.5",children:"packages/web/src/app/dev/terminal-test/page.tsx"})," ","- This test page"]})]})]}),(0,t.jsxs)("div",{className:"mt-8 border-t border-[var(--color-border-default)] pt-4 text-center text-xs text-[var(--color-text-secondary)]",children:[(0,t.jsx)("p",{children:"Investigation: Feb 15-16, 2026 • Duration: 12+ hours • Status: ✅ Resolved"}),(0,t.jsx)("p",{className:"mt-1",children:"Node 20.20.0 • node-pty 1.1.0 • xterm.js 5.3.0"})]})]})})}function x(){return(0,t.jsx)(l.Suspense,{fallback:(0,t.jsx)("div",{className:"flex min-h-screen items-center justify-center",children:"Loading..."}),children:(0,t.jsx)(d,{})})}},5468:(e,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,r){for(var s in r)Object.defineProperty(e,s,{enumerable:!0,get:r[s]})}(r,{bindSnapshot:function(){return l},createAsyncLocalStorage:function(){return n},createSnapshot:function(){return i}});let s=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class t{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function n(){return a?new a:new t}function l(e){return a?a.bind(e):t.bind(e)}function i(){return a?a.snapshot():function(e,...r){return e(...r)}}},5864:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let t=s(3817),a=s(6749),n=s(6943);function l(e){return{default:e&&"default"in e?e.default:e}}s(6418);let i={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},o=function(e){let r={...i,...e},s=(0,a.lazy)(()=>r.loader().then(l)),o=r.loading;function c(e){let l=o?(0,t.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!r.ssr||!!r.loading,c=i?a.Suspense:a.Fragment,d=r.ssr?(0,t.jsxs)(t.Fragment,{children:[null,(0,t.jsx)(s,{...e})]}):(0,t.jsx)(n.BailoutToCSR,{reason:"next/dynamic",children:(0,t.jsx)(s,{...e})});return(0,t.jsx)(c,{...i?{fallback:l}:{},children:d})}return c.displayName="LoadableComponent",c}},6313:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorage",{enumerable:!0,get:function(){return t.workAsyncStorageInstance}});let t=s(8394)},6418:(e,r,s)=>{"use strict";function t(e){let{moduleIds:r}=e;return null}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return t}}),s(3817),s(4768),s(6313),s(5152)},6943:(e,r,s)=>{"use strict";function t(e){let{reason:r,children:s}=e;return s}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return t}}),s(1763)},7594:(e,r,s)=>{"use strict";var t=s(9582);s.o(t,"useParams")&&s.d(r,{useParams:function(){return t.useParams}}),s.o(t,"usePathname")&&s.d(r,{usePathname:function(){return t.usePathname}}),s.o(t,"useRouter")&&s.d(r,{useRouter:function(){return t.useRouter}}),s.o(t,"useSearchParams")&&s.d(r,{useSearchParams:function(){return t.useSearchParams}})},7618:(e,r,s)=>{Promise.resolve().then(s.bind(s,4255))},8394:(e,r,s)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"workAsyncStorageInstance",{enumerable:!0,get:function(){return t}});let t=(0,s(5468).createAsyncLocalStorage)()},9891:(e,r,s)=>{"use strict";s.d(r,{default:()=>a.a});var t=s(1712),a=s.n(t)}},e=>{e.O(0,[131,1461,7358],()=>e(e.s=7618)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8039],{249:(r,e,o)=>{Promise.resolve().then(o.bind(o,3464))},3464:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>s});var a=o(3817),t=o(7594),l=o(6749),n=o(9789);function s(r){let{error:e,reset:o}=r,s=(0,t.useRouter)();return(0,l.useEffect)(()=>{console.error(e)},[e]),(0,a.jsx)(n.ErrorDisplay,{title:"Something went wrong",message:"The dashboard hit an unexpected error. Try reloading the route data or head back to the main dashboard.",tone:"warning",primaryAction:{label:"Try again",onClick:()=>{o(),s.refresh()}},secondaryAction:{label:"Back to dashboard",href:"/"},error:e,compact:!0,chrome:"card"})}},7594:(r,e,o)=>{"use strict";var a=o(9582);o.o(a,"useParams")&&o.d(e,{useParams:function(){return a.useParams}}),o.o(a,"usePathname")&&o.d(e,{usePathname:function(){return a.usePathname}}),o.o(a,"useRouter")&&o.d(e,{useRouter:function(){return a.useRouter}}),o.o(a,"useSearchParams")&&o.d(e,{useSearchParams:function(){return a.useSearchParams}})},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var a=o(3817),t=o(8713),l=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,a.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,a.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,a.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,a.jsx)(l(),{href:e.href,className:t,style:n,children:e.label}):(0,a.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:l="Technical details",error:i,primaryAction:d,secondaryAction:u,compact:x=!1,chrome:m="page",children:b}=r,v=n[t],h=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,a.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(x?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,a.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,a.jsx)(s,{accent:v.accent}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,a.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,a.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||u)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,a.jsx)(c,{action:d,primary:!0}):null,u?(0,a.jsx)(c,{action:u}):null]}),b,h?(0,a.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,a.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:l}),(0,a.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,a.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,a.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,a.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=249)),_N_E=r.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{5272:(r,e,o)=>{Promise.resolve().then(o.bind(o,7494))},7494:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>n});var l=o(3817),t=o(6749),a=o(9789);function n(r){let{error:e,reset:o}=r;return(0,t.useEffect)(()=>{console.error(e)},[e]),(0,l.jsx)("html",{lang:"en",className:"dark",children:(0,l.jsx)("body",{className:"bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased",children:(0,l.jsx)(a.ErrorDisplay,{title:"Something broke at the app shell",message:"The dashboard could not recover from this error at the layout level. Try again first, then reload the page if it still fails.",tone:"error",primaryAction:{label:"Try again",onClick:o},secondaryAction:{label:"Reload page",onClick:()=>window.location.reload()},error:e})})})}},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:m="page",children:u}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),u,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=5272)),_N_E=r.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{1829:(r,e,o)=>{Promise.resolve().then(o.bind(o,7494))},7494:(r,e,o)=>{"use strict";o.r(e),o.d(e,{default:()=>n});var l=o(3817),t=o(6749),a=o(9789);function n(r){let{error:e,reset:o}=r;return(0,t.useEffect)(()=>{console.error(e)},[e]),(0,l.jsx)("html",{lang:"en",className:"dark",children:(0,l.jsx)("body",{className:"bg-[var(--color-bg-base)] text-[var(--color-text-primary)] antialiased",children:(0,l.jsx)(a.ErrorDisplay,{title:"Something broke at the app shell",message:"The dashboard could not recover from this error at the layout level. Try again first, then reload the page if it still fails.",tone:"error",primaryAction:{label:"Try again",onClick:o},secondaryAction:{label:"Reload page",onClick:()=>window.location.reload()},error:e})})})}},9789:(r,e,o)=>{"use strict";o.d(e,{ErrorDisplay:()=>i});var l=o(3817),t=o(8713),a=o.n(t);let n={error:{accent:"var(--color-status-error)",bg:"var(--color-tint-red)",border:"color-mix(in srgb, var(--color-status-error) 24%, transparent)",label:"error"},warning:{accent:"var(--color-status-attention)",bg:"var(--color-tint-yellow)",border:"color-mix(in srgb, var(--color-status-attention) 24%, transparent)",label:"warning"},"not-found":{accent:"var(--color-accent)",bg:"var(--color-tint-blue)",border:"color-mix(in srgb, var(--color-accent) 24%, transparent)",label:"missing"}};function s(r){let{accent:e}=r;return(0,l.jsx)("div",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border",style:{background:"linear-gradient(180deg, color-mix(in srgb, ".concat(e," 16%, var(--color-bg-elevated)) 0%, var(--color-bg-surface) 100%)"),borderColor:"color-mix(in srgb, ".concat(e," 18%, var(--color-border-default))"),boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("svg",{className:"h-7 w-7",fill:"none",stroke:"currentColor",strokeWidth:"1.6",style:{color:e},viewBox:"0 0 24 24",children:[(0,l.jsx)("rect",{x:"2.5",y:"4.5",width:"19",height:"15",rx:"3"}),(0,l.jsx)("path",{d:"M6.5 9.5l3.25 2.5-3.25 2.5M12.75 15h4.75"})]})})}function c(r){let{action:e,primary:o=!1}=r,t=o?"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-semibold transition-colors hover:no-underline":"inline-flex items-center justify-center rounded-full border px-4 py-2 text-[12px] font-medium transition-colors hover:no-underline",n=o?{background:"var(--color-accent)",color:"var(--color-text-inverse)",borderColor:"color-mix(in srgb, var(--color-accent) 72%, transparent)"}:{background:"var(--color-bg-surface)",color:"var(--color-text-secondary)",borderColor:"var(--color-border-default)"};return e.href?(0,l.jsx)(a(),{href:e.href,className:t,style:n,children:e.label}):(0,l.jsx)("button",{type:"button",onClick:e.onClick,className:t,style:n,children:e.label})}function i(r){let{title:e,message:o,tone:t="error",detailsTitle:a="Technical details",error:i,primaryAction:d,secondaryAction:x,compact:b=!1,chrome:m="page",children:u}=r,v=n[t],p=!!((null==i?void 0:i.digest)||(null==i?void 0:i.message)||(null==i?void 0:i.stack));return(0,l.jsx)("div",{className:"flex w-full items-center justify-center px-6 py-10 ".concat(b?"min-h-[calc(100vh-4rem)]":"min-h-screen"),style:{background:"page"===m?"radial-gradient(circle at top, var(--color-body-gradient-blue), transparent 35%), var(--color-bg-base)":"transparent"},children:(0,l.jsx)("div",{className:"w-full max-w-[36rem] rounded-[28px] border p-6 sm:p-8",style:{background:"linear-gradient(180deg, color-mix(in srgb, var(--color-bg-elevated) 88%, transparent) 0%, var(--color-bg-surface) 100%)",borderColor:"var(--color-border-default)",boxShadow:"var(--detail-card-shadow)"},children:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start",children:[(0,l.jsx)(s,{accent:v.accent}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"mb-3 inline-flex items-center rounded-full border px-2.5 py-1 font-[var(--font-mono)] text-[10px] font-medium uppercase tracking-[0.22em]",style:{color:v.accent,background:v.bg,borderColor:v.border},children:v.label}),(0,l.jsx)("h1",{className:"text-[24px] font-semibold tracking-[-0.04em] text-[var(--color-text-primary)]",children:e}),(0,l.jsx)("p",{className:"mt-2 max-w-[34rem] text-[14px] leading-6 text-[var(--color-text-secondary)]",children:o})]})]}),(d||x)&&(0,l.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d?(0,l.jsx)(c,{action:d,primary:!0}):null,x?(0,l.jsx)(c,{action:x}):null]}),u,p?(0,l.jsxs)("details",{className:"rounded-2xl border",style:{background:"color-mix(in srgb, var(--color-bg-elevated) 84%, transparent)",borderColor:"var(--color-border-subtle)"},children:[(0,l.jsx)("summary",{className:"cursor-pointer list-none px-4 py-3 text-[12px] font-medium text-[var(--color-text-secondary)]",children:a}),(0,l.jsxs)("div",{className:"border-t px-4 py-4",style:{borderColor:"var(--color-border-subtle)"},children:[(null==i?void 0:i.digest)?(0,l.jsxs)("p",{className:"mb-3 font-[var(--font-mono)] text-[11px] text-[var(--color-text-tertiary)]",children:["digest: ",i.digest]}):null,(null==i?void 0:i.message)?(0,l.jsx)("p",{className:"mb-3 text-[12px] leading-5 text-[var(--color-text-secondary)]",children:i.message}):null,(null==i?void 0:i.stack)?(0,l.jsx)("pre",{className:"overflow-x-auto whitespace-pre-wrap font-[var(--font-mono)] text-[11px] leading-5 text-[var(--color-text-tertiary)]",children:i.stack}):null]})]}):null]})})})}}},r=>{r.O(0,[8713,131,1461,7358],()=>r(r.s=1829)),_N_E=r.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[25,64,403,719,816,1097,1105,1214,1337,1390,1762,1797,2007,2079,2430,2437,2438,2564,2641,2818,2922,2985,3511,3625,3675,4209,4587,4746,5214,6681,6849,6865,6946,6999,7462,7500,8581,9002,9217,9492,9514,9744],{687:()=>{}},_=>{_.O(0,[131,1461,7358],()=>_(_.s=687)),_N_E=_.O()}]);