<rss version="2.0">
  <channel>
    <title>Thomas Sileo</title>
    <link>https://hexa.ninja</link>
    <description>Thomas Sileo - Devlog</description>
    <generator>Zine -- https://zine-ssg.io</generator>
    <language>en-US</language>
    <lastBuildDate>Fri, 27 Feb 2026 22:23:44 +0000</lastBuildDate>
    
      <item>
        <title>bigbrowser: build provenance for bigbrowser’s Firefox web extension
</title>
        <description>&lt;div id=&quot;2026-01-22t00:00:00&quot;&gt;&lt;h2&gt;&lt;a class=&quot;&quot; href=&quot;#2026-01-22t00:00:00&quot;&gt;bigbrowser: build provenance for bigbrowser’s Firefox web extension&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Installing a Firefox extension requires a signed build (the .xpi file), and the process to get it signed is a bit cumbersome:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It requires a Mozilla Addons account&lt;/li&gt;&lt;li&gt;Each built version needs to be uploaded/validated/signed&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I’ve tried to come up with a process to build and sign the extension in a way that can be “trusted”.&lt;/p&gt;&lt;p&gt;What I mean by trusted is how can I make people trust that the extension I provide was built using the code publicly available in the repo.&lt;/p&gt;&lt;p&gt;A common concept to help with that is “build provenance”, which is basically providing trustable metadata about the process.&lt;/p&gt;&lt;p&gt;The &lt;a href=&quot;https://slsa.dev/&quot; target=&quot;_blank&quot;&gt;SLSA (Supply-chain Levels for Software Artifacts)&lt;/a&gt; security framework is trying to come up with some standard about &lt;a href=&quot;https://slsa.dev/spec/draft/build-provenance&quot; target=&quot;_blank&quot;&gt;build provenance&lt;/a&gt;, but I looked at it mainly for inspiration.&lt;/p&gt;&lt;p&gt;I am using &lt;a href=&quot;https://man.sr.ht/builds.sr.ht/&quot; target=&quot;_blank&quot;&gt;Sourcehut builds&lt;/a&gt; for CI, which is a joy to work with and made the process quite easy.&lt;/p&gt;&lt;p&gt;Here’s my version of a simplified build provenance for the web extension:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The whole build/signing/uploading happens in a public CI build run&lt;ul&gt;&lt;li&gt;This helps prove that the extension is built with the public code for a given tag&lt;ul&gt;&lt;li&gt;Mozilla provides an API to sign extensions&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;It prints the SHA-256 hash of the signed extension after signing/before uploading&lt;ul&gt;&lt;li&gt;Artifacts are stored in a Backblaze B2 bucket&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;It uploads the metadata in a bucket along with the build artifact:&lt;ul&gt;&lt;li&gt;date&lt;/li&gt;&lt;li&gt;artifact hash&lt;/li&gt;&lt;li&gt;CI job ID&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Anyone can look at the job run and confirm it generated/uploaded this specific build&lt;ul&gt;&lt;li&gt;The bucket is public and the download page will display the metadata&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This process is way better than “trust me you can download this extension that I built locally on my machine”.&lt;/p&gt;&lt;p&gt;I will see how I can improve it over time but I feel like this is a good start!&lt;/p&gt;&lt;/div&gt;</description>
        <link>https://hexa.ninja/devlog/#2026-01-22t00:00:00</link>
        <pubDate>Thu, 22 Jan 2026 00:00:00 +0000</pubDate>
        <guid>https://hexa.ninja/devlog/#2026-01-22t00:00:00</guid>
      </item>
    
      <item>
        <title>bigbrowser: improving navigation trails
</title>
        <description>&lt;div id=&quot;2025-12-10t00:00:00&quot;&gt;&lt;h2&gt;&lt;a class=&quot;&quot; href=&quot;#2025-12-10t00:00:00&quot;&gt;bigbrowser: improving navigation trails&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In bigbrowser, a navigation trail starts when a tab is opened, and ends whenever that tab is closed, tracking all transitions in between. This led to weird behavior where I would follow links within a website, and then go to a totally different website by typing it into the address bar, and it would continue the existing trail.&lt;/p&gt;&lt;p&gt;I am updating bigbrowser to automatically reset trails based on the transition type.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;link&lt;/code&gt;: clicked on a link within a page&lt;/li&gt;&lt;li&gt;&lt;code&gt;auto_bookmark&lt;/code&gt;: clicked on a bookmark&lt;/li&gt;&lt;li&gt;&lt;code&gt;typed&lt;/code&gt;: typed url in the address bar&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en-us/docs/mozilla/add-ons/webextensions/api/webnavigation/transitiontype&quot; target=&quot;_blank&quot;&gt;…&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And in bigbrowser’s case, I want to try starting a new trail on &lt;code&gt;typed&lt;/code&gt; and &lt;code&gt;auto_bookmark&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;This information is gathered in the extension using the &lt;a href=&quot;https://developer.mozilla.org/en-us/docs/mozilla/add-ons/webextensions/api/webnavigation/transitiontype&quot; target=&quot;_blank&quot;&gt;webNavigation&lt;/a&gt; API.&lt;/p&gt;&lt;p&gt;Aas usual there’s browser compatibility issues:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Firefox doesn’t expose &lt;code&gt;transitiontype&lt;/code&gt; in &lt;code&gt;oncompleted&lt;/code&gt; events, only in &lt;code&gt;oncommitted&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=1623654&quot; target=&quot;_blank&quot;&gt;Firefox doesn’t support the &lt;code&gt;auto_bookmark&lt;/code&gt; transition at all&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Excited to see how it improves the trails!&lt;/p&gt;&lt;/div&gt;</description>
        <link>https://hexa.ninja/devlog/#2025-12-10t00:00:00</link>
        <pubDate>Wed, 10 Dec 2025 00:00:00 +0000</pubDate>
        <guid>https://hexa.ninja/devlog/#2025-12-10t00:00:00</guid>
      </item>
    
      <item>
        <title>TIL about CSS scroll-margin
</title>
        <description>&lt;div id=&quot;2025-11-27T00:00:00&quot;&gt;&lt;h2&gt;&lt;a class=&quot;&quot; href=&quot;#2025-11-27T00:00:00&quot;&gt;TIL about CSS scroll-margin&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;I am working on the bigbrowser documentation website, and the page has a sticky navigation bar at the top.&lt;/p&gt;&lt;p&gt;Everything was working well until I decided to add a basic table of content. Clicking on a section would scroll to the correct location, but the section title was hidden behind the sticky navbar.&lt;/p&gt;&lt;p&gt;It turns out there’s a CSS property designed to help with this use case: &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/scroll-margin&quot; target=&quot;_blank&quot;&gt;scroll-margin-top&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;It’s mainly used for “scroll snapping” (which I’d never heard of before either). This helps implement carousel-style scrolling where content “snaps” into place (the MDN page shows an example). But since it also affects anchored links scroll positions, that’s exactly what I needed.&lt;/p&gt;&lt;p&gt;Here’s the fix, it can be applied to headings directly, and anchored links will magically have a 80px margin top:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#docs h2[id],
#docs h3[id] {
    scroll-margin-top: 80px;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I had no idea that “offsetting” the scroll was natively supported in CSS, it’s quite nice not having to resort to any hack!&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;/devlog/til-scroll-margin.png&quot;&gt;
&lt;figcaption&gt;The heading is now properly positioned below the sticky navbar&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;/div&gt;</description>
        <link>https://hexa.ninja/devlog/#2025-11-27T00:00:00</link>
        <pubDate>Thu, 27 Nov 2025 00:00:00 +0000</pubDate>
        <guid>https://hexa.ninja/devlog/#2025-11-27T00:00:00</guid>
      </item>
    
      <item>
        <title>bigbrowser: content extraction weirdness
</title>
        <description>&lt;div id=&quot;2025-11-17T00:00:00&quot;&gt;&lt;h2&gt;&lt;a class=&quot;&quot; href=&quot;#2025-11-17T00:00:00&quot;&gt;bigbrowser: content extraction weirdness&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;While reviewing the results of the content extractor (used to power the history search engine), I ended up with CSS rules as part of the extracted text.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;.css-1x8m391 { fill: rgb(7, 79, 105); } extracted content
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At first, I thought that the website somehow embedded CSS style outside of regular &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags.&lt;/p&gt;&lt;p&gt;It turns out that the indexed website is using XHTML (as in &lt;code&gt;&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; lang=&amp;quot;en&amp;quot;&amp;gt;&lt;/code&gt;) and uses some namespaced &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags: &lt;code&gt;&amp;lt;a0:style&amp;gt;&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;This is my first time stumbling upon namespaced tags while processing HTML documents.&lt;/p&gt;&lt;p&gt;bigbrowser uses &lt;a href=&quot;https://github.com/servo/html5ever&quot; target=&quot;_blank&quot;&gt;html5ever&lt;/a&gt; for content extraction and the namespace is included as part of the tag local name.&lt;/p&gt;&lt;p&gt;This was kind of unexpected to me, but XHTML is XML and it makes sense for a “pure” HTML parser to parse the whole tag without parsing the namespace.&lt;/p&gt;&lt;p&gt;As a result, I ended up using &lt;code&gt;tag_name_str.ends_with(&amp;quot;:style&amp;quot;)&lt;/code&gt; to detect style tags.&lt;/p&gt;&lt;/div&gt;</description>
        <link>https://hexa.ninja/devlog/#2025-11-17T00:00:00</link>
        <pubDate>Mon, 17 Nov 2025 00:00:00 +0000</pubDate>
        <guid>https://hexa.ninja/devlog/#2025-11-17T00:00:00</guid>
      </item>
    
  </channel>
</rss>
