Skip to content

Why we left Electron: the exam that moved on the page

Tziyun B'Rega printed exams through a hidden Chrome window, and later pages drifted. We tried LaTeX twice, then found Folio, Go and Wails. The project history shows the path.

6 min read

A stack of printed sheets fanned out, each one sitting a hair away from the next, beside a printer in golden light.

6 min read

In a 35-page test, the last page of exams printed several millimetres away from where the first page had put the same content. A person would hardly notice. The software that reads an exam after it is ticked expects every sheet to land on the paper in exactly the same place.

That drift started the search that ended with Tziyun B’Rega leaving Electron (opens in a new tab). This story follows it through the project’s commit history, with its dates and its deleted files. There are no written decision records (short notes the team wrote when it chose between options) for this early period, so the history is what we have.

What is a project’s history?

A repository is the folder where a project’s files are kept together with a record of every change. Each time someone saves a set of changes with a short note, that is called a commit, so the history reads like a diary with dates. We use it to see what we did and when.

We did not know Go (opens in a new tab) when we started. Every step below was a try, and several ended in a retreat.

Key points

  • In a 35-page test, the last page printed several millimetres away from where the first page put the same content.
  • Electron printed through a hidden Chrome window. The fix that worked, one hidden window per copy, was blunt and heavy on memory.
  • We tried LaTeX twice. It took about 800 MB on disk, too much for a program that must be easy to download and run offline.
  • We ended up on Folio, Go and Wails, and the Electron code was taken out of the app between May and July 2026.

First foundation: Tauri and LaTeX (November 2025)

The project was created on 31 October 2025. On 1 November it was set up as a Tauri (opens in a new tab) program with AMC (opens in a new tab), an existing exam tool, added to the project, and a Rust (opens in a new tab) program that wrote LaTeX (opens in a new tab) files for the exams.

LaTeX is a document-layout program. Give it the same input and you get the same page every time, which is exactly what a printed exam needs. On 10 November we committed a portable copy of it, TinyTeX (opens in a new tab) for Windows and Mac: 14,317 files in one commit. Three days later, on 13 November, we removed that folder again (14,797 files). The same day a run of cleanup commits, one of them titled “clean project before refacture” (quoted as written), took out AMC and the LaTeX code.

A note we wrote on 10 November shows the other problem. The TinyTeX we had was missing the add-on packages for Hebrew and right-to-left text, and fetching them needed the internet the first time. For an offline product, that was already a warning.

Second foundation: Electron and a hidden Chrome window (from 19 November 2025)

On 19 November the commit “working pdf generation tested” (spelling fixed here) is the first Electron code in the project. Electron wraps a website in a desktop program by shipping a copy of Chrome inside it. To make a PDF, the program opened a hidden Chrome window, loaded the exam as a web page and asked Chrome to print it. For several months this was the product.

The lists of outside code the program relied on (its dependency files) from that period show JavaScript PDF tools such as jsPDF and pdf-lib. The history does not show a series of other JavaScript PDF tools being tried and dropped, so we will not claim one.

The pages that moved

By April 2026 we had seen that when many exam copies were printed in one batch, content on the later pages sat lower or higher than on the first. On 6 April we wrote down the root cause. When Chrome prints a long document, it lays all the pages out as one very tall page and slices it, and each slice has a slightly different tiny offset. Printing three copies at a time reduced the drift and did not remove it.

The fix that worked was blunt: one hidden Chrome window per copy, on 6 April. Positions came out right. The price was a hidden browser window for every copy, which used a lot of memory and was fragile. The same day we added a limit of ten copies at a time, to stop the program running out of memory.

LaTeX again, as a switch (April 2026)

On 12 April we wrote a design for bringing TinyTeX back, this time inside Electron, and on 13 April it landed. It sat behind a setting, so the old Chrome path stayed as the default and as a fallback. The design says TinyTeX would be bundled on Windows and downloaded on first use on Mac and Linux.

The Windows download alone was about 163 MB compressed, according to that design. A later note puts TinyTeX at about 800 MB on disk. The program has to be easy to download, and it has to run offline and from a USB stick. That was too much weight for a program like that. LaTeX never became the default, and the plan files were deleted on 16 October 2026. They remain in the history.

Folio, then Wails and Go (May 2026)

Meanwhile the scanner and the image work were moving to Go, where the libraries were better. We found Folio (opens in a new tab), an open-source Go library that turns HTML directly into PDF, with no browser and no extra tools. In our own copy we added Hebrew fixes: vowel marks and right-to-left text.

With printing in Go too, Node and Chrome had nothing left to do. The Wails (opens in a new tab) plan was committed on 2 May 2026, and a first running Wails window appeared on 3 May. On 7 May a commit removed Electron’s files from the app, and the whole Electron folder was deleted on 9 July.

Wails builds a desktop program in Go and shows the screen with the web view that Windows and macOS already have, so no copy of Chrome travels with it. The first written decision record is dated 14 May 2026.

The path, in order
  1. 1 November 2025Set up with Tauri, with AMC and a Rust program that wrote LaTeX files
  2. 13 November 2025Cleanup: AMC, the LaTeX code and the TinyTeX folder removed
  3. 19 November 2025First Electron code: printing through a hidden Chrome window
  4. 6 April 2026Cause of the drifting pages written down; one hidden Chrome window per copy
  5. 13 April 2026LaTeX back as a setting, with Chrome still the default
  6. 2 May 2026Wails plan committed
  7. 7 May 2026First commit removing Electron’s files from the app

How we learned Go

We did not know Go before this. We leaned heavily on AI coding assistants, and we learned to give them written rules and reusable skills so the code stayed tidy and decisions got recorded. Many commit messages in the history credit the assistant.

What we cannot tell from the record

We remember the drift as about a centimetre. The written measurement says several millimetres on page 35 of a test. We would rather print the measurement than the memory.

Read next

Printing without the print dialog: learning from how Chrome does itThe first idea was to hand printing to the operating system and let people sort out the options. That was a mistake. Here is how we cut the choices down to three, and how reading Chromium's source helped.Finding the scanner, and taking over its settingsA teacher should press one button and get a scan. Behind that button are a search for the scanner, a list of settings nobody should have to touch, and a Windows firewall surprise.

Got something to build? Let's talk.

No sales pitch. Tell us what your business needs and we'll tell you straight how we'd tackle it, or whether you need it at all.

9 stories about Tziyun B'Rega

All 9 stories

"Why can't you just scan it?" How Tziyun B'Rega beganIt started with one email asking a simple question. The studio's account of the first search, a lottery-ticket comparison, a childhood memory of bubbles, and why we built our own reader.How we chose the tools: Tauri, Electron, then Wails and GoWe started with Rust and Tauri, went back to the tools we knew, and ended up with Go and Wails, which we never planned. The lesson: pick tools you can deliver with.Why we left Electron: the exam that moved on the pageYou are reading this story. Tziyun B'Rega printed exams through a hidden Chrome window, and later pages drifted. We tried LaTeX twice, then found Folio, Go and Wails. The project history shows the path.Printing without the print dialog: learning from how Chrome does itThe first idea was to hand printing to the operating system and let people sort out the options. That was a mistake. Here is how we cut the choices down to three, and how reading Chromium's source helped.Finding the scanner, and taking over its settingsA teacher should press one button and get a scan. Behind that button are a search for the scanner, a list of settings nobody should have to touch, and a Windows firewall surprise.Building Windows software from a Mac: a borrowed computer, a virtual machine and a photo of an errorSchools run Windows. We work on a Mac and Ubuntu. This is how Tziyun B'Rega learned to build and test for Windows, and the photo that taught us the most.A mouse pointer that looked wrong on WindowsThe same program can look different on every operating system. One day the mouse pointer changed on Windows, so we chose our own pointer and learned to test the small things.Watching a school computer from far away: what the logs taught us about small computersTziyun B'Rega sends its logs home so we can see it work where we cannot visit. A small computer in a remote town showed us that a computer's size, and in the end its processor, decides how well the program runs.Offline first, but is it really always offline?Tziyun B'Rega works without an internet connection, but a few features need one. Telling the two cases apart turned out to be harder than we expected.
Accessibility menu

Keyboard shortcuts

Open accessibility menuAlt+A
Accessibility statement

These settings are saved on your device only and are used to adjust the display. They do not change the site content and send no information to any server.