diffing 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +134 -100
  2. package/dist/apply-suggestion-BAuyCYk6.mjs +54 -0
  3. package/dist/cli-agent-BlMtx1Tx.mjs +736 -0
  4. package/dist/cli-agent-C4Fb90GL.mjs +728 -0
  5. package/dist/cli-agent-ChALuNbw.mjs +841 -0
  6. package/dist/cli-agent-D71pq2ep.mjs +841 -0
  7. package/dist/cli-agent-qBT8clNM.mjs +841 -0
  8. package/dist/cli-gh-6qiblgj7.mjs +150 -0
  9. package/dist/cli-gh-D5OCnjNe.mjs +150 -0
  10. package/dist/cli-gh-KjPnyST6.mjs +150 -0
  11. package/dist/cli.mjs +38 -66
  12. package/dist/client/assets/{angular-html-Dg8frIKA.js → angular-html-Dh86jUvr.js} +1 -1
  13. package/dist/client/assets/{angular-ts-BgXWv16g.js → angular-ts-Bh4wRJtT.js} +1 -1
  14. package/dist/client/assets/{apl-uFl-_xI6.js → apl-BSXBHduT.js} +1 -1
  15. package/dist/client/assets/{arc-2DyFlUoQ.js → arc-CRQlhBrV.js} +1 -1
  16. package/dist/client/assets/{architectureDiagram-3BPJPVTR-Cpo5XnQh.js → architectureDiagram-3BPJPVTR-BXq3UvEv.js} +1 -1
  17. package/dist/client/assets/{astro-CsSgohj_.js → astro-Bh00klUw.js} +1 -1
  18. package/dist/client/assets/{blade-tmMbmea0.js → blade-CisA3zhm.js} +1 -1
  19. package/dist/client/assets/{blockDiagram-GPEHLZMM-C2j4VeON.js → blockDiagram-GPEHLZMM-Bw-PTAJr.js} +1 -1
  20. package/dist/client/assets/{c-CYFchk-Y.js → c-D-pHVWrf.js} +1 -1
  21. package/dist/client/assets/{c4Diagram-AAUBKEIU-B9Iu60rg.js → c4Diagram-AAUBKEIU-C0XyiqC_.js} +1 -1
  22. package/dist/client/assets/channel-CDxgOu-3.js +1 -0
  23. package/dist/client/assets/{chunk-2J33WTMH-CYF5wgmI.js → chunk-2J33WTMH-DekjZXNj.js} +1 -1
  24. package/dist/client/assets/{chunk-3OPIFGDE-BsCKEfSk.js → chunk-3OPIFGDE-BtROpcL8.js} +1 -1
  25. package/dist/client/assets/{chunk-4BX2VUAB-CKaohpWW.js → chunk-4BX2VUAB-C92XLTlx.js} +1 -1
  26. package/dist/client/assets/{chunk-55IACEB6-CPg0c8fY.js → chunk-55IACEB6-CceUgh8N.js} +1 -1
  27. package/dist/client/assets/{chunk-5ZQYHXKU-qstslfP1.js → chunk-5ZQYHXKU-DSbYPAe7.js} +1 -1
  28. package/dist/client/assets/{chunk-727SXJPM-C1WRwOi2.js → chunk-727SXJPM-DVzUJa-9.js} +1 -1
  29. package/dist/client/assets/{chunk-AQP2D5EJ-_jbfFh_H.js → chunk-AQP2D5EJ-6n3Z_IFa.js} +1 -1
  30. package/dist/client/assets/{chunk-BSJP7CBP-CjQkUxwj.js → chunk-BSJP7CBP-BgVLnkxr.js} +1 -1
  31. package/dist/client/assets/{chunk-CSCIHK7Q-D4khYgW5.js → chunk-CSCIHK7Q-CkGMXntp.js} +1 -1
  32. package/dist/client/assets/{chunk-FMBD7UC4-B1r9As4X.js → chunk-FMBD7UC4-BM8lrLBo.js} +1 -1
  33. package/dist/client/assets/{chunk-KSCS5N6A-XehlazPT.js → chunk-KSCS5N6A-Bm2pjMQg.js} +1 -1
  34. package/dist/client/assets/{chunk-L5ZTLDWV-5KMCRmgT.js → chunk-L5ZTLDWV-VL17ikXM.js} +1 -1
  35. package/dist/client/assets/{chunk-LZXEDZCA--x7aE-36.js → chunk-LZXEDZCA-B629g67M.js} +2 -2
  36. package/dist/client/assets/{chunk-ND2GUHAM-BcUeNQF6.js → chunk-ND2GUHAM-CjZGwhKA.js} +1 -1
  37. package/dist/client/assets/{chunk-NZK2D7GU-HdA4zA81.js → chunk-NZK2D7GU-DGsLjESY.js} +1 -1
  38. package/dist/client/assets/{chunk-O5CBEL6O-BbkpkgBW.js → chunk-O5CBEL6O-EyUrGY3l.js} +1 -1
  39. package/dist/client/assets/chunk-QZHKN3VN-DJCeMpP8.js +1 -0
  40. package/dist/client/assets/chunk-WU5MYG2G-BbuOkMaH.js +1 -0
  41. package/dist/client/assets/{chunk-XPW4576I-BrjJtb92.js → chunk-XPW4576I-C2TeAQmQ.js} +1 -1
  42. package/dist/client/assets/classDiagram-4FO5ZUOK-D5oJbiED.js +1 -0
  43. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-5MJt5ZxQ.js +1 -0
  44. package/dist/client/assets/{cobol-CbEdzJpe.js → cobol-DsRZMP16.js} +1 -1
  45. package/dist/client/assets/{coffee-BYBPPvKf.js → coffee-DP0-MMsE.js} +1 -1
  46. package/dist/client/assets/{cose-bilkent-S5V4N54A-C2UlmvWG.js → cose-bilkent-S5V4N54A-DMmK0b0W.js} +1 -1
  47. package/dist/client/assets/{cpp-Cy1Wnp8d.js → cpp-B6XYbbze.js} +1 -1
  48. package/dist/client/assets/{crystal-Bg1sUJya.js → crystal-dBLPFLMp.js} +1 -1
  49. package/dist/client/assets/{css-C6iyzRBi.js → css-tgwuSZL0.js} +1 -1
  50. package/dist/client/assets/{dagre-BM42HDAG-CLP5IYO3.js → dagre-BM42HDAG-CgNkf0TR.js} +1 -1
  51. package/dist/client/assets/{diagram-2AECGRRQ-Dg8GXMUD.js → diagram-2AECGRRQ-ocAqn0LV.js} +1 -1
  52. package/dist/client/assets/{diagram-5GNKFQAL-D5eskvC7.js → diagram-5GNKFQAL-CB1Yo4Gc.js} +1 -1
  53. package/dist/client/assets/{diagram-KO2AKTUF-SO-9Apcj.js → diagram-KO2AKTUF-B2vpMBRT.js} +1 -1
  54. package/dist/client/assets/{diagram-LMA3HP47-Dz15-yRy.js → diagram-LMA3HP47-DuxZOaQS.js} +1 -1
  55. package/dist/client/assets/{diagram-OG6HWLK6-BuQK0W1m.js → diagram-OG6HWLK6-CkShDmcv.js} +1 -1
  56. package/dist/client/assets/{dist-CZ555WMx.js → dist-BgZIvk5w.js} +1 -1
  57. package/dist/client/assets/{edge-CmOR4HCT.js → edge-Bokubn8E.js} +1 -1
  58. package/dist/client/assets/{elixir-CK9qhOZG.js → elixir-BEzcf3Xg.js} +1 -1
  59. package/dist/client/assets/{elm-DZWlTp8-.js → elm-vJyLTAER.js} +1 -1
  60. package/dist/client/assets/{erDiagram-TEJ5UH35-D7vADGZy.js → erDiagram-TEJ5UH35-BFV1NQAH.js} +1 -1
  61. package/dist/client/assets/{erb-CTTGdXJ0.js → erb-DDkAmjBS.js} +1 -1
  62. package/dist/client/assets/{flowDiagram-I6XJVG4X-BwcgAtP3.js → flowDiagram-I6XJVG4X-DU8xbFdO.js} +1 -1
  63. package/dist/client/assets/{ganttDiagram-6RSMTGT7-kInginE9.js → ganttDiagram-6RSMTGT7-DCb7Qh0c.js} +1 -1
  64. package/dist/client/assets/{git-rebase-B_sSbVaY.js → git-rebase-DWcifAdK.js} +1 -1
  65. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-C4pDDMLO.js → gitGraphDiagram-PVQCEYII-C_Tw-piE.js} +1 -1
  66. package/dist/client/assets/{glimmer-js-BaLXlo90.js → glimmer-js--HDru5ys.js} +1 -1
  67. package/dist/client/assets/{glimmer-ts-ugNWY62Y.js → glimmer-ts-DAdXisHh.js} +1 -1
  68. package/dist/client/assets/{glsl-CDofiyvf.js → glsl-CmIRlJht.js} +1 -1
  69. package/dist/client/assets/{graphql-lRTsx6gb.js → graphql-tx4-7I3U.js} +1 -1
  70. package/dist/client/assets/{hack-DG646xxf.js → hack-yA0XjhF7.js} +1 -1
  71. package/dist/client/assets/{haml-CjNyEqTY.js → haml-BR5MUE1b.js} +1 -1
  72. package/dist/client/assets/{handlebars-DmTlsycc.js → handlebars-BPOF7iOf.js} +1 -1
  73. package/dist/client/assets/{html-CYKa0iGt.js → html-BbteRk96.js} +1 -1
  74. package/dist/client/assets/{html-derivative-CJrmldEy.js → html-derivative-59NNrcMm.js} +1 -1
  75. package/dist/client/assets/{http-Dv_sB6KO.js → http-D3odGQI4.js} +1 -1
  76. package/dist/client/assets/{hurl-aIa6gC3s.js → hurl-BLTj8fPj.js} +1 -1
  77. package/dist/client/assets/index-BZcKS8Sb.css +1 -0
  78. package/dist/client/assets/{index-DLwFuHoH.js → index-DHXpO7eS.js} +136 -98
  79. package/dist/client/assets/{infoDiagram-5YYISTIA-DE1yaqeG.js → infoDiagram-5YYISTIA-CI6hJyRl.js} +1 -1
  80. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-D61KC690.js → ishikawaDiagram-YF4QCWOH-gMS1P1LQ.js} +1 -1
  81. package/dist/client/assets/{java--GCJC5Ht.js → java-CsViuzs_.js} +1 -1
  82. package/dist/client/assets/{javascript-CLU-vrsL.js → javascript-DQgsl2Dh.js} +1 -1
  83. package/dist/client/assets/{jinja-DpKxO4hN.js → jinja-DQNp2NUA.js} +1 -1
  84. package/dist/client/assets/{jison-DAzEKgwk.js → jison-CDDOZQdc.js} +1 -1
  85. package/dist/client/assets/{journeyDiagram-JHISSGLW-Bt37oidm.js → journeyDiagram-JHISSGLW-BTQ_Ws_h.js} +1 -1
  86. package/dist/client/assets/{json-CoxC1kMn.js → json-DP4TqCuE.js} +1 -1
  87. package/dist/client/assets/{jsx-Bjv8cqXv.js → jsx-Df5hn0Tf.js} +1 -1
  88. package/dist/client/assets/{julia-2HI5Piu6.js → julia--u33yGLi.js} +1 -1
  89. package/dist/client/assets/{just-AUrPjdB4.js → just-BCpMmSOD.js} +1 -1
  90. package/dist/client/assets/{kanban-definition-UN3LZRKU-D46QdRYJ.js → kanban-definition-UN3LZRKU-CvqGbLR_.js} +1 -1
  91. package/dist/client/assets/{latex-DjzDlfkY.js → latex-D8D4jZGw.js} +1 -1
  92. package/dist/client/assets/{line-D_rKDTVX.js → line-DBgaS_RW.js} +1 -1
  93. package/dist/client/assets/{linear-DCm3ZWOL.js → linear-RQVzKNVU.js} +1 -1
  94. package/dist/client/assets/{liquid-DZ8JEV93.js → liquid-CkH85f12.js} +1 -1
  95. package/dist/client/assets/{lua-iKYCK6sd.js → lua-iKoV7WE3.js} +1 -1
  96. package/dist/client/assets/{marko-CrhrBZpj.js → marko-N8ScQSqT.js} +1 -1
  97. package/dist/client/assets/{mdc-M6YkRqT_.js → mdc-BvHTOxsp.js} +1 -1
  98. package/dist/client/assets/{mermaid-parser.core-DOlZkAUl.js → mermaid-parser.core-CwDRwMR7.js} +1 -1
  99. package/dist/client/assets/{mermaid.core-B5kraaYr.js → mermaid.core-D2LDJgXO.js} +3 -3
  100. package/dist/client/assets/{mindmap-definition-RKZ34NQL-CG-S_0Tm.js → mindmap-definition-RKZ34NQL-FRnPh642.js} +1 -1
  101. package/dist/client/assets/{nginx-DGSv66H3.js → nginx-DGgvASuI.js} +1 -1
  102. package/dist/client/assets/{nim-wTb9iFPK.js → nim-D-v9hzvR.js} +1 -1
  103. package/dist/client/assets/{perl-BrLOtih-.js → perl-CG8leJ8K.js} +1 -1
  104. package/dist/client/assets/{php-BpG59zED.js → php-DvkeSP10.js} +1 -1
  105. package/dist/client/assets/{pieDiagram-4H26LBE5-BSsvT950.js → pieDiagram-4H26LBE5-CepOg38Y.js} +1 -1
  106. package/dist/client/assets/{pug-L7QegceF.js → pug-B4T7-xaL.js} +1 -1
  107. package/dist/client/assets/{qml-Bhe1hZ7B.js → qml-BE6D5Bxn.js} +1 -1
  108. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-Bxs1ZIId.js → quadrantDiagram-W4KKPZXB-DOFAsP60.js} +1 -1
  109. package/dist/client/assets/{r-D1TBw_pw.js → r-BKZg9Mcq.js} +1 -1
  110. package/dist/client/assets/{razor-CQm1uFKr.js → razor-D-02oaxL.js} +1 -1
  111. package/dist/client/assets/{regexp--jRne08M.js → regexp-BDFvAR1k.js} +1 -1
  112. package/dist/client/assets/{requirementDiagram-4Y6WPE33-BvrwIHRn.js → requirementDiagram-4Y6WPE33-BBVNH-2W.js} +1 -1
  113. package/dist/client/assets/review-export-D5iIl46_.js +7 -0
  114. package/dist/client/assets/{rst-DojkdR69.js → rst-BcT26OSj.js} +1 -1
  115. package/dist/client/assets/{ruby-CihGsdWE.js → ruby-Cq_YQvFT.js} +1 -1
  116. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-ChVx7-uL.js → sankeyDiagram-5OEKKPKP-BQfCTbBX.js} +1 -1
  117. package/dist/client/assets/{sas-De9KOrSF.js → sas-DN9oTxKY.js} +1 -1
  118. package/dist/client/assets/{scss-s1VsrZAM.js → scss-BK_sp3z2.js} +1 -1
  119. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-DfGXu7Db.js → sequenceDiagram-3UESZ5HK-CKAW2eyx.js} +1 -1
  120. package/dist/client/assets/{shellscript-BQarhH5B.js → shellscript-CvNpOu0J.js} +1 -1
  121. package/dist/client/assets/{shellsession-DudKTKQ_.js → shellsession-8-yj2cJj.js} +1 -1
  122. package/dist/client/assets/{soy-CQggW1_P.js → soy-C6Q9atPF.js} +1 -1
  123. package/dist/client/assets/{sql-CyxjmxEX.js → sql-CBL3BuHb.js} +1 -1
  124. package/dist/client/assets/{src-Be3tFbq6.js → src-D-VUWIK5.js} +1 -1
  125. package/dist/client/assets/{stata-Baq2oukf.js → stata-B2Q7Vqzu.js} +1 -1
  126. package/dist/client/assets/{stateDiagram-AJRCARHV-DUsSkWi-.js → stateDiagram-AJRCARHV-BGJiv0qO.js} +1 -1
  127. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CdUgMghp.js +1 -0
  128. package/dist/client/assets/{surrealql-DY_lPQU6.js → surrealql-C-A2N8vk.js} +1 -1
  129. package/dist/client/assets/{svelte-oBaORrzD.js → svelte-VAut_-uy.js} +1 -1
  130. package/dist/client/assets/{templ-WpkyVGPg.js → templ-mUetM--K.js} +1 -1
  131. package/dist/client/assets/{tex-t_gMyObp.js → tex-BT53mWGp.js} +1 -1
  132. package/dist/client/assets/{timeline-definition-PNZ67QCA-DO30eyIk.js → timeline-definition-PNZ67QCA-lVwMt1rk.js} +1 -1
  133. package/dist/client/assets/{ts-tags-Dn6NjJLA.js → ts-tags-VkIOkgLN.js} +1 -1
  134. package/dist/client/assets/{tsx-DDWp_p5y.js → tsx-D_aaGHTf.js} +1 -1
  135. package/dist/client/assets/{twig-FBY22xUa.js → twig-CufwqKkk.js} +1 -1
  136. package/dist/client/assets/{typescript-BHZBosYe.js → typescript-osFD2CEV.js} +1 -1
  137. package/dist/client/assets/{vennDiagram-CIIHVFJN-DbE8UKE1.js → vennDiagram-CIIHVFJN-_K9NtpA5.js} +1 -1
  138. package/dist/client/assets/{vue-CrOmWBlh.js → vue-Bub1rXmL.js} +1 -1
  139. package/dist/client/assets/{vue-html-jBuGpXgg.js → vue-html-CN3x2pYg.js} +1 -1
  140. package/dist/client/assets/{vue-vine-DEzqOkvG.js → vue-vine-C0csYkGm.js} +1 -1
  141. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-BqhSY5Qs.js → wardleyDiagram-YWT4CUSO-B2jTMfra.js} +1 -1
  142. package/dist/client/assets/{xml-DkWImCZV.js → xml-my6OjeGb.js} +1 -1
  143. package/dist/client/assets/{xsl-BotuNSYU.js → xsl-Bx0YVn26.js} +1 -1
  144. package/dist/client/assets/{xychartDiagram-2RQKCTM6-DA2pXGD9.js → xychartDiagram-2RQKCTM6-DfZ4YYXU.js} +1 -1
  145. package/dist/client/assets/{yaml-8lMTQUH5.js → yaml-DanwOypk.js} +1 -1
  146. package/dist/client/index.html +2 -2
  147. package/dist/comment-format-B5AcGcR-.mjs +118 -0
  148. package/dist/comment-format-CKTt0fzi.mjs +113 -0
  149. package/dist/comment-format-DG_PAehC.mjs +117 -0
  150. package/dist/completions-ZSKYvW06.mjs +126 -0
  151. package/dist/diff-fingerprint-CWa-soYD.mjs +78 -0
  152. package/dist/doctor-q6oA64hm.mjs +195 -0
  153. package/dist/find-tui-binary-CRpbYXLC.mjs +52 -0
  154. package/dist/git-Czo96ymM.mjs +789 -0
  155. package/dist/git-DaP_1rVy.mjs +2 -0
  156. package/dist/github-C9GLNak7.mjs +2 -0
  157. package/dist/github-HfIlIS-J.mjs +525 -0
  158. package/dist/mcp-7eXATtez.mjs +1334 -0
  159. package/dist/mcp-BBk8AIO4.mjs +1334 -0
  160. package/dist/mcp-BJxrW9dS.mjs +1334 -0
  161. package/dist/mcp-BhT5GgYF.mjs +1334 -0
  162. package/dist/mcp-BsGdNA88.mjs +1334 -0
  163. package/dist/mcp-Ca9QAlJ0.mjs +1334 -0
  164. package/dist/mcp-eor39qmD.mjs +1352 -0
  165. package/dist/plan-format-BQyx--mp.mjs +144 -0
  166. package/dist/plan-format-Bi46QS0m.mjs +132 -0
  167. package/dist/review-export-BoV0884M.mjs +66 -0
  168. package/dist/review-export-CKTI5Od_.mjs +66 -0
  169. package/dist/review-export-DjxKBeIZ.mjs +66 -0
  170. package/dist/server-AisDKkpW.mjs +3227 -0
  171. package/dist/server-BUsRhL1B.mjs +3283 -0
  172. package/dist/server-Bc2m9R5-.mjs +3263 -0
  173. package/dist/server-C105rwQw.mjs +3283 -0
  174. package/dist/server-D0Ni8PKP.mjs +3252 -0
  175. package/dist/server-TOElOuNP.mjs +3258 -0
  176. package/dist/server-lock-uqSdDYeR.mjs +153 -0
  177. package/dist/settings-BVnzGFL7.mjs +478 -0
  178. package/dist/update-check-fe0tR8tx.mjs +129 -0
  179. package/package.json +1 -1
  180. package/dist/client/assets/channel-Br3gV-0C.js +0 -1
  181. package/dist/client/assets/chunk-QZHKN3VN-yNyHmFLj.js +0 -1
  182. package/dist/client/assets/chunk-WU5MYG2G-DOSgjhZV.js +0 -1
  183. package/dist/client/assets/classDiagram-4FO5ZUOK-BV8x1oiD.js +0 -1
  184. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-AibFxRy2.js +0 -1
  185. package/dist/client/assets/index-CkjX2qPW.css +0 -1
  186. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-DczGQieS.js +0 -1
package/README.md CHANGED
@@ -6,8 +6,8 @@
6
6
 
7
7
  A local-first code review tool and double-sided bridge designed for the modern AI coding agent workflow. Review AI-generated changes in a high-fidelity, GitHub-like web UI, leave inline comments, and hand them back to your coding agent to fix in real time — and review the agent's **plan** the same way *before* it writes any code, approving, rejecting, or requesting changes on specific lines and sections.
8
8
 
9
- <img width="1667" height="1087" alt="image" src="https://github.com/user-attachments/assets/52dcd2af-fc85-44ba-a679-4609e667c6f4" />
10
-
9
+ <img width="1624" height="1061" alt="image" src="https://github.com/user-attachments/assets/c1e12c28-610e-4d68-abb1-3c8dde58560e" />
10
+ <img width="1624" height="1061" alt="image" src="https://github.com/user-attachments/assets/95a51403-3bce-453c-a831-43a2834c5ed7" />
11
11
 
12
12
  ---
13
13
 
@@ -31,10 +31,11 @@ Prefer the terminal? Add `--tui` for a native-Rust terminal UI — same review f
31
31
  diffing --tui
32
32
  ```
33
33
  > [!WARNING]
34
- > The TUI is **experimental** in v0.3.0. The interface, keymap, and
35
- > `server.json` (`mode: "tui"`) on-disk format may change in a minor
36
- > release. The web UI is the supported path for production workflows.
37
- > See [Native Terminal UI (TUI)](#native-terminal-ui-tui) for the full feature set, keymap, and stability notes.
34
+ > The TUI is **experimental**. The interface, keymap, and `server.json`
35
+ > (`mode: "tui"`) on-disk format may change in a minor release. The web UI is
36
+ > the supported path for production workflows. See
37
+ > [Native Terminal UI (TUI)](#native-terminal-ui-tui) for the full feature set,
38
+ > keymap, and stability notes.
38
39
 
39
40
  ### 3. Update
40
41
  Check if a new version is available on npm and upgrade instantly via the CLI:
@@ -48,16 +49,18 @@ diffing update
48
49
 
49
50
  A local Hono-powered review server delivers a full-featured GitHub-like code review interface directly in your browser.
50
51
 
51
- - **Split / Unified View** — Toggle between side-by-side (`split`) and inline (`unified`) diff layouts via toolbar or keyboard shortcut `m`.
52
+ - **Split / Unified View** — Side-by-side (`split`) or inline (`unified`) layouts. Set under **Settings → Diff style**, or press `m` to cycle. Diff style is not a toolbar toggle.
53
+ - **Compact toolbar** — Repo + branch, quiet summary chips (files, `+X/−Y`, open comments), Search (`⌘K`), Plans badge, Resolve all, Settings, and **Send review**.
52
54
  - **Syntax Highlighting** — Powered by Shiki via `@pierre/diffs`, with high-fidelity highlighting for 200+ languages.
53
- - **Interactive File Tree** — Hierarchical file navigation sidebar with collapsible folders, viewed/unviewed tracking, and change-type indicators (added, modified, deleted).
54
- - **Status Dashboard (Comment Tracker)** — Bottom panel tracking open, replied, and resolved comments with filter tabs and click-to-navigate references to the relevant file and line.
55
- - **Git Diff Stats** — Toolbar displays repo name, branch, file count, and additions/deletions (`+X/-Y`) computed from the patch.
56
- - **Server-Side State & Drafts Persistence** — No browser storage is used. All settings, UI panels sizing, session states, and comment drafts are securely stored and persisted server-side in the project's global `.diffing` directory (and global settings inside `~/.config/diffing/settings.json`).
57
- - **Dynamic Font Customization** — Pick any [Google Fonts](https://fonts.google.com/) family or locally-installed system font for both UI typography and monospace code rendering, configurable via the settings font picker. Google-hosted families are fetched automatically as web fonts and render everywhere; local fonts are applied by name (see the [note on custom fonts](#a-note-on-custom-fonts)).
58
- - **Resizable Panels** — Drag-to-resize sidebar (240px–640px) and comment tracker panel (100px–600px). Panel states are instantly saved server-side for absolute consistency across browser sessions.
59
- - **Skeleton Loading Screen** — Full shimmer placeholder UI for toolbar, sidebar, search, tree nodes, and file diffs during initial load.
60
- - **Image Diff Previews** — Visual side-by-side comparison for added, changed, and deleted image files (PNG, JPEG, GIF, WebP, SVG, BMP, ICO, AVIF).
55
+ - **Interactive File Tree** — Hierarchical navigation with collapsible folders, viewed/unviewed tracking, change-type indicators, smart filter chips (**All / Unviewed / Comments / Since last**), multi-select extension filters, and path search.
56
+ - **Icon file-header actions** — Expand context, open in editor, file-level comment, and Viewed with tooltips; less chrome noise per card.
57
+ - **Status Dashboard (Comment Tracker)** — Bottom panel tracking open, replied, and resolved comments with severity filters and click-to-navigate.
58
+ - **Multi-round review** — Round history popover, “changed since last send” chips, and outdated-comment detection.
59
+ - **Server-Side State & Drafts Persistence** No browser storage is used. Settings, panel sizes, session state, and comment drafts live under `~/.diffing/` (global settings in `~/.config/diffing/settings.json`).
60
+ - **Dynamic Font Customization** — Google Fonts or local system fonts for UI + mono (see [custom fonts](#a-note-on-custom-fonts)).
61
+ - **Resizable Panels** — Drag-to-resize sidebar (240px–640px) and comment tracker (100px–600px); sizes persisted server-side.
62
+ - **Skeleton Loading Screen** — Full shimmer placeholder UI during initial load.
63
+ - **Image Diff Previews** — Side-by-side comparison for common image formats.
61
64
 
62
65
  ---
63
66
 
@@ -83,7 +86,8 @@ A local Hono-powered review server delivers a full-featured GitHub-like code rev
83
86
  - **Instant Switching** — CSS transitions suppressed during theme changes for a snappy, lag-free experience.
84
87
  - **Persistent Setting** — Theme choice saved to `~/.config/diffing/settings.json` and restored on next launch.
85
88
 
86
- <img width="1667" height="1087" alt="image" src="https://github.com/user-attachments/assets/6e4a4552-fef2-4002-8b8f-b544c95c4c26" />
89
+
90
+ <img width="1624" height="1061" alt="image" src="https://github.com/user-attachments/assets/eaa0675c-21d6-4754-8fbd-97ee63a743dc" />
87
91
 
88
92
 
89
93
 
@@ -103,8 +107,7 @@ Blazing-fast, native fuzzy code search integrated directly into the sidebar sear
103
107
  - **Graceful Degradation** — If the native Rust binary is unavailable, search reports as unavailable without crashing the server.
104
108
  - **Auto-Indexing** — The Rust engine maintains its own file system watcher for real-time index updates as the working tree changes.
105
109
 
106
- <img width="1840" height="1196" alt="image" src="https://github.com/user-attachments/assets/0830b770-3c7f-44a1-b8ff-a70b2b34144a" />
107
-
110
+ <img width="1624" height="1061" alt="image" src="https://github.com/user-attachments/assets/2b2bc001-2d3a-4744-b9d5-a23642f1afba" />
108
111
 
109
112
  ---
110
113
 
@@ -119,7 +122,7 @@ Full keyboard-driven navigation with vim-like motions and a modal status bar:
119
122
  | `Ctrl+d` / `Ctrl+u` | Scroll half-page down/up |
120
123
  | `g` `g` | Jump to top of diff |
121
124
  | `G` | Jump to bottom of diff |
122
- | `m` | Toggle split/unified view |
125
+ | `m` | Toggle split/unified view (also Settings → Diff style) |
123
126
  | `t` | Cycle tab size (2 → 4 → 8) |
124
127
  | `w` | Toggle line wrap |
125
128
  | `n` | Toggle line numbers |
@@ -139,11 +142,21 @@ Full keyboard-driven navigation with vim-like motions and a modal status bar:
139
142
  | `g` `t` | Open theme picker |
140
143
  | `Cmd/Ctrl+K` | Open global command palette |
141
144
  | `Cmd/Ctrl+,` | Toggle settings panel |
142
- | `?` | Show shortcuts help modal |
145
+ | `?` / `⌘?` | Show shortcuts help modal |
146
+
147
+ ### Plan page extras (when reviewing a plan at `/plan`)
148
+ | Key | Action |
149
+ |-----|--------|
150
+ | `m` | Cycle Source → Read → Split |
151
+ | `z` | Toggle zen reading (switches to Read if needed); Esc also exits zen |
152
+ | `o` | Toggle Outline (left TOC) |
153
+ | `c` | Toggle Comments map (right rail) |
154
+ | `J` / `K` | Next / previous plan |
155
+ | Esc | Exit zen / dismiss Add-comment chip / close draft |
143
156
 
144
157
  A vim-style status bar at the bottom displays the current mode (NORMAL/INSERT), file path, and a help button. Multi-key sequences use an 800ms key buffer.
145
158
 
146
- <img width="1840" height="1196" alt="image" src="https://github.com/user-attachments/assets/d230d020-4fb2-475a-a8a0-0ae11bb271ff" />
159
+ <img width="1624" height="1061" alt="image" src="https://github.com/user-attachments/assets/f0971704-65a2-4512-978f-6b6e656b5dda" />
147
160
 
148
161
 
149
162
  ---
@@ -151,13 +164,13 @@ A vim-style status bar at the bottom displays the current mode (NORMAL/INSERT),
151
164
  ## Native Terminal UI (TUI) — *Experimental*
152
165
 
153
166
  > [!WARNING]
154
- > The TUI is **experimental** in v0.3.0. The interface, keymap, and on-disk
155
- > format of `server.json` (`mode: "tui"`) may change in a minor release
156
- > before stabilisation. The web UI is the supported path for production
157
- > workflows; please open an issue before depending on the TUI for CI / agent
158
- > automation. The web review flow, plan review, and PR review are unaffected.
167
+ > The TUI is **experimental**. The interface, keymap, and on-disk format of
168
+ > `server.json` (`mode: "tui"`) may change in a minor release before
169
+ > stabilisation. The web UI is the supported path for production workflows;
170
+ > please open an issue before depending on the TUI for CI / agent automation.
171
+ > The web review flow, plan review, and PR review are unaffected.
159
172
 
160
- `diffing --tui` opens an **opt-in native-Rust terminal interface** that mirrors the web review dashboard — no browser, no Electron, no port. It's a leaf renderer in a new `crates/diffing-tui/` binary: the Node CLI is still the single source of truth for arg parsing, lockfile discovery, and agent handoff, and the TUI reads the same `~/.diffing/<repo>/*` state on disk and writes a `server.json` with `mode: "tui"`.
173
+ `diffing --tui` opens an **opt-in native-Rust terminal interface** that mirrors the local code-review workflow — no browser or Electron. The renderer and headless tools share one sparse diff index. A random-port loopback API is published through `server.json` with `mode: "tui"` and a per-session capability, so local agents can inspect a large diff without receiving the whole patch.
161
174
 
162
175
  The default `diffing` behaviour is **byte-identical** with and without `--tui` — the TUI is strictly opt-in. If the env cannot support a TUI (piped stdin, CI, no raw mode) or the binary is missing, you get a one-line stderr note and the normal `git diff` output. The web mode is also unaffected by the TUI build; the same `diffing` install serves either.
163
176
 
@@ -173,15 +186,26 @@ diffing --tui -- -- src/ # Limit a TUI review to a directory
173
186
 
174
187
  **Features**
175
188
 
176
- - **Unified diff render** with a virtualised file card, syntect highlighter, and the same 8 Shiki-compatible colour themes as the web UI.
177
- - **Vim-style file tree & keymap** `j/k/gg/G/J/K/Tab/w/t/m/?/` motions, plus `c` (new comment), `e/r/x` (edit / reply / resolve), `]`/`[` (next / previous thread), `?` (help).
189
+ - **Disk-backed streaming index** Git output is parsed as bytes into sparse file/hunk/checkpoint metadata. The first partial generation is usable during ingestion; neither the TUI nor an agent needs to retain the full patch in memory.
190
+ - **Viewport-only rendering** only visible rows are sought, decoded, syntax-highlighted, and converted to terminal cells. Unified and split layouts, horizontal scrolling, wrapping, binary markers, untracked files, and live working-tree refresh are supported.
191
+ - **Vim-style file tree & keymap** — numeric counts plus `j/k`, `gg/G`, `Ctrl-d/u`, `J/K`, `]h/[h`, `]c/[c`, `zz`, `h/l`, `/`, `n/N`, `:`, `Tab`, `v`, `w`, `m`, `t`, and `?`. `Esc` cancels a mode; `q` or `Ctrl-C` quits.
178
192
  - **Full comment CRUD** — mirrors `src/lib/comments.ts` byte-for-byte; the comment tracker at the bottom lists open / replied / resolved threads with click-to-jump navigation.
179
193
  - **Multi-line `tui-textarea` form** with markdown rendering in the preview pane.
180
194
  - **Live updates** via `notify` watcher on `comments.json` and the repo working tree — write a comment in another window and it appears immediately.
181
- - **Send review & agent handoff** — verdict radios + general-comment popover with a live XML preview. Submits via the same `format_comments` envelope as the web UI, copies to clipboard (`pbcopy` / `wl-copy` / `xclip` / `xsel` / `clip.exe`), and persists `pending-review.xml`. The agent-status indicator in the status bar mirrors the web UI's "Send to agent" connection dot.
195
+ - **Send review & agent handoff** — verdict radios + general-comment popover with a live XML preview. `Ctrl-S` persists the review, copies it to the clipboard when available, and immediately wakes every `diffing await-review` waiter. The status bar reports real waiter state.
196
+ - **Headless, token-bounded inspection** — `diffing inspect summary|files|hunks|slice|search` and the equivalent MCP tools page the same index with strict row/byte limits, generation checks, and compact JSON. Every request is loopback-only and requires the session capability.
182
197
  - **Cross-platform** — macOS, Linux, and Windows are all first-class. The TUI liveness probe uses `kill(pid, 0)` on Unix and `tasklist /NH /FO CSV` on Windows. Clipboard works on Wayland (`wl-copy`), X11 (`xclip` / `xsel`), macOS (`pbcopy`), and Windows (`clip.exe` / PowerShell `Set-Clipboard`).
183
198
 
184
- **Caveat** the TUI's "Send to agent" writes the review to disk + clipboard but does not actively unblock a long-polling `diffing await-review`; that requires a Node-side change in a follow-up. The web UI's send button remains the supported native handoff path. The `pending-review.xml` is still produced and the review session is still round-incremented only the long-poll wake-up is missing.
199
+ The synthetic one-million-line benchmark (50.8 MiB patch) currently reaches a usable partial snapshot in under 1 ms, completes indexing in 47–152 ms, serves viewport reads at 30 µs p95, and peaks at about 54 MiB RSS on the development machine. Run it with `DIFFING_BENCH_LINES=1000000 cargo bench -p diffing-core --bench diff_index`; results vary by machine and filesystem cache.
200
+
201
+ Headless examples:
202
+
203
+ ```bash
204
+ diffing inspect summary
205
+ diffing inspect files --limit 100
206
+ diffing inspect slice --file 0 --start 0 --max-lines 120 --max-bytes 262144
207
+ diffing inspect search "unsafe" --limit 25
208
+ ```
185
209
 
186
210
  **Building the binary locally**
187
211
 
@@ -263,22 +287,34 @@ Bidirectional, event-driven sync between the browser UI and connected AI agents
263
287
  The `diffing` binary acts as a port-agnostic CLI client. It automatically discovers the running server by reading a local repository lockfile:
264
288
 
265
289
  ```bash
266
- diffing await-review # Block process until you click "Send to agent"; outputs comments as XML
267
- diffing comments [--open] [--json] # One-shot query of the comments database
268
- diffing reply <id> --body "..." # Post an agent response or explanation
269
- diffing resolve <id> # Mark a comment resolved, updating the UI live
270
- diffing url # Retrieve the active server base URL
271
-
272
- # Plan review (review a markdown plan before any code is written)
273
- diffing plan submit <file> [--title T] [--model M] [--id <id>] [--wait] # Submit/resubmit a plan; prints its id
274
- diffing plan await [--timeout N] # Block until the human approves/rejects/requests-changes; outputs the verdict XML
275
- diffing plan list [--json] # List submitted plans with their verdicts
276
- diffing plan show [<id>] [--json] [--version N] # Show one plan as <plan-review> XML (latest if omitted; use --version to read a historical body)
277
- diffing plan versions <id> [--json] # List every submitted version of a plan, oldest-first (current marked with `*`)
278
- diffing plan reply <commentId> --body "..." # Reply to an inline plan comment
279
- diffing plan resolve <commentId> # Mark a plan comment resolved
290
+ # Code-review handoff
291
+ diffing await-review # Block until "Send to agent"; print comments as XML
292
+ diffing comments [--open] [--format xml|json|md]
293
+ diffing reply <id> --body "..." # Post an agent response
294
+ diffing resolve <id> # Mark resolved (UI updates live)
295
+ diffing unresolve <id> # Re-open a resolved thread
296
+ diffing comment edit <id> --body "..."
297
+ diffing comment delete <id>
298
+ diffing progress --message "…" [--pct 40] [--model M] # Live progress toast
299
+ diffing url # Active server base URL
300
+
301
+ # Plan review (before any code is written)
302
+ diffing plan submit <file> [--title T] [--model M] [--id <id>] [--wait] [--save-source]
303
+ diffing plan await [--timeout N]
304
+ diffing plan list [--json]
305
+ diffing plan show [<id>] [--json] [--version N]
306
+ diffing plan versions <id> [--json]
307
+ diffing plan reply <commentId> --body "..."
308
+ diffing plan resolve <commentId>
309
+
310
+ # DX
311
+ diffing doctor # Environment / install self-check
312
+ diffing completion <bash|zsh|fish>
313
+ diffing inspect summary|files|hunks|slice|search # Bounded reads from a TUI session
280
314
  ```
281
315
 
316
+ Full contracts (flags, exit codes, XML, HTTP): **[docs/cli.md](docs/cli.md)**.
317
+
282
318
  ### B. Model Context Protocol (MCP) Server
283
319
  If your agent supports MCP, configure `diffing` as a stdio server. The MCP is
284
320
  self-describing and can start or reuse the loopback review server, so an
@@ -313,9 +349,13 @@ Run `diffing mcp --help` for setup details. The server initialization
313
349
  instructions tell an unfamiliar model what to do next, and every tool returns
314
350
  both readable text and structured content.
315
351
 
316
- - Session: `review_session_status`, `start_review_session`
317
- - Local review: `get_diff`, `create_comment`, `await_review`, `list_comments`, `reply_to_comment`, `resolve_comment`
318
- - Plan review: `submit_plan`, `await_plan_review`, `list_plans`, `get_plan`, `get_plan_versions`, `get_plan_version`, `reply_to_plan_comment`, `resolve_plan_comment`
352
+ | Area | Tools |
353
+ |------|-------|
354
+ | Session | `review_session_status`, `start_review_session` |
355
+ | Diff inspection | `get_diff`, `diff_summary`, `diff_files`, `diff_hunks`, `diff_slice`, `diff_search` |
356
+ | Comments | `create_comment`, `list_comments`, `reply_to_comment`, `resolve_comment`, `unresolve_comment`, `edit_comment`, `delete_comment`, `edit_reply`, `delete_reply`, `apply_suggestion`, `resolve_all_comments` |
357
+ | Loop | `await_review`, `report_progress`, `get_review_history` |
358
+ | Plan | `submit_plan`, `await_plan_review`, `list_plans`, `get_plan`, `get_plan_versions`, `get_plan_version`, `reply_to_plan_comment`, `resolve_plan_comment` |
319
359
 
320
360
  Clients that expose MCP prompts can use `review_local_changes` and
321
361
  `submit_plan_for_review`; clients that expose resources can read
@@ -340,7 +380,11 @@ still interpret pasted self-describing XML. The installable `skills/` copies and
340
380
  repo-local `.agents/skills/` copies are contract-tested to remain identical.
341
381
 
342
382
  ### Send Review Popover
343
- A GitHub-style "finish your review" popover with inline editing of each comment, an optional general/overall comment, and a visual indicator when an agent is waiting. The **"Copy comments"** toolbar button serializes all comments to the XML spec and copies them to the clipboard.
383
+ A GitHub-style **Submit review** / **Send to agent** popover: pick a verdict
384
+ (Approve / Request edits / Reject / **Comment only**), optionally add an overall
385
+ note, preview every inline comment (editable/removable), and release every
386
+ waiting agent. Agent waiting state shows as a green dot on the button.
387
+ **Copy comments** serializes the thread set to the agent XML spec.
344
388
 
345
389
  ### Port-Agnostic Discovery
346
390
  A per-repo lockfile (`server.json`) in `~/.diffing/<repo-hash>/` enables all subcommands and MCP tools to discover the server's port with zero configuration. Stale or crashed server locks are automatically detected and treated as dead via `process.kill(pid, 0)`.
@@ -355,39 +399,29 @@ A `ReviewSession` class with a monotonic `round` counter and race-guard logic en
355
399
  Review **any agent plan** — not just code. When an AI agent produces a plan
356
400
  (an implementation outline, a design proposal, a migration strategy), `diffing`
357
401
  renders the markdown line-by-line so you can comment on specific lines or
358
- sections and **approve**, **request changes**, or **reject** it then hands the
359
- structured verdict back to the waiting agent. It's the "agent waits, human
360
- releases" handoff, applied *before* any code is written.
402
+ sections and **approve**, **request changes**, **reject**, or **comment only**
403
+ — then hands the structured verdict back to the waiting agent. It's the
404
+ "agent waits, human releases" handoff, applied *before* any code is written.
361
405
 
362
406
  ```text
363
407
  1. The agent submits a markdown plan and blocks (diffing plan submit … --wait).
364
- 2. You open the "Plans" tab, read the plan, and comment on lines/sections.
365
- 3. You click Approve / Request changes / Reject (with an optional overall note).
366
- 4. The agent wakes instantly, receives the verdict + comments as <plan-review> XML,
367
- and proceeds, revises-and-resubmits, or stops accordingly.
408
+ 2. You open Plans (/plan), read Source / Read / Split, and comment on lines/sections.
409
+ 3. You Submit review: Approve / Request changes / Reject / Comment only.
410
+ 4. The agent wakes, receives <plan-review> XML, and proceeds, revises, or stops.
368
411
  ```
369
412
 
370
- - **Renders any markdown plan** — the plan body is shown via `@pierre/diffs` with
371
- full syntax highlighting and line numbers, so it's addressable like a diff.
372
- - **Line, range & section comments** — hover the gutter `+` or select a line range
373
- to comment; each comment auto-captures its enclosing markdown heading (section)
374
- and the exact anchored text for the agent.
375
- - **General comments** — attach notes scoped to the whole plan.
376
- - **Three-way verdict** — Approve / Request changes / Reject, GitHub-style, with
377
- an optional overall comment. Resubmitting a revised plan (same id) bumps the
378
- version and re-opens it for review.
379
- - **Browse plan versions** — every submitted body is kept on disk, oldest-first.
380
- A version dropdown next to the `v{n}` chip switches the viewer to any past
381
- version; comments are filtered to those anchored to the version you're
382
- reading; a "viewing v{N} of v{M}" banner makes the historical context obvious.
383
- Available from the CLI (`diffing plan versions <id>`, `diffing plan show <id> --version N`),
384
- MCP (`get_plan_versions`, `get_plan_version`), and the HTTP API
385
- (`GET /api/plans/:id/versions`, `GET /api/plans/:id/versions/:n`).
386
- - **Live "Plans" badge** — the diff toolbar shows a badge counting plans awaiting
387
- your review, with a green dot when an agent is connected and waiting.
388
- - **Same channels everywhere** — drive it from the CLI (`diffing plan …`), the
389
- MCP tools (`submit_plan`, `await_plan_review`, …), or the HTTP API
390
- (`POST /api/plans`, `POST /api/plans/:id/decision`, `GET /api/plan-review/await`).
413
+ - **Source / Read / Split** — always-visible view modes in the plan toolbar (`m` cycles). Read uses full main-column width; **Zen** (`z`) immersive full-width focus (Esc exits).
414
+ - **Resizable split** drag the Source|Read divider; double-click resets 50/50.
415
+ - **Renders any markdown plan** — Source via `@pierre/diffs` (commentable lines); Read as polished markdown with outline (`o`) and comments map (`c`).
416
+ - **Line, range & section comments** — gutter `+` or select lines (Source); highlight text → Add comment in Read (multiple floating drafts, range steppers, minimize tray, Esc). **Read mode always shows submitted threads inline** under the matching section.
417
+ - **Severity** optional blocking / nit / question / praise on plan comments (same labels as code review; included in `<plan-review>` handoff XML).
418
+ - **Collapsible threads** — collapse open or resolved cards; collapse the in-card source preview; delete resolved comments and replies.
419
+ - **General comments** — notes scoped to the whole plan.
420
+ - **Four-way verdict** Approve / Request changes / Reject / Comment only (no file edits). Resubmit with the same id bumps version and re-opens review.
421
+ - **Browse plan versions** — version dropdown, historical banner, comments filtered to the viewed version. CLI / MCP / HTTP as below.
422
+ - **Live "Plans" badge** — toolbar badge for plans awaiting review; green dot when an agent is waiting.
423
+ - **Same channels everywhere** CLI (`diffing plan …`), MCP (`submit_plan`, `await_plan_review`, …), HTTP (`POST /api/plans`, `POST /api/plans/:id/decision`, `GET /api/plan-review/await`).
424
+ - **Scratch outside the tree** plan sources under `~/.diffing/<repo>/plan-sources/` (`--save-source`); never commit agent plans into the consumer project.
391
425
 
392
426
  ### Plan Review XML Specification
393
427
 
@@ -404,7 +438,7 @@ self-documenting `<plan-review>` envelope:
404
438
  ## Phase 1
405
439
  …full markdown of the plan being reviewed…]]></plan-body>
406
440
  <comments>
407
- <comment id="c1" line="4" section="Phase 1" status="open" created-at="2026-05-29T18:52:29.557Z">
441
+ <comment id="c1" line="4" section="Phase 1" status="open" severity="blocking" created-at="2026-05-29T18:52:29.557Z">
408
442
  <context><![CDATA[Do the first thing]]></context>
409
443
  <body><![CDATA[Clarify what "the first thing" is.]]></body>
410
444
  <replies>
@@ -416,8 +450,6 @@ self-documenting `<plan-review>` envelope:
416
450
  </plan-review>
417
451
  ```
418
452
 
419
- <img width="1667" height="1087" alt="image" src="https://github.com/user-attachments/assets/00e884b5-4c90-4a9a-9e24-9ae57d80f3f2" />
420
-
421
453
  ---
422
454
 
423
455
  ## Reviewing a GitHub PR
@@ -498,13 +530,16 @@ coexist without colliding.
498
530
 
499
531
  Rich, real-time comment threads directly on diff lines:
500
532
 
501
- - **Inline Threads** — Hover and click the `+` button on any addition or deletion line to start a thread. Supports markdown (GFM + line breaks) with syntax-highlighted fenced code blocks.
502
- - **Multi-Line Comments** — Select a line range to comment on an entire block of code.
503
- - **File-Level Comments** — Add general comments scoped to the entire file without targeting a specific line.
504
- - **Comment Drafts** — Draft system (`diffing-draft-*` keys) with 7-day TTL, stored in the global `.diffing` folder so drafts survive page refreshes without any browser storage footprint.
505
- - **Agent Attribution** — Replies carry `role` (`user`/`agent`) and the agent's `model` name for clear attribution.
506
- - **Suggestion Application** — Parse `` ```suggestion `` code blocks from comment bodies and apply them to the file in one click via `POST /api/comments/:id/apply-suggestion`.
507
- - **Full CRUD API** — REST endpoints for creating, reading, updating, and deleting comments and replies.
533
+ - **Inline Threads** — Hover the gutter `+` or select lines to open a composer **on that line/side** (additions and deletions). Markdown (GFM + breaks) with syntax-highlighted fences. Threads are collapsible.
534
+ - **Multi-Line Comments** — Drag a line range; the form anchors under the bottom line, with a clear `L12–L15 · new|old` label and **range steppers**. Reverse selection is normalized; range is **inclusive** on the agent handoff (`line="12-15"`).
535
+ - **Severity** — Optional triage labels (design-system dropdown): blocking / nit / question / praise. Stored and emitted on agent handoff XML; MCP `create_comment` accepts `severity`.
536
+ - **File-Level Comments** — Notes scoped to the entire file.
537
+ - **Comment Drafts** — Server-side drafts with TTL under `~/.diffing/` (no browser storage).
538
+ - **Agent Attribution** — Replies carry `role` (`user`/`agent`) and `model`.
539
+ - **Suggestion Application** — `` ```suggestion `` blocks (including multi-line) via **Apply suggestion** / `POST /api/comments/:id/apply-suggestion`.
540
+ - **Bulk resolve** — Toolbar **Resolve all** → `POST /api/comments/resolve-all`.
541
+ - **Agent progress** — Agents can `diffing progress` / `report_progress` for a live toast while working.
542
+ - **Full CRUD** — Create, edit, delete (including resolved plan threads), reply, unresolve — CLI, MCP, and HTTP.
508
543
 
509
544
  ---
510
545
 
@@ -632,8 +667,10 @@ When review comments are exported or streamed to a waiting agent, they are seria
632
667
  You are an AI coding assistant receiving a structured list of code review comments to address.
633
668
  For each file, review the inline comments and apply the changes requested.
634
669
  - Target lines are specified by the "line" attribute (e.g. line="42" for single lines, line="42-45" for multi-line blocks, or line="file" for file-level notes).
670
+ - When line="A-B", the range is INCLUSIVE on that side.
635
671
  - "side" indicates whether the comment is on "additions" (new code) or "deletions" (old code).
636
672
  - "status" indicates whether the comment is "open" or "resolved". Only address "open" comments.
673
+ - Optional severity="blocking|nit|question|praise": blocking = must fix; nit = optional polish; question = needs an answer; praise = positive (no change required). Omit (or none) = untriaged.
637
674
  - The <code> block contains the code context at the reviewed lines.
638
675
  - The <body> tag contains the review feedback or request.
639
676
 
@@ -650,7 +687,7 @@ When review comments are exported or streamed to a waiting agent, they are seria
650
687
 
651
688
  <file path="src/utils/parser.ts">
652
689
  <!-- [Example A] Multi-Line Selection Addition Comment -->
653
- <comment id="c1" line="42-45" side="additions" status="open" created-at="2026-05-24T22:00:00.000Z">
690
+ <comment id="c1" line="42-45" side="additions" status="open" severity="blocking" created-at="2026-05-24T22:00:00.000Z">
654
691
  <code><![CDATA[
655
692
  + const parsedToken = tokenize(input);
656
693
  + if (parsedToken.type === 'EOF') {
@@ -666,7 +703,7 @@ When review comments are exported or streamed to a waiting agent, they are seria
666
703
  </comment>
667
704
 
668
705
  <!-- [Example B] Whole-File General Comment -->
669
- <comment id="c2" line="file" side="additions" status="open" created-at="2026-05-24T22:08:00.000Z">
706
+ <comment id="c2" line="file" side="additions" status="open" severity="nit" created-at="2026-05-24T22:08:00.000Z">
670
707
  <body><![CDATA[This parser module needs additional unit tests to cover negative bounds.]]></body>
671
708
  </comment>
672
709
  </file>
@@ -692,22 +729,19 @@ For advanced features, internal API endpoints, sequence specifications, and conf
692
729
 
693
730
  > [!IMPORTANT]
694
731
  > Read the [CLI & Protocol Reference Manual](docs/cli.md) for detailed descriptions of:
695
- > - TTY Auto-Detection and Output Mode resolution.
696
- > - The port-agnostic discovery lockfile mechanics.
697
- > - Monotonic sequence `round` synchronization for race-free polling.
698
- > - Full Web API endpoints schema (`GET /api/review/await`, `POST /api/comments`, etc.).
699
- > - Custom git config shell aliases.
732
+ > - TTY auto-detection and output modes (web / terminal / TUI).
733
+ > - Port-agnostic discovery lockfile (`server.json`) and modes (`web` | `tui` | `gh-pr`).
734
+ > - Full agent CLI surface: `await-review`, `comments`, `reply` / `resolve` / `unresolve`, `comment edit|delete`, `progress`, `plan …`, `gh …`, `inspect`, `doctor`, `completion`, `mcp`.
735
+ > - Complete MCP tool table (session, bounded diff, comment lifecycle, progress, plan).
736
+ > - Monotonic `round` handoff, plan-review XML, and comment XML schemas.
737
+ > - Web API endpoints (`/api/review/await`, `/api/comments`, `/api/plans`, `/api/agent/progress`, …).
738
+ > - Agent guidance: root [`Agents.md`](Agents.md) and installable skills under `skills/`.
700
739
 
701
- ---
702
-
703
- ## Landing Page
740
+ Changelog for the latest release: [`CHANGELOG.md`](CHANGELOG.md) (current package version **0.7.0**).
704
741
 
705
- <img width="1287" height="6579" alt="screencapture-localhost-3000-2026-05-31-20_57_04" src="https://github.com/user-attachments/assets/a163b00e-a85a-428f-b8d5-2a33ff9fa1eb" />
706
742
 
707
743
  ---
708
744
 
709
- 👉🏻 The project was intially forked from **wong2/diffx**
710
-
711
745
  ## License
712
746
 
713
747
  MIT
@@ -0,0 +1,54 @@
1
+ //#region src/lib/apply-suggestion.ts
2
+ /**
3
+ * Extract the first ```suggestion ... ``` fence body from a comment.
4
+ * Returns null when no fence is present.
5
+ */
6
+ function extractSuggestionBlock(body) {
7
+ const match = body.match(/```suggestion\r?\n([\s\S]*?)```/);
8
+ if (!match) return null;
9
+ return match[1];
10
+ }
11
+ /**
12
+ * Apply a suggestion fence to file content.
13
+ *
14
+ * - Single-line comments replace one line.
15
+ * - Multi-line comments (startLineNumber..lineNumber) replace that span with
16
+ * the suggestion lines (which may be shorter or longer than the span).
17
+ * - Suggestion content is split on any common newline style.
18
+ */
19
+ function applySuggestionToContent(input) {
20
+ if (input.side !== "additions") return {
21
+ ok: false,
22
+ error: "Suggestions can only be applied to added or modified lines"
23
+ };
24
+ const suggestion = extractSuggestionBlock(input.body);
25
+ if (suggestion === null) return {
26
+ ok: false,
27
+ error: "No suggestion block found in comment body"
28
+ };
29
+ const useCrlf = input.content.includes("\r\n");
30
+ const lines = input.content.split(/\r?\n/);
31
+ const end = input.lineNumber;
32
+ const start = input.startLineNumber && input.startLineNumber > 0 && input.startLineNumber < end ? input.startLineNumber : end;
33
+ if (start < 1 || end < 1) return {
34
+ ok: false,
35
+ error: "Comment line number out of range"
36
+ };
37
+ if (end > lines.length) return {
38
+ ok: false,
39
+ error: "Comment line number out of range"
40
+ };
41
+ const startIdx = start - 1;
42
+ const deleteCount = end - start + 1;
43
+ let suggestionLines = suggestion.split(/\r?\n/);
44
+ if (suggestionLines.length > 1 && suggestionLines[suggestionLines.length - 1] === "") suggestionLines = suggestionLines.slice(0, -1);
45
+ const next = [...lines];
46
+ next.splice(startIdx, deleteCount, ...suggestionLines);
47
+ return {
48
+ ok: true,
49
+ content: next.join(useCrlf ? "\r\n" : "\n"),
50
+ replacedLines: deleteCount
51
+ };
52
+ }
53
+ //#endregion
54
+ export { applySuggestionToContent };