Skip to content
Fermium

Pages that keep up

An open page shows a newer version of its document by itself. Markdown fills in where you are reading, other pages reload and come back to your place, and a document can say which sections are not written yet.

A document you have open keeps up with its document. When a person or an agent saves a newer version, the page shows it within a second or two, without you reloading.

This works at a document's own link, on your link host and custom domains, in the file viewer that a share link opens, and where the document is shown inside Fermium. It works for everybody who can open the page, signed in or not.

What you see

  • A Markdown page fills in where it is. New and changed blocks appear in place and glow for a moment. What you are reading stays where it is on the screen, also when something lands above it.
  • Any other page loads again and comes back to your place. An HTML page is its author's own, so Fermium reloads it and scrolls back to where you were.
  • It waits when you are in the middle of something. No reload while you are typing in a field, a dialog is open, a video or sound is playing, or you have text selected. A small marker says New version · Reload until you are done or press it. If you typed or chose something in the page, it waits until you press the marker, so a reload never takes what you entered.
  • A marker says what is happening. Being written while versions are arriving for a document that still has sections to write, Updated just now after a change landed, New below when something landed further down than you are.
  • Only a tab that is showing asks. A tab behind another tab asks nothing, and catches up the moment you return to it. A window that is showing beside the one you are typing in counts as showing.

A snippet keeps up the same way a Markdown page does. A Markdown document that carries HTML of its own, or a diagram that changed, is loaded again like an HTML page.

Sections that are not written yet

A document that is still being written can say so. In Markdown, a quote that starts with [!pending] is a section that is not written yet, with what it will say after it:

## What we measured

> [!pending] The four cohorts and the numbers for each

Fermium shows it as a placeholder: Not written yet: The four cohorts and the numbers for each. While versions are arriving, the first placeholder on the page says Being written. A document is finished when it has no placeholder left. Anywhere else the same Markdown reads as an ordinary quote.

This is how an agent can hand you a link in its first minute: it publishes the title and the headings with a placeholder under each, and fills them in while you watch.

The note editor draws a placeholder the same way. It is still a quote there, so you can type over it like any other text.

An agent that writes in front of you

Agents connected to Fermium are told to work this way, in the instructions every MCP session reads, in the usage guide, and in a use case they can download as a skill:

  1. Publish the skeleton first: the title, one line that says what the document is, every section heading, and a placeholder under each.
  2. Give you the link at once.
  3. Fill one section per call with write_section, which names a section by its heading. The page shows each section as it lands.
  4. Say so when no placeholder is left. If the agent stops early, the placeholders that remain show what is missing.

In a note people are editing together, a section an agent writes merges with what they are typing in other sections.

Letters do not appear one by one: a section lands whole when the agent's call arrives. An agent running on Fermium's own hosted runtime cannot write documents yet.

In the note editor

When an agent edits a note you have open in the editor, it is shown with the people present. It is named after the person it writes for: Your agent when it uses your connection, Maria’s agent when it uses hers. A line under the header says it is writing in the note.

  • What it wrote glows for two seconds, in the place where it landed.
  • Follow takes you to each change the agent makes. It is off until you choose it, so an agent never moves the page under somebody who is typing.
  • It leaves by itself. The agent stays among the people present for 45 seconds after its last edit, and for up to ten minutes while the note still has a section that is not written.

None of this is stored in the note. It is how the editor shows the edit.

Switch it off for a page

An HTML page can ask to be left alone. Put this in its <head>:

<meta name="fermium-live" content="off">

That page is then never reloaded or changed by Fermium while it is open.

A dashboard that redraws itself

A page that draws its own numbers can take new numbers in without loading again. Keep the numbers in a file beside the page, data.json say, and let the page listen for fermium:update:

<script>
  const draw = () =>
    fetch("data.json", { cache: "no-store" })
      .then((response) => response.json())
      .then((data) => {
        document.querySelector("#orders").textContent = data.orders;
      });
  draw();
  window.addEventListener("fermium:update", (event) => {
    event.preventDefault(); // this page takes the change in itself
    draw();
  });
</script>

Fermium fires the event when a new version changed only the files beside the page. event.detail.version is the number of the new version. A page that calls preventDefault() is left as it is. A page that does not is loaded again, and so is every page whose own HTML changed.

To update the numbers, replace the file: put_file over MCP, or an upload to the same path. The page's own file stays the same, so nobody watching loses their place or what they typed.

A page reads the files beside it with an ordinary fetch. That works at a link that is open to anyone who has it, and inside Fermium. At the own link of a document that asks who is reading, a page cannot load files beside it: a browser sends no sign-in with the requests a sandboxed page makes. Read such a dashboard inside Fermium, or keep it in one file.

What does not keep up

  • A version you chose in the file viewer. The viewer (fermium.app/view/…, the page with Fermium's header and the discussion) follows the newest version. It stays on a version you picked from history, and on a version you have started to comment on, and says A newer version is available. See File viewer and discussions.
  • Wiki pages show a newer version the next time they are loaded.
  • Forms and apps are never reloaded under somebody who is using them.
  • A file share (an image, a PDF, a download) cannot change: its file is fixed when it is published.

How it works, and what it can see

Fermium adds one small script to the page when it serves it. The stored document is not changed. The script asks the document's own address whether a newer version exists, and for a Markdown page it asks for the newer page.

A page that loads again by itself for a newer version is not counted as a new view. The page tells Fermium a moment before it reloads, and the load that follows from that address is the same visit.

A page that asks who is reading carries a ticket for that one document and that one reader. The ticket can only return what reloading the page would, and each use checks the reader's access again: losing access, signing out everywhere or a changed password stops the updates at the next request. A document open to anyone with its link needs no ticket. The details are in Two origins.