Conversation

Keeps the newest message in view, and lets you scroll back without losing your place.

  1. What changed in checkout this week?

  2. Scout

    Four changes merged: the wallet button, a retry for declined cards, VAT on invoices, and a new receipt email.

  3. Which of those touch tax?

  4. Scout

    One: PAY-415 moved VAT into the invoice line items, and the old total still adds it.

  5. Who reviewed the VAT change?

  6. Scout

    Mira Patel reviewed it on Tuesday. The tests cover line items, not the total.

  7. Did it ship behind a flag?

  8. Scout

    No. It went out to everyone with Tuesday's 5 PM deploy.

  9. How many EU invoices went out since?

  10. Scout

    1,284 EU invoices since the deploy. 212 of them were paid by card.

  11. Draft a note to finance about the double VAT.

  12. Scout
    Thinking…

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/conversation-viewport

Usage

import { ConversationViewport } from "./ui/uicontext/components/kit/ConversationViewport.ts"import { Thread, type ThreadMessage } from "./ui/uicontext/components/kit/Thread.ts"
export const Transcript = <M>(h: Html.H<M>, messages: ReadonlyArray<ThreadMessage>, me: string) =>	ConversationViewport(h, {		props: {			label: "Conversation with Scout",			maxHeight: 480,			latest: messages.filter((m) => m.actor.id === me).at(-1)?.id,		},		slots: { content: Thread(h, { messages, me }) },	})

Examples

A long session

Four hundred messages from a day with a coding agent. It opens at the newest, and scrolling back stays smooth.

  1. Run the billing tests again.

  2. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  3. Why did invoice.spec.ts fail?

  4. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  5. Try the fix with the rounding helper instead.

  6. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  7. Show me the diff for tax.ts.

  8. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  9. Commit that with a short message.

  10. Forge

    Committed a91f3c2: Round invoice totals once.

  11. Run the billing tests again.

  12. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  13. Why did invoice.spec.ts fail?

  14. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  15. Try the fix with the rounding helper instead.

  16. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  17. Show me the diff for tax.ts.

  18. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  19. Commit that with a short message.

  20. Forge

    Committed a91f3c2: Round invoice totals once.

  21. Run the billing tests again.

  22. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  23. Why did invoice.spec.ts fail?

  24. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  25. Try the fix with the rounding helper instead.

  26. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  27. Show me the diff for tax.ts.

  28. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  29. Commit that with a short message.

  30. Forge

    Committed a91f3c2: Round invoice totals once.

  31. Run the billing tests again.

  32. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  33. Why did invoice.spec.ts fail?

  34. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  35. Try the fix with the rounding helper instead.

  36. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  37. Show me the diff for tax.ts.

  38. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  39. Commit that with a short message.

  40. Forge

    Committed a91f3c2: Round invoice totals once.

  41. Run the billing tests again.

  42. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  43. Why did invoice.spec.ts fail?

  44. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  45. Try the fix with the rounding helper instead.

  46. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  47. Show me the diff for tax.ts.

  48. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  49. Commit that with a short message.

  50. Forge

    Committed a91f3c2: Round invoice totals once.

  51. Run the billing tests again.

  52. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  53. Why did invoice.spec.ts fail?

  54. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  55. Try the fix with the rounding helper instead.

  56. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  57. Show me the diff for tax.ts.

  58. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  59. Commit that with a short message.

  60. Forge

    Committed a91f3c2: Round invoice totals once.

  61. Run the billing tests again.

  62. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  63. Why did invoice.spec.ts fail?

  64. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  65. Try the fix with the rounding helper instead.

  66. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  67. Show me the diff for tax.ts.

  68. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  69. Commit that with a short message.

  70. Forge

    Committed a91f3c2: Round invoice totals once.

  71. Run the billing tests again.

  72. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  73. Why did invoice.spec.ts fail?

  74. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  75. Try the fix with the rounding helper instead.

  76. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  77. Show me the diff for tax.ts.

  78. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  79. Commit that with a short message.

  80. Forge

    Committed a91f3c2: Round invoice totals once.

  81. Run the billing tests again.

  82. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  83. Why did invoice.spec.ts fail?

  84. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  85. Try the fix with the rounding helper instead.

  86. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  87. Show me the diff for tax.ts.

  88. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  89. Commit that with a short message.

  90. Forge

    Committed a91f3c2: Round invoice totals once.

  91. Run the billing tests again.

  92. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  93. Why did invoice.spec.ts fail?

  94. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  95. Try the fix with the rounding helper instead.

  96. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  97. Show me the diff for tax.ts.

  98. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  99. Commit that with a short message.

  100. Forge

    Committed a91f3c2: Round invoice totals once.

  101. Run the billing tests again.

  102. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  103. Why did invoice.spec.ts fail?

  104. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  105. Try the fix with the rounding helper instead.

  106. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  107. Show me the diff for tax.ts.

  108. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  109. Commit that with a short message.

  110. Forge

    Committed a91f3c2: Round invoice totals once.

  111. Run the billing tests again.

  112. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  113. Why did invoice.spec.ts fail?

  114. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  115. Try the fix with the rounding helper instead.

  116. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  117. Show me the diff for tax.ts.

  118. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  119. Commit that with a short message.

  120. Forge

    Committed a91f3c2: Round invoice totals once.

  121. Run the billing tests again.

  122. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  123. Why did invoice.spec.ts fail?

  124. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  125. Try the fix with the rounding helper instead.

  126. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  127. Show me the diff for tax.ts.

  128. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  129. Commit that with a short message.

  130. Forge

    Committed a91f3c2: Round invoice totals once.

  131. Run the billing tests again.

  132. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  133. Why did invoice.spec.ts fail?

  134. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  135. Try the fix with the rounding helper instead.

  136. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  137. Show me the diff for tax.ts.

  138. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  139. Commit that with a short message.

  140. Forge

    Committed a91f3c2: Round invoice totals once.

  141. Run the billing tests again.

  142. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  143. Why did invoice.spec.ts fail?

  144. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  145. Try the fix with the rounding helper instead.

  146. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  147. Show me the diff for tax.ts.

  148. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  149. Commit that with a short message.

  150. Forge

    Committed a91f3c2: Round invoice totals once.

  151. Run the billing tests again.

  152. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  153. Why did invoice.spec.ts fail?

  154. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  155. Try the fix with the rounding helper instead.

  156. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  157. Show me the diff for tax.ts.

  158. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  159. Commit that with a short message.

  160. Forge

    Committed a91f3c2: Round invoice totals once.

  161. Run the billing tests again.

  162. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  163. Why did invoice.spec.ts fail?

  164. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  165. Try the fix with the rounding helper instead.

  166. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  167. Show me the diff for tax.ts.

  168. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  169. Commit that with a short message.

  170. Forge

    Committed a91f3c2: Round invoice totals once.

  171. Run the billing tests again.

  172. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  173. Why did invoice.spec.ts fail?

  174. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  175. Try the fix with the rounding helper instead.

  176. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  177. Show me the diff for tax.ts.

  178. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  179. Commit that with a short message.

  180. Forge

    Committed a91f3c2: Round invoice totals once.

  181. Run the billing tests again.

  182. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  183. Why did invoice.spec.ts fail?

  184. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  185. Try the fix with the rounding helper instead.

  186. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  187. Show me the diff for tax.ts.

  188. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  189. Commit that with a short message.

  190. Forge

    Committed a91f3c2: Round invoice totals once.

  191. Run the billing tests again.

  192. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  193. Why did invoice.spec.ts fail?

  194. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  195. Try the fix with the rounding helper instead.

  196. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  197. Show me the diff for tax.ts.

  198. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  199. Commit that with a short message.

  200. Forge

    Committed a91f3c2: Round invoice totals once.

  201. Run the billing tests again.

  202. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  203. Why did invoice.spec.ts fail?

  204. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  205. Try the fix with the rounding helper instead.

  206. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  207. Show me the diff for tax.ts.

  208. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  209. Commit that with a short message.

  210. Forge

    Committed a91f3c2: Round invoice totals once.

  211. Run the billing tests again.

  212. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  213. Why did invoice.spec.ts fail?

  214. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  215. Try the fix with the rounding helper instead.

  216. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  217. Show me the diff for tax.ts.

  218. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  219. Commit that with a short message.

  220. Forge

    Committed a91f3c2: Round invoice totals once.

  221. Run the billing tests again.

  222. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  223. Why did invoice.spec.ts fail?

  224. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  225. Try the fix with the rounding helper instead.

  226. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  227. Show me the diff for tax.ts.

  228. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  229. Commit that with a short message.

  230. Forge

    Committed a91f3c2: Round invoice totals once.

  231. Run the billing tests again.

  232. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  233. Why did invoice.spec.ts fail?

  234. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  235. Try the fix with the rounding helper instead.

  236. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  237. Show me the diff for tax.ts.

  238. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  239. Commit that with a short message.

  240. Forge

    Committed a91f3c2: Round invoice totals once.

  241. Run the billing tests again.

  242. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  243. Why did invoice.spec.ts fail?

  244. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  245. Try the fix with the rounding helper instead.

  246. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  247. Show me the diff for tax.ts.

  248. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  249. Commit that with a short message.

  250. Forge

    Committed a91f3c2: Round invoice totals once.

  251. Run the billing tests again.

  252. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  253. Why did invoice.spec.ts fail?

  254. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  255. Try the fix with the rounding helper instead.

  256. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  257. Show me the diff for tax.ts.

  258. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  259. Commit that with a short message.

  260. Forge

    Committed a91f3c2: Round invoice totals once.

  261. Run the billing tests again.

  262. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  263. Why did invoice.spec.ts fail?

  264. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  265. Try the fix with the rounding helper instead.

  266. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  267. Show me the diff for tax.ts.

  268. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  269. Commit that with a short message.

  270. Forge

    Committed a91f3c2: Round invoice totals once.

  271. Run the billing tests again.

  272. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  273. Why did invoice.spec.ts fail?

  274. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  275. Try the fix with the rounding helper instead.

  276. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  277. Show me the diff for tax.ts.

  278. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  279. Commit that with a short message.

  280. Forge

    Committed a91f3c2: Round invoice totals once.

  281. Run the billing tests again.

  282. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  283. Why did invoice.spec.ts fail?

  284. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  285. Try the fix with the rounding helper instead.

  286. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  287. Show me the diff for tax.ts.

  288. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  289. Commit that with a short message.

  290. Forge

    Committed a91f3c2: Round invoice totals once.

  291. Run the billing tests again.

  292. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  293. Why did invoice.spec.ts fail?

  294. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  295. Try the fix with the rounding helper instead.

  296. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  297. Show me the diff for tax.ts.

  298. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  299. Commit that with a short message.

  300. Forge

    Committed a91f3c2: Round invoice totals once.

  301. Run the billing tests again.

  302. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  303. Why did invoice.spec.ts fail?

  304. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  305. Try the fix with the rounding helper instead.

  306. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  307. Show me the diff for tax.ts.

  308. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  309. Commit that with a short message.

  310. Forge

    Committed a91f3c2: Round invoice totals once.

  311. Run the billing tests again.

  312. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  313. Why did invoice.spec.ts fail?

  314. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  315. Try the fix with the rounding helper instead.

  316. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  317. Show me the diff for tax.ts.

  318. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  319. Commit that with a short message.

  320. Forge

    Committed a91f3c2: Round invoice totals once.

  321. Run the billing tests again.

  322. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  323. Why did invoice.spec.ts fail?

  324. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  325. Try the fix with the rounding helper instead.

  326. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  327. Show me the diff for tax.ts.

  328. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  329. Commit that with a short message.

  330. Forge

    Committed a91f3c2: Round invoice totals once.

  331. Run the billing tests again.

  332. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  333. Why did invoice.spec.ts fail?

  334. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  335. Try the fix with the rounding helper instead.

  336. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  337. Show me the diff for tax.ts.

  338. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  339. Commit that with a short message.

  340. Forge

    Committed a91f3c2: Round invoice totals once.

  341. Run the billing tests again.

  342. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  343. Why did invoice.spec.ts fail?

  344. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  345. Try the fix with the rounding helper instead.

  346. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  347. Show me the diff for tax.ts.

  348. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  349. Commit that with a short message.

  350. Forge

    Committed a91f3c2: Round invoice totals once.

  351. Run the billing tests again.

  352. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  353. Why did invoice.spec.ts fail?

  354. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  355. Try the fix with the rounding helper instead.

  356. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  357. Show me the diff for tax.ts.

  358. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  359. Commit that with a short message.

  360. Forge

    Committed a91f3c2: Round invoice totals once.

  361. Run the billing tests again.

  362. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  363. Why did invoice.spec.ts fail?

  364. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  365. Try the fix with the rounding helper instead.

  366. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  367. Show me the diff for tax.ts.

  368. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  369. Commit that with a short message.

  370. Forge

    Committed a91f3c2: Round invoice totals once.

  371. Run the billing tests again.

  372. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  373. Why did invoice.spec.ts fail?

  374. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  375. Try the fix with the rounding helper instead.

  376. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  377. Show me the diff for tax.ts.

  378. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  379. Commit that with a short message.

  380. Forge

    Committed a91f3c2: Round invoice totals once.

  381. Run the billing tests again.

  382. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  383. Why did invoice.spec.ts fail?

  384. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  385. Try the fix with the rounding helper instead.

  386. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  387. Show me the diff for tax.ts.

  388. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  389. Commit that with a short message.

  390. Forge

    Committed a91f3c2: Round invoice totals once.

  391. Run the billing tests again.

  392. Forge

    Ran 212 tests: 211 passed, 1 failed in invoice.spec.ts.

  393. Why did invoice.spec.ts fail?

  394. Forge

    The total rounds each line before adding VAT, so 3 lines of €0.335 come to €1.02 instead of €1.01.

  395. Try the fix with the rounding helper instead.

  396. Forge

    Done. roundCurrency now runs once on the total. All 212 tests pass.

  397. Show me the diff for tax.ts.

  398. Forge
    diff
    - const total = lines.map(round).reduce(add)
    + const total = round(lines.reduce(add))
  399. Commit that with a short message.

  400. Forge

    Committed a91f3c2: Round invoice totals once.

API reference

Props

ConversationViewport props
NameTypeDescription
labelrequiredstringThe region's accessible name: "Conversation with the agent"
maxHeightnumberThe tallest the viewport grows, in CSS pixels; without it, a constrained parent sizes it
lateststringThe id of the reader's own newest message. When it changes (they sent something), the view jumps to the bottom and follows again, even if they had scrolled back.
unreadstringThe element id of the unread line: the view opens there, and a pill leads back to it
unreadLabelstringThe pill's words while the unread line is above the view: "3 new messages"

Events

ConversationViewport events
EventPayloadDescription
ReachedStart{}The reader scrolled to the top: load older messages, if there are any

Slots

content

Accessibility

  • The conversation is a named region that takes keyboard focus, so the arrow keys and Page Up and Page Down scroll it.
  • Scrolling up stops following new messages; Jump to latest scrolls to the end and moves focus back to the conversation.
  • If the app already owns the scroll region, mount AttachConversationViewport on that same named, focusable element. Keep the growing content in its first child and use the mount's canJump state to render the Jump to latest button.

Source