{"type":"video","version":"1.0","html":"<iframe src=\"https://www.loom.com/embed/a7a58ec7bfd54d34b702c395acffe819\" frameborder=\"0\" width=\"1920\" height=\"1440\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>","height":1440,"width":1920,"provider_name":"Loom","provider_url":"https://www.loom.com","thumbnail_height":1440,"thumbnail_width":1920,"thumbnail_url":"https://cdn.loom.com/sessions/thumbnails/a7a58ec7bfd54d34b702c395acffe819-519a5364c72d0f07.gif","duration":102.613,"title":"How discourse node context Badge Calculation Updates Live","description":"This Loom explains the implementation for live preview, focusing on how the batch gets calculated. It describes extracting link text, determining whether it is a discourse link, locating the target in the relation index, and counting its relations to drive the widget decoration. The shared bash element is also used in reading mode, and it updates live by listening to relation.json changes. For example, when a Discord relation is deleted, the relation count drops from 4 to 1, and the displayed value decreases accordingly."}