@dylanpiercey/work 0.0.36 → 0.0.39

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 (156) hide show
  1. package/README.md +4 -1
  2. package/dist/index.mjs +828 -799
  3. package/dist/public/assets/{_DuoccJ6n.js → _0YVFvNq7.js} +2 -2
  4. package/dist/public/assets/{_DuoccJ6n.js.map → _0YVFvNq7.js.map} +1 -1
  5. package/dist/public/assets/{_C4_Z5zkn2.js → _3_h0JIqF2.js} +2 -2
  6. package/dist/public/assets/{_C4_Z5zkn2.js.map → _3_h0JIqF2.js.map} +1 -1
  7. package/dist/public/assets/{_D_xmssUK.js → _8FQvJvvC.js} +2 -2
  8. package/dist/public/assets/{_D_xmssUK.js.map → _8FQvJvvC.js.map} +1 -1
  9. package/dist/public/assets/{_CyiwEyMn.js → _9mIlYM38.js} +2 -2
  10. package/dist/public/assets/{_CyiwEyMn.js.map → _9mIlYM38.js.map} +1 -1
  11. package/dist/public/assets/{_CWrnc7xO2.js → _B-8ckAju2.js} +2 -2
  12. package/dist/public/assets/{_CWrnc7xO2.js.map → _B-8ckAju2.js.map} +1 -1
  13. package/dist/public/assets/{_CwkB-eRE.js → _B0Zx9TVd.js} +2 -2
  14. package/dist/public/assets/{_CwkB-eRE.js.map → _B0Zx9TVd.js.map} +1 -1
  15. package/dist/public/assets/{_B8xjUWgM.js → _B0tTvCKz.js} +2 -2
  16. package/dist/public/assets/{_B8xjUWgM.js.map → _B0tTvCKz.js.map} +1 -1
  17. package/dist/public/assets/{_t2imYRnn2.js → _B1sHSj4w2.js} +2 -2
  18. package/dist/public/assets/{_t2imYRnn2.js.map → _B1sHSj4w2.js.map} +1 -1
  19. package/dist/public/assets/{_AXtY7xHP.js → _B222bJOA.js} +2 -2
  20. package/dist/public/assets/{_AXtY7xHP.js.map → _B222bJOA.js.map} +1 -1
  21. package/dist/public/assets/{_COiBEm7k.js → _B9ZTM6vy.js} +2 -2
  22. package/dist/public/assets/{_COiBEm7k.js.map → _B9ZTM6vy.js.map} +1 -1
  23. package/dist/public/assets/{_DN6T92i8.js → _BCGHghp3.js} +2 -2
  24. package/dist/public/assets/{_DN6T92i8.js.map → _BCGHghp3.js.map} +1 -1
  25. package/dist/public/assets/{_Bl80TKT9.js → _BQHdIsH-.js} +2 -2
  26. package/dist/public/assets/{_Bl80TKT9.js.map → _BQHdIsH-.js.map} +1 -1
  27. package/dist/public/assets/{_hXqBq7cl.js → _BTD-E3MH.js} +2 -2
  28. package/dist/public/assets/{_hXqBq7cl.js.map → _BTD-E3MH.js.map} +1 -1
  29. package/dist/public/assets/{_CFBiEQIu.js → _BWm0ZgI6.js} +2 -2
  30. package/dist/public/assets/{_CFBiEQIu.js.map → _BWm0ZgI6.js.map} +1 -1
  31. package/dist/public/assets/{_CLY9VDVq.js → _BWmXhThI.js} +2 -2
  32. package/dist/public/assets/{_CLY9VDVq.js.map → _BWmXhThI.js.map} +1 -1
  33. package/dist/public/assets/{_DW8Owj0c.js → _BaVw_5rb.js} +2 -2
  34. package/dist/public/assets/{_DW8Owj0c.js.map → _BaVw_5rb.js.map} +1 -1
  35. package/dist/public/assets/{_DfENFEEn2.js → _Biu1sMqL2.js} +2 -2
  36. package/dist/public/assets/{_DfENFEEn2.js.map → _Biu1sMqL2.js.map} +1 -1
  37. package/dist/public/assets/{_BPGPMfuZ.js → _Bl7Ludpl.js} +2 -2
  38. package/dist/public/assets/{_BPGPMfuZ.js.map → _Bl7Ludpl.js.map} +1 -1
  39. package/dist/public/assets/{_BrLNY2My.js → _BlBppazN.js} +2 -2
  40. package/dist/public/assets/{_BrLNY2My.js.map → _BlBppazN.js.map} +1 -1
  41. package/dist/public/assets/{_Bdm7wPMn2.js → _Bn3jsc1x2.js} +2 -2
  42. package/dist/public/assets/{_Bdm7wPMn2.js.map → _Bn3jsc1x2.js.map} +1 -1
  43. package/dist/public/assets/{_ShXTYkUA.js → _BpjzFBgX.js} +2 -2
  44. package/dist/public/assets/{_ShXTYkUA.js.map → _BpjzFBgX.js.map} +1 -1
  45. package/dist/public/assets/{_DuS1asJa2.js → _Bq_UbhoI2.js} +2 -2
  46. package/dist/public/assets/{_DuS1asJa2.js.map → _Bq_UbhoI2.js.map} +1 -1
  47. package/dist/public/assets/{_bLU3PTcM2.js → _BwHPDQ2K2.js} +2 -2
  48. package/dist/public/assets/{_bLU3PTcM2.js.map → _BwHPDQ2K2.js.map} +1 -1
  49. package/dist/public/assets/{_Cov46DHW2.js → _C9FF4Nwt2.js} +2 -2
  50. package/dist/public/assets/{_Cov46DHW2.js.map → _C9FF4Nwt2.js.map} +1 -1
  51. package/dist/public/assets/{_TVT9qZ2c.js → _CF4aOEw0.js} +2 -2
  52. package/dist/public/assets/{_TVT9qZ2c.js.map → _CF4aOEw0.js.map} +1 -1
  53. package/dist/public/assets/{_aH4XiimY2.js → _CFFd0jR-2.js} +2 -2
  54. package/dist/public/assets/{_aH4XiimY2.js.map → _CFFd0jR-2.js.map} +1 -1
  55. package/dist/public/assets/{_C4EbflRh.js → _CGMrqKQx.js} +2 -2
  56. package/dist/public/assets/{_C4EbflRh.js.map → _CGMrqKQx.js.map} +1 -1
  57. package/dist/public/assets/{_Wb4g2Ryz.js → _CGlduZ09.js} +2 -2
  58. package/dist/public/assets/{_Wb4g2Ryz.js.map → _CGlduZ09.js.map} +1 -1
  59. package/dist/public/assets/{_CeJ_R8Zu.js → _CM1Bz2e2.js} +2 -2
  60. package/dist/public/assets/{_CeJ_R8Zu.js.map → _CM1Bz2e2.js.map} +1 -1
  61. package/dist/public/assets/{_DEvD97Np.js → _CN_uVutc.js} +2 -2
  62. package/dist/public/assets/{_DEvD97Np.js.map → _CN_uVutc.js.map} +1 -1
  63. package/dist/public/assets/{_CcsnyjhW2.js → _CR7soDA62.js} +2 -2
  64. package/dist/public/assets/{_CcsnyjhW2.js.map → _CR7soDA62.js.map} +1 -1
  65. package/dist/public/assets/{_FHWCAUYB.js → _CUhN1PMI.js} +2 -2
  66. package/dist/public/assets/{_FHWCAUYB.js.map → _CUhN1PMI.js.map} +1 -1
  67. package/dist/public/assets/{_Bjc3fQZ9.js → _CVepAYMH.js} +2 -2
  68. package/dist/public/assets/{_Bjc3fQZ9.js.map → _CVepAYMH.js.map} +1 -1
  69. package/dist/public/assets/{_B9KQdUb-.js → _CWq_CViy.js} +2 -2
  70. package/dist/public/assets/{_B9KQdUb-.js.map → _CWq_CViy.js.map} +1 -1
  71. package/dist/public/assets/{_B-U7diCX2.js → _CXeLdopD2.js} +2 -2
  72. package/dist/public/assets/{_B-U7diCX2.js.map → _CXeLdopD2.js.map} +1 -1
  73. package/dist/public/assets/{_Da2X2MEt.js → _CYFv9QGU.js} +2 -2
  74. package/dist/public/assets/{_Da2X2MEt.js.map → _CYFv9QGU.js.map} +1 -1
  75. package/dist/public/assets/{_D1Az4M4H.js → _Cd1ynaVf.js} +2 -2
  76. package/dist/public/assets/{_D1Az4M4H.js.map → _Cd1ynaVf.js.map} +1 -1
  77. package/dist/public/assets/{_uFkMNfZY2.js → _CfjmjCpz2.js} +2 -2
  78. package/dist/public/assets/{_uFkMNfZY2.js.map → _CfjmjCpz2.js.map} +1 -1
  79. package/dist/public/assets/{_D_oBKnCW.js → _Cj248HDV.js} +2 -2
  80. package/dist/public/assets/{_D_oBKnCW.js.map → _Cj248HDV.js.map} +1 -1
  81. package/dist/public/assets/{_CTyXNSU-2.js → _Cry0Vu092.js} +2 -2
  82. package/dist/public/assets/{_CTyXNSU-2.js.map → _Cry0Vu092.js.map} +1 -1
  83. package/dist/public/assets/{_HiEasrjQ2.js → _CsBnKH_a2.js} +2 -2
  84. package/dist/public/assets/{_HiEasrjQ2.js.map → _CsBnKH_a2.js.map} +1 -1
  85. package/dist/public/assets/{_ChocyBLz.js → _CuUIu7A0.js} +2 -2
  86. package/dist/public/assets/{_ChocyBLz.js.map → _CuUIu7A0.js.map} +1 -1
  87. package/dist/public/assets/{_B-2xx3M0.js → _CudIJ9N1.js} +2 -2
  88. package/dist/public/assets/{_B-2xx3M0.js.map → _CudIJ9N1.js.map} +1 -1
  89. package/dist/public/assets/{_DFry2jOJ.js → _CxK19rXP.js} +2 -2
  90. package/dist/public/assets/{_DFry2jOJ.js.map → _CxK19rXP.js.map} +1 -1
  91. package/dist/public/assets/{_096Qw0u62.js → _D2YiTEdV2.js} +2 -2
  92. package/dist/public/assets/{_096Qw0u62.js.map → _D2YiTEdV2.js.map} +1 -1
  93. package/dist/public/assets/{_BVVi-dYC2.js → _D2ch0L3l2.js} +2 -2
  94. package/dist/public/assets/{_BVVi-dYC2.js.map → _D2ch0L3l2.js.map} +1 -1
  95. package/dist/public/assets/{_CYdXmh7d.js → _D4GRfjHF.js} +2 -2
  96. package/dist/public/assets/{_CYdXmh7d.js.map → _D4GRfjHF.js.map} +1 -1
  97. package/dist/public/assets/{_CZUDVddH.js → _D51cBuRP.js} +2 -2
  98. package/dist/public/assets/{_CZUDVddH.js.map → _D51cBuRP.js.map} +1 -1
  99. package/dist/public/assets/{_p4z0x8Fj.js → _D79L--fl.js} +2 -2
  100. package/dist/public/assets/{_p4z0x8Fj.js.map → _D79L--fl.js.map} +1 -1
  101. package/dist/public/assets/{_DKeHG9D92.js → _D7dsIO-O2.js} +2 -2
  102. package/dist/public/assets/{_DKeHG9D92.js.map → _D7dsIO-O2.js.map} +1 -1
  103. package/dist/public/assets/{_DalOpczF.js → _DIhu80mU.js} +2 -2
  104. package/dist/public/assets/{_DalOpczF.js.map → _DIhu80mU.js.map} +1 -1
  105. package/dist/public/assets/{_DcuyUb4o.js → _DN7QgLB-.js} +2 -2
  106. package/dist/public/assets/{_DcuyUb4o.js.map → _DN7QgLB-.js.map} +1 -1
  107. package/dist/public/assets/{_bDyzxZsE.js → _DZOjtuBx.js} +2 -2
  108. package/dist/public/assets/{_bDyzxZsE.js.map → _DZOjtuBx.js.map} +1 -1
  109. package/dist/public/assets/{_CqzlDCHo.js → _Dh3Zdz4W.js} +2 -2
  110. package/dist/public/assets/{_CqzlDCHo.js.map → _Dh3Zdz4W.js.map} +1 -1
  111. package/dist/public/assets/{_BgfYPsIe.js → _Dlge38I0.js} +2 -2
  112. package/dist/public/assets/{_BgfYPsIe.js.map → _Dlge38I0.js.map} +1 -1
  113. package/dist/public/assets/{_BrWRoxKI2.js → _DpJaOsUS2.js} +2 -2
  114. package/dist/public/assets/{_BrWRoxKI2.js.map → _DpJaOsUS2.js.map} +1 -1
  115. package/dist/public/assets/{_zVAjbSuW.js → _DpZRF37u.js} +2 -2
  116. package/dist/public/assets/{_zVAjbSuW.js.map → _DpZRF37u.js.map} +1 -1
  117. package/dist/public/assets/{_DE_8Qb7f.js → _Dq_5FFld.js} +2 -2
  118. package/dist/public/assets/{_DE_8Qb7f.js.map → _Dq_5FFld.js.map} +1 -1
  119. package/dist/public/assets/{_ZdGWRW222.js → _DrAyvf042.js} +2 -2
  120. package/dist/public/assets/{_ZdGWRW222.js.map → _DrAyvf042.js.map} +1 -1
  121. package/dist/public/assets/{_CncEoG6z2.js → _DzkSj4zS2.js} +2 -2
  122. package/dist/public/assets/{_CncEoG6z2.js.map → _DzkSj4zS2.js.map} +1 -1
  123. package/dist/public/assets/{_CZuuo_P0.js → _HibLhaHH.js} +2 -2
  124. package/dist/public/assets/{_CZuuo_P0.js.map → _HibLhaHH.js.map} +1 -1
  125. package/dist/public/assets/{_Bq9YxMl72.js → _IEZe9nw42.js} +2 -2
  126. package/dist/public/assets/{_Bq9YxMl72.js.map → _IEZe9nw42.js.map} +1 -1
  127. package/dist/public/assets/{_Bu9RyxVf.js → _KoAN5c4U.js} +2 -2
  128. package/dist/public/assets/{_Bu9RyxVf.js.map → _KoAN5c4U.js.map} +1 -1
  129. package/dist/public/assets/{_BtX537Gm.js → _RKCdcM6s.js} +2 -2
  130. package/dist/public/assets/{_BtX537Gm.js.map → _RKCdcM6s.js.map} +1 -1
  131. package/dist/public/assets/{_BUjkn5eX2.js → _WOCAvL642.js} +2 -2
  132. package/dist/public/assets/{_BUjkn5eX2.js.map → _WOCAvL642.js.map} +1 -1
  133. package/dist/public/assets/{_BhMiIRVw.js → __dMnQCKa.js} +2 -2
  134. package/dist/public/assets/{_BhMiIRVw.js.map → __dMnQCKa.js.map} +1 -1
  135. package/dist/public/assets/{_pAwkeL3h.js → _aF_XxRRK.js} +2 -2
  136. package/dist/public/assets/{_pAwkeL3h.js.map → _aF_XxRRK.js.map} +1 -1
  137. package/dist/public/assets/{_7sBqdzGz2.js → _bcyfHqN_2.js} +2 -2
  138. package/dist/public/assets/{_7sBqdzGz2.js.map → _bcyfHqN_2.js.map} +1 -1
  139. package/dist/public/assets/{_XMNlNzQv.js → _frxegHGP.js} +2 -2
  140. package/dist/public/assets/{_XMNlNzQv.js.map → _frxegHGP.js.map} +1 -1
  141. package/dist/public/assets/{_wlkP-qJT.js → _gCS79yat.js} +2 -2
  142. package/dist/public/assets/{_wlkP-qJT.js.map → _gCS79yat.js.map} +1 -1
  143. package/dist/public/assets/{_DpqGs4Pe.js → _haaSjWYo.js} +2 -2
  144. package/dist/public/assets/{_DpqGs4Pe.js.map → _haaSjWYo.js.map} +1 -1
  145. package/dist/public/assets/{_BoXdy8m42.js → _wqbV3ClO2.js} +2 -2
  146. package/dist/public/assets/{_BoXdy8m42.js.map → _wqbV3ClO2.js.map} +1 -1
  147. package/dist/public/assets/{_Blgwpswc.js → _yNCqh4w6.js} +2 -2
  148. package/dist/public/assets/{_Blgwpswc.js.map → _yNCqh4w6.js.map} +1 -1
  149. package/dist/public/assets/{_CdmtxRRv.js → _zW4ABdBd.js} +2 -2
  150. package/dist/public/assets/{_CdmtxRRv.js.map → _zW4ABdBd.js.map} +1 -1
  151. package/dist/public/assets/index-BJLi-qve.css +1 -0
  152. package/dist/public/assets/{index-yVQX4L50.js → index-YZZGnWtK.js} +63 -63
  153. package/dist/public/assets/index-YZZGnWtK.js.map +1 -0
  154. package/package.json +1 -1
  155. package/dist/public/assets/index-DeOM_rPS.css +0 -1
  156. package/dist/public/assets/index-yVQX4L50.js.map +0 -1
package/dist/index.mjs CHANGED
@@ -2068,8 +2068,15 @@ function swr(ttlMs, load, seed) {
2068
2068
  }
2069
2069
  //#endregion
2070
2070
  //#region src/server/prs.ts
2071
- var PR_JSON = "number,title,url,headRefName,baseRefName,headRefOid,isDraft,state,reviewDecision";
2071
+ var PR_JSON = "number,title,url,headRefName,baseRefName,headRefOid,isDraft,state";
2072
2072
  var TTL_MS$3 = 12e4;
2073
+ function mapPr(raw) {
2074
+ const { headRef, ...rest } = raw;
2075
+ return {
2076
+ ...rest,
2077
+ headRefOid: rest.headRefOid || headRef?.oid
2078
+ };
2079
+ }
2073
2080
  /** PRs in every state for a repo, stale-while-revalidate cached. */
2074
2081
  var prs = swr(TTL_MS$3, fetchPrs);
2075
2082
  /** PRs whose head is the workspace branch or one of its `-topic` lanes.
@@ -2101,7 +2108,7 @@ var headPrs = swr(TTL_MS$3, async (key) => {
2101
2108
  "--json",
2102
2109
  PR_JSON
2103
2110
  ]).catch(() => "[]");
2104
- return JSON.parse(out);
2111
+ return JSON.parse(out).map(mapPr);
2105
2112
  });
2106
2113
  /** A workspace repo's PRs: the recency-windowed list filtered to the
2107
2114
  * branch prefix, plus the exact-head lookup merged in. */
@@ -2124,17 +2131,17 @@ async function fetchPrs(fullName) {
2124
2131
  "--json",
2125
2132
  PR_JSON
2126
2133
  ]).catch(() => "[]");
2127
- return JSON.parse(out);
2134
+ return JSON.parse(out).map(mapPr);
2128
2135
  }
2129
2136
  /** Refresh many repos' PRs with one GraphQL request (vs one `gh pr list`
2130
2137
  * process per repo) — called from the status watcher for active
2131
- * workspaces so PR/CI flips surface in ~watch-tick time instead of
2132
- * waiting out the per-repo TTL. Throttled internally. */
2133
- var BATCH_MIN_MS = 3e4;
2134
- /** After a detected local push, poll fast for a bit — the PR appears and
2135
- * CI starts flipping in the minutes right after. */
2136
- var HOT_MIN_MS = 4e3;
2137
- var HOT_WINDOW_MS = 12e4;
2138
+ * workspaces so open/merge/close flips surface in ~watch-tick time
2139
+ * instead of waiting out the per-repo TTL. Throttled internally. */
2140
+ var BATCH_MIN_MS = 15e3;
2141
+ /** After a detected local push, poll fast for a bit — the PR appears
2142
+ * and merges/closes in the minutes right after. */
2143
+ var HOT_MIN_MS = 3e3;
2144
+ var HOT_WINDOW_MS = 18e4;
2138
2145
  var lastBatch = 0;
2139
2146
  var hotUntil = 0;
2140
2147
  function notePushActivity() {
@@ -2144,6 +2151,7 @@ function notePushActivity() {
2144
2151
  function inHotWindow() {
2145
2152
  return Date.now() < hotUntil;
2146
2153
  }
2154
+ var GQL_PR_FIELDS = "number title url headRefName baseRefName isDraft state headRef { oid }";
2147
2155
  async function refreshPrsBatch(fullNames, force = false) {
2148
2156
  const names = [...new Set(fullNames)].filter((n) => n.includes("/"));
2149
2157
  const minMs = force ? 2e3 : Date.now() < hotUntil ? HOT_MIN_MS : BATCH_MIN_MS;
@@ -2153,7 +2161,7 @@ async function refreshPrsBatch(fullNames, force = false) {
2153
2161
  try {
2154
2162
  const query = "query {" + names.map((fullName, i) => {
2155
2163
  const [owner, name] = fullName.split("/");
2156
- return `r${i}: repository(owner: ${JSON.stringify(owner)}, name: ${JSON.stringify(name)}) { pullRequests(first: 50, orderBy: {field: UPDATED_AT, direction: DESC}) { nodes { number title url headRefName baseRefName isDraft state reviewDecision headRef { oid } } } }`;
2164
+ return `r${i}: repository(owner: ${JSON.stringify(owner)}, name: ${JSON.stringify(name)}) { pullRequests(first: 50, orderBy: {field: UPDATED_AT, direction: DESC}) { nodes { ${GQL_PR_FIELDS} } } }`;
2157
2165
  }).join(" ") + "}";
2158
2166
  const out = await gh([
2159
2167
  "api",
@@ -2169,10 +2177,7 @@ async function refreshPrsBatch(fullNames, force = false) {
2169
2177
  names.forEach((fullName, i) => {
2170
2178
  const repo = data[`r${i}`];
2171
2179
  if (!repo) return;
2172
- prs.set(fullName, repo.pullRequests.nodes.map((n) => ({
2173
- ...n,
2174
- headRefOid: n.headRefOid || n.headRef?.oid
2175
- })));
2180
+ prs.set(fullName, repo.pullRequests.nodes.map(mapPr));
2176
2181
  });
2177
2182
  return true;
2178
2183
  } catch (err) {
@@ -2221,13 +2226,13 @@ function statusForAll() {
2221
2226
  }
2222
2227
  /** Push-based freshness: while any events-bus client is connected,
2223
2228
  * recompute the (shared, deduped) snapshot on a slow tick and publish it
2224
- * only when it actually changed — ports appearing, PR/CI flips reach
2229
+ * only when it actually changed — ports appearing, PR open/merge/close flips reach
2225
2230
  * every client in ~15s instead of waiting out a slow poll, and idle
2226
2231
  * systems push nothing at all. */
2227
- var WATCH_MS = 15e3;
2228
- /** Right after a local push PR state flips within seconds — tick fast so
2229
- * the badge lands while it still feels immediate. */
2230
- var WATCH_HOT_MS = 5e3;
2232
+ var WATCH_MS = 1e4;
2233
+ /** Right after a local push, PR+check state flips within seconds — tick
2234
+ * fast so the badge lands while it still feels immediate. */
2235
+ var WATCH_HOT_MS = 4e3;
2231
2236
  var watching = false;
2232
2237
  var lastPushed = "";
2233
2238
  async function watchTick() {
@@ -2300,7 +2305,7 @@ async function computeStatus() {
2300
2305
  }
2301
2306
  async function repoStatus(ws, repo, foreign) {
2302
2307
  const dir = path.join(ws.path, repo.worktree);
2303
- const [repoPrs, localHead] = await Promise.all([workspacePrs(repo.full_name, ws.branch, foreign).then((list) => list.filter((pr) => pr.state === "OPEN")), git(["rev-parse", "HEAD"], dir).catch(() => "")]);
2308
+ const [repoPrs, localHead] = await Promise.all([workspacePrs(repo.full_name, ws.branch, foreign).then((list) => withoutDismissed(ws.id, repo.full_name, list)), git(["rev-parse", "HEAD"], dir).catch(() => "")]);
2304
2309
  return {
2305
2310
  full_name: repo.full_name,
2306
2311
  worktree: repo.worktree,
@@ -4372,30 +4377,30 @@ var _layout_default = _template("a", (input) => {
4372
4377
  _trailers("</body></html>");
4373
4378
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, {});
4374
4379
  }, 1);
4375
- var page_module_default = { boot: "_a" };
4380
+ var page_module_default = { boot: "_w" };
4376
4381
  var ui_module_default = {
4377
- icon: "_b",
4378
- btn: "_c",
4379
- primary: "_d",
4380
- danger: "_e",
4381
- armed: "_f",
4382
- chip: "_g",
4383
- lane: "_h",
4384
- pr: "_i",
4385
- draft: "_j",
4386
- dim: "_k",
4387
- mono: "_l",
4388
- spacer: "_m",
4389
- dot: "_n",
4390
- working: "_o",
4391
- waiting: "_p",
4392
- idle: "_q",
4393
- off: "_r",
4394
- splitBtn: "_s",
4395
- splitPrimary: "_t _s",
4396
- splitGrow: "_u",
4397
- spin: "_v",
4398
- workSpin: "_w"
4382
+ icon: "_a",
4383
+ btn: "_b",
4384
+ primary: "_c",
4385
+ danger: "_d",
4386
+ armed: "_e",
4387
+ chip: "_f",
4388
+ lane: "_g",
4389
+ pr: "_h",
4390
+ draft: "_i",
4391
+ dim: "_j",
4392
+ mono: "_k",
4393
+ spacer: "_l",
4394
+ dot: "_m",
4395
+ working: "_n",
4396
+ waiting: "_o",
4397
+ idle: "_p",
4398
+ off: "_q",
4399
+ splitBtn: "_r",
4400
+ splitPrimary: "_s _r",
4401
+ splitGrow: "_t",
4402
+ spin: "_u",
4403
+ workSpin: "_v"
4399
4404
  };
4400
4405
  var page_boot_module_default = { root: "_x" };
4401
4406
  var bus = new EventTarget();
@@ -4438,17 +4443,17 @@ function isTouch() {
4438
4443
  return typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches;
4439
4444
  }
4440
4445
  var toast_module_default = {
4441
- toast: "_T",
4442
- toastFloat: "_U",
4443
- toastInline: "_V",
4444
- toastError: "_W",
4445
- toastTitle: "_X",
4446
- toastWarn: "_Y",
4447
- toastInfo: "_Z",
4448
- toastBody: "_0",
4449
- toastContent: "_1",
4450
- toastActions: "_2",
4451
- toastDismiss: "_3 _eD"
4446
+ toast: "_y",
4447
+ toastFloat: "_z",
4448
+ toastInline: "_A",
4449
+ toastError: "_B",
4450
+ toastTitle: "_C",
4451
+ toastWarn: "_D",
4452
+ toastInfo: "_E",
4453
+ toastBody: "_F",
4454
+ toastContent: "_G",
4455
+ toastActions: "_H",
4456
+ toastDismiss: "_I _ez"
4452
4457
  };
4453
4458
  //#endregion
4454
4459
  //#region src/tags/toast.marko
@@ -4592,27 +4597,27 @@ function sessionPhase(state) {
4592
4597
  return state?.phase === "working" ? "working" : state?.phase === "waiting" ? "waiting" : state?.alive ? "idle" : "off";
4593
4598
  }
4594
4599
  var palette_module_default = {
4595
- paletteBackdrop: "_y",
4596
- palette: "_z",
4597
- inline: "_A",
4598
- rows: "_B",
4599
- rowWrap: "_C",
4600
- row: "_D",
4601
- rowMore: "_E",
4602
- hi: "_F",
4603
- archived: "_G",
4604
- cmdRow: "_H",
4605
- onboard: "_I",
4606
- rowName: "_J",
4607
- rowNameText: "_K",
4608
- rowStats: "_L",
4609
- open: "_M",
4610
- stat: "_N",
4611
- rowRepos: "_O",
4612
- paletteFoot: "_P",
4613
- hint: "_Q",
4614
- archivedLink: "_R",
4615
- newSessionPop: "_S"
4600
+ paletteBackdrop: "_bh",
4601
+ palette: "_bi",
4602
+ inline: "_bj",
4603
+ rows: "_bk",
4604
+ rowWrap: "_bl",
4605
+ row: "_bm",
4606
+ rowMore: "_bn",
4607
+ hi: "_bo",
4608
+ archived: "_bp",
4609
+ cmdRow: "_bq",
4610
+ onboard: "_br",
4611
+ rowName: "_bs",
4612
+ rowNameText: "_bt",
4613
+ rowStats: "_bu",
4614
+ open: "_bv",
4615
+ stat: "_bw",
4616
+ rowRepos: "_bx",
4617
+ paletteFoot: "_by",
4618
+ hint: "_bz",
4619
+ archivedLink: "_bA",
4620
+ newSessionPop: "_bB"
4616
4621
  };
4617
4622
  //#endregion
4618
4623
  //#region src/tags/icons/icon-base.marko
@@ -4625,7 +4630,7 @@ var icon_base_default = _template("B", (input) => {
4625
4630
  });
4626
4631
  //#endregion
4627
4632
  //#region src/tags/icons/icon-diff.marko
4628
- var icon_diff_default = _template("E", (input) => {
4633
+ var icon_diff_default = _template("F", (input) => {
4629
4634
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
4630
4635
  const $scope0_id = _scope_id();
4631
4636
  _set_serialize_reason({
@@ -4642,7 +4647,7 @@ var icon_diff_default = _template("E", (input) => {
4642
4647
  });
4643
4648
  //#endregion
4644
4649
  //#region src/tags/icons/icon-manage.marko
4645
- var icon_manage_default = _template("L", (input) => {
4650
+ var icon_manage_default = _template("M", (input) => {
4646
4651
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
4647
4652
  const $scope0_id = _scope_id();
4648
4653
  _set_serialize_reason({
@@ -4659,7 +4664,7 @@ var icon_manage_default = _template("L", (input) => {
4659
4664
  });
4660
4665
  //#endregion
4661
4666
  //#region src/tags/icons/icon-plus.marko
4662
- var icon_plus_default = _template("M", (input) => {
4667
+ var icon_plus_default = _template("N", (input) => {
4663
4668
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
4664
4669
  const $scope0_id = _scope_id();
4665
4670
  _set_serialize_reason({
@@ -5012,33 +5017,33 @@ var palette_default = _template("o", (input) => {
5012
5017
  _resume_branch($scope0_id);
5013
5018
  });
5014
5019
  var new_workspace_module_default = {
5015
- content: "_4 _bE",
5016
- actions: "_5",
5017
- barPrimary: "_6",
5018
- iconBtn: "_7 _eD",
5019
- spinning: "_8 _eE",
5020
- field: "_9",
5021
- section: "__",
5022
- reposHead: "_ba",
5023
- curRepos: "_bb",
5024
- curRepo: "_bc",
5025
- curFull: "_bd",
5026
- curBase: "_be",
5027
- curRemove: "_bf",
5028
- emptyNote: "_bg",
5029
- steps: "_bh",
5030
- active: "_bi",
5031
- stepDone: "_bj",
5032
- archived: "_bk",
5033
- archivedCount: "_bl",
5034
- archivedHint: "_bm",
5035
- archivedList: "_bn",
5036
- archivedCard: "_bo",
5037
- archivedMain: "_bp",
5038
- archivedName: "_bq",
5039
- archivedMeta: "_br",
5040
- restoreBtn: "_bs",
5041
- btn: "_bt"
5020
+ content: "_R _bE",
5021
+ actions: "_S",
5022
+ barPrimary: "_T",
5023
+ iconBtn: "_U _ez",
5024
+ spinning: "_V _eA",
5025
+ field: "_W",
5026
+ section: "_X",
5027
+ reposHead: "_Y",
5028
+ curRepos: "_Z",
5029
+ curRepo: "_0",
5030
+ curFull: "_1",
5031
+ curBase: "_2",
5032
+ curRemove: "_3",
5033
+ emptyNote: "_4",
5034
+ steps: "_5",
5035
+ active: "_6",
5036
+ stepDone: "_7",
5037
+ archived: "_8",
5038
+ archivedCount: "_9",
5039
+ archivedHint: "__",
5040
+ archivedList: "_ba",
5041
+ archivedCard: "_bb",
5042
+ archivedMain: "_bc",
5043
+ archivedName: "_bd",
5044
+ archivedMeta: "_be",
5045
+ restoreBtn: "_bf",
5046
+ btn: "_bg"
5042
5047
  };
5043
5048
  var page_shell_module_default = {
5044
5049
  page: "_bC",
@@ -5052,7 +5057,7 @@ var page_shell_module_default = {
5052
5057
  };
5053
5058
  //#endregion
5054
5059
  //#region src/tags/icons/icon-refresh.marko
5055
- var icon_refresh_default = _template("N", (input) => {
5060
+ var icon_refresh_default = _template("O", (input) => {
5056
5061
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
5057
5062
  const $scope0_id = _scope_id();
5058
5063
  _set_serialize_reason({
@@ -5068,18 +5073,18 @@ var icon_refresh_default = _template("N", (input) => {
5068
5073
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
5069
5074
  });
5070
5075
  var repo_picker_module_default = {
5071
- addRepo: "_er",
5072
- repoResults: "_es",
5073
- resultWrap: "_et",
5074
- hi: "_eu",
5075
- resultRow: "_ev",
5076
- resultBranch: "_ew",
5077
- on: "_ex",
5078
- branchPick: "_ey",
5079
- branchList: "_ez",
5080
- resultPlus: "_eA",
5081
- repoName: "_eB",
5082
- emptyNote: "_eC"
5076
+ addRepo: "_b_",
5077
+ repoResults: "_ca",
5078
+ resultWrap: "_cb",
5079
+ hi: "_cc",
5080
+ resultRow: "_cd",
5081
+ resultBranch: "_ce",
5082
+ on: "_cf",
5083
+ branchPick: "_cg",
5084
+ branchList: "_ch",
5085
+ resultPlus: "_ci",
5086
+ repoName: "_cj",
5087
+ emptyNote: "_ck"
5083
5088
  };
5084
5089
  //#endregion
5085
5090
  //#region src/tags/repo-picker.marko
@@ -5553,14 +5558,14 @@ function diffUncommitted() {
5553
5558
  return get("diff-uncommitted") === "1";
5554
5559
  }
5555
5560
  var work_view_module_default = {
5556
- workView: "_bu",
5557
- sideWrap: "_bv",
5558
- navPage: "_bw",
5559
- mainCol: "_bx",
5560
- termArea: "_by",
5561
- asBar: "_bz",
5562
- padInline: "_bA",
5563
- emptySess: "_bB"
5561
+ workView: "_J",
5562
+ sideWrap: "_K",
5563
+ navPage: "_L",
5564
+ mainCol: "_M",
5565
+ termArea: "_N",
5566
+ asBar: "_O",
5567
+ padInline: "_P",
5568
+ emptySess: "_Q"
5564
5569
  };
5565
5570
  //#endregion
5566
5571
  //#region src/client/api.ts
@@ -5625,23 +5630,23 @@ function vapidKey(base64) {
5625
5630
  return Uint8Array.from(raw, (c) => c.charCodeAt(0));
5626
5631
  }
5627
5632
  var side_nav_module_default = {
5628
- iconBtn: "_b_ _eD",
5629
- spinning: "_ca _eE",
5630
- navToggle: "_cb _eD",
5631
- notifyBtn: "_cc _eD",
5632
- sideNav: "_cd",
5633
- pageHead: "_ce",
5634
- pageHeadActions: "_cf",
5635
- sectionLabel: "_cg",
5636
- newSpaceBtn: "_ch",
5637
- page: "_ci",
5638
- sideList: "_cj",
5639
- sideRail: "_ck",
5640
- sideFoot: "_cl",
5641
- footSpacer: "_cm",
5642
- on: "_cn",
5643
- closed: "_co",
5644
- railPop: "_cp"
5633
+ iconBtn: "_cQ _ez",
5634
+ spinning: "_cR _eA",
5635
+ navToggle: "_cS _ez",
5636
+ notifyBtn: "_cT _ez",
5637
+ sideNav: "_cU",
5638
+ pageHead: "_cV",
5639
+ pageHeadActions: "_cW",
5640
+ sectionLabel: "_cX",
5641
+ newSpaceBtn: "_cY",
5642
+ page: "_cZ",
5643
+ sideList: "_c0",
5644
+ sideRail: "_c1",
5645
+ sideFoot: "_c2",
5646
+ footSpacer: "_c3",
5647
+ on: "_c4",
5648
+ closed: "_c5",
5649
+ railPop: "_c6"
5645
5650
  };
5646
5651
  _template("C", (input) => {
5647
5652
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
@@ -5660,7 +5665,7 @@ _template("C", (input) => {
5660
5665
  });
5661
5666
  //#endregion
5662
5667
  //#region src/tags/icons/icon-gauge.marko
5663
- var icon_gauge_default = _template("I", (input) => {
5668
+ var icon_gauge_default = _template("J", (input) => {
5664
5669
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
5665
5670
  const $scope0_id = _scope_id();
5666
5671
  _set_serialize_reason({
@@ -5676,37 +5681,37 @@ var icon_gauge_default = _template("I", (input) => {
5676
5681
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
5677
5682
  });
5678
5683
  var side_nav_item_module_default = {
5679
- railBtn: "_fe _eD",
5680
- current: "_ff",
5681
- railDot: "_fg",
5682
- ws: "_fh",
5683
- railPopWs: "_fi",
5684
- wsRow: "_fj",
5685
- wsBtn: "_fk",
5686
- wsActions: "_fl",
5687
- rowIcon: "_fm",
5688
- on: "_fn",
5689
- newSessionPop: "_fo",
5690
- wsText: "_fp",
5691
- wsName: "_fq",
5692
- wsMeta: "_fr",
5693
- wsOpenHint: "_fs",
5694
- statusDot: "_ft",
5695
- pageCard: "_fu",
5696
- sessTitle: "_fv",
5697
- sessActions: "_fw",
5698
- sessRenameDot: "_fx",
5699
- sessRename: "_fy",
5700
- close: "_fz",
5701
- sess: "_fA",
5702
- armed: "_fB",
5703
- sessions: "_fC",
5704
- sessBtn: "_fD",
5705
- sessIcon: "_fE"
5684
+ railBtn: "_e1 _ez",
5685
+ current: "_e2",
5686
+ railDot: "_e3",
5687
+ ws: "_e4",
5688
+ railPopWs: "_e5",
5689
+ wsRow: "_e6",
5690
+ wsBtn: "_e7",
5691
+ wsActions: "_e8",
5692
+ rowIcon: "_e9",
5693
+ on: "_e_",
5694
+ newSessionPop: "_fa",
5695
+ wsText: "_fb",
5696
+ wsName: "_fc",
5697
+ wsMeta: "_fd",
5698
+ wsOpenHint: "_fe",
5699
+ statusDot: "_ff",
5700
+ pageCard: "_fg",
5701
+ sessTitle: "_fh",
5702
+ sessActions: "_fi",
5703
+ sessRenameDot: "_fj",
5704
+ sessRename: "_fk",
5705
+ close: "_fl",
5706
+ sess: "_fm",
5707
+ armed: "_fn",
5708
+ sessions: "_fo",
5709
+ sessBtn: "_fp",
5710
+ sessIcon: "_fq"
5706
5711
  };
5707
5712
  //#endregion
5708
5713
  //#region src/tags/icons/icon-edit.marko
5709
- var icon_edit_default = _template("G", (input) => {
5714
+ var icon_edit_default = _template("H", (input) => {
5710
5715
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
5711
5716
  const $scope0_id = _scope_id();
5712
5717
  _set_serialize_reason({
@@ -5722,29 +5727,68 @@ var icon_edit_default = _template("G", (input) => {
5722
5727
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
5723
5728
  });
5724
5729
  var side_nav_chips_module_default = {
5725
- sideChips: "_fF",
5726
- prBtn: "_fG",
5727
- portChip: "_fH",
5728
- portOpen: "_fI",
5729
- portKill: "_fJ",
5730
- rejected: "_fK",
5731
- armed: "_fL"
5730
+ sideChips: "_fB",
5731
+ prChip: "_fC",
5732
+ portChip: "_fD",
5733
+ seg: "_fE",
5734
+ portOpen: "_fF",
5735
+ action: "_fG",
5736
+ dismiss: "_fH",
5737
+ armed: "_fI",
5738
+ merged: "_fJ",
5739
+ closed: "_fK"
5732
5740
  };
5733
5741
  //#endregion
5742
+ //#region src/tags/icons/icon-xmark.marko
5743
+ var icon_xmark_default = _template("U", (input) => {
5744
+ const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
5745
+ const $scope0_id = _scope_id();
5746
+ _set_serialize_reason({
5747
+ 0: $sg__input_size__OR__input_class,
5748
+ 1: $sg__input_size__OR__input_class
5749
+ });
5750
+ const $childScope = _peek_scope_id();
5751
+ icon_base_default({
5752
+ d: "M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426",
5753
+ size: input.size,
5754
+ class: input.class
5755
+ });
5756
+ _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
5757
+ });
5758
+ //#endregion
5734
5759
  //#region src/tags/side-nav-chips.marko
5760
+ var prTitle = (repo, pr) => {
5761
+ const parts = [`${repo.worktree} — ${pr.title}`];
5762
+ if (pr.state === "MERGED") parts.push("merged");
5763
+ else if (pr.state === "CLOSED") parts.push("closed");
5764
+ else if (pr.isDraft) parts.push("draft");
5765
+ else parts.push("open");
5766
+ return parts.join(" · ");
5767
+ };
5768
+ var isOpen = (pr) => !pr.state || pr.state === "OPEN";
5735
5769
  var side_nav_chips_default = _template("r", (input) => {
5736
5770
  const $scope0_reason = _scope_reason(), $sg__input_status_repos = _serialize_guard($scope0_reason, 1), $si__input_status_repos = _serialize_if($scope0_reason, 1), $sg__input_status_ports = _serialize_guard($scope0_reason, 2), $sg__input_status_repos__OR__input_status_ports = _serialize_guard($scope0_reason, 0), $si__input_status_repos__OR__input_status_ports = _serialize_if($scope0_reason, 0);
5737
5771
  const $scope0_id = _scope_id();
5738
5772
  const $armedPid__closures = /* @__PURE__ */ new Set();
5739
5773
  let armedPid = null;
5740
5774
  const armBox = { timer: 0 };
5741
- const arm = _resume((pid) => {
5775
+ const armPid = _resume((pid) => {
5742
5776
  clearTimeout(armBox.timer);
5743
5777
  armedPid = pid;
5744
5778
  armBox.timer = setTimeout(() => {
5745
5779
  armedPid = null;
5746
5780
  }, 3500);
5747
5781
  }, "r0", $scope0_id);
5782
+ const dismissPr = _resume((fullName, number) => {
5783
+ fetch(`/api/workspaces/${input.workspaceId}/prs`, {
5784
+ method: "POST",
5785
+ headers: { "content-type": "application/json" },
5786
+ body: JSON.stringify({
5787
+ fullName,
5788
+ number
5789
+ })
5790
+ }).catch(() => {});
5791
+ }, "r1", $scope0_id);
5748
5792
  const repos = input.status?.repos || [];
5749
5793
  const ports = input.status?.ports || [];
5750
5794
  _if(() => {
@@ -5755,22 +5799,47 @@ var side_nav_chips_default = _template("r", (input) => {
5755
5799
  if (repos.length < 2) return "";
5756
5800
  const name = repo.full_name.split("/")[1];
5757
5801
  return repos.some((r) => r.full_name !== repo.full_name && r.full_name.split("/")[1] === name) ? repo.full_name : name;
5758
- }, "r1", $scope1_id);
5802
+ }, "r2", $scope1_id);
5759
5803
  _html(`<div${_attr_class(side_nav_chips_module_default.sideChips)}>`);
5760
5804
  _for_of(repos, (repo) => {
5761
5805
  const $scope2_id = _scope_id();
5762
5806
  _for_of(repo.prs || [], (pr) => {
5763
5807
  const $scope3_id = _scope_id();
5764
- _html(`<button type=button${_attr_class([
5808
+ const open = isOpen(pr);
5809
+ _html(`<span${_attr_class([
5765
5810
  ui_module_default.chip,
5766
- ui_module_default.pr,
5767
- side_nav_chips_module_default.prBtn,
5811
+ side_nav_chips_module_default.prChip,
5768
5812
  {
5769
- [ui_module_default.draft]: pr.isDraft,
5770
- [side_nav_chips_module_default.rejected]: pr.reviewDecision === "CHANGES_REQUESTED"
5813
+ [ui_module_default.pr]: open && !pr.isDraft,
5814
+ [ui_module_default.draft]: open && pr.isDraft,
5815
+ [side_nav_chips_module_default.merged]: pr.state === "MERGED",
5816
+ [side_nav_chips_module_default.closed]: pr.state === "CLOSED"
5771
5817
  }
5772
- ])}${_attr("title", `${repo.worktree}${pr.title}${pr.reviewDecision === "APPROVED" ? " (approved)" : pr.reviewDecision === "CHANGES_REQUESTED" ? " (changes requested)" : ""}`)}>${_escape(repoLabel(repo))}${_el_resume($scope3_id, "b", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "c", $sg__input_status_repos)}${_sep($sg__input_status_repos)}${pr.reviewDecision === "APPROVED" ? " ✓" : pr.reviewDecision === "CHANGES_REQUESTED" ? " ✗" : ""}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</button>${_el_resume($scope3_id, "a")}`);
5773
- _script($scope3_id, "r2");
5818
+ ])}${_attr("title", prTitle(repo, pr))}><a${_attr_class(side_nav_chips_module_default.seg)}${_attr("href", pr.url)} target=_blank rel=noopener>${_escape(repoLabel(repo))}${_el_resume($scope3_id, "c", $sg__input_status_repos)}#${_sep($sg__input_status_repos)}${_escape(pr.number)}${_el_resume($scope3_id, "d", $sg__input_status_repos)}</a>${_el_resume($scope3_id, "b", $sg__input_status_repos)}`);
5819
+ _if(() => {
5820
+ if (open) {
5821
+ const $scope4_id = _scope_id();
5822
+ _html(`<button type=button${_attr_class([side_nav_chips_module_default.seg, side_nav_chips_module_default.action])}${_attr("title", `Review #${pr.number} diff`)}>`);
5823
+ icon_diff_default({ size: 12 });
5824
+ _html(`</button>${_el_resume($scope4_id, "a")}`);
5825
+ _script($scope4_id, "r3");
5826
+ writeScope($scope4_id, { _: _scope_with_id($scope3_id) });
5827
+ return 0;
5828
+ } else {
5829
+ const $scope6_id = _scope_id();
5830
+ _html(`<button type=button${_attr_class([
5831
+ side_nav_chips_module_default.seg,
5832
+ side_nav_chips_module_default.action,
5833
+ side_nav_chips_module_default.dismiss
5834
+ ])}${_attr("title", `Clear #${pr.number} from this list`)}>`);
5835
+ icon_xmark_default({ size: 12 });
5836
+ _html(`</button>${_el_resume($scope6_id, "a")}`);
5837
+ _script($scope6_id, "r4");
5838
+ writeScope($scope6_id, { _: _scope_with_id($scope3_id) });
5839
+ return 1;
5840
+ }
5841
+ }, $scope3_id, "e", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos, 0, 1);
5842
+ _html(`</span>${_el_resume($scope3_id, "a", $sg__input_status_repos)}`);
5774
5843
  _subscribe($si__input_status_repos && $if_content__repoLabel__closures, writeScope($scope3_id, {
5775
5844
  l: pr?.number,
5776
5845
  _: _scope_with_id($scope2_id)
@@ -5779,17 +5848,25 @@ var side_nav_chips_default = _template("r", (input) => {
5779
5848
  writeScope($scope2_id, {
5780
5849
  c: $si__input_status_repos && repo,
5781
5850
  e: repo?.worktree,
5851
+ f: repo?.full_name,
5782
5852
  _: _scope_with_id($scope1_id)
5783
5853
  });
5784
5854
  }, "full_name", $scope1_id, "b", $sg__input_status_repos, $sg__input_status_repos, $sg__input_status_repos__OR__input_status_ports);
5785
5855
  _for_of(ports, (p) => {
5786
- const $scope4_id = _scope_id();
5787
- _html(`<span${_attr_class([ui_module_default.chip, side_nav_chips_module_default.portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class(side_nav_chips_module_default.portOpen)}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope4_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope4_id, "b")}<button type=button${_attr_class([side_nav_chips_module_default.portKill, { [side_nav_chips_module_default.armed]: armedPid === p.pid }])}${armedPid === p.pid ? _attr("title", `Really kill ${p.cmd}?`) : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>×</button>${_el_resume($scope4_id, "d")}</span>${_el_resume($scope4_id, "a", $sg__input_status_ports)}`);
5788
- _script($scope4_id, "r3");
5789
- _subscribe($armedPid__closures, writeScope($scope4_id, {
5790
- g: p?.cmd,
5791
- h: p?.port,
5792
- i: p?.pid,
5856
+ const $scope5_id = _scope_id();
5857
+ _html(`<span${_attr_class([ui_module_default.chip, side_nav_chips_module_default.portChip])}${_attr("title", p.cmd)}><button type=button${_attr_class([side_nav_chips_module_default.seg, side_nav_chips_module_default.portOpen])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${p.port}`)}>:${_sep($sg__input_status_ports)}${_escape(p.port)}${_el_resume($scope5_id, "c", $sg__input_status_ports)}</button>${_el_resume($scope5_id, "b")}<button type=button${_attr_class([
5858
+ side_nav_chips_module_default.seg,
5859
+ side_nav_chips_module_default.action,
5860
+ side_nav_chips_module_default.dismiss,
5861
+ { [side_nav_chips_module_default.armed]: armedPid === p.pid }
5862
+ ])}${armedPid === p.pid ? _attr("title", `Really kill ${p.cmd}?`) : _attr("title", `Kill ${p.cmd} (pid ${p.pid})`)}>`);
5863
+ icon_xmark_default({ size: 12 });
5864
+ _html(`</button>${_el_resume($scope5_id, "d")}</span>${_el_resume($scope5_id, "a", $sg__input_status_ports)}`);
5865
+ _script($scope5_id, "r5");
5866
+ _subscribe($armedPid__closures, writeScope($scope5_id, {
5867
+ h: p?.cmd,
5868
+ i: p?.port,
5869
+ j: p?.pid,
5793
5870
  _: _scope_with_id($scope1_id)
5794
5871
  }));
5795
5872
  }, "port", $scope1_id, "c", $sg__input_status_ports, $sg__input_status_ports, $sg__input_status_repos__OR__input_status_ports, 0, 1);
@@ -5803,21 +5880,23 @@ var side_nav_chips_default = _template("r", (input) => {
5803
5880
  }
5804
5881
  }, $scope0_id, "a", $sg__input_status_repos__OR__input_status_ports, $sg__input_status_repos__OR__input_status_ports, $sg__input_status_repos__OR__input_status_ports, 0, 1);
5805
5882
  writeScope($scope0_id, {
5806
- g: input.onReviewPr,
5807
- h: armedPid,
5808
- j: armBox.timer,
5809
- k: arm,
5810
- l: $si__input_status_repos__OR__input_status_ports && repos,
5811
- m: $si__input_status_repos__OR__input_status_ports && ports,
5812
- n: $si__input_status_repos && ports.length,
5813
- p: $armedPid__closures
5883
+ d: input.workspaceId,
5884
+ h: input.onReviewPr,
5885
+ i: armedPid,
5886
+ k: armBox.timer,
5887
+ l: armPid,
5888
+ m: dismissPr,
5889
+ n: $si__input_status_repos__OR__input_status_ports && repos,
5890
+ o: $si__input_status_repos__OR__input_status_ports && ports,
5891
+ p: $si__input_status_repos && ports.length,
5892
+ r: $armedPid__closures
5814
5893
  });
5815
5894
  _resume_branch($scope0_id);
5816
5895
  });
5817
5896
  //#endregion
5818
5897
  //#region src/tags/side-nav-item.marko
5819
5898
  var side_nav_item_default = _template("s", (input) => {
5820
- const $scope0_reason = _scope_reason(), $sg__input_workspaceId__OR__input_status = _serialize_guard($scope0_reason, 1), $sg__input_page = _serialize_guard($scope0_reason, 22), $si__input_current = _serialize_if($scope0_reason, 18), $sg__input_agents = _serialize_guard($scope0_reason, 24), $si__input_agents = _serialize_if($scope0_reason, 24), $sg__input_onNewSession = _serialize_guard($scope0_reason, 23), $sg__input_onNewSession__OR__input_onReview = _serialize_guard($scope0_reason, 2), $sg__input_onReview = _serialize_guard($scope0_reason, 25), $sg__input_sessions = _serialize_guard($scope0_reason, 20), $si__input_sessions = _serialize_if($scope0_reason, 20), $si__input_workspaces__OR__input_workspaceId = _serialize_if($scope0_reason, 0), $si__input_workspaceId__OR__input_status = _serialize_if($scope0_reason, 1), $si__input_page = _serialize_if($scope0_reason, 22), $sg__input_rail = _serialize_guard($scope0_reason, 17), $si__input_rail = _serialize_if($scope0_reason, 17), $sg__input_workspaces__OR__input_workspaceId = _serialize_guard($scope0_reason, 0), $si__input_workspaces__OR__input_workspaceId__OR__input_rail = _serialize_if($scope0_reason, 4), $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page = _serialize_if($scope0_reason, 13), $si__input_index = _serialize_if($scope0_reason, 19), $si__input_onNewSession = _serialize_if($scope0_reason, 23), $si__input_onReview = _serialize_if($scope0_reason, 25), $si__input_managing = _serialize_if($scope0_reason, 26), $si__input_currentTab = _serialize_if($scope0_reason, 27), $si__input_railPop = _serialize_if($scope0_reason, 21), $si__input_onReviewPr = _serialize_if($scope0_reason, 28);
5899
+ const $scope0_reason = _scope_reason(), $sg__input_workspaceId__OR__input_status = _serialize_guard($scope0_reason, 1), $sg__input_page = _serialize_guard($scope0_reason, 21), $si__input_current = _serialize_if($scope0_reason, 17), $sg__input_agents = _serialize_guard($scope0_reason, 23), $si__input_agents = _serialize_if($scope0_reason, 23), $sg__input_onNewSession = _serialize_guard($scope0_reason, 22), $sg__input_onNewSession__OR__input_onReview = _serialize_guard($scope0_reason, 2), $sg__input_onReview = _serialize_guard($scope0_reason, 24), $sg__input_sessions = _serialize_guard($scope0_reason, 19), $si__input_sessions = _serialize_if($scope0_reason, 19), $si__input_workspaces__OR__input_workspaceId = _serialize_if($scope0_reason, 0), $si__input_workspaceId__OR__input_status = _serialize_if($scope0_reason, 1), $si__input_page = _serialize_if($scope0_reason, 21), $sg__input_rail = _serialize_guard($scope0_reason, 16), $si__input_rail = _serialize_if($scope0_reason, 16), $sg__input_workspaces__OR__input_workspaceId = _serialize_guard($scope0_reason, 0), $si__input_workspaceId = _serialize_if($scope0_reason, 15), $si__input_workspaces__OR__input_workspaceId__OR__input_rail = _serialize_if($scope0_reason, 3), $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page = _serialize_if($scope0_reason, 12), $si__input_index = _serialize_if($scope0_reason, 18), $si__input_onNewSession = _serialize_if($scope0_reason, 22), $si__input_onReview = _serialize_if($scope0_reason, 24), $si__input_managing = _serialize_if($scope0_reason, 25), $si__input_currentTab = _serialize_if($scope0_reason, 26), $si__input_railPop = _serialize_if($scope0_reason, 20), $si__input_onReviewPr = _serialize_if($scope0_reason, 27);
5821
5900
  const $scope0_id = _scope_id();
5822
5901
  const $input_current__closures = /* @__PURE__ */ new Set();
5823
5902
  const $input_index__closures = /* @__PURE__ */ new Set();
@@ -5830,6 +5909,7 @@ var side_nav_item_default = _template("s", (input) => {
5830
5909
  const $armedKill__closures = /* @__PURE__ */ new Set();
5831
5910
  const $input_currentTab__closures = /* @__PURE__ */ new Set();
5832
5911
  const $renamingId__closures = /* @__PURE__ */ new Set();
5912
+ const $input_workspaceId__closures = /* @__PURE__ */ new Set();
5833
5913
  const $input_sessions__closures = /* @__PURE__ */ new Set();
5834
5914
  const $input_railPop__closures = /* @__PURE__ */ new Set();
5835
5915
  const $input_page__closures = /* @__PURE__ */ new Set();
@@ -5860,7 +5940,7 @@ var side_nav_item_default = _template("s", (input) => {
5860
5940
  _if(() => {
5861
5941
  if (input.rail) {
5862
5942
  const $scope2_id = _scope_id();
5863
- _html(`<button${_attr_class([side_nav_item_module_default.railBtn, { [side_nav_item_module_default.current]: input.current }])}${_attr("title", ws.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 19))}<span${_attr_class([
5943
+ _html(`<button${_attr_class([side_nav_item_module_default.railBtn, { [side_nav_item_module_default.current]: input.current }])}${_attr("title", ws.name)}>${_escape((input.index ?? 0) + 1)}${_el_resume($scope2_id, "b", _serialize_guard($scope0_reason, 18))}<span${_attr_class([
5864
5944
  ui_module_default.dot,
5865
5945
  ui_module_default[dot],
5866
5946
  side_nav_item_module_default.railDot
@@ -5885,16 +5965,16 @@ var side_nav_item_default = _template("s", (input) => {
5885
5965
  _if(() => {
5886
5966
  if (input.page) {
5887
5967
  const $scope12_id = _scope_id();
5888
- _html(`<span${_attr_class(side_nav_item_module_default.wsMeta)}>${_escape(meta)}${_el_resume($scope12_id, "b", _serialize_guard($scope0_reason, 6))}</span>`);
5889
- _serialize_if($scope0_reason, 11) && writeScope($scope12_id, { _: _serialize_if($scope0_reason, 6) && _scope_with_id($scope3_id) });
5968
+ _html(`<span${_attr_class(side_nav_item_module_default.wsMeta)}>${_escape(meta)}${_el_resume($scope12_id, "b", _serialize_guard($scope0_reason, 5))}</span>`);
5969
+ _serialize_if($scope0_reason, 10) && writeScope($scope12_id, { _: _serialize_if($scope0_reason, 5) && _scope_with_id($scope3_id) });
5890
5970
  return 0;
5891
5971
  }
5892
- }, $scope3_id, "h", _serialize_guard($scope0_reason, 11), $sg__input_page, $sg__input_page, 0, 1);
5972
+ }, $scope3_id, "h", _serialize_guard($scope0_reason, 10), $sg__input_page, $sg__input_page, 0, 1);
5893
5973
  _html("</span>");
5894
5974
  _if(() => {
5895
5975
  if (input.page) {
5896
5976
  const $scope4_id = _scope_id();
5897
- _html(`<span${_attr_class(side_nav_item_module_default.wsOpenHint)}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 18))}</span>`);
5977
+ _html(`<span${_attr_class(side_nav_item_module_default.wsOpenHint)}>${input.current ? "Open" : ""}${_el_resume($scope4_id, "b", _serialize_guard($scope0_reason, 17))}</span>`);
5898
5978
  $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page && _subscribe($si__input_current && $input_current__closures, writeScope($scope4_id, {
5899
5979
  _: _scope_with_id($scope3_id),
5900
5980
  Cab: $si__input_current && 2
@@ -6026,25 +6106,26 @@ var side_nav_item_default = _template("s", (input) => {
6026
6106
  });
6027
6107
  const $childScope4 = _peek_scope_id();
6028
6108
  side_nav_chips_default({
6109
+ workspaceId: input.workspaceId,
6029
6110
  status: st,
6030
6111
  onReviewPr: input.onReviewPr
6031
6112
  });
6032
6113
  _html(`</div></section>${_el_resume($scope3_id, "a")}`);
6033
6114
  _script($scope3_id, "s10");
6034
- _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_onReviewPr && $input_onReviewPr__closures, _subscribe($si__input_page && $input_page__closures, _subscribe($si__input_railPop && $input_railPop__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_current && $input_current__closures, writeScope($scope3_id, {
6115
+ _subscribe($si__input_workspaces__OR__input_workspaceId && $ws_name__closures, _subscribe($si__input_onReviewPr && $input_onReviewPr__closures, _subscribe($si__input_page && $input_page__closures, _subscribe($si__input_railPop && $input_railPop__closures, _subscribe($si__input_sessions && $input_sessions__closures, _subscribe($si__input_current && $input_current__closures, _subscribe($si__input_workspaceId && $input_workspaceId__closures, writeScope($scope3_id, {
6035
6116
  o: $si__input_workspaceId__OR__input_status && sessions.length,
6036
6117
  q: $si__input_workspaceId__OR__input_status && sessions[0]?.title,
6037
6118
  r: $si__input_workspaceId__OR__input_status && sessions[0]?.agent,
6038
6119
  s: $si__input_sessions && phaseLabel,
6039
6120
  u: $si__input_page && meta,
6040
6121
  _: _scope_with_id($scope1_id),
6041
- m: _serialize_if($scope0_reason, 7) && _existing_scope($childScope4),
6122
+ m: _serialize_if($scope0_reason, 6) && _existing_scope($childScope4),
6042
6123
  Cab: $si__input_current && 1,
6043
6124
  Cap: $si__input_workspaces__OR__input_workspaceId && 1
6044
- })))))));
6125
+ }))))))));
6045
6126
  return 1;
6046
6127
  }
6047
- }, $scope1_id, "a", _serialize_guard($scope0_reason, 5), $sg__input_rail, $sg__input_rail, 0, 1);
6128
+ }, $scope1_id, "a", _serialize_guard($scope0_reason, 4), $sg__input_rail, $sg__input_rail, 0, 1);
6048
6129
  writeScope($scope1_id, {
6049
6130
  b: $si__input_rail && st,
6050
6131
  c: $si__input_rail && dot,
@@ -6052,25 +6133,25 @@ var side_nav_item_default = _template("s", (input) => {
6052
6133
  });
6053
6134
  return 0;
6054
6135
  }
6055
- }, $scope0_id, "a", _serialize_guard($scope0_reason, 8), $sg__input_workspaces__OR__input_workspaceId, $sg__input_workspaces__OR__input_workspaceId);
6136
+ }, $scope0_id, "a", _serialize_guard($scope0_reason, 7), $sg__input_workspaces__OR__input_workspaceId, $sg__input_workspaces__OR__input_workspaceId);
6056
6137
  writeScope($scope0_id, {
6057
6138
  d: input.onRenameSession,
6058
- e: _serialize_if($scope0_reason, 16) && input.workspaces,
6059
- f: _serialize_if($scope0_reason, 3) && input.workspaceId,
6139
+ e: $si__input_workspaceId && input.workspaces,
6140
+ f: _serialize_if($scope0_reason, 7) && input.workspaceId,
6060
6141
  h: $si__input_workspaces__OR__input_workspaceId && input.status,
6061
6142
  i: $si__input_workspaces__OR__input_workspaceId && input.rail,
6062
- j: _serialize_if($scope0_reason, 14) && input.current,
6143
+ j: _serialize_if($scope0_reason, 13) && input.current,
6063
6144
  k: input.onSelect,
6064
6145
  l: $si__input_workspaces__OR__input_workspaceId__OR__input_rail && input.index,
6065
6146
  m: $si__input_workspaces__OR__input_workspaceId__OR__input_rail && input.sessions,
6066
6147
  n: $si__input_workspaces__OR__input_workspaceId__OR__input_rail__OR__input_current__OR__input_page && input.railPop,
6067
- o: _serialize_if($scope0_reason, 12) && input.page,
6148
+ o: _serialize_if($scope0_reason, 11) && input.page,
6068
6149
  p: input.onNewSession,
6069
- q: _serialize_if($scope0_reason, 15) && input.agents,
6150
+ q: _serialize_if($scope0_reason, 14) && input.agents,
6070
6151
  r: input.onReview,
6071
- s: _serialize_if($scope0_reason, 10) && input.managing,
6152
+ s: _serialize_if($scope0_reason, 9) && input.managing,
6072
6153
  t: input.onManage,
6073
- u: _serialize_if($scope0_reason, 9) && input.currentTab,
6154
+ u: _serialize_if($scope0_reason, 8) && input.currentTab,
6074
6155
  v: input.onOpenTab,
6075
6156
  w: input.onCloseSession,
6076
6157
  x: $si__input_workspaces__OR__input_workspaceId__OR__input_rail && input.onReviewPr,
@@ -6092,6 +6173,7 @@ var side_nav_item_default = _template("s", (input) => {
6092
6173
  am: $armedKill__closures,
6093
6174
  ak: $si__input_currentTab && $input_currentTab__closures,
6094
6175
  an: $renamingId__closures,
6176
+ a8: $si__input_workspaceId && $input_workspaceId__closures,
6095
6177
  ad: $si__input_sessions && $input_sessions__closures,
6096
6178
  ae: $si__input_railPop && $input_railPop__closures,
6097
6179
  af: $si__input_page && $input_page__closures,
@@ -6101,7 +6183,7 @@ var side_nav_item_default = _template("s", (input) => {
6101
6183
  });
6102
6184
  //#endregion
6103
6185
  //#region src/tags/icons/icon-folder-plus.marko
6104
- var icon_folder_plus_default = _template("H", (input) => {
6186
+ var icon_folder_plus_default = _template("I", (input) => {
6105
6187
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
6106
6188
  const $scope0_id = _scope_id();
6107
6189
  _set_serialize_reason({
@@ -6118,7 +6200,7 @@ var icon_folder_plus_default = _template("H", (input) => {
6118
6200
  });
6119
6201
  //#endregion
6120
6202
  //#region src/tags/icons/icon-sidebar-collapse.marko
6121
- var icon_sidebar_collapse_default = _template("P", (input) => {
6203
+ var icon_sidebar_collapse_default = _template("Q", (input) => {
6122
6204
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
6123
6205
  const $scope0_id = _scope_id();
6124
6206
  _set_serialize_reason({
@@ -6135,7 +6217,7 @@ var icon_sidebar_collapse_default = _template("P", (input) => {
6135
6217
  });
6136
6218
  //#endregion
6137
6219
  //#region src/tags/icons/icon-sidebar.marko
6138
- var icon_sidebar_default = _template("Q", (input) => {
6220
+ var icon_sidebar_default = _template("R", (input) => {
6139
6221
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
6140
6222
  const $scope0_id = _scope_id();
6141
6223
  _set_serialize_reason({
@@ -6153,7 +6235,7 @@ var icon_sidebar_default = _template("Q", (input) => {
6153
6235
  //#endregion
6154
6236
  //#region src/tags/side-nav.marko
6155
6237
  var side_nav_default = _template("t", (input) => {
6156
- const $scope0_reason = _scope_reason(), $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus = _serialize_guard($scope0_reason, 1), $sg__input_workspace__OR__input_allWorkspaces = _serialize_guard($scope0_reason, 0), $sg__input_agents = _serialize_guard($scope0_reason, 10), $sg__input_workspace = _serialize_guard($scope0_reason, 2), $si__input_workspace = _serialize_if($scope0_reason, 2), $si__input_workspace__OR__input_allWorkspaces = _serialize_if($scope0_reason, 0), $si__input_allStatus = _serialize_if($scope0_reason, 8), $si__input_onSelectWorkspace = _serialize_if($scope0_reason, 9), $si__input_agents = _serialize_if($scope0_reason, 10), $si__input_onNewSession = _serialize_if($scope0_reason, 11), $si__input_onReviewOpened = _serialize_if($scope0_reason, 12), $si__input_sessions = _serialize_if($scope0_reason, 13), $si__input_onRenameSession = _serialize_if($scope0_reason, 14), $si__input_onCloseSession = _serialize_if($scope0_reason, 15);
6238
+ const $scope0_reason = _scope_reason(), $sg__input_workspace__OR__input_allWorkspaces = _serialize_guard($scope0_reason, 0), $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus = _serialize_guard($scope0_reason, 1), $sg__input_agents = _serialize_guard($scope0_reason, 10), $sg__input_workspace = _serialize_guard($scope0_reason, 2), $si__input_workspace = _serialize_if($scope0_reason, 2), $si__input_workspace__OR__input_allWorkspaces = _serialize_if($scope0_reason, 0), $si__input_allStatus = _serialize_if($scope0_reason, 8), $si__input_onSelectWorkspace = _serialize_if($scope0_reason, 9), $si__input_agents = _serialize_if($scope0_reason, 10), $si__input_onNewSession = _serialize_if($scope0_reason, 11), $si__input_onReviewOpened = _serialize_if($scope0_reason, 12), $si__input_sessions = _serialize_if($scope0_reason, 13), $si__input_onRenameSession = _serialize_if($scope0_reason, 14), $si__input_onCloseSession = _serialize_if($scope0_reason, 15);
6157
6239
  const $scope0_id = _scope_id();
6158
6240
  const $notifyOn__closures = /* @__PURE__ */ new Set();
6159
6241
  const $ws_id__closures = /* @__PURE__ */ new Set();
@@ -6253,16 +6335,15 @@ var side_nav_default = _template("t", (input) => {
6253
6335
  13: 1,
6254
6336
  14: 1,
6255
6337
  15: 1,
6256
- 16: 1,
6257
- 18: 1,
6258
- 20: 1,
6338
+ 17: 1,
6339
+ 19: 1,
6340
+ 21: 1,
6259
6341
  22: 1,
6260
- 23: 1,
6261
- 24: $sg__input_agents,
6342
+ 23: $sg__input_agents,
6343
+ 24: 1,
6262
6344
  25: 1,
6263
6345
  26: 1,
6264
- 27: 1,
6265
- 28: $sg__input_workspace
6346
+ 27: $sg__input_workspace
6266
6347
  });
6267
6348
  const $childScope = _peek_scope_id();
6268
6349
  side_nav_item_default({
@@ -6338,22 +6419,21 @@ var side_nav_default = _template("t", (input) => {
6338
6419
  _set_serialize_reason({
6339
6420
  0: $sg__input_workspace__OR__input_allWorkspaces,
6340
6421
  1: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6341
- 3: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6342
- 4: $sg__input_workspace__OR__input_allWorkspaces,
6422
+ 3: $sg__input_workspace__OR__input_allWorkspaces,
6423
+ 4: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6343
6424
  5: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6344
6425
  6: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6345
6426
  7: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6346
- 8: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6427
+ 8: $sg__input_workspace__OR__input_allWorkspaces,
6347
6428
  9: $sg__input_workspace__OR__input_allWorkspaces,
6348
- 10: $sg__input_workspace__OR__input_allWorkspaces,
6349
- 11: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6429
+ 10: $sg__input_workspace__OR__input_allWorkspaces__OR__input_allStatus,
6430
+ 11: 1,
6350
6431
  12: 1,
6351
- 13: 1,
6432
+ 13: $sg__input_workspace__OR__input_allWorkspaces,
6352
6433
  14: $sg__input_workspace__OR__input_allWorkspaces,
6353
6434
  15: $sg__input_workspace__OR__input_allWorkspaces,
6354
- 16: $sg__input_workspace__OR__input_allWorkspaces,
6355
- 18: 1,
6356
- 19: $sg__input_workspace__OR__input_allWorkspaces
6435
+ 17: 1,
6436
+ 18: $sg__input_workspace__OR__input_allWorkspaces
6357
6437
  });
6358
6438
  const $childScope2 = _peek_scope_id();
6359
6439
  side_nav_item_default({
@@ -6398,15 +6478,14 @@ var side_nav_default = _template("t", (input) => {
6398
6478
  13: 1,
6399
6479
  14: 1,
6400
6480
  15: 1,
6401
- 16: 1,
6402
- 18: 1,
6403
- 20: 1,
6404
- 23: 1,
6405
- 24: $sg__input_agents,
6481
+ 17: 1,
6482
+ 19: 1,
6483
+ 22: 1,
6484
+ 23: $sg__input_agents,
6485
+ 24: 1,
6406
6486
  25: 1,
6407
6487
  26: 1,
6408
- 27: 1,
6409
- 28: $sg__input_workspace
6488
+ 27: $sg__input_workspace
6410
6489
  });
6411
6490
  const $childScope3 = _peek_scope_id();
6412
6491
  side_nav_item_default({
@@ -6834,61 +6913,61 @@ function treeRows(files) {
6834
6913
  return rows;
6835
6914
  }
6836
6915
  var diff_view_module_default = {
6837
- iconBtn: "_dz _eD",
6838
- spinning: "_dA _eE",
6839
- diffView: "_dB",
6840
- treeToggle: "_dC _eD",
6841
- diffTools: "_dD",
6842
- on: "_dE",
6843
- diffCol: "_dF",
6844
- chrome: "_dG",
6845
- backBtn: "_dH",
6846
- headText: "_dI",
6847
- pageTitle: "_dJ",
6848
- headWithSend: "_dK",
6849
- toolCtrl: "_dL",
6850
- findBtn: "_dM",
6851
- findSlot: "_dN",
6852
- findSlotClosed: "_dO",
6853
- toolsFind: "_dP",
6854
- fileFindActive: "_dQ",
6855
- pathFindActive: "_dR",
6856
- diffMain: "_dS",
6857
- toastMeta: "_dT",
6858
- diffHead: "_dU",
6859
- filterSlot: "_dV",
6860
- diffStats: "_dW",
6861
- statAdd: "_dX",
6862
- statDel: "_dY",
6863
- statEmpty: "_dZ",
6864
- statSep: "_d0",
6865
- scope: "_d1",
6866
- scopeOpt: "_d2",
6867
- scopeOn: "_d3",
6868
- scopeChip: "_d4",
6869
- repoSection: "_d5",
6870
- repoSep: "_d6",
6871
- repoSepCollapsed: "_d7",
6872
- repoWorktree: "_d8 _l",
6873
- repoState: "_d9",
6874
- repoTitle: "_d_ _k",
6875
- repoMeta: "_ea",
6876
- compare: "_eb",
6877
- compareBase: "_ec",
6878
- compareHead: "_ed",
6879
- compareVs: "_ee",
6880
- compareTopic: "_ef",
6881
- files: "_eg",
6882
- file: "_eh",
6883
- diffWait: "_ei",
6884
- treeChev: "_ej",
6885
- treeChevOpen: "_ek",
6886
- treeChevBusy: "_el",
6887
- status: "_em",
6888
- path: "_en",
6889
- centerPad: "_eo",
6890
- filesBtn: "_ep",
6891
- diffPad: "_eq"
6916
+ iconBtn: "_dH _ez",
6917
+ spinning: "_dI _eA",
6918
+ diffView: "_dJ",
6919
+ treeToggle: "_dK _ez",
6920
+ diffTools: "_dL",
6921
+ on: "_dM",
6922
+ diffCol: "_dN",
6923
+ chrome: "_dO",
6924
+ backBtn: "_dP",
6925
+ headText: "_dQ",
6926
+ pageTitle: "_dR",
6927
+ headWithSend: "_dS",
6928
+ toolCtrl: "_dT",
6929
+ findBtn: "_dU",
6930
+ findSlot: "_dV",
6931
+ findSlotClosed: "_dW",
6932
+ toolsFind: "_dX",
6933
+ fileFindActive: "_dY",
6934
+ pathFindActive: "_dZ",
6935
+ diffMain: "_d0",
6936
+ toastMeta: "_d1",
6937
+ diffHead: "_d2",
6938
+ filterSlot: "_d3",
6939
+ diffStats: "_d4",
6940
+ statAdd: "_d5",
6941
+ statDel: "_d6",
6942
+ statEmpty: "_d7",
6943
+ statSep: "_d8",
6944
+ scope: "_d9",
6945
+ scopeOpt: "_d_",
6946
+ scopeOn: "_ea",
6947
+ scopeChip: "_eb",
6948
+ repoSection: "_ec",
6949
+ repoSep: "_ed",
6950
+ repoSepCollapsed: "_ee",
6951
+ repoWorktree: "_ef _k",
6952
+ repoState: "_eg",
6953
+ repoTitle: "_eh _j",
6954
+ repoMeta: "_ei",
6955
+ compare: "_ej",
6956
+ compareBase: "_ek",
6957
+ compareHead: "_el",
6958
+ compareVs: "_em",
6959
+ compareTopic: "_en",
6960
+ files: "_eo",
6961
+ file: "_ep",
6962
+ diffWait: "_eq",
6963
+ treeChev: "_er",
6964
+ treeChevOpen: "_es",
6965
+ treeChevBusy: "_et",
6966
+ status: "_eu",
6967
+ path: "_ev",
6968
+ centerPad: "_ew",
6969
+ filesBtn: "_ex",
6970
+ diffPad: "_ey"
6892
6971
  };
6893
6972
  //#endregion
6894
6973
  //#region src/tags/icons/icon-back.marko
@@ -6908,8 +6987,8 @@ var icon_back_default = _template("A", (input) => {
6908
6987
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
6909
6988
  });
6910
6989
  var file_filter_module_default = {
6911
- wrap: "_eH",
6912
- fileFilter: "_eI"
6990
+ wrap: "_eN",
6991
+ fileFilter: "_eO"
6913
6992
  };
6914
6993
  //#endregion
6915
6994
  //#region src/tags/file-filter.marko
@@ -6957,7 +7036,7 @@ var file_filter_default = _template("j", (input) => {
6957
7036
  });
6958
7037
  _resume_branch($scope0_id);
6959
7038
  });
6960
- var diff_send_module_default = { headActions: "_eJ" };
7039
+ var diff_send_module_default = { headActions: "_e0" };
6961
7040
  //#endregion
6962
7041
  //#region src/tags/diff-send.marko
6963
7042
  var diff_send_default = _template("g", (input) => {
@@ -8449,17 +8528,17 @@ function clip(line, at, len) {
8449
8528
  return (start > 0 ? "…" : "") + line.slice(start, end) + (end < line.length ? "…" : "");
8450
8529
  }
8451
8530
  var diff_find_module_default = {
8452
- findBar: "_eK",
8453
- closed: "_eL",
8454
- findInput: "_eM",
8455
- termOverlay: "_eN",
8456
- count: "_eO",
8457
- findIconBtn: "_eP _eD",
8458
- findWrap: "_eQ",
8459
- termOverlayWrap: "_eR",
8460
- termKeybarWrap: "_eS",
8461
- termKeybar: "_eT",
8462
- termClosed: "_eU"
8531
+ findBar: "_eC",
8532
+ closed: "_eD",
8533
+ findInput: "_eE",
8534
+ termOverlay: "_eF",
8535
+ count: "_eG",
8536
+ findIconBtn: "_eH _ez",
8537
+ findWrap: "_eI",
8538
+ termOverlayWrap: "_eJ",
8539
+ termKeybarWrap: "_eK",
8540
+ termKeybar: "_eL",
8541
+ termClosed: "_eM"
8463
8542
  };
8464
8543
  //#endregion
8465
8544
  //#region src/tags/diff-find.marko
@@ -8567,7 +8646,7 @@ var diff_find_default = _template("f", (input) => {
8567
8646
  });
8568
8647
  //#endregion
8569
8648
  //#region src/tags/icons/icon-search.marko
8570
- var icon_search_default = _template("O", (input) => {
8649
+ var icon_search_default = _template("P", (input) => {
8571
8650
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
8572
8651
  const $scope0_id = _scope_id();
8573
8652
  _set_serialize_reason({
@@ -8582,7 +8661,7 @@ var icon_search_default = _template("O", (input) => {
8582
8661
  });
8583
8662
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
8584
8663
  });
8585
- var diff_file_module_default = { diffFile: "_eG" };
8664
+ var diff_file_module_default = { diffFile: "_eZ" };
8586
8665
  //#endregion
8587
8666
  //#region src/tags/diff-file.marko
8588
8667
  var diff_file_default = _template("e", (input) => {
@@ -8595,25 +8674,28 @@ var diff_file_default = _template("e", (input) => {
8595
8674
  d: input.file,
8596
8675
  e: input.comments,
8597
8676
  f: input.draft,
8598
- g: input.onDeleteComment,
8599
- h: input.onSaveComment,
8600
- i: input.onCancelDraft,
8601
- j: input.onSelect,
8602
- k: input.onError
8677
+ g: input.sessions,
8678
+ h: input.onDeleteComment,
8679
+ i: input.onSendComment,
8680
+ j: input.onSendDraft,
8681
+ k: input.onSaveComment,
8682
+ l: input.onCancelDraft,
8683
+ m: input.onSelect,
8684
+ n: input.onError
8603
8685
  });
8604
8686
  _resume_branch($scope0_id);
8605
8687
  });
8606
8688
  var diff_tree_module_default = {
8607
- tree: "_e5",
8608
- closed: "_e6",
8609
- treeRepo: "_e7",
8610
- treeRepoName: "_e8",
8611
- treeDir: "_e9",
8612
- treeFile: "_e_",
8613
- treeFileName: "_fa",
8614
- treeNote: "_fb",
8615
- treeChev: "_fc",
8616
- status: "_fd"
8689
+ tree: "_fr",
8690
+ closed: "_fs",
8691
+ treeRepo: "_ft",
8692
+ treeRepoName: "_fu",
8693
+ treeDir: "_fv",
8694
+ treeFile: "_fw",
8695
+ treeFileName: "_fx",
8696
+ treeNote: "_fy",
8697
+ treeChev: "_fz",
8698
+ status: "_fA"
8617
8699
  };
8618
8700
  //#endregion
8619
8701
  //#region src/tags/diff-tree.marko
@@ -8727,16 +8809,16 @@ var diff_tree_default = _template("h", (input) => {
8727
8809
  _resume_branch($scope0_id);
8728
8810
  });
8729
8811
  var diff_file_sheet_module_default = {
8730
- iconBtn: "_eV _eD",
8731
- spinning: "_eW _eE",
8732
- sheetBackdrop: "_eX",
8733
- fileSheet: "_eY",
8734
- sheetHead: "_eZ",
8735
- fileCount: "_e0",
8736
- sheetList: "_e1",
8737
- sheetFile: "_e2",
8738
- sheetPath: "_e3",
8739
- status: "_e4"
8812
+ iconBtn: "_eP _ez",
8813
+ spinning: "_eQ _eA",
8814
+ sheetBackdrop: "_eR",
8815
+ fileSheet: "_eS",
8816
+ sheetHead: "_eT",
8817
+ fileCount: "_eU",
8818
+ sheetList: "_eV",
8819
+ sheetFile: "_eW",
8820
+ sheetPath: "_eX",
8821
+ status: "_eY"
8740
8822
  };
8741
8823
  //#endregion
8742
8824
  //#region src/tags/diff-file-sheet.marko
@@ -8796,7 +8878,7 @@ var getTermDims;
8796
8878
  var revealSearchHit;
8797
8879
  var setSearchPaint;
8798
8880
  var diff_view_default = _template("i", (input) => {
8799
- const $scope0_reason = _scope_reason(), $sg__input_onExit = _serialize_guard($scope0_reason, 2), $si__input_workspaceBranch = _serialize_if($scope0_reason, 4);
8881
+ const $scope0_reason = _scope_reason(), $sg__input_onExit = _serialize_guard($scope0_reason, 2), $si__input_workspaceBranch = _serialize_if($scope0_reason, 4), $si__input_sessions = _serialize_if($scope0_reason, 3);
8800
8882
  const $scope0_id = _scope_id();
8801
8883
  const $error__closures = /* @__PURE__ */ new Set();
8802
8884
  const $uncommitted__closures = /* @__PURE__ */ new Set();
@@ -8806,9 +8888,12 @@ var diff_view_default = _template("i", (input) => {
8806
8888
  const $collapsedRepos__closures = /* @__PURE__ */ new Set();
8807
8889
  const $expandingRepos__closures = /* @__PURE__ */ new Set();
8808
8890
  const $localDifferIds__closures = /* @__PURE__ */ new Set();
8891
+ const $input_sessions__closures = /* @__PURE__ */ new Set();
8809
8892
  const $draft__closures = /* @__PURE__ */ new Set();
8810
8893
  const $saveComment2__closures = /* @__PURE__ */ new Set();
8811
8894
  const $removeComment2__closures = /* @__PURE__ */ new Set();
8895
+ const $sendDraftComment2__closures = /* @__PURE__ */ new Set();
8896
+ const $sendOneComment2__closures = /* @__PURE__ */ new Set();
8812
8897
  const $findState_hit_key__closures = /* @__PURE__ */ new Set();
8813
8898
  const $findState_hit_line__closures = /* @__PURE__ */ new Set();
8814
8899
  const $shownKeySet__closures = /* @__PURE__ */ new Set();
@@ -8928,9 +9013,13 @@ var diff_view_default = _template("i", (input) => {
8928
9013
  if (seq === loadBox.seq) loading = false;
8929
9014
  }
8930
9015
  }, "i3", $scope0_id);
9016
+ const sendGate = { busy: 0 };
8931
9017
  const loadReview = _resume(async () => {
9018
+ if (sendGate.busy) return;
8932
9019
  try {
8933
- comments = (await api$4(`/api/workspaces/${input.workspaceId}/review`)).comments || [];
9020
+ const reviewData = await api$4(`/api/workspaces/${input.workspaceId}/review`);
9021
+ if (sendGate.busy) return;
9022
+ comments = reviewData.comments || [];
8934
9023
  } catch {}
8935
9024
  }, "i4", $scope0_id);
8936
9025
  const reload = _resume(() => {
@@ -8991,6 +9080,7 @@ var diff_view_default = _template("i", (input) => {
8991
9080
  const dismissDrift = _resume(() => {
8992
9081
  dismissedDrift = /* @__PURE__ */ new Set([...dismissedDrift, ...driftRepos.map((r) => r.id)]);
8993
9082
  }, "i7", $scope0_id);
9083
+ const fileWorktree = _resume((repo) => repo.includes("#") ? repo.split("#")[0] : repo, "i8");
8994
9084
  const saveComment = _resume(async (file, text) => {
8995
9085
  const range = draft;
8996
9086
  draft = null;
@@ -9000,7 +9090,7 @@ var diff_view_default = _template("i", (input) => {
9000
9090
  headers: { "content-type": "application/json" },
9001
9091
  body: JSON.stringify({
9002
9092
  action: "comment",
9003
- worktree: file.repo,
9093
+ worktree: fileWorktree(file.repo),
9004
9094
  path: file.path,
9005
9095
  side: range.side,
9006
9096
  line_start: range.start,
@@ -9012,11 +9102,11 @@ var diff_view_default = _template("i", (input) => {
9012
9102
  } catch (err) {
9013
9103
  error = String(err.message || err);
9014
9104
  }
9015
- }, "i8", $scope0_id);
9105
+ }, "i9", $scope0_id);
9016
9106
  const removeComment = _resume(async (id) => {
9017
9107
  comments = comments.filter((c) => c.id !== id);
9018
9108
  await fetch(`/api/review-comments/${id}`, { method: "DELETE" });
9019
- }, "i9", $scope0_id);
9109
+ }, "i10", $scope0_id);
9020
9110
  const clearComments = _resume(async () => {
9021
9111
  comments = [];
9022
9112
  draft = null;
@@ -9025,7 +9115,18 @@ var diff_view_default = _template("i", (input) => {
9025
9115
  headers: { "content-type": "application/json" },
9026
9116
  body: JSON.stringify({ action: "clear" })
9027
9117
  });
9028
- }, "i10", $scope0_id);
9118
+ }, "i11", $scope0_id);
9119
+ const postToSession = _resume(async (list, sessionId) => {
9120
+ if (!list.length) return;
9121
+ await api$4(`/api/sessions/${sessionId}/send`, {
9122
+ method: "POST",
9123
+ headers: { "content-type": "application/json" },
9124
+ body: JSON.stringify({
9125
+ text: `Please address this review feedback, then summarize what you changed.\n\n${commentMarkdown(list, repos)}`,
9126
+ ...getTermDims() || {}
9127
+ })
9128
+ });
9129
+ }, "i12", $scope0_id);
9029
9130
  const copyMarkdown = _resume(async () => {
9030
9131
  if (!await copyText(commentMarkdown(comments, repos))) {
9031
9132
  error = "Copy failed — clipboard needs HTTPS on this browser.";
@@ -9033,36 +9134,81 @@ var diff_view_default = _template("i", (input) => {
9033
9134
  }
9034
9135
  await clearComments();
9035
9136
  return true;
9036
- }, "i11", $scope0_id);
9137
+ }, "i13", $scope0_id);
9037
9138
  const sendTo = _resume(async (sessionId) => {
9139
+ const batch = comments;
9140
+ sendGate.busy++;
9038
9141
  try {
9039
- await api$4(`/api/sessions/${sessionId}/send`, {
9142
+ await postToSession(batch, sessionId);
9143
+ input.onSent?.(sessionId);
9144
+ comments = [];
9145
+ draft = null;
9146
+ await fetch(`/api/workspaces/${input.workspaceId}/review`, {
9040
9147
  method: "POST",
9041
9148
  headers: { "content-type": "application/json" },
9042
- body: JSON.stringify({
9043
- text: `Please address this review feedback, then summarize what you changed.\n\n${commentMarkdown(comments, repos)}`,
9044
- ...getTermDims() || {}
9045
- })
9046
- });
9047
- await clearComments();
9149
+ body: JSON.stringify({ action: "clear" })
9150
+ }).catch(() => {});
9151
+ } catch (err) {
9152
+ error = String(err.message || err);
9153
+ } finally {
9154
+ sendGate.busy--;
9155
+ }
9156
+ }, "i14", $scope0_id);
9157
+ const sendDraftComment = _resume(async (file, text, sessionId) => {
9158
+ const range = draft;
9159
+ if (!range) return;
9160
+ const trimmed = text.trim();
9161
+ if (!trimmed) return;
9162
+ const one = {
9163
+ id: -1,
9164
+ workspace_id: input.workspaceId,
9165
+ worktree: fileWorktree(file.repo),
9166
+ path: file.path,
9167
+ side: range.side === "deletions" ? "deletions" : "additions",
9168
+ line_start: range.start,
9169
+ line_end: range.end,
9170
+ text: trimmed,
9171
+ created_at: ""
9172
+ };
9173
+ sendGate.busy++;
9174
+ try {
9175
+ await postToSession([one], sessionId);
9048
9176
  input.onSent?.(sessionId);
9177
+ draft = null;
9049
9178
  } catch (err) {
9050
9179
  error = String(err.message || err);
9180
+ } finally {
9181
+ sendGate.busy--;
9051
9182
  }
9052
- }, "i12", $scope0_id);
9183
+ }, "i15", $scope0_id);
9184
+ const sendOneComment = _resume(async (id, sessionId) => {
9185
+ const comment = comments.find((c) => c.id === id);
9186
+ if (!comment) return;
9187
+ sendGate.busy++;
9188
+ try {
9189
+ await postToSession([comment], sessionId);
9190
+ input.onSent?.(sessionId);
9191
+ comments = comments.filter((c) => c.id !== id);
9192
+ await fetch(`/api/review-comments/${id}`, { method: "DELETE" }).catch(() => {});
9193
+ } catch (err) {
9194
+ error = String(err.message || err);
9195
+ } finally {
9196
+ sendGate.busy--;
9197
+ }
9198
+ }, "i16", $scope0_id);
9053
9199
  const openFile = _resume((key) => {
9054
9200
  const el = ((scrollEl) => scrollEl())(_el_read_error)?.querySelector(`details[data-key="${CSS.escape(key)}"]`);
9055
9201
  if (el) el.open = true;
9056
9202
  return el;
9057
- }, "i13", $scope0_id);
9203
+ }, "i17", $scope0_id);
9058
9204
  const jumpTo = _resume((key) => {
9059
9205
  openFile(key)?.scrollIntoView({ block: "start" });
9060
- }, "i14", $scope0_id);
9206
+ }, "i18", $scope0_id);
9061
9207
  const openFind = _resume(() => {
9062
9208
  findOpen = true;
9063
9209
  findTick++;
9064
9210
  findFocusRef.focus();
9065
- }, "i15", $scope0_id);
9211
+ }, "i19", $scope0_id);
9066
9212
  const onFindState = _resume((next) => {
9067
9213
  findState = next;
9068
9214
  if (!next.hit) return;
@@ -9081,7 +9227,7 @@ var diff_view_default = _template("i", (input) => {
9081
9227
  setSearchPaint(next.query, hit);
9082
9228
  revealSearchHit();
9083
9229
  }, 0);
9084
- }, "i16", $scope0_id);
9230
+ }, "i20", $scope0_id);
9085
9231
  _html(`<div${_attr_class(diff_view_module_default.diffView)}><div${_attr_class(diff_view_module_default.diffCol)}><div${_attr_class([diff_view_module_default.chrome, { [diff_view_module_default.headWithSend]: comments.length > 0 }])}><div${_attr_class(diff_view_module_default.diffHead)}>`);
9086
9232
  _if(() => {
9087
9233
  if (input.onExit) {
@@ -9089,7 +9235,7 @@ var diff_view_default = _template("i", (input) => {
9089
9235
  _html(`<button${_attr_class([diff_view_module_default.iconBtn, diff_view_module_default.backBtn])} title="Back to terminal">`);
9090
9236
  icon_back_default({ size: 14 });
9091
9237
  _html(`</button>${_el_resume($scope1_id, "a")}`);
9092
- _script($scope1_id, "i30");
9238
+ _script($scope1_id, "i36");
9093
9239
  writeScope($scope1_id, { _: _scope_with_id($scope0_id) });
9094
9240
  return 0;
9095
9241
  }
@@ -9101,7 +9247,7 @@ var diff_view_default = _template("i", (input) => {
9101
9247
  value: fileFilter,
9102
9248
  valueChange: _resume((_new_fileFilter) => {
9103
9249
  fileFilter = _new_fileFilter;
9104
- }, "i17", $scope0_id)
9250
+ }, "i21", $scope0_id)
9105
9251
  });
9106
9252
  _html(`</div><div${_attr_class(diff_view_module_default.headText)}><h1${_attr_class(diff_view_module_default.pageTitle)}>Review</h1><span${_attr_class(diff_view_module_default.diffStats)}>`);
9107
9253
  _if(() => {
@@ -9119,9 +9265,9 @@ var diff_view_default = _template("i", (input) => {
9119
9265
  }, $scope0_id, "k");
9120
9266
  _if(() => {
9121
9267
  if (comments.length) {
9122
- const $scope9_id = _scope_id();
9123
- _html(`<span${_attr_class(diff_view_module_default.statSep)}>·</span>${_escape(comments.length)}${_el_resume($scope9_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope9_id, "c")}`);
9124
- writeScope($scope9_id, {});
9268
+ const $scope13_id = _scope_id();
9269
+ _html(`<span${_attr_class(diff_view_module_default.statSep)}>·</span>${_escape(comments.length)}${_el_resume($scope13_id, "b")} comment<!>${comments.length === 1 ? "" : "s"}${_el_resume($scope13_id, "c")}`);
9270
+ writeScope($scope13_id, {});
9125
9271
  return 0;
9126
9272
  }
9127
9273
  }, $scope0_id, "l");
@@ -9161,11 +9307,11 @@ var diff_view_default = _template("i", (input) => {
9161
9307
  open: findOpen,
9162
9308
  openChange: _resume((_new_findOpen) => {
9163
9309
  findOpen = _new_findOpen;
9164
- }, "i18", $scope0_id),
9310
+ }, "i22", $scope0_id),
9165
9311
  focusRef: findFocusRef,
9166
9312
  stateChange: _resume(function(s) {
9167
9313
  onFindState(s);
9168
- }, "i19", $scope0_id)
9314
+ }, "i23", $scope0_id)
9169
9315
  });
9170
9316
  _html(`</div>${_el_resume($scope0_id, "z")}<button${_attr_class([
9171
9317
  diff_view_module_default.iconBtn,
@@ -9180,8 +9326,8 @@ var diff_view_default = _template("i", (input) => {
9180
9326
  toast_default({
9181
9327
  onDismiss: _resume(function() {
9182
9328
  error = null;
9183
- }, "i20", $scope14_id),
9184
- content: _content_resume("i31", () => {
9329
+ }, "i24", $scope14_id),
9330
+ content: _content_resume("i37", () => {
9185
9331
  _scope_reason();
9186
9332
  const $scope15_id = _scope_id();
9187
9333
  _html(`${_escape(error)}${_el_resume($scope15_id, "a")}`);
@@ -9210,7 +9356,7 @@ var diff_view_default = _template("i", (input) => {
9210
9356
  kind: "warn",
9211
9357
  placement: "inline",
9212
9358
  title: `${repo.worktree}: base not found`,
9213
- content: _content_resume("i32", () => {
9359
+ content: _content_resume("i38", () => {
9214
9360
  _scope_reason();
9215
9361
  const $scope20_id = _scope_id();
9216
9362
  _html(`${_escape(repo.base)}${_el_resume($scope20_id, "a")}<!>${uncommitted ? " — showing uncommitted changes only" : ""}${_el_resume($scope20_id, "b")}.`);
@@ -9233,13 +9379,13 @@ var diff_view_default = _template("i", (input) => {
9233
9379
  kind: "info",
9234
9380
  placement: "inline",
9235
9381
  title: repo.pr ? `${repo.worktree} #${repo.pr.number}` : repo.worktree,
9236
- content: _content_resume("i33", () => {
9382
+ content: _content_resume("i39", () => {
9237
9383
  _scope_reason();
9238
9384
  const $scope22_id = _scope_id();
9239
9385
  _html(`already in <!>${_escape(repo.base)}${_el_resume($scope22_id, "a")}<!>${uncommitted ? " — showing uncommitted changes only" : ""}${_el_resume($scope22_id, "b")}.`);
9240
9386
  _subscribe($for_content4__repo_base__closures, _subscribe($uncommitted__closures, writeScope($scope22_id, {
9241
9387
  _: _scope_with_id($scope21_id),
9242
- Cdk: 1
9388
+ Cdt: 1
9243
9389
  })));
9244
9390
  _resume_branch($scope22_id);
9245
9391
  }, $scope21_id)
@@ -9261,16 +9407,16 @@ var diff_view_default = _template("i", (input) => {
9261
9407
  title: "GitHub is behind",
9262
9408
  onDismiss: _resume(function() {
9263
9409
  dismissDrift();
9264
- }, "i21", $scope16_id),
9265
- action: attrTag({ content: _content_resume("i35", () => {
9410
+ }, "i25", $scope16_id),
9411
+ action: attrTag({ content: _content_resume("i41", () => {
9266
9412
  _scope_reason();
9267
9413
  const $scope17_id = _scope_id();
9268
9414
  _html(`<button${_attr_class(ui_module_default.btn)}${_attr("disabled", loading)}>${loading ? "Reloading…" : "Reload"}${_el_resume($scope17_id, "b")}</button>${_el_resume($scope17_id, "a")}`);
9269
- _script($scope17_id, "i34");
9415
+ _script($scope17_id, "i40");
9270
9416
  _subscribe($loading__closures, writeScope($scope17_id, { _: _scope_with_id($scope16_id) }));
9271
9417
  _resume_branch($scope17_id);
9272
9418
  }, $scope16_id) }),
9273
- content: _content_resume("i36", () => {
9419
+ content: _content_resume("i42", () => {
9274
9420
  _scope_reason();
9275
9421
  const $scope28_id = _scope_id();
9276
9422
  _html(`<span${_attr_class(ui_module_default.dim)}>`);
@@ -9305,13 +9451,13 @@ var diff_view_default = _template("i", (input) => {
9305
9451
  kind: "info",
9306
9452
  placement: "inline",
9307
9453
  title: `${repo.worktree} #${repo.pr.number}`,
9308
- content: _content_resume("i37", () => {
9454
+ content: _content_resume("i43", () => {
9309
9455
  _scope_reason();
9310
9456
  const $scope24_id = _scope_id();
9311
9457
  _html(`this view is <!>${_escape(shortSha(repo.head))}${_el_resume($scope24_id, "a")} (<!>${_escape(repo.pr.headRefName)}${_el_resume($scope24_id, "b")}). Local is <!>${_escape(shortSha(repo.localHead))}${_el_resume($scope24_id, "c")} (<!>${_escape(repo.branch)}${_el_resume($scope24_id, "d")}<!>${uncommitted ? ", plus uncommitted" : ""}${_el_resume($scope24_id, "e")}).`);
9312
9458
  _subscribe($for_content5__repo_branch__closures, _subscribe($for_content5__repo_localHead__closures, _subscribe($for_content5__repo_pr_headRefName__closures, _subscribe($for_content5__repo_head__closures, _subscribe($uncommitted__closures, writeScope($scope24_id, {
9313
9459
  _: _scope_with_id($scope23_id),
9314
- Cdk: 2
9460
+ Cdt: 2
9315
9461
  }))))));
9316
9462
  _resume_branch($scope24_id);
9317
9463
  }, $scope23_id)
@@ -9380,7 +9526,7 @@ var diff_view_default = _template("i", (input) => {
9380
9526
  if (repo.pr) {
9381
9527
  const $scope33_id = _scope_id();
9382
9528
  _html(`<a${_attr_class([ui_module_default.chip, ui_module_default.pr])}${_attr("href", `${repo.pr.url}/files`)} target=_blank rel=noopener${_attr("title", `${repo.pr.title} — ${repo.pr.headRefName} ${repo.head} vs ${repo.base} ${repo.baseSha}`)}>#<!>${_escape(repo.pr.number)}${_el_resume($scope33_id, "b")}</a>${_el_resume($scope33_id, "a")}<span${_attr_class(diff_view_module_default.repoTitle)}>${_escape(repo.pr.title)}${_el_resume($scope33_id, "d")}</span>`);
9383
- _script($scope33_id, "i38");
9529
+ _script($scope33_id, "i44");
9384
9530
  _subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_pr_title__closures, _subscribe($for_content__repo_pr_url__closures, _subscribe($for_content__repo_pr_number__closures, writeScope($scope33_id, {
9385
9531
  Ca4: 2,
9386
9532
  Ca5: 2,
@@ -9411,19 +9557,19 @@ var diff_view_default = _template("i", (input) => {
9411
9557
  const $scope6_id = _scope_id();
9412
9558
  _html(`<span${_attr_class(ui_module_default.chip)}${_attr("title", `checked out ${repo.branch} ${repo.localHead}`)}>local <!>${_escape(shortBranch(repo.branch, input.workspaceBranch || ""))}${_el_resume($scope6_id, "b")}</span>${_el_resume($scope6_id, "a")}`);
9413
9559
  _subscribe($for_content__repo_localHead__closures, _subscribe($for_content__repo_branch__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope6_id, {
9414
- Cde: $si__input_workspaceBranch && 1,
9560
+ Cdn: $si__input_workspaceBranch && 1,
9415
9561
  Caa: 1
9416
9562
  }))));
9417
9563
  return 0;
9418
9564
  }
9419
9565
  }, $scope5_id, "n", 1, 1, 1, 0, 1);
9420
9566
  _html(`<span${_attr_class(diff_view_module_default.repoState)}>${_escape(shownInRepo.length || repoFiles.length)}${_el_resume($scope5_id, "p")} file<!>${(shownInRepo.length || repoFiles.length) === 1 ? "" : "s"}${_el_resume($scope5_id, "q")}</span></button>${_el_resume($scope5_id, "a")}`);
9421
- _script($scope5_id, "i39");
9567
+ _script($scope5_id, "i45");
9422
9568
  _subscribe($for_content__shownInRepo_length__closures, _subscribe($for_content__repoFiles_length__closures, _subscribe($for_content__repo_branch__closures, _subscribe($for_content__repo_pr_baseRefName__closures, _subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_worktree__closures, _subscribe($for_content__repo_pr__closures, _subscribe($for_content__repo_id__closures, _subscribe($localDifferIds__closures, _subscribe($expandingRepos__closures, _subscribe($collapsedRepos__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope5_id, {
9423
9569
  r: repoCollapsed,
9424
9570
  t: repoExpanding,
9425
9571
  a0: compare?.topic,
9426
- Cdp: 1
9572
+ Cdy: 1
9427
9573
  }))))))))))))))));
9428
9574
  return 0;
9429
9575
  } else {
@@ -9461,7 +9607,7 @@ var diff_view_default = _template("i", (input) => {
9461
9607
  const $scope8_id = _scope_id();
9462
9608
  _html(`<span${_attr_class(ui_module_default.chip)}${_attr("title", `checked out ${repo.branch} ${repo.localHead}`)}>local <!>${_escape(shortBranch(repo.branch, input.workspaceBranch || ""))}${_el_resume($scope8_id, "b")}</span>${_el_resume($scope8_id, "a")}`);
9463
9609
  _subscribe($for_content__repo_localHead__closures, _subscribe($for_content__repo_branch__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope8_id, {
9464
- Cde: $si__input_workspaceBranch && 3,
9610
+ Cdn: $si__input_workspaceBranch && 3,
9465
9611
  Caa: 3,
9466
9612
  Cab: 1
9467
9613
  }))));
@@ -9471,8 +9617,8 @@ var diff_view_default = _template("i", (input) => {
9471
9617
  _html("</p>");
9472
9618
  _subscribe($for_content__repo_branch__closures, _subscribe($for_content__repo_pr_baseRefName__closures, _subscribe($for_content__repo_baseSha__closures, _subscribe($for_content__repo_base__closures, _subscribe($for_content__repo_head__closures, _subscribe($for_content__repo_pr_headRefName__closures, _subscribe($for_content__repo_pr__closures, _subscribe($for_content__repo_id__closures, _subscribe($localDifferIds__closures, _subscribe($si__input_workspaceBranch && $input_workspaceBranch__closures, writeScope($scope7_id, {
9473
9619
  p: compare?.topic,
9474
- Cde: $si__input_workspaceBranch && 2,
9475
- Ce1: 1,
9620
+ Cdn: $si__input_workspaceBranch && 2,
9621
+ Cea: 1,
9476
9622
  Cy: 1,
9477
9623
  Cz: 1,
9478
9624
  Ca4: 1,
@@ -9487,18 +9633,18 @@ var diff_view_default = _template("i", (input) => {
9487
9633
  }, $scope4_id, "b", 1, 1, 1, 0, 1);
9488
9634
  _if(() => {
9489
9635
  if (repoList.length === 1 || !collapsedRepos.has(repo.id) || openedRepos.has(repo.id)) {
9490
- const $scope10_id = _scope_id();
9636
+ const $scope9_id = _scope_id();
9491
9637
  const $show = repoList.length === 1 || !collapsedRepos.has(repo.id);
9492
9638
  _show_start($show);
9493
9639
  _html(`<div${_attr_class(diff_view_module_default.files)}>`);
9494
9640
  _for_of(repoFiles, (file) => {
9495
- const $scope11_id = _scope_id();
9641
+ const $scope10_id = _scope_id();
9496
9642
  const $for_content2__file__closures = /* @__PURE__ */ new Set();
9497
9643
  const $for_content2__file_key__closures = /* @__PURE__ */ new Set();
9498
9644
  const $for_content2__fileComments__closures = /* @__PURE__ */ new Set();
9499
9645
  const fileComments = commentsByFile.get(file.key) || [];
9500
9646
  let expanded = true;
9501
- _html(`<details${_attr_details_or_dialog_open($scope11_id, "a", expanded)}${_attr_class([diff_view_module_default.file, findState.hit?.key === file.key && diff_view_module_default.fileFindActive])}${_attr("data-key", file.key)}${_attr("hidden", !shownKeySet.has(file.key))}><summary><span${_attr_class(diff_view_module_default.status)}${_attr("data-status", file.status)}>${_escape(file.status)}${_el_resume($scope11_id, "c")}</span>${_el_resume($scope11_id, "b")}<span${_attr_class([diff_view_module_default.path, findState.hit?.key === file.key && findState.hit.line < 1 && diff_view_module_default.pathFindActive])}${_attr("title", file.path)}><bdi>${_escape(file.path)}${_el_resume($scope11_id, "e")}</bdi></span>${_el_resume($scope11_id, "d")}`);
9647
+ _html(`<details${_attr_details_or_dialog_open($scope10_id, "a", expanded)}${_attr_class([diff_view_module_default.file, findState.hit?.key === file.key && diff_view_module_default.fileFindActive])}${_attr("data-key", file.key)}${_attr("hidden", !shownKeySet.has(file.key))}><summary><span${_attr_class(diff_view_module_default.status)}${_attr("data-status", file.status)}>${_escape(file.status)}${_el_resume($scope10_id, "c")}</span>${_el_resume($scope10_id, "b")}<span${_attr_class([diff_view_module_default.path, findState.hit?.key === file.key && findState.hit.line < 1 && diff_view_module_default.pathFindActive])}${_attr("title", file.path)}><bdi>${_escape(file.path)}${_el_resume($scope10_id, "e")}</bdi></span>${_el_resume($scope10_id, "d")}`);
9502
9648
  _if(() => {
9503
9649
  if (fileComments.length) {
9504
9650
  const $scope38_id = _scope_id();
@@ -9506,7 +9652,7 @@ var diff_view_default = _template("i", (input) => {
9506
9652
  writeScope($scope38_id, {});
9507
9653
  return 0;
9508
9654
  }
9509
- }, $scope11_id, "f", 1, 1, 1, 0, 1);
9655
+ }, $scope10_id, "f", 1, 1, 1, 0, 1);
9510
9656
  _html("</summary>");
9511
9657
  _if(() => {
9512
9658
  if (file.binary) {
@@ -9525,23 +9671,24 @@ var diff_view_default = _template("i", (input) => {
9525
9671
  writeScope($scope41_id, {});
9526
9672
  return 2;
9527
9673
  } else {
9528
- const $scope12_id = _scope_id();
9674
+ const $scope11_id = _scope_id();
9529
9675
  let near = false;
9530
9676
  const forceNear = findState.hit?.key === file.key;
9531
9677
  _if(() => {
9532
9678
  if (!forceNear) {
9533
9679
  const $scope25_id = _scope_id();
9534
9680
  _html(`<div${_attr_class(diff_view_module_default.diffWait)}></div>${_el_resume($scope25_id, "a")}`);
9535
- _script($scope25_id, "i40");
9681
+ _script($scope25_id, "i46");
9536
9682
  writeScope($scope25_id, {});
9537
9683
  return 0;
9538
9684
  } else {
9539
- const $scope13_id = _scope_id();
9685
+ const $scope12_id = _scope_id();
9540
9686
  const $childScope8 = _peek_scope_id();
9541
9687
  diff_file_default({
9542
9688
  file,
9543
9689
  comments: fileComments,
9544
9690
  draft: draft && draft.key === file.key ? draft : null,
9691
+ sessions: input.sessions || [],
9545
9692
  onSelect: _resume(function(range) {
9546
9693
  draft = {
9547
9694
  key: file.key,
@@ -9549,35 +9696,41 @@ var diff_view_default = _template("i", (input) => {
9549
9696
  start: Math.min(range.start, range.end),
9550
9697
  end: Math.max(range.start, range.end)
9551
9698
  };
9552
- }, "i22", $scope13_id),
9699
+ }, "i26", $scope12_id),
9553
9700
  onSaveComment: _resume(function(text) {
9554
9701
  saveComment(file, text);
9555
- }, "i23", $scope13_id),
9702
+ }, "i27", $scope12_id),
9703
+ onSendDraft: _resume(function(text, sessionId) {
9704
+ sendDraftComment(file, text, sessionId);
9705
+ }, "i28", $scope12_id),
9556
9706
  onCancelDraft: _resume(function() {
9557
9707
  draft = null;
9558
- }, "i24", $scope13_id),
9708
+ }, "i29", $scope12_id),
9559
9709
  onDeleteComment: _resume(function(id) {
9560
9710
  removeComment(id);
9561
- }, "i25", $scope13_id),
9711
+ }, "i30", $scope12_id),
9712
+ onSendComment: _resume(function(id, sessionId) {
9713
+ sendOneComment(id, sessionId);
9714
+ }, "i31", $scope12_id),
9562
9715
  onError: _resume(function(message) {
9563
9716
  error = message;
9564
- }, "i26", $scope13_id)
9717
+ }, "i32", $scope12_id)
9565
9718
  });
9566
- _subscribe($for_content2__fileComments__closures, _subscribe($for_content2__file_key__closures, _subscribe($for_content2__file__closures, _subscribe($removeComment2__closures, _subscribe($saveComment2__closures, _subscribe($draft__closures, writeScope($scope13_id, { a: _existing_scope($childScope8) })))))));
9719
+ _subscribe($for_content2__fileComments__closures, _subscribe($for_content2__file_key__closures, _subscribe($for_content2__file__closures, _subscribe($sendOneComment2__closures, _subscribe($sendDraftComment2__closures, _subscribe($removeComment2__closures, _subscribe($saveComment2__closures, _subscribe($draft__closures, _subscribe($si__input_sessions && $input_sessions__closures, writeScope($scope12_id, { a: _existing_scope($childScope8) }))))))))));
9567
9720
  return 1;
9568
9721
  }
9569
- }, $scope12_id, "a", 1, 1, 1, 0, 1);
9570
- _subscribe($findState_hit_key__closures, writeScope($scope12_id, {
9722
+ }, $scope11_id, "a", 1, 1, 1, 0, 1);
9723
+ _subscribe($findState_hit_key__closures, writeScope($scope11_id, {
9571
9724
  b: near,
9572
9725
  c: forceNear,
9573
- Cdm: 1
9726
+ Cdv: 1
9574
9727
  }));
9575
9728
  return 3;
9576
9729
  }
9577
- }, $scope11_id, "g");
9578
- _html(`</details>${_el_resume($scope11_id, "a")}`);
9579
- _script($scope11_id, "i41");
9580
- _subscribe($commentsByFile__closures, _subscribe($shownKeySet__closures, _subscribe($findState_hit_line__closures, _subscribe($findState_hit_key__closures, writeScope($scope11_id, {
9730
+ }, $scope10_id, "g");
9731
+ _html(`</details>${_el_resume($scope10_id, "a")}`);
9732
+ _script($scope10_id, "i47");
9733
+ _subscribe($commentsByFile__closures, _subscribe($shownKeySet__closures, _subscribe($findState_hit_line__closures, _subscribe($findState_hit_key__closures, writeScope($scope10_id, {
9581
9734
  i: file,
9582
9735
  j: file?.key,
9583
9736
  q: file?.binary,
@@ -9591,11 +9744,11 @@ var diff_view_default = _template("i", (input) => {
9591
9744
  z: $for_content2__file_key__closures,
9592
9745
  a0: $for_content2__fileComments__closures
9593
9746
  })))));
9594
- }, "key", $scope10_id, "b", 1, 1, 1, "</div>", 1);
9595
- _show_end($scope10_id, "c", $show, 1, 1, 0, 1);
9596
- _subscribe($for_content__repoFiles__closures, _subscribe($for_content__repo_id__closures, _subscribe($repoList_length__closures, _subscribe($collapsedRepos__closures, writeScope($scope10_id, {
9597
- Cdp: 2,
9598
- Cdu: 1,
9747
+ }, "key", $scope9_id, "b", 1, 1, 1, "</div>", 1);
9748
+ _show_end($scope9_id, "c", $show, 1, 1, 0, 1);
9749
+ _subscribe($for_content__repoFiles__closures, _subscribe($for_content__repo_id__closures, _subscribe($repoList_length__closures, _subscribe($collapsedRepos__closures, writeScope($scope9_id, {
9750
+ Cdy: 2,
9751
+ Ce3: 1,
9599
9752
  Cy: 2
9600
9753
  })))));
9601
9754
  return 0;
@@ -9652,11 +9805,11 @@ var diff_view_default = _template("i", (input) => {
9652
9805
  collapsedRepos,
9653
9806
  collapsedReposChange: _resume((_new_collapsedRepos) => {
9654
9807
  collapsedRepos = _new_collapsedRepos;
9655
- }, "i27", $scope0_id),
9808
+ }, "i33", $scope0_id),
9656
9809
  openedRepos,
9657
9810
  openedReposChange: _resume((_new_openedRepos) => {
9658
9811
  openedRepos = _new_openedRepos;
9659
- }, "i28", $scope0_id),
9812
+ }, "i34", $scope0_id),
9660
9813
  commentKeys,
9661
9814
  onJump: jumpTo
9662
9815
  });
@@ -9666,17 +9819,17 @@ var diff_view_default = _template("i", (input) => {
9666
9819
  open: fileSheet,
9667
9820
  openChange: _resume((_new_fileSheet) => {
9668
9821
  fileSheet = _new_fileSheet;
9669
- }, "i29", $scope0_id),
9822
+ }, "i35", $scope0_id),
9670
9823
  files: shownFiles,
9671
9824
  commentKeys,
9672
9825
  total: allFiles.length,
9673
9826
  onJump: jumpTo
9674
9827
  });
9675
9828
  _html("</div>");
9676
- _script($scope0_id, "i42");
9677
- _script($scope0_id, "i43");
9678
- _script($scope0_id, "i44");
9679
- _script($scope0_id, "i45");
9829
+ _script($scope0_id, "i48");
9830
+ _script($scope0_id, "i49");
9831
+ _script($scope0_id, "i50");
9832
+ _script($scope0_id, "i51");
9680
9833
  writeScope($scope0_id, {
9681
9834
  ag: _serialize_if($scope0_reason, 1) && input.findOpen,
9682
9835
  ah: _serialize_if($scope0_reason, 0) && input.findOpenChange,
@@ -9693,119 +9846,123 @@ var diff_view_default = _template("i", (input) => {
9693
9846
  au: comments,
9694
9847
  av: comments?.length,
9695
9848
  aw: draft,
9696
- ay: error,
9697
- az: loading,
9698
- b1: fileFilter,
9699
- b2: uncommitted,
9700
- b3: treeOpen,
9701
- b7: findTick,
9702
- b9: findFocusRef,
9703
- bc: findState?.query,
9704
- be: findState?.hit,
9705
- bf: findState?.hit?.key,
9706
- bg: findState?.hit?.repo,
9707
- bh: findState?.hit?.line,
9708
- bi: collapsedRepos,
9709
- bj: openedRepos,
9710
- bl: expandingRepos,
9711
- bm: dismissedDrift,
9712
- bo: nearBox.cbs,
9713
- bp: nearBox.io,
9714
- bq: nearBox.root,
9715
- bs: observeNear,
9716
- bt: focusPrSection,
9717
- bv: headBox.sig,
9718
- bw: headBox.timer,
9719
- by: loadBox.seq,
9720
- c0: load,
9721
- c2: loadReview,
9722
- c3: reload,
9723
- c5: reloadSoon,
9724
- c7: repoList,
9725
- c9: repoList.length,
9726
- ca: allFiles,
9727
- cc: allFiles?.length,
9728
- cd: fileFiltered,
9729
- cf: lineStats?.additions,
9730
- cg: lineStats?.deletions,
9731
- ci: findKeys,
9732
- co: shownKeySet,
9733
- cp: filesByRepo,
9734
- cq: shownByRepo,
9735
- cs: commentsByFile,
9736
- cw: localDifferIds,
9737
- cx: driftRepos,
9738
- d0: dismissDrift,
9739
- d1: saveComment,
9740
- d2: removeComment,
9741
- d3: clearComments,
9742
- d6: copyMarkdown,
9743
- d7: sendTo,
9744
- d8: openFile,
9745
- da: openFind,
9746
- dc: onFindState,
9747
- b6: input.findOpenChange || void 0,
9849
+ ax: error,
9850
+ ay: loading,
9851
+ b0: fileFilter,
9852
+ b1: uncommitted,
9853
+ b2: treeOpen,
9854
+ b6: findTick,
9855
+ b8: findFocusRef,
9856
+ bb: findState?.query,
9857
+ bd: findState?.hit,
9858
+ be: findState?.hit?.key,
9859
+ bf: findState?.hit?.repo,
9860
+ bg: findState?.hit?.line,
9861
+ bh: collapsedRepos,
9862
+ bi: openedRepos,
9863
+ bk: expandingRepos,
9864
+ bl: dismissedDrift,
9865
+ bn: nearBox.cbs,
9866
+ bo: nearBox.io,
9867
+ bp: nearBox.root,
9868
+ br: observeNear,
9869
+ bs: focusPrSection,
9870
+ bu: headBox.sig,
9871
+ bv: headBox.timer,
9872
+ bx: loadBox.seq,
9873
+ bz: load,
9874
+ c2: sendGate.busy,
9875
+ c4: loadReview,
9876
+ c5: reload,
9877
+ c7: reloadSoon,
9878
+ c9: repoList,
9879
+ cb: repoList.length,
9880
+ cc: allFiles,
9881
+ ce: allFiles?.length,
9882
+ cf: fileFiltered,
9883
+ ch: lineStats?.additions,
9884
+ ci: lineStats?.deletions,
9885
+ ck: findKeys,
9886
+ cq: shownKeySet,
9887
+ cr: filesByRepo,
9888
+ cs: shownByRepo,
9889
+ cu: commentsByFile,
9890
+ cy: localDifferIds,
9891
+ cz: driftRepos,
9892
+ d2: dismissDrift,
9893
+ d3: fileWorktree,
9894
+ d5: saveComment,
9895
+ d6: removeComment,
9896
+ d7: clearComments,
9897
+ d9: postToSession,
9898
+ dd: copyMarkdown,
9899
+ de: sendTo,
9900
+ df: sendDraftComment,
9901
+ dg: sendOneComment,
9902
+ dh: openFile,
9903
+ dj: openFind,
9904
+ dl: onFindState,
9905
+ b5: input.findOpenChange || void 0,
9748
9906
  g: _existing_scope($childScope),
9749
9907
  a0: _existing_scope($childScope3),
9750
- dh: $error__closures,
9751
- dk: $uncommitted__closures,
9752
- di: $loading__closures,
9753
- e2: $driftRepos__closures,
9754
- de: $si__input_workspaceBranch && $input_workspaceBranch__closures,
9755
- dp: $collapsedRepos__closures,
9756
- dr: $expandingRepos__closures,
9757
- e1: $localDifferIds__closures,
9758
- dg: $draft__closures,
9759
- e4: $saveComment2__closures,
9760
- e5: $removeComment2__closures,
9761
- dm: $findState_hit_key__closures,
9762
- do: $findState_hit_line__closures,
9763
- dx: $shownKeySet__closures,
9764
- e0: $commentsByFile__closures,
9765
- du: $repoList_length__closures,
9766
- dn: $findState_hit_repo__closures,
9767
- dq: $openedRepos__closures,
9908
+ dq: $error__closures,
9909
+ dt: $uncommitted__closures,
9910
+ dr: $loading__closures,
9911
+ eb: $driftRepos__closures,
9912
+ dn: $si__input_workspaceBranch && $input_workspaceBranch__closures,
9913
+ dy: $collapsedRepos__closures,
9914
+ e0: $expandingRepos__closures,
9915
+ ea: $localDifferIds__closures,
9916
+ dm: $si__input_sessions && $input_sessions__closures,
9917
+ dp: $draft__closures,
9918
+ ed: $saveComment2__closures,
9919
+ ee: $removeComment2__closures,
9920
+ eh: $sendDraftComment2__closures,
9921
+ ei: $sendOneComment2__closures,
9922
+ dv: $findState_hit_key__closures,
9923
+ dx: $findState_hit_line__closures,
9924
+ e6: $shownKeySet__closures,
9925
+ e9: $commentsByFile__closures,
9926
+ e3: $repoList_length__closures,
9927
+ dw: $findState_hit_repo__closures,
9928
+ dz: $openedRepos__closures,
9768
9929
  ac: _existing_scope($childScope9),
9769
9930
  ad: _existing_scope($childScope10)
9770
9931
  });
9771
9932
  _resume_branch($scope0_id);
9772
9933
  });
9773
9934
  var manage_workspace_module_default = {
9774
- content: "_cq _bE",
9775
- pageMeta: "_cr _bI",
9776
- wsLabel: "_cs",
9777
- metaSep: "_ct",
9778
- pathMeta: "_cu",
9779
- statusPill: "_cv",
9780
- statusOff: "_cw",
9781
- progress: "_cx",
9782
- section: "_cy",
9783
- sectionHead: "_cz",
9784
- sectionCount: "_cA",
9785
- sectionBtn: "_cB",
9786
- groupLabel: "_cC",
9787
- pickerWrap: "_cD",
9788
- cardList: "_cE",
9789
- card: "_cF",
9790
- pending: "_cG",
9791
- cardMain: "_cH",
9792
- cardTitle: "_cI",
9793
- cardMeta: "_cJ",
9794
- cardSub: "_cK",
9795
- cardTag: "_cL",
9796
- cardAction: "_cM",
9797
- dangerAction: "_cN",
9798
- armed: "_cO",
9799
- okAction: "_cP",
9800
- prState: "_cQ",
9801
- portLink: "_cR",
9802
- emptyNote: "_cS",
9803
- dangerZone: "_cT",
9804
- dangerRow: "_cU",
9805
- dangerBtn: "_cV",
9806
- dangerHint: "_cW",
9807
- iconBtn: "_cX _eD",
9808
- spinning: "_cY _eE"
9935
+ content: "_cl _bE",
9936
+ pageMeta: "_cm _bI",
9937
+ wsLabel: "_cn",
9938
+ metaSep: "_co",
9939
+ pathMeta: "_cp",
9940
+ statusPill: "_cq",
9941
+ statusOff: "_cr",
9942
+ progress: "_cs",
9943
+ section: "_ct",
9944
+ sectionHead: "_cu",
9945
+ sectionCount: "_cv",
9946
+ pickerWrap: "_cw",
9947
+ cardList: "_cx",
9948
+ card: "_cy",
9949
+ pending: "_cz",
9950
+ cardMain: "_cA",
9951
+ cardTitle: "_cB",
9952
+ cardMeta: "_cC",
9953
+ cardSub: "_cD",
9954
+ cardTag: "_cE",
9955
+ cardAction: "_cF",
9956
+ dangerAction: "_cG",
9957
+ armed: "_cH",
9958
+ portLink: "_cI",
9959
+ emptyNote: "_cJ",
9960
+ dangerZone: "_cK",
9961
+ dangerRow: "_cL",
9962
+ dangerBtn: "_cM",
9963
+ dangerHint: "_cN",
9964
+ iconBtn: "_cO _ez",
9965
+ spinning: "_cP _eA"
9809
9966
  };
9810
9967
  //#endregion
9811
9968
  //#region src/tags/manage-workspace.marko
@@ -9816,12 +9973,8 @@ var manage_workspace_default = _template("k", (input) => {
9816
9973
  const $scope0_id = _scope_id();
9817
9974
  const $error__closures = /* @__PURE__ */ new Set();
9818
9975
  const $confirmingRemove__closures = /* @__PURE__ */ new Set();
9819
- const $finishedCount__closures = /* @__PURE__ */ new Set();
9820
- const $prRepos_length__closures = /* @__PURE__ */ new Set();
9821
9976
  let catalogRefreshing = false;
9822
9977
  let procs = lastData.get(`procs:${input.workspace.id}`) || null;
9823
- let prs = lastData.get(`prs:${input.workspace.id}`) || null;
9824
- let prsRefreshing = false;
9825
9978
  let busy = /* @__PURE__ */ new Set();
9826
9979
  let error = null;
9827
9980
  let pendingAction = null;
@@ -9837,56 +9990,13 @@ var manage_workspace_default = _template("k", (input) => {
9837
9990
  lastData.set(`procs:${ws.id}`, data);
9838
9991
  } catch {}
9839
9992
  }, "k0", $scope0_id);
9840
- const loadPrs = _resume(async (signal, refresh) => {
9841
- try {
9842
- const data = await api$3(`/api/workspaces/${ws.id}/prs${refresh ? "?refresh" : ""}`, { signal });
9843
- prs = data;
9844
- lastData.set(`prs:${ws.id}`, data);
9845
- } catch {}
9846
- }, "k1", $scope0_id);
9847
- const refreshPrs = _resume(async () => {
9848
- prsRefreshing = true;
9849
- await loadPrs(void 0, true);
9850
- prsRefreshing = false;
9851
- }, "k2", $scope0_id);
9852
- const clearFinished = _resume(async () => {
9853
- for (const repo of prs || []) for (const pr of repo.prs) {
9854
- if (pr.state === "OPEN") continue;
9855
- await api$3(`/api/workspaces/${ws.id}/prs`, {
9856
- method: "POST",
9857
- headers: { "content-type": "application/json" },
9858
- body: JSON.stringify({
9859
- fullName: repo.full_name,
9860
- number: pr.number
9861
- })
9862
- }).catch(() => {});
9863
- }
9864
- await loadPrs(void 0, false);
9865
- }, "k3", $scope0_id);
9866
- const dismissPr = _resume(async (fullName, number) => {
9867
- error = null;
9868
- try {
9869
- const data = await api$3(`/api/workspaces/${ws.id}/prs`, {
9870
- method: "POST",
9871
- headers: { "content-type": "application/json" },
9872
- body: JSON.stringify({
9873
- fullName,
9874
- number
9875
- })
9876
- });
9877
- prs = data;
9878
- lastData.set(`prs:${ws.id}`, data);
9879
- } catch (err) {
9880
- error = String(err.message || err);
9881
- }
9882
- }, "k4", $scope0_id);
9883
9993
  const inWorkspace = new Set(ws.repos.map((r) => r.full_name));
9884
9994
  const setBusy = _resume((name, on) => {
9885
9995
  const next = new Set(busy);
9886
9996
  if (on) next.add(name);
9887
9997
  else next.delete(name);
9888
9998
  busy = next;
9889
- }, "k5", $scope0_id);
9999
+ }, "k1", $scope0_id);
9890
10000
  const addRepo = _resume(async (name, baseBranch) => {
9891
10001
  if (!name || busy.has(name)) return;
9892
10002
  error = null;
@@ -9904,7 +10014,7 @@ var manage_workspace_default = _template("k", (input) => {
9904
10014
  error = String(err.message || err);
9905
10015
  }
9906
10016
  setBusy(name, false);
9907
- }, "k6", $scope0_id);
10017
+ }, "k2", $scope0_id);
9908
10018
  const removeRepo = _resume(async (row) => {
9909
10019
  if (busy.has(row.full_name)) return;
9910
10020
  error = null;
@@ -9919,7 +10029,7 @@ var manage_workspace_default = _template("k", (input) => {
9919
10029
  error = String(err.message || err);
9920
10030
  }
9921
10031
  setBusy(row.full_name, false);
9922
- }, "k7", $scope0_id);
10032
+ }, "k3", $scope0_id);
9923
10033
  const runAction = _resume(async (action) => {
9924
10034
  error = null;
9925
10035
  pendingAction = action;
@@ -9941,48 +10051,47 @@ var manage_workspace_default = _template("k", (input) => {
9941
10051
  pendingAction = null;
9942
10052
  actionStep = null;
9943
10053
  }
9944
- }, "k8", $scope0_id);
10054
+ }, "k4", $scope0_id);
9945
10055
  const killProc = _resume(async (pid) => {
9946
10056
  await fetch(`/api/procs/${pid}`, { method: "DELETE" });
9947
10057
  setTimeout(() => loadProcs(void 0), 500);
9948
- }, "k9", $scope0_id);
9949
- const finishedCount = (prs || []).reduce((n, r) => n + r.prs.filter((pr) => pr.state !== "OPEN").length, 0);
10058
+ }, "k5", $scope0_id);
9950
10059
  const titleId = _id();
9951
10060
  _html(`<div${_attr_class(page_shell_module_default.page)} role=region${_attr("aria-labelledby", titleId)}><div${_attr_class(page_shell_module_default.body)}><div${_attr_class(manage_workspace_module_default.content)}><header${_attr_class(page_shell_module_default.pageHead)}><div${_attr_class(page_shell_module_default.pageHeadText)}><h1${_attr("id", titleId)}>Manage</h1><p${_attr_class(manage_workspace_module_default.pageMeta)}${_attr("title", ws.display_path || ws.path)}><span${_attr_class(manage_workspace_module_default.wsLabel)}>${_escape(ws.name)}${_el_resume($scope0_id, "i")}</span>`);
9952
10061
  _if(() => {
9953
10062
  if (ws.status !== "active") {
9954
- const $scope15_id = _scope_id();
10063
+ const $scope10_id = _scope_id();
9955
10064
  _html(`<span${_attr_class([manage_workspace_module_default.statusPill, manage_workspace_module_default.statusOff])}>Archived</span>`);
9956
- writeScope($scope15_id, {});
10065
+ writeScope($scope10_id, {});
9957
10066
  return 0;
9958
10067
  }
9959
10068
  }, $scope0_id, "j", 1, 1, 1, 0, 1);
9960
10069
  _html(`<span${_attr_class(manage_workspace_module_default.metaSep)} aria-hidden=true>·</span><span${_attr_class([manage_workspace_module_default.pathMeta, ui_module_default.mono])}>${_escape(ws.display_path || ws.path)}${_el_resume($scope0_id, "m")}</span></p>${_el_resume($scope0_id, "g")}</div></header>`);
9961
10070
  _if(() => {
9962
10071
  if (error) {
9963
- const $scope3_id = _scope_id();
10072
+ const $scope2_id = _scope_id();
9964
10073
  toast_default({
9965
10074
  placement: "inline",
9966
10075
  onDismiss: _resume(function() {
9967
10076
  error = null;
9968
- }, "k10", $scope3_id),
9969
- content: _content_resume("k14", () => {
10077
+ }, "k6", $scope2_id),
10078
+ content: _content_resume("k10", () => {
9970
10079
  _scope_reason();
9971
- const $scope4_id = _scope_id();
9972
- _html(`${_escape(error)}${_el_resume($scope4_id, "a")}`);
9973
- _subscribe($error__closures, writeScope($scope4_id, { _: _scope_with_id($scope3_id) }));
9974
- _resume_branch($scope4_id);
9975
- }, $scope3_id)
10080
+ const $scope3_id = _scope_id();
10081
+ _html(`${_escape(error)}${_el_resume($scope3_id, "a")}`);
10082
+ _subscribe($error__closures, writeScope($scope3_id, { _: _scope_with_id($scope2_id) }));
10083
+ _resume_branch($scope3_id);
10084
+ }, $scope2_id)
9976
10085
  });
9977
- writeScope($scope3_id, {});
10086
+ writeScope($scope2_id, {});
9978
10087
  return 0;
9979
10088
  }
9980
10089
  }, $scope0_id, "n", 1, 1, 1, 0, 1);
9981
10090
  _if(() => {
9982
10091
  if (pendingAction && actionStep) {
9983
- const $scope8_id = _scope_id();
9984
- _html(`<p${_attr_class(manage_workspace_module_default.progress)}><span${_attr_class(ui_module_default.spin)}></span><!>${_escape(actionStep)}${_el_resume($scope8_id, "c")}</p>`);
9985
- writeScope($scope8_id, {});
10092
+ const $scope7_id = _scope_id();
10093
+ _html(`<p${_attr_class(manage_workspace_module_default.progress)}><span${_attr_class(ui_module_default.spin)}></span><!>${_escape(actionStep)}${_el_resume($scope7_id, "c")}</p>`);
10094
+ writeScope($scope7_id, {});
9986
10095
  return 0;
9987
10096
  }
9988
10097
  }, $scope0_id, "o", 1, 1, 1, 0, 1);
@@ -9990,37 +10099,37 @@ var manage_workspace_default = _template("k", (input) => {
9990
10099
  icon_refresh_default({ size: 14 });
9991
10100
  _html(`</button>${_el_resume($scope0_id, "u")}</div><ul${_attr_class(manage_workspace_module_default.cardList)}>`);
9992
10101
  _for_of(ws.repos, (row) => {
9993
- const $scope2_id = _scope_id();
9994
- _html(`<li${_attr_class(manage_workspace_module_default.card)}><div${_attr_class(manage_workspace_module_default.cardMain)}><span${_attr_class([manage_workspace_module_default.cardTitle, ui_module_default.mono])}>${_escape(row.worktree)}${_el_resume($scope2_id, "d")}/</span><span${_attr_class(manage_workspace_module_default.cardMeta)}><span${_attr_class(manage_workspace_module_default.cardSub)}>${_escape(row.full_name)}${_el_resume($scope2_id, "g")}</span>`);
10102
+ const $scope1_id = _scope_id();
10103
+ _html(`<li${_attr_class(manage_workspace_module_default.card)}><div${_attr_class(manage_workspace_module_default.cardMain)}><span${_attr_class([manage_workspace_module_default.cardTitle, ui_module_default.mono])}>${_escape(row.worktree)}${_el_resume($scope1_id, "d")}/</span><span${_attr_class(manage_workspace_module_default.cardMeta)}><span${_attr_class(manage_workspace_module_default.cardSub)}>${_escape(row.full_name)}${_el_resume($scope1_id, "g")}</span>`);
9995
10104
  _if(() => {
9996
10105
  if (row.base_branch !== row.default_branch) {
9997
- const $scope16_id = _scope_id();
9998
- _html(`<span${_attr_class([manage_workspace_module_default.cardTag, ui_module_default.mono])} title="Base branch">⎇ <!>${_escape(row.base_branch)}${_el_resume($scope16_id, "b")}</span>`);
9999
- writeScope($scope16_id, {});
10106
+ const $scope11_id = _scope_id();
10107
+ _html(`<span${_attr_class([manage_workspace_module_default.cardTag, ui_module_default.mono])} title="Base branch">⎇ <!>${_escape(row.base_branch)}${_el_resume($scope11_id, "b")}</span>`);
10108
+ writeScope($scope11_id, {});
10000
10109
  return 0;
10001
10110
  }
10002
- }, $scope2_id, "h", 1, 1, 1, 0, 1);
10111
+ }, $scope1_id, "h", 1, 1, 1, 0, 1);
10003
10112
  _html("</span></div>");
10004
10113
  _if(() => {
10005
10114
  if (busy.has(row.full_name)) {
10006
- const $scope17_id = _scope_id();
10115
+ const $scope12_id = _scope_id();
10007
10116
  _html(`<span${_attr_class(ui_module_default.spin)}></span>`);
10008
- writeScope($scope17_id, {});
10117
+ writeScope($scope12_id, {});
10009
10118
  return 0;
10010
10119
  } else {
10011
- const $scope7_id = _scope_id();
10120
+ const $scope6_id = _scope_id();
10012
10121
  _html(`<button${_attr_class([
10013
10122
  manage_workspace_module_default.cardAction,
10014
10123
  manage_workspace_module_default.dangerAction,
10015
10124
  { [manage_workspace_module_default.armed]: confirmingRemove === row.full_name }
10016
- ])}${confirmingRemove === row.full_name ? _attr("title", `Really remove ${row.worktree}/? Uncommitted changes are lost.`) : _attr("title", `Remove ${row.worktree}/`)}>${confirmingRemove === row.full_name ? "Remove?" : "×"}${_el_resume($scope7_id, "b")}</button>${_el_resume($scope7_id, "a")}`);
10017
- _script($scope7_id, "k15");
10018
- _subscribe($confirmingRemove__closures, writeScope($scope7_id, {}));
10125
+ ])}${confirmingRemove === row.full_name ? _attr("title", `Really remove ${row.worktree}/? Uncommitted changes are lost.`) : _attr("title", `Remove ${row.worktree}/`)}>${confirmingRemove === row.full_name ? "Remove?" : "×"}${_el_resume($scope6_id, "b")}</button>${_el_resume($scope6_id, "a")}`);
10126
+ _script($scope6_id, "k11");
10127
+ _subscribe($confirmingRemove__closures, writeScope($scope6_id, {}));
10019
10128
  return 1;
10020
10129
  }
10021
- }, $scope2_id, "i", 1, 1, 1, 0, 1);
10130
+ }, $scope1_id, "i", 1, 1, 1, 0, 1);
10022
10131
  _html("</li>");
10023
- writeScope($scope2_id, {
10132
+ writeScope($scope1_id, {
10024
10133
  k: row,
10025
10134
  l: row?.worktree,
10026
10135
  m: row?.full_name,
@@ -10028,16 +10137,16 @@ var manage_workspace_default = _template("k", (input) => {
10028
10137
  });
10029
10138
  }, "full_name", $scope0_id, "x", 1, 1, 1, 0, 1);
10030
10139
  _for_of([...busy].filter((n) => !inWorkspace.has(n)), (name) => {
10031
- const $scope18_id = _scope_id();
10032
- _html(`<li${_attr_class([manage_workspace_module_default.card, manage_workspace_module_default.pending])}><span${_attr_class(ui_module_default.spin)}></span><div${_attr_class(manage_workspace_module_default.cardMain)}><span${_attr_class(manage_workspace_module_default.cardSub)}>Adding <!>${_escape(name)}${_el_resume($scope18_id, "e")}…</span></div></li>`);
10033
- writeScope($scope18_id, {});
10140
+ const $scope13_id = _scope_id();
10141
+ _html(`<li${_attr_class([manage_workspace_module_default.card, manage_workspace_module_default.pending])}><span${_attr_class(ui_module_default.spin)}></span><div${_attr_class(manage_workspace_module_default.cardMain)}><span${_attr_class(manage_workspace_module_default.cardSub)}>Adding <!>${_escape(name)}${_el_resume($scope13_id, "e")}…</span></div></li>`);
10142
+ writeScope($scope13_id, {});
10034
10143
  }, (n) => n, $scope0_id, "y", 1, 1, 1, 0, 1);
10035
10144
  _html("</ul>");
10036
10145
  _if(() => {
10037
10146
  if (!ws.repos.length && !busy.size) {
10038
- const $scope19_id = _scope_id();
10147
+ const $scope14_id = _scope_id();
10039
10148
  _html(`<p${_attr_class(manage_workspace_module_default.emptyNote)}>No repos yet — search below to add one.</p>`);
10040
- writeScope($scope19_id, {});
10149
+ writeScope($scope14_id, {});
10041
10150
  return 0;
10042
10151
  }
10043
10152
  }, $scope0_id, "z", 1, 1, 1, 0, 1);
@@ -10047,190 +10156,109 @@ var manage_workspace_default = _template("k", (input) => {
10047
10156
  exclude: inWorkspace,
10048
10157
  onPick: _resume(function(name, baseBranch) {
10049
10158
  addRepo(name, baseBranch);
10050
- }, "k11", $scope0_id),
10159
+ }, "k7", $scope0_id),
10051
10160
  onError: _resume(function(message) {
10052
10161
  error = message;
10053
- }, "k12", $scope0_id),
10162
+ }, "k8", $scope0_id),
10054
10163
  refreshingChange: _resume(function(busy) {
10055
10164
  catalogRefreshing = busy;
10056
- }, "k13", $scope0_id)
10165
+ }, "k9", $scope0_id)
10057
10166
  });
10058
- _var($scope0_id, "a2", $childScope, "k16");
10059
- const prRepos = (prs || []).filter((r) => r.prs.length);
10060
- _html("</div></section>");
10061
- _if(() => {
10062
- if (prRepos.length) {
10063
- const $scope1_id = _scope_id();
10064
- _html(`<section${_attr_class(manage_workspace_module_default.section)}><div${_attr_class(manage_workspace_module_default.sectionHead)}><h2>Pull requests</h2><div${_attr_class(ui_module_default.spacer)}></div>`);
10065
- _if(() => {
10066
- if (finishedCount) {
10067
- const $scope9_id = _scope_id();
10068
- _html(`<button${_attr_class([ui_module_default.btn, manage_workspace_module_default.sectionBtn])} title="Confirm every merged/closed PR is done — remove them from this list">Clear <!>${_escape(finishedCount)}${_el_resume($scope9_id, "b")}</button>${_el_resume($scope9_id, "a")}`);
10069
- _script($scope9_id, "k17");
10070
- _subscribe($finishedCount__closures, writeScope($scope9_id, {}));
10071
- return 0;
10072
- }
10073
- }, $scope1_id, "d", 1, 1, 1, 0, 1);
10074
- _html(`<button${_attr_class([manage_workspace_module_default.iconBtn, { [manage_workspace_module_default.spinning]: prsRefreshing }])} title="Refresh PRs" aria-label="Refresh PRs"${_attr("disabled", prsRefreshing)}>`);
10075
- icon_refresh_default({ size: 14 });
10076
- _html(`</button>${_el_resume($scope1_id, "e")}</div>`);
10077
- _for_of(prRepos, (repo) => {
10078
- const $scope10_id = _scope_id();
10079
- _if(() => {
10080
- if (prRepos.length > 1) {
10081
- const $scope20_id = _scope_id();
10082
- _html(`<p${_attr_class([manage_workspace_module_default.groupLabel, ui_module_default.mono])}>${_escape(repo.worktree)}${_el_resume($scope20_id, "b")}</p>`);
10083
- writeScope($scope20_id, {});
10084
- return 0;
10085
- }
10086
- }, $scope10_id, "a", 1, 1, 1, 0, 1);
10087
- _html(`<ul${_attr_class(manage_workspace_module_default.cardList)}>`);
10088
- _for_of(repo.prs, (pr) => {
10089
- const $scope11_id = _scope_id();
10090
- const prState = pr.state === "OPEN" && pr.isDraft ? "open" : (pr.state || "open").toLowerCase();
10091
- const prLabel = pr.state === "OPEN" && pr.isDraft ? "draft" : (pr.state || "open").toLowerCase();
10092
- _html(`<li${_attr_class(manage_workspace_module_default.card)}><a${_attr_class(manage_workspace_module_default.cardMain)}${_attr("href", pr.url)} target=_blank rel=noopener><span${_attr_class(manage_workspace_module_default.cardTitle)}>${_escape(pr.title)}${_el_resume($scope11_id, "d")}</span><span${_attr_class(manage_workspace_module_default.cardMeta)}><span${_attr_class(manage_workspace_module_default.prState)}${_attr("data-state", prState)}>${_escape(prLabel)}${_el_resume($scope11_id, "g")}</span>${_el_resume($scope11_id, "f")}`);
10093
- _if(() => {
10094
- if (pr.state === "OPEN" && pr.reviewDecision === "APPROVED") {
10095
- const $scope21_id = _scope_id();
10096
- _html(`<span${_attr_class(manage_workspace_module_default.prState)} data-state=open title=Approved>✓</span>`);
10097
- writeScope($scope21_id, {});
10098
- return 0;
10099
- } else if (pr.state === "OPEN" && pr.reviewDecision === "CHANGES_REQUESTED") {
10100
- const $scope22_id = _scope_id();
10101
- _html(`<span${_attr_class(manage_workspace_module_default.prState)} data-state=closed title="Changes requested">✗</span>`);
10102
- writeScope($scope22_id, {});
10103
- return 1;
10104
- }
10105
- }, $scope11_id, "h", 1, 1, 1, 0, 1);
10106
- _html(`<span${_attr_class([manage_workspace_module_default.cardTag, ui_module_default.mono])}>#<!>${_escape(pr.number)}${_el_resume($scope11_id, "j")}</span></span></a>${_el_resume($scope11_id, "b")}`);
10107
- _if(() => {
10108
- if (pr.state !== "OPEN") {
10109
- const $scope12_id = _scope_id();
10110
- _html(`<button${_attr_class([manage_workspace_module_default.cardAction, manage_workspace_module_default.okAction])}${_attr("title", `Confirm #${pr.number} is done — remove from this list`)}>✓</button>${_el_resume($scope12_id, "a")}`);
10111
- _script($scope12_id, "k18");
10112
- writeScope($scope12_id, {});
10113
- return 0;
10114
- }
10115
- }, $scope11_id, "k", 1, 1, 1, 0, 1);
10116
- _html("</li>");
10117
- writeScope($scope11_id, { u: pr?.number });
10118
- }, "number", $scope10_id, "b", 1, 1, 1, "</ul>", 1);
10119
- _subscribe($prRepos_length__closures, writeScope($scope10_id, {
10120
- e: repo?.worktree,
10121
- g: repo?.full_name
10122
- }));
10123
- }, "full_name", $scope1_id, "g");
10124
- _html("</section>");
10125
- _script($scope1_id, "k19");
10126
- writeScope($scope1_id, {});
10127
- return 0;
10128
- }
10129
- }, $scope0_id, "a3", 1, 1, 1, 0, 1);
10167
+ _var($scope0_id, "a2", $childScope, "k12");
10130
10168
  const running = procs || [];
10169
+ _html("</div></section>");
10131
10170
  _if(() => {
10132
10171
  if (running.length) {
10133
- const $scope13_id = _scope_id();
10134
- _html(`<section${_attr_class(manage_workspace_module_default.section)}><div${_attr_class(manage_workspace_module_default.sectionHead)}><h2>Running</h2><span${_attr_class(manage_workspace_module_default.sectionCount)}>${_escape(running.length)}${_el_resume($scope13_id, "d")}</span></div><ul${_attr_class(manage_workspace_module_default.cardList)}>`);
10172
+ const $scope8_id = _scope_id();
10173
+ _html(`<section${_attr_class(manage_workspace_module_default.section)}><div${_attr_class(manage_workspace_module_default.sectionHead)}><h2>Running</h2><span${_attr_class(manage_workspace_module_default.sectionCount)}>${_escape(running.length)}${_el_resume($scope8_id, "d")}</span></div><ul${_attr_class(manage_workspace_module_default.cardList)}>`);
10135
10174
  _for_of(running, (p) => {
10136
- const $scope14_id = _scope_id();
10137
- _html(`<li${_attr_class(manage_workspace_module_default.card)}><div${_attr_class(manage_workspace_module_default.cardMain)}${_attr("title", p.args)}><span${_attr_class([manage_workspace_module_default.cardTitle, ui_module_default.mono])}>${_escape(p.cmd)}${_el_resume($scope14_id, "d")}</span>`);
10175
+ const $scope9_id = _scope_id();
10176
+ _html(`<li${_attr_class(manage_workspace_module_default.card)}><div${_attr_class(manage_workspace_module_default.cardMain)}${_attr("title", p.args)}><span${_attr_class([manage_workspace_module_default.cardTitle, ui_module_default.mono])}>${_escape(p.cmd)}${_el_resume($scope9_id, "d")}</span>`);
10138
10177
  _if(() => {
10139
10178
  if (p.ports.length) {
10140
- const $scope23_id = _scope_id();
10179
+ const $scope15_id = _scope_id();
10141
10180
  _html(`<span${_attr_class(manage_workspace_module_default.cardMeta)}>`);
10142
10181
  _for_of(p.ports, (port) => {
10143
- const $scope24_id = _scope_id();
10144
- _html(`<button${_attr_class([ui_module_default.chip, manage_workspace_module_default.portLink])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope24_id, "b")}</button>${_el_resume($scope24_id, "a")}`);
10145
- _script($scope24_id, "k20");
10146
- writeScope($scope24_id, { d: port });
10147
- }, (x) => String(x), $scope23_id, "a", 1, 1, 1, "</span>", 1);
10148
- writeScope($scope23_id, {});
10182
+ const $scope16_id = _scope_id();
10183
+ _html(`<button${_attr_class([ui_module_default.chip, manage_workspace_module_default.portLink])}${_attr("title", `Open http://${typeof location === "undefined" ? "localhost" : location.hostname}:${port}`)}>:<!>${_escape(port)}${_el_resume($scope16_id, "b")}</button>${_el_resume($scope16_id, "a")}`);
10184
+ _script($scope16_id, "k13");
10185
+ writeScope($scope16_id, { d: port });
10186
+ }, (x) => String(x), $scope15_id, "a", 1, 1, 1, "</span>", 1);
10187
+ writeScope($scope15_id, {});
10149
10188
  return 0;
10150
10189
  }
10151
- }, $scope14_id, "e", 1, 1, 1, 0, 1);
10152
- _html(`</div>${_el_resume($scope14_id, "b")}<button${_attr_class([manage_workspace_module_default.cardAction, manage_workspace_module_default.dangerAction])} type=button${_attr("title", `Kill ${p.pid}`)}${_attr("aria-label", `Kill process ${p.pid}`)}>×</button>${_el_resume($scope14_id, "f")}</li>`);
10153
- _script($scope14_id, "k21");
10154
- writeScope($scope14_id, {
10190
+ }, $scope9_id, "e", 1, 1, 1, 0, 1);
10191
+ _html(`</div>${_el_resume($scope9_id, "b")}<button${_attr_class([manage_workspace_module_default.cardAction, manage_workspace_module_default.dangerAction])} type=button${_attr("title", `Kill ${p.pid}`)}${_attr("aria-label", `Kill process ${p.pid}`)}>×</button>${_el_resume($scope9_id, "f")}</li>`);
10192
+ _script($scope9_id, "k14");
10193
+ writeScope($scope9_id, {
10155
10194
  k: p?.ports,
10156
10195
  m: p?.pid
10157
10196
  });
10158
- }, "pid", $scope13_id, "e", 1, 1, 1, "</ul>", 1);
10197
+ }, "pid", $scope8_id, "e", 1, 1, 1, "</ul>", 1);
10159
10198
  _html("</section>");
10160
- writeScope($scope13_id, {});
10199
+ writeScope($scope8_id, {});
10161
10200
  return 0;
10162
10201
  }
10163
- }, $scope0_id, "a4", 1, 1, 1, 0, 1);
10202
+ }, $scope0_id, "a3", 1, 1, 1, 0, 1);
10164
10203
  _html(`<section${_attr_class([manage_workspace_module_default.section, manage_workspace_module_default.dangerZone])}><div${_attr_class(manage_workspace_module_default.sectionHead)}><h2>Workspace</h2></div><div${_attr_class(manage_workspace_module_default.dangerRow)}>`);
10165
10204
  _if(() => {
10166
10205
  if (ws.status === "active") {
10167
- const $scope5_id = _scope_id();
10168
- _html(`<button type=button${_attr_class([ui_module_default.btn, manage_workspace_module_default.dangerBtn])}${_attr("disabled", !!pendingAction)}>${pendingAction === "archive" ? "Archiving…" : "Archive"}${_el_resume($scope5_id, "b")}</button>${_el_resume($scope5_id, "a")}`);
10169
- _script($scope5_id, "k22");
10170
- writeScope($scope5_id, {});
10206
+ const $scope4_id = _scope_id();
10207
+ _html(`<button type=button${_attr_class([ui_module_default.btn, manage_workspace_module_default.dangerBtn])}${_attr("disabled", !!pendingAction)}>${pendingAction === "archive" ? "Archiving…" : "Archive"}${_el_resume($scope4_id, "b")}</button>${_el_resume($scope4_id, "a")}`);
10208
+ _script($scope4_id, "k15");
10209
+ writeScope($scope4_id, {});
10171
10210
  return 0;
10172
10211
  } else {
10173
- const $scope6_id = _scope_id();
10174
- _html(`<button type=button${_attr_class([ui_module_default.btn, manage_workspace_module_default.dangerBtn])}${_attr("disabled", !!pendingAction)}>Restore</button>${_el_resume($scope6_id, "a")}`);
10175
- _script($scope6_id, "k23");
10176
- writeScope($scope6_id, {});
10212
+ const $scope5_id = _scope_id();
10213
+ _html(`<button type=button${_attr_class([ui_module_default.btn, manage_workspace_module_default.dangerBtn])}${_attr("disabled", !!pendingAction)}>Restore</button>${_el_resume($scope5_id, "a")}`);
10214
+ _script($scope5_id, "k16");
10215
+ writeScope($scope5_id, {});
10177
10216
  return 1;
10178
10217
  }
10179
- }, $scope0_id, "a8", 1, 1, 1, 0, 1);
10218
+ }, $scope0_id, "a7", 1, 1, 1, 0, 1);
10180
10219
  _html(`<button type=button${_attr_class([
10181
10220
  ui_module_default.btn,
10182
10221
  ui_module_default.danger,
10183
10222
  manage_workspace_module_default.dangerBtn,
10184
10223
  { [ui_module_default.armed]: confirmingDelete }
10185
- ])}${_attr("disabled", !!pendingAction)}>${pendingAction === "delete" ? "Deleting…" : "Delete"}${_el_resume($scope0_id, "aa")}</button>${_el_resume($scope0_id, "a9")}</div><p${_attr_class(manage_workspace_module_default.dangerHint)}>Archive hides the space from the list. Delete removes it and its worktrees.</p></section></div></div></div>`);
10186
- _script($scope0_id, "k24");
10187
- _script($scope0_id, "k25");
10224
+ ])}${_attr("disabled", !!pendingAction)}>${pendingAction === "delete" ? "Deleting…" : "Delete"}${_el_resume($scope0_id, "a9")}</button>${_el_resume($scope0_id, "a8")}</div><p${_attr_class(manage_workspace_module_default.dangerHint)}>Archive hides the space from the list. Delete removes it and its worktrees.</p></section></div></div></div>`);
10225
+ _script($scope0_id, "k17");
10226
+ _script($scope0_id, "k18");
10188
10227
  writeScope($scope0_id, {
10189
- ae: _serialize_if($scope0_reason, 0) && input.workspace,
10190
- ag: input.workspaceChange,
10191
- ai: input.onExit,
10192
- al: prs,
10193
- am: prsRefreshing,
10194
- an: busy,
10195
- ao: busy?.size,
10196
- ap: error,
10197
- aq: pendingAction,
10198
- ar: confirmingDelete,
10199
- at: confirmingRemove,
10200
- au: actionStep,
10201
- aw: workspace,
10202
- ay: workspace?.id,
10203
- b4: workspace?.repos?.length,
10204
- b5: loadProcs,
10205
- b6: loadPrs,
10206
- b7: refreshPrs,
10207
- b8: clearFinished,
10208
- b9: dismissPr,
10209
- ba: inWorkspace,
10210
- bb: setBusy,
10211
- bc: addRepo,
10212
- bd: removeRepo,
10213
- be: runAction,
10214
- bf: killProc,
10215
- bg: finishedCount,
10216
- bi: refreshCatalog,
10217
- bj: prRepos,
10218
- bk: prRepos?.length,
10219
- bl: running,
10220
- bm: running.length,
10221
- ax: input.workspaceChange || void 0,
10222
- bw: $error__closures,
10223
- by: $confirmingRemove__closures,
10224
- a1: _existing_scope($childScope),
10225
- c0: $finishedCount__closures,
10226
- c2: $prRepos_length__closures
10228
+ ad: _serialize_if($scope0_reason, 0) && input.workspace,
10229
+ af: input.workspaceChange,
10230
+ ah: input.onExit,
10231
+ ak: busy,
10232
+ al: busy?.size,
10233
+ am: error,
10234
+ an: pendingAction,
10235
+ ao: confirmingDelete,
10236
+ aq: confirmingRemove,
10237
+ ar: actionStep,
10238
+ at: workspace,
10239
+ av: workspace?.id,
10240
+ b1: workspace?.repos?.length,
10241
+ b2: loadProcs,
10242
+ b3: inWorkspace,
10243
+ b4: setBusy,
10244
+ b5: addRepo,
10245
+ b6: removeRepo,
10246
+ b7: runAction,
10247
+ b8: killProc,
10248
+ ba: refreshCatalog,
10249
+ bb: running,
10250
+ bc: running.length,
10251
+ au: input.workspaceChange || void 0,
10252
+ bk: $error__closures,
10253
+ bm: $confirmingRemove__closures,
10254
+ a1: _existing_scope($childScope)
10227
10255
  });
10228
10256
  _resume_branch($scope0_id);
10229
10257
  });
10230
10258
  var usage_stats_module_default = {
10231
10259
  content: "_bK _bK _bF",
10232
- iconBtn: "_bL _eD",
10233
- spinning: "_bM _eE",
10260
+ iconBtn: "_bL _ez",
10261
+ spinning: "_bM _eA",
10234
10262
  refreshBtn: "_bN",
10235
10263
  note: "_bO",
10236
10264
  usageList: "_bP",
@@ -10361,43 +10389,43 @@ var usage_stats_default = _template("x", (input) => {
10361
10389
  _resume_branch($scope0_id);
10362
10390
  });
10363
10391
  var term_module_default = {
10364
- iconBtn: "_cZ _eD",
10365
- termWrap: "_c0",
10366
- term: "_c1",
10367
- xterm: "_c2",
10368
- termDead: "_c3",
10369
- termCopied: "_c4",
10370
- termCopiedFade: "_c5",
10371
- termUploading: "_c6",
10372
- trapBackdrop: "_c7",
10373
- pasteTrap: "_c8",
10374
- kbSlot: "_c9",
10375
- keyBar: "_c_",
10376
- keyBarBtns: "_da",
10377
- keyBarBtnsHidden: "_db",
10378
- kspacer: "_dc",
10379
- sessBtn: "_dd",
10380
- sessDot: "_de",
10381
- sessPop: "_df",
10382
- sessRow: "_dg",
10383
- current: "_dh",
10384
- sessOpen: "_di",
10385
- sessTitle: "_dj",
10386
- sessRename: "_dk",
10387
- sessX: "_dl",
10388
- armed: "_dm",
10389
- sessEdit: "_dn",
10390
- sessNew: "_do",
10391
- lone: "_dp",
10392
- kbarWs: "_dq",
10393
- kbarWsName: "_dr",
10394
- kbtn: "_ds _eD",
10395
- dpadGrid: "_dt",
10396
- repeat: "_du",
10397
- on: "_dv",
10398
- bigGlyph: "_dw",
10399
- enter: "_dx",
10400
- dpadEsc: "_dy"
10392
+ iconBtn: "_c7 _ez",
10393
+ termWrap: "_c8",
10394
+ term: "_c9",
10395
+ xterm: "_c_",
10396
+ termDead: "_da",
10397
+ termCopied: "_db",
10398
+ termCopiedFade: "_dc",
10399
+ termUploading: "_dd",
10400
+ trapBackdrop: "_de",
10401
+ pasteTrap: "_df",
10402
+ kbSlot: "_dg",
10403
+ keyBar: "_dh",
10404
+ keyBarBtns: "_di",
10405
+ keyBarBtnsHidden: "_dj",
10406
+ kspacer: "_dk",
10407
+ sessBtn: "_dl",
10408
+ sessDot: "_dm",
10409
+ sessPop: "_dn",
10410
+ sessRow: "_do",
10411
+ current: "_dp",
10412
+ sessOpen: "_dq",
10413
+ sessTitle: "_dr",
10414
+ sessRename: "_ds",
10415
+ sessX: "_dt",
10416
+ armed: "_du",
10417
+ sessEdit: "_dv",
10418
+ sessNew: "_dw",
10419
+ lone: "_dx",
10420
+ kbarWs: "_dy",
10421
+ kbarWsName: "_dz",
10422
+ kbtn: "_dA _ez",
10423
+ dpadGrid: "_dB",
10424
+ repeat: "_dC",
10425
+ on: "_dD",
10426
+ bigGlyph: "_dE",
10427
+ enter: "_dF",
10428
+ dpadEsc: "_dG"
10401
10429
  };
10402
10430
  //#endregion
10403
10431
  //#region src/tags/term-find.marko
@@ -10468,7 +10496,7 @@ var term_find_default = _template("u", (input) => {
10468
10496
  });
10469
10497
  _resume_branch($scope0_id);
10470
10498
  });
10471
- _template("R", (input) => {
10499
+ _template("T", (input) => {
10472
10500
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
10473
10501
  const $scope0_id = _scope_id();
10474
10502
  _set_serialize_reason({
@@ -10483,7 +10511,7 @@ _template("R", (input) => {
10483
10511
  });
10484
10512
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
10485
10513
  });
10486
- _template("F", (input) => {
10514
+ _template("G", (input) => {
10487
10515
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
10488
10516
  const $scope0_id = _scope_id();
10489
10517
  _set_serialize_reason({
@@ -10498,7 +10526,7 @@ _template("F", (input) => {
10498
10526
  });
10499
10527
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
10500
10528
  });
10501
- _template("K", (input) => {
10529
+ _template("L", (input) => {
10502
10530
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
10503
10531
  const $scope0_id = _scope_id();
10504
10532
  _set_serialize_reason({
@@ -10513,7 +10541,7 @@ _template("K", (input) => {
10513
10541
  });
10514
10542
  _serialize_if($scope0_reason, 0) && writeScope($scope0_id, { a: _existing_scope($childScope) });
10515
10543
  });
10516
- _template("D", (input) => {
10544
+ _template("E", (input) => {
10517
10545
  const $scope0_reason = _scope_reason(), $sg__input_size__OR__input_class = _serialize_guard($scope0_reason, 0);
10518
10546
  const $scope0_id = _scope_id();
10519
10547
  _set_serialize_reason({
@@ -14027,6 +14055,7 @@ var Dismiss = /* @__PURE__ */ object({
14027
14055
  var POST$3 = Run.POST({ json: Dismiss }, async (ctx) => {
14028
14056
  const body = await readBody(ctx);
14029
14057
  dismissPr(ctx.data.workspace.id, body.fullName, body.number);
14058
+ pokeStatusWatch();
14030
14059
  return Response.json(await listPrs(ctx.data.workspace, false));
14031
14060
  });
14032
14061
  async function listPrs(ws, refresh) {
@@ -18621,4 +18650,4 @@ server.listen(port, () => {
18621
18650
  //#endregion
18622
18651
  export {};
18623
18652
 
18624
- ;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/index-DeOM_rPS.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/index-DeOM_rPS.css\"",">"],"defer":[2,"/assets/index-yVQX4L50.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/index-yVQX4L50.js\"","></script>"]}};
18653
+ ;var __MARKO_MANIFEST__={"esfPH6H":{"block":[2,"stylesheet#/assets/index-BJLi-qve.css",6,"<link",0," rel=\"stylesheet\" crossorigin href=\"",1,"assets/index-BJLi-qve.css\"",">"],"defer":[2,"/assets/index-YZZGnWtK.js",6,"<script",0," async type=\"module\" crossorigin src=\"",1,"assets/index-YZZGnWtK.js\"","></script>"]}};