Changelog

文档暂时只有英文。

What changed in Tifa that apps and their users can see. From v0.0.1 on, changes are grouped by release. Older changes are grouped by the date they reached main. The format follows Keep a Changelog. Performance has how each speedup was measured. An entry that apps must act on ends its bullet with the word Upgrading, a colon and the steps, which go tool tifa upgrade prints.

[Unreleased]

[0.5.2] - 2026-11-25

Changed

  • The docs index in the Tifa block of AGENTS.md now shows the whole summary of each doc, with the names, settings and commands it covers, so a coding agent can tell which doc answers its question.

Fixed

  • tifa dev on Windows no longer fails a rebuild when another program holds an old copy of the app open. When the app does not answer in time, the log now says what the last check saw and whether the app process still ran.

[0.5.1] - 2026-11-24

Added

  • An app from tifa new can back up its database to Cloudflare R2, AWS S3 or another S3 store: set the option db.backup (DB_BACKUP, --db-backup) to the URL of the store, and AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment or .env. Every commit is in the store about a second later, and a start that finds no database file restores it from there, as on a new machine. Empty, the default, backs up nothing. An app made earlier can add the code from Back it up.

Changed

  • Back it up in the database guide is now a how-to for the backup to R2: making the bucket and its token, setting the keys on the server with tifa deploy env set, moving to a new machine, undoing a bad deploy by going back to the second before it, and what it costs on R2. VACUUM INTO stays for a one-off copy. The driver says how it answers database is locked, write speed and losing the machine.

[0.5.0] - 2026-11-24

Added

  • The managed block of AGENTS.md that tifa new and tifa agents write ends with an index of the docs for apps of the Tifa version in use: one line per doc with its path and the first clause of its summary, grouped by section folder, and where the folder is. A coding agent sees which doc to open without running go tool tifa docs first. go tool tifa upgrade and go tool tifa agents write it.

Changed

  • The managed block of AGENTS.md is about a third shorter, index included: it keeps the conventions, the commands, the build rules of Load and the test helpers in short form, and leaves the details (the table of returned errors, the hooks, the flags of tifa dev and tifa errors) to the docs it names. It no longer says that tifa dev misses a change to schema.sql, which it rebuilds on since it watches embedded files.

  • tifa dev and tifa build no longer compile plain stylesheets (a .css file imported for its side effect) for the server render, which has no use for CSS. Tailwind and Vite's CSS step now run for the browser only. A save of a .ts or .tsx file in examples/shop takes about 2.1 s for the bundle step instead of 2.4 s (median of 12 saves each, on an Apple M4). dist/ssr.js and its map are byte for byte the same. A stylesheet that does not compile still fails the bundle step. .tifa/dist/inputs.json lists fewer files under tifa dev: not the files a stylesheet imports nor the ones Tailwind scans.

  • With deploy.front: none, tifa deploy makes the app serve visitors itself instead of listening on 127.0.0.1 only, where nothing outside the server reached it. With a domain as the host of site.url, systemd opens ports 443 and 80 for the app and the app runs its built-in HTTPS with a certificate from Let's Encrypt, kept in /srv/tifa/<app>/certs. Without a domain (no site.url, an IP address or localhost) it serves plain HTTP on port 80. Setup sets net.ipv4.ip_unprivileged_port_start = 80 once per server as root so the app needs no root, stops before changing anything when another app or a program such as nginx or Caddy listens on those ports, and says which ports the firewall must let in. When ufw is on and blocks them, the plan of setup allows them as root, once you agree or with --yes, in rules with the comment tifa <app> (ufw allow 80/tcp comment 'tifa <app>'). tifa deploy remove, and setup once the app no longer serves visitors on a port, deletes only the rules with that comment, and no other rule, the one of ssh among them. Tifa does not change the firewall or the security groups of your provider. After a deploy it prints visitors: <url> and whether the ports answered from your machine. See The app serves visitors itself.

    Upgrading: the next go tool tifa deploy setup moves an app with front: none from the loopback to ports 80 and 443. If your own proxy (Caddy, nginx) holds those ports in front of it, setup stops and names it: stop the proxy and keep it from starting at boot, or set deploy.front: cloudflare. With several apps of front: none on one server, only one can move, and the others need front: cloudflare. When ufw is on, the plan of setup opens ports 80 and 443 (or 80 without a domain) there. Open them in the firewall or security group of your provider if it blocks them.

Fixed

  • The db.go that tifa new writes opens SQLite with _txlock=immediate, so a transaction takes the write lock at BEGIN and waits its turn there, instead of failing with database is locked when another request writes between its first read and its first write. A transaction that only reads should start with sql.TxOptions{ReadOnly: true}. An app made earlier can add &_txlock=immediate to the address in its db.go. See When a write gets database is locked.
  • On Windows, a rebuild of tifa dev right after the app started could fail with "rename ... bin\tifa-dev.exe ...: The process cannot access the file because it is being used by another process" while another program, such as a virus scanner, read the new program. tifa dev now waits up to 2 seconds for it, as the go command does.

[0.4.2] - 2026-11-24

Added

  • A guide to logs, Logs: where the logs of an app are in tifa dev, on a server and in a container, what Tifa itself logs, how to log from your code with log/slog, how to set the format and the level, and a request log made with tifa.SetHTTPHandler.

Changed

  • Server rendering runs on beastjs v0.33.0, the engine that was named slowjs. The engine is the same, and only its module path and names changed.

[0.4.1] - 2026-11-23

Added

  • The docs for writing an app now have a Chinese version beside each English file (docs/guides/forms.zh-CN.md beside docs/guides/forms.md), shipped in the module. go tool tifa docs --lang zh-CN lists them with their Chinese summaries. Without --lang the English docs are listed, and the language is never chosen for you.

Changed

  • The docs of Tifa are grouped in folders by what they are for: docs/start/, docs/pages-and-data/, docs/guides/, docs/build-and-deploy/ and docs/reference/ for writing and running an app, and docs/internals/ for developing Tifa. go tool tifa docs prints the new paths, such as docs/start/app.md where it printed docs/app.md. Upgrading: run go tool tifa agents so the notes and the skill of your app name the new paths.

[0.4.0] - 2026-11-23

Changed

  • Breaking: a key in tifa.yaml that is not a setting of Tifa now fails tifa check, build, dev and the deploy commands at its line, such as tifa.yaml line 3: deploy.ssh is not a setting of tifa.yaml, with did you mean when a name is close, the settings of its section, and where the options of an app go. Before, such a key was ignored without a word, so a leftover deploy.ssh: cloudflare deployed as direct. tifa.yaml holds only the settings of Tifa, and the options of an app, also in a section of Tifa such as server.name, go in a flag, an environment variable, .env or the file of -c. -c files, .env and the environment are not checked. Upgrading: delete the keys that are not settings of Tifa from tifa.yaml, and move the options of your app to .env, the environment or a flag.

Removed

  • Everything that only carried an app or a repository from an older Tifa to this one. Tifa has no users on older versions to carry. tifa deploy setup no longer recognises the secrets and the variable of earlier setups (DEPLOY_SSH_KEY, DEPLOY_KNOWN_HOSTS, DEPLOY_HOST, CF_ZONE_ID, CF_CACHE_PURGE_TOKEN, CF_PURGE_TOKEN, CF_ACCESS_CLIENT_ID, CF_ACCESS_CLIENT_SECRET, TS_OAUTH_CLIENT_ID, TS_OAUTH_SECRET and the variable TIFA_DEPLOY), the OAuth client of Tailscale (TIFA_DEPLOY_TAILSCALE_CLIENT_ID and TIFA_DEPLOY_TAILSCALE_SECRET), the purge token and zone ID kept as repository secrets by v0.1.18, and the ssh host name made from the domain alone. The workflow it writes no longer hands a purge token to Tifa, and no longer has an OAuth form for Tailscale. tifa deploy no longer stops on DEPLOY_HOST, CF_CACHE_PURGE_TOKEN or CF_ZONE_ID in .env, and no longer says what to write for deploy.host, deploy.ssh, deploy.ci, deploy.github, deploy.domain or deploy.cdn. The program and the build no longer warn about cache.size, cache.whole_page, cache.ignore_query and cache_control.s_maxage, and --cache-size and the other flags of those settings are gone. The build no longer has special messages for a hooks.ts, a route.tsx, a config.go that holds options, LayoutSSR, RenderCache, BodyLimit and ReadTimeout constants in route.go, or an htmlAttributes export of the root Layout. Upgrading: an app on an older Tifa edits tifa.yaml to the current keys and runs go tool tifa deploy setup again, see Deploy. The names and the files above are no longer checked. A left over key in tifa.yaml fails as an unknown setting (see the entry under Changed), and a left over environment variable or .env line is ignored.

[0.3.0] - 2026-11-23

Added

  • deploy.auto.branch and deploy.auto.needs choose what deploys from GitHub Actions. branch is the branch whose pushes deploy, and left out it is the default branch of the repository as before. needs is the file in .github/workflows that must pass first, and left out it is ci.yml. needs: none deploys every push to the branch without waiting. tifa deploy setup reads the file: it must exist, have a name: line (GitHub's workflow_run finds a workflow by its name) and run on a push to the branch (on: as a word, a list or a mapping, with the branches and branches-ignore filters of GitHub). Otherwise the plan lists it as something for you and setup exits with an error that says to fix the file, change needs or write needs: none. GitHub starts a workflow that waits for another only from the file on the default branch, so with another branch the plan says to commit the workflow to the default branch. The deploy job also checks that the workflow run it follows came from the file in needs, since two workflows can share a name. The subject of the Tailscale identity that setup prints now has the ref the deploy job runs with: the default branch after needs passed, and branch with needs: none. It prints both forms of the subject, the one with the owner and repository IDs that GitHub sends for repositories made after July 15, 2026, and says how to see which one is sent. An identity whose audience variable is missing or is not the one of the client ID is made right from the client ID in the repository, and any deploy.auto.* key, written dotted or in a block, turns deploy.auto on.
  • CI joins the tailnet with Tailscale workload identity federation instead of an OAuth client secret. The workflow of connect: tailscale has id-token: write and passes oauth-client-id and audience from the repository variables TIFA_DEPLOY_TAILSCALE_ID and TIFA_DEPLOY_TAILSCALE_AUDIENCE, which are not secret. In the Tailscale console, make a credential with the GitHub issuer, the subject setup prints and the scope auth_keys for tag:ci, then run go tool tifa deploy setup --tailscale-client-id <client ID> (on a terminal, setup asks for it). Upgrading: a workflow written by v0.2.x keeps working with its OAuth secrets until you do that. Make the credential, run setup with its client ID, commit and push the new workflow, then run setup again: it removes the secrets TIFA_DEPLOY_TAILSCALE_CLIENT_ID and TIFA_DEPLOY_TAILSCALE_SECRET once the workflow on the default branch no longer uses them. Delete the OAuth client in the Tailscale console yourself.

Removed

  • tifa deploy setup --tailscale-oauth and the page that took an OAuth client secret. The Tailscale identity of CI has no secret: use --tailscale-client-id <client ID>. Upgrading: replace the flag as the entry above says.

Changed

  • Breaking: deploy.ssh is now deploy.connect, with the same values direct, cloudflare and tailscale and the same meaning: the one path ssh takes to the server, from your machine and from the runner. deploy.ssh in tifa.yaml stops tifa check, build, dev and every tifa deploy command at its line with deploy.ssh is now deploy.connect: write connect: <the value>. Upgrading: in the deploy section of tifa.yaml, change ssh: to connect:.
  • Breaking: deploy.ci is replaced by the block deploy.auto. The block being there turns deploys from GitHub Actions on, auto: {} takes the defaults, and auto: with nothing after it, or a key other than branch and needs, is an error. deploy.ci in tifa.yaml stops the same commands with deploy.ci is now the block deploy.auto: replace ci: github with auto: {}. A repository with ci: github and no ci.yml used to deploy on every push: it now needs ci.yml with a name: or needs: none. Upgrading: replace ci: github with auto: {}, and delete ci: none. If the app has no .github/workflows/ci.yml, or yours has another file name, write auto: with needs: <file> (or needs: none) under it.
  • tifa check and tifa build now run the deploy checks that need no network, and tifa dev shows the same problems as warnings and keeps running, once at the start and again when tifa.yaml or a workflow file changes. They stop on settings that cannot work together (connect: tailscale without auto, connect: cloudflare without front: cloudflare, front: cloudflare without site.url), and with auto on, on a needs file that is missing, has no name: or does not run on a push (to the branch, when auto.branch is written: the default branch is known to GitHub only, so setup matches that). The messages are the ones tifa deploy gives. A tifa.yaml that does not parse, deploy.ssh and deploy.ci stay errors everywhere. An empty needs: or branch: says what to write.
  • The tifa.yaml that tifa new writes shows connect: direct and the block auto with branch and needs, commented out.

[0.2.2] - 2026-11-23

Added

  • tifa deploy setup remembers the servers it sets up in ~/.tifa/config.yaml (TIFA_HOME moves the folder, and the file holds no secret): the server's host name and machine ID, the host a new app uses, and the apps, each by the folder of its checkout with the host that worked for it (with ssh: cloudflare, the ssh host name of its domain once the tunnel check passed). An app that names no server through --host, TIFA_DEPLOY_HOST or .env now uses the only server in the file, or the one that lists its folder, and tifa deploy prints one line that says which and what to put in .env to name another. With several servers and no way to tell, it stops, lists them and says to set TIFA_DEPLOY_HOST=<host> in .env or pass --host. A host taken from the file is checked against the machine ID the server reports in the command's first probe, and a mismatch stops the command. tifa deploy remove takes the app off the file once it finished with nothing left for you. A second app on the same machine needs no TIFA_DEPLOY_HOST any more. GitHub Actions never reads the file.
  • deploy.ssh: cloudflare now takes your own machine through the Cloudflare Tunnel too, so the server needs no open ssh port for anyone. tifa deploy setup adds the email of your cf login to a policy of the Access application it made for the ssh host name (a second person's setup adds theirs next to it), installs cloudflared when it is missing (brew install cloudflared on macOS, winget install --id Cloudflare.cloudflared -e on Windows, a link elsewhere), writes a marked block at the top of ~/.ssh/config, checks that ssh tifa@<ssh host> works (the first time cloudflared opens the Cloudflare Access login in your browser and waits for you, up to 4 minutes), and then moves TIFA_DEPLOY_HOST to the ssh host. tifa deploy remove takes the policy and the block away. Tifa does not change the firewall of the server: close its ssh port yourself once a deploy through the tunnel worked. Setup makes the Access application and a policy before it publishes the route and record of the ssh host name, and publishes nothing when no policy can be made. Upgrading: nothing is required. An app already set up with ssh: cloudflare and ci: github keeps its Access application and token, and the next go tool tifa deploy setup adds the items for your machine.

Changed

  • When the check of ssh through the tunnel at the end of tifa deploy setup fails, it says the key must be in /srv/tifa/.ssh/authorized_keys only if ssh got to authentication (Permission denied). Any other failure shows the output and does not blame the key.
  • The commented deploy.ssh line of the tifa.yaml that tifa new writes says ssh through Cloudflare covers CI and this machine.
  • deploy.ssh: cloudflare no longer needs deploy.ci: github. The ssh host name, its route, its DNS record and its Access application are made without CI. deploy.ssh: tailscale still needs it.
  • tifa deploy setup writes one line of the .env of the app: TIFA_DEPLOY_HOST becomes the ssh host name once ssh through the tunnel works, and only when the value was read from .env. When it comes from the environment or --host, setup says what to set and changes nothing.

[0.2.1] - 2026-11-23

Changed

  • The build errors for the removed LayoutSSR, BodyLimit and ReadTimeout say more of what to write. The one for LayoutSSR lists the route.go of each page the Layout wraps. The example for BodyLimit and ReadTimeout passes the app's own value, such as c.SetBodyLimit(4 << 20), where it showed a made-up one, and the exact number when the value names a constant of the package.

[0.2.0] - 2026-11-23

Changed

  • hooks.ts at the app root is now setup.ts, plain top-level code with no function to export. Both entries import it before the routes, so its top level runs once per JavaScript runtime, in each VM of the server and in the browser, before any route module evaluates, and a route module that reads at its own top level what setup.ts set sees it. What setup.ts exports is ignored. The onStart parameter of serve and hydrate in the runtime is gone. A hooks.ts at the root fails the build with hooks.ts is now setup.ts: rename it and move the body of onStart to the top level of the file. tifa dev picks up an edit of setup.ts as it did one of hooks.ts. Upgrading: rename hooks.ts to setup.ts, delete the line export function onStart() { and its closing }, and move the body of the function to the top level of the file. If the body returns early, keep it as a local function and call it once at the top level.
  • LayoutSSR is gone from route.go. A Layout has no switch of its own now, and every page renders on the server unless its own route.go says SSR = false. A URL that matches no page and shows its 404 inside a Layout always renders on the server. Declaring LayoutSSR fails the build with LayoutSSR is gone: delete it. If it was false, write const SSR = false in the route.go of each page this Layout wraps. tifa routes no longer prints an SSR column for Layouts. Upgrading: delete the LayoutSSR constant. If it was false, write const SSR = false in the route.go of each page the Layout wraps (a page with no route.go needs one).
  • The route constants BodyLimit and ReadTimeout are gone from route.go. An app sets them for one request in OnRequest with c.SetBodyLimit and c.SetReadTimeout, before anything reads the body, and matches c.Pattern() and the method. Declaring either as a constant or a variable in route.go fails the build with BodyLimit is gone: set it in OnRequest with c.SetBodyLimit for this route (and the same with ReadTimeout and c.SetReadTimeout), followed by an example for that route. A type named BodyLimit or ReadTimeout stays allowed. c.SetReadTimeout and c.SetBodyLimit are the only way now: the 0.1.20 entry that says the constants keep working no longer holds. The misspelling check keeps only SSR, Cache and Memo as names a typo can be of. Upgrading: delete BodyLimit and ReadTimeout from each route.go and add the calls to OnRequest in hooks.go: if c.Pattern() == "/photos" && c.Request().Method == http.MethodPost { if err := c.SetBodyLimit(20 << 20); err != nil { return err }; if err := c.SetReadTimeout(5 * time.Minute); err != nil { return err } }. A variable that came from an option of the app works as the argument (c.SetBodyLimit(int64(UploadLimit))).
  • The htmlAttributes of the root Layout are now a key of its documentHead, in the same shape as the return of a route's head: export const documentHead = { htmlAttributes: { lang: 'zh-CN' }, meta: [...], links: [...] }. The default stays { lang: 'en' }, and the merge is the same: the root gives the attributes every page starts from, and a route's head overrides one attribute at a time. The check that a site with languages sets no lang reads documentHead.htmlAttributes now, in tifa check, tifa build and tifa dev. A separate export const htmlAttributes in app/layout.tsx fails the build with app/layout.tsx: htmlAttributes is now a key of documentHead: move it into export const documentHead = { htmlAttributes: {...}, ... }. Upgrading: in app/layout.tsx, delete export const htmlAttributes = {...} and write the object as the htmlAttributes key of documentHead, which you add with only that key when the app has none.

[0.1.20] - 2026-11-23

Added

  • A page with a canonical link also gets <meta property="og:url"> with the same URL, in the server render and after a navigation in the browser. An og:url in a route's head or in documentHead wins, and the page has only that one.
  • A share image written as a path in a head (og:image, og:image:url, og:image:secure_url, twitter:image with a content that starts with one /) gets site.url in front of it, in the server render and after a navigation, since crawlers need a full URL. A full URL or one that starts with // is kept, and without site.url nothing changes.
  • tifa check, tifa build and tifa dev warn about a <title> or <meta> written as JSX in a component, with its file and line, and point to the head export. Tifa writes the head as a string and React renders only the app root in <body>, so such a tag ended up in <body>, where crawlers do not read it. A <title> inside an <svg> and a <meta itemProp> are not reported.
  • c.SetReadTimeout(d) gives the body of one request d to arrive, as the ReadTimeout of a route does, and the answer server.write_timeout after it. Call it in OnRequest next to c.SetBodyLimit. The constants BodyLimit and ReadTimeout keep working in this release, and OnRequest is the way to write them now.

Changed

  • A constant in route.go that is a typo of a switch, such as Cahce for Cache or ReadTimout for ReadTimeout, fails the build with Cahce is not a switch: did you mean Cache?. Before, it was ignored without a word. Only exported constants with at least three letters and a type the switch takes count, within one edit of a switch name when the shorter name has four letters or fewer, and within two edits above that.

[0.1.19] - 2026-11-23

Added

  • Apps build for and run on windows/arm64, with slowjs v0.31.12. The CI tests Tifa on a Windows arm64 runner too.
  • A secret can come in without a terminal, as when a coding agent runs the command, on a page in your browser. tifa deploy env set uses it when its standard input is not a terminal, a pipe or a file, such as the /dev/null agents give. tifa deploy setup --cache-purge-token and --tailscale-oauth use it without a terminal, with --yes too, and setup without them lists the token with that command. Tifa serves the page on 127.0.0.1 at a one-time URL, opens it and prints the URL, takes one value and closes, or stops after 10 minutes. The value never passes through the agent. Before, these flags needed a terminal, and env set read an empty value from /dev/null.

Changed

  • tifa dev has a page ready sooner after some saves. A save of a plain .css file (not a .module.css) only compiles the stylesheets again when every stylesheet the pages import is plain: on the shop the page is ready 0.19 s after a save of app/styles.css, was 2.67 s. A save that leaves ssr.js and its map the same bytes, such as an edit of a comment, keeps the VMs: 2.18 s, was 2.54 s. The checks of exports, htmlLang and foreign imports read again only the files that changed, a few tens of milliseconds on each save. Medians of 10 saves on an Apple M4. What dev serves is the same.
  • With front: cloudflare, tifa deploy setup keeps the Cloudflare token that clears the CDN cache on your server, in /srv/tifa/.config/tifa/cloudflare-purge with the zone ID, readable only by the user tifa, and no longer as secrets of the repository. tifa deploy and rollback, from CI or from any machine that may log in as tifa, read it there over ssh and clear the cache, so a deploy from a machine without a cf login clears it too. One token serves every app of the server on that zone: a second app needs nothing. Setup now asks for it without ci: github too, and --cache-purge-token works without CI. TIFA_DEPLOY_CF_PURGE_TOKEN and TIFA_DEPLOY_CF_ZONE_ID in the environment or .env still work and win over the server. The workflow setup writes no longer passes them, and tifa deploy remove of the last app on the server deletes the file. A workflow written by v0.1.18 keeps clearing the cache, so nothing needs to change. To keep the token only on the server and remove the two repository secrets TIFA_DEPLOY_CF_PURGE_TOKEN and TIFA_DEPLOY_CF_ZONE_ID, run go tool tifa deploy setup on a terminal, paste the token when it asks, commit and push the workflow it writes, and run setup again: it removes the secrets once the workflow on the default branch no longer uses them.

[0.1.18] - 2026-11-23

Added

  • A Markdown heading can carry its own id at the end: ## 图片和链接 {#images-and-links} gives the heading id="images-and-links" and takes the {#...} and the space before it out of the text. Headings() returns that id and the shorter text, so a translated heading can keep the id of the original and links between languages and the table of contents keep working. The id has letters, digits, -, _, . and :, and only a {#id} at the very end counts. Headings without one get their GitHub id after these, so an automatic id that would repeat a written one gets -1.
  • tifa deploy setup installs and logs in cf and gh when tifa.yaml needs them and they are missing: cf for front: cloudflare with pnpm add --global cf, gh for ci: github without TIFA_DEPLOY_GITHUB_TOKEN with brew install gh on macOS or winget install --id GitHub.cli -e on Windows. Installing and logging in are items of a first plan, the y you type to it is the consent, and each login opens a browser on your terminal. Setup then plans the Cloudflare and GitHub parts and asks again. It installs only with a package manager the machine has, never downloads a program itself, and never installs or logs in with --yes or without a terminal: then, or on Linux, it lists the commands for you. An install or login that fails is a warning that says how to do it by hand, and setup goes on with the rest.

Changed

  • tifa deploy commands now stop when the .env of the app sets a TIFA_DEPLOY_ name that Tifa does not read, such as TIFA_DEPLOY_CF_CACHE_PURGE_TOKEN, and name the closest one. They used to ignore the line without a word.
  • tifa build and tifa dev spend about 0.4 to 0.5 s less in the plugin's rewrites of the SSR bundle, which tifa dev runs after every save: on the shop, the bundle step after an edit takes 2.3 s in place of 2.9 s. The bundle is the same byte for byte.
  • tifa deploy setup and tifa deploy remove now say cf is not installed: pnpm add --global cf, then cf auth login when cf is not on the PATH. They used to ask for cf auth login, which fails with "command not found" when cf is missing. With cf installed but not logged in, the message is the same as before.

Fixed

  • On Windows, a page request right after a save could get the page without that save: tifa dev waits for the watcher to see every save made before the request, but Windows could report the save after the event the wait ended on.
  • On Windows, tifa dev could stop with "The process cannot access the file because it is being used by another process" when an editor saved a file by renaming a new one over it while tifa dev was reading it.

[0.1.17] - 2026-11-22

Added

  • tifa new writes a .gitattributes with * text=auto eol=lf, so git keeps LF line ends on every system. git on Windows checks files out with CRLF by default, and the program embeds some of them, such as schema.sql and the hashes of the files in .tifa/dist/inputs.json, so a program built there differed from one built elsewhere from the same commit. An app made before can add the same file.

Fixed

  • tifa deploy setup no longer plans to write .github/workflows/tifa-deploy.yml again on every run when git checked the file out with CRLF line ends, as git on Windows does in an app without a .gitattributes. A file that differs only in its line ends counts as right.

[0.1.16] - 2026-11-22

Added

  • tifa dev runs on Windows (10 1809 and later, tested on Windows Server 2022 and 2025), in the foreground and with --background, dev status, dev logs, dev stop and tifa errors. Ctrl-C, closing the console window and tifa dev stop stop it, the app runs OnShutdown on each restart as on Linux and macOS, and a tifa dev killed in the Task Manager takes Node, Vite and the app with it. On Windows lists what differs there.

Fixed

  • On Windows a second tifa build in an app that is building already now stops with an error, as on Linux and macOS. The lock of the app did nothing there.

[0.1.15] - 2026-11-22

Added

  • tifa new, tifa check and tifa build run on Windows (10 1809 and later, tested on Windows Server 2022 and 2025). tifa build writes bin\<name>.exe there, since Windows runs only files that end in .exe. A build for another system, such as GOOS=linux for a server, writes the bare name as before, and -o is used as given. tifa dev does not run on Windows yet.

Changed

  • tifa build and tifa deploy no longer print Rolldown's PLUGIN_TIMINGS lists, and Vite's chunk size warning starts at 1000 kB for the browser bundle (it was 500 kB, which an app with a UI library passes with the one entry file Tifa makes). The app's own build.chunkSizeWarningLimit and build.rolldownOptions.checks still win.

Fixed

  • Under tifa dev, import.meta.env.BASE_URL is /, as in a build. It was the prefix of Vite's modules, so a library that builds URLs of the app from it, such as the search of fumadocs-ui, asked a path that does not exist. The URLs of Vite's own modules and the HMR client keep their prefix, and the server render still reads the same value as the browser.
  • The icon cache of lucide-react works again with lucide-react 1.75 and later. Every build and tifa dev warned tifa rewrite not recognized for it, because 1.75 rewrote mergeClasses and hasA11yProp, and icons rendered without the cache. The pages render the same.
  • tifa deploy setup says what it does not know yet in its plan. The ssh host name for CI shows as deploy-ssh-<random>.example.com, since each run draws a new random part and the line that reports the step shows the name it made. A server without the user tifa shows "the user tifa does not exist yet" and no longer prints ssh's Permission denied (publickey). The tunnel shows as tifa-<machine id> until the server is read.
  • In /llms.txt, the Markdown version of a page and /llms-full.txt, a home page with no Title in its SitemapPage is named after the site (Sitemap.Name, else the host of site.url) and no longer shows as [/]. Other pages without a title still show their path.
  • Server rendering runs on slowjs v0.31.11. The render timeout, the stop on shutdown and the memory limit now also hold inside Intl on very long inputs: case mapping for Turkish, Azerbaijani, Lithuanian and Greek, locale tags with many variants, Intl.Segmenter on long Chinese or Japanese text, Intl.ListFormat with many items and Intl.Collator on long strings that share a start. The HTML of a render is the same, and its instructions are within 0.24% of v0.31.10.
  • A built program sends .js files as text/javascript on every system. Go took the type from the Windows registry or from /etc/mime.types when the machine had one, and a wrong entry there changed the type the browser was sent.

[0.1.14] - 2026-11-22

Changed

  • Every name tifa deploy reads or sets starts with TIFA_DEPLOY_. The inputs are TIFA_DEPLOY_HOST, TIFA_DEPLOY_CF_PURGE_TOKEN and TIFA_DEPLOY_CF_ZONE_ID. The secrets of the workflow are TIFA_DEPLOY_HOST, TIFA_DEPLOY_SSH_KEY, TIFA_DEPLOY_KNOWN_HOSTS, TIFA_DEPLOY_CF_ZONE_ID, TIFA_DEPLOY_CF_PURGE_TOKEN, TIFA_DEPLOY_CF_ACCESS_ID, TIFA_DEPLOY_CF_ACCESS_SECRET, TIFA_DEPLOY_TAILSCALE_CLIENT_ID and TIFA_DEPLOY_TAILSCALE_SECRET, and the marker variable is TIFA_DEPLOY_FINGERPRINT. Names that cloudflared and the Tailscale action fix stay. An old input name (DEPLOY_HOST, CF_CACHE_PURGE_TOKEN, CF_ZONE_ID) in .env, with the new name missing, stops every tifa deploy command with an error that names the new one. In the environment the old names are left alone, since other tools use them. Setup finds the old secrets by the old marker variable TIFA_DEPLOY, sets the new ones, and plans to remove the old secrets and the old variable after that. ci: none and tifa deploy remove take them away too. GitHub does not show a secret, so the purge token and the Tailscale OAuth client are pasted again. Upgrading: rename DEPLOY_HOST to TIFA_DEPLOY_HOST in .env (and CF_CACHE_PURGE_TOKEN, CF_ZONE_ID if used), and run go tool tifa deploy setup again when deploying from CI, then commit and push the workflow it writes.

Added

  • Every input of tifa deploy is read the same way: the flag if it has one, else the environment variable, else the .env at the root of the app. The purge token and the zone ID were read from the environment only. A machine with no cf login can now clear the CDN cache at deploy with TIFA_DEPLOY_CF_PURGE_TOKEN and TIFA_DEPLOY_CF_ZONE_ID in .env. Tifa only reads that file and never writes a token into it.
  • tifa deploy setup and remove work without gh. With gh installed and logged in they use it as before. Without it they call the GitHub API with a fine-grained token from TIFA_DEPLOY_GITHUB_TOKEN (environment or .env), limited to the repository with Secrets and Variables set to Read and write. Secrets are sealed with the public key of the repository. With neither, setup lists the GitHub part as something it cannot do and prints a link that opens GitHub's token form with the name, the owner and the permissions filled in.

[0.1.13] - 2026-11-21

Changed

  • A public repository no longer shows where the server is. deploy.host is gone from tifa.yaml, which is committed: tifa deploy takes the server from --host, else the environment variable DEPLOY_HOST, else DEPLOY_HOST in the .env at the root of the app, which git ignores. The value is an ssh alias (a Host of ~/.ssh/config) or ssh://host[:port], with no user. In GitHub Actions the workflow no longer writes the port or the zone ID: DEPLOY_HOST holds the whole target (ssh://<address>:<port> for ssh: direct), and the zone ID is the new secret CF_ZONE_ID. tifa deploy and rollback ask the log of Actions to hide the host name. With ssh: cloudflare, the ssh host name has 12 random characters (deploy-a-ssh-k3j9x2m5q7wt.example.com), and setup replaces the old name, which the domain alone gave, in its plan. The workflow installs cloudflared 2026.11.1 and checks its SHA-256, in place of the latest version. Upgrading: move the value of deploy.host from tifa.yaml to a line DEPLOY_HOST=<the same value> in the .env of the app (a deploy.host left in tifa.yaml is a warning at its line, and every tifa deploy command stops on it). With deploy.ci: github, run go tool tifa deploy setup again: it sets the new DEPLOY_HOST and CF_ZONE_ID and writes the new workflow, which you commit and push, and with ssh: cloudflare it also makes the new ssh host name and removes the old one. Another repository that deploys the same domain through ssh: cloudflare runs setup again too.
  • tifa new pins github.com/liustack/sqlite v0.1.8. It runs on windows/arm64, and on a target it does not support the build stops with the list of supported ones, instead of failing when the program opens a database. PRAGMA optimize no longer fails with SQLITE_BUSY while another connection writes, and _pragma=optimize in the DSN is refused: run it with Exec. Readers that fill every core no longer wait on each other in the WAL index. An existing app can upgrade with go get github.com/liustack/sqlite@v0.1.8.
  • deploy.cdn is deploy.front again, with the same values none and cloudflare. The value says what visitors come through before the server: with cloudflare that is the Tunnel, DNS, rules, cache clearing and the path ssh: cloudflare uses, not only a CDN cache. Upgrading: in tifa.yaml, rename cdn: under deploy: to front:. A cdn key is a warning at its line, and every tifa deploy command stops on it.

[0.1.12] - 2026-11-21

Added

  • tifa deploy logs prints the log of the app on the server over ssh, what it printed and what systemd said about it: the last 100 lines, -n for another count, and -f to follow until Ctrl-C.
  • tifa deploy status prints the release that runs and its commit, the releases kept and whether each passed its health check, since when the service runs, what GET /healthz answers now and the memory of the program.
  • tifa deploy remove takes the app off the server and takes back what Tifa made for it: its units and its folder with its data, the route, DNS record, rules and Access of Cloudflare, the tunnel and cloudflared with the last app of the server, and the key and secrets of GitHub. It prints a plan and asks for the name of the app, or needs --yes without a terminal. The workflow file stays.

Fixed

  • A retired key in tifa.yaml is a warning at its line, such as tifa.yaml:69: deploy.front is no longer used, ..., and GitHub Actions marks that line.
  • tifa deploy env list says on stderr when .env holds no names, and stdout stays empty.
  • With deploy.ci: none, tifa deploy setup also removes the Tailscale secrets TS_OAUTH_CLIENT_ID and TS_OAUTH_SECRET it set.

[0.1.11] - 2026-11-21

Added

  • In GitHub Actions, tifa check, tifa build and tifa gen print each finding of their own as a workflow command in place of its plain line, so the run and the pull request mark its file and line once, errors and warnings apart. Findings in TypeScript files were not marked before, and a warning about a Go file was marked as an error.

Changed

  • The ci.yml of tifa new and the deploy workflow of tifa deploy setup install with pnpm install --frozen-lockfile --ignore-scripts, so the checks run in tifa check, where GitHub reads their marks, not in the prepare script, whose output pnpm prefixes. An app made before gets the marks by adding --ignore-scripts to that line of its .github/workflows/ci.yml. Setup offers the new deploy workflow as a change.

[0.1.10] - 2026-11-21

Added

  • With deploy.ssh: tailscale, tifa deploy setup asks on a terminal for the ID and secret of your Tailscale OAuth client, checks that it can make keys for tag:ci, and keeps them as the secrets of the repository. tifa deploy setup --tailscale-oauth replaces them. Setup no longer tells you to run gh secret set.

Changed

  • The plan of tifa deploy setup is short. It lists only what will be added, changed or removed, counts what is already right in one line (--all lists it), and ends with a numbered list of what setup cannot do for you, each with its reason. When everything is right it prints one line and asks nothing. Setup now does all it can and then exits with an error when something is left for you or a step failed, such as a cache purge token that Cloudflare refused three times. Upgrading: a script that runs tifa deploy setup must expect a non-zero exit when something needs you.
  • deploy.front is now deploy.cdn, with the same values none and cloudflare. tifa deploy and setup stop on the old key and name the new one. Upgrading: in tifa.yaml, rename front: under deploy: to cdn:.
  • The Cloudflare cache purge token CF_CACHE_PURGE_TOKEN is optional. Setup lists it as optional when it cannot ask for it, and an empty line at its prompt skips it, without failing the run. It asks on the first CI setup only, and tifa deploy setup --cache-purge-token adds or replaces the token later. A deploy without a token or a cf login prints cache: not cleared for <host> and what that costs, not a warning: a page with Cache can stay old on the CDN for up to its Cache time.

[0.1.9] - 2026-11-20

Added

  • tifa build and tifa dev warn when the source of a page names an image or a font of public/ by its path, such as <img src="/logo.png"> or url(/fonts/a.woff2). A file you import gets a content hash and a one-year cache under /assets/, and a file of public/ is checked with the server on every use. The docs now say which files to import and which to keep in public/ (fixed names such as favicon.ico, robots.txt, or an og image other sites link to). favicon.ico, apple-touch-icon*.png and files a web manifest lists get no warning.

Fixed

  • Behind Cloudflare, browsers kept a page with Cache and the files of public/ for 4 hours: the zone's Browser Cache TTL replaced their max-age=0 and no-cache, and no purge reaches a browser. The cache rule tifa deploy setup writes now keeps the browser TTL of the origin. Upgrading: run go tool tifa deploy setup again, which changes the rule. With a Cloudflare setup of your own, set Browser TTL to "Respect origin TTL" in the Cache Rule of the site.

Changed

  • The .gitignore of tifa new ignores .cloudflare/, where cf, the Cloudflare CLI, remembers the account for the folder it runs in. An existing app can add the same line.

[0.1.8] - 2026-11-20

Changed

  • tifa deploy setup reads the server, Cloudflare and GitHub at the same time and each thing once, says what it is reading, and ignores keys pressed before it asks. Planning went from 49 s to 7 s on a slow link.

  • The deploy section of tifa.yaml has new keys. deploy.domain is gone: the domain is the host of site.url, and deploy.front: cloudflare (default none) turns on the Cloudflare Tunnel, DNS, cache rules and cache clearing for it. deploy.github is now deploy.ci (none or github). deploy commands refuse a mix that cannot work, such as front: cloudflare without site.url, a port in site.url, ssh: cloudflare without front: cloudflare, or ssh other than direct without ci: github. A login of cf cannot make API tokens, so setup no longer tries to: on a terminal it prints a prefilled Cloudflare form, reads the token hidden, checks it and sets the secret, now named CF_CACHE_PURGE_TOKEN. Without a terminal the plan shows the link and the gh secret set command. Upgrading: replace deploy.domain: X with site.url: https://X (if not set) and deploy.front: cloudflare. Replace deploy.github: true with deploy.ci: github. Rerun go tool tifa deploy setup, which asks for the token again under the new name and removes the old secret CF_PURGE_TOKEN.

[0.1.7] - 2026-11-20

Added

  • The deploy section of tifa.yaml has two new settings, deploy.ssh (direct, cloudflare or tailscale, how CI reaches the server) and deploy.github (true lets the GitHub Actions of the repository deploy the app). go tool tifa deploy setup makes the server, Cloudflare and GitHub match the four settings: it prints a plan of ok, add, change and remove lines (and cannot lines that say what is missing), asks on a terminal (--yes skips the question, and without a terminal it stops after the plan), then applies it with a line for each step. It can run again at any time, and removes only what Tifa made and marked. A deploy.host that is an IP address gets a note to write an ssh alias instead. See Deploying.
  • With deploy.github: true, setup writes .github/workflows/tifa-deploy.yml, which deploys after the CI workflow of tifa new passed on the default branch (on a push when the app has no ci.yml), and offers deploy or rollback by hand. It makes a key for the repository alone, reads the host keys of the server over your ssh, and sets the secrets with gh without printing or writing them. With deploy.ssh: cloudflare it adds an ssh host name to the tunnel with a Cloudflare Access service token for the repository, and with tailscale the workflow joins your tailnet.
  • With deploy.domain, go tool tifa deploy and deploy rollback clear the Cloudflare CDN cache of that host name when the release is live, by host name and nothing wider. On your machine cf does it, in CI a token that can only clear the cache of the zone does (setup makes it with cf when it can). A clearing that fails prints a warning and does not fail the deploy. In GitHub Actions, deploy and rollback write a short summary to the page of the run.
  • go tool tifa deploy env set NAME, env unset NAME and env list edit the .env of the app on the server over ssh. set reads the value from the standard input or a hidden prompt, never from an argument, and no command prints a value. The file keeps mode 600. The app restarts through its socket and must pass the health check of a deploy, or the old file comes back. The file is read by the app as configuration only and is not put into any environment.
  • go tool tifa deploy makes the folder, port and units of a new app by itself on a server that setup prepared, as the user tifa and without root.

Changed

  • go tool tifa deploy setup no longer takes --cloudflare: deploy.domain decides whether the app goes behind a Cloudflare Tunnel, and it asks before it changes anything. go tool tifa deploy github is gone: its work is part of setup, under deploy.github. Upgrading: set deploy.github: true (and deploy.ssh: cloudflare or tailscale if you passed --cloudflare or --tailscale) in tifa.yaml, run go tool tifa deploy setup, and for Caddy or another proxy leave deploy.domain empty instead of passing --cloudflare=false.
  • go tool tifa new writes .github/workflows/ci.yml, a GitHub Actions workflow that runs go tool tifa check on pull requests and on pushes to main, and go tool tifa agents writes it into an app that has no workflow yet. It never replaces a file. See tifa new.

[0.1.6] - 2026-11-20

Added

  • go tool tifa deploy puts the app on a Linux server with systemd over ssh. It builds on your machine for the system of the server, uploads the program into a new release, restarts the app through its systemd socket so no request is refused, asks the new program for /healthz on the server and starts the release before again when it does not answer below 500 within 30 seconds. It never uploads .env, keeps the last 5 releases and writes each deploy into deploys.log on the server. go tool tifa deploy setup, once per app as root, creates the user tifa that runs every app of the server, the folder of the app with an empty .env, a free loopback port and the systemd units. go tool tifa deploy rollback goes back to the release before. The server is deploy.host in tifa.yaml, --host or DEPLOY_HOST, and Tifa runs your own ssh, so ~/.ssh/config, a Cloudflare Tunnel or Tailscale work as they do in a terminal. See Deploy with tifa deploy.
  • With deploy.domain set and cf, the Cloudflare CLI, installed and logged in, go tool tifa deploy setup puts the app behind a Cloudflare Tunnel with the login of cf, and the server opens no port. One tunnel serves every app of the server: setup creates it, installs cloudflared with apt from Cloudflare's signed package repository when the server has none (so unattended-upgrades keeps it current, and on a server without apt setup downloads nothing and says to install it), runs it as the service tifa-tunnel, then adds the route of the domain, a proxied DNS record, and rules for that host name only that cache what the Cache-Control of the app allows, never cache /__tifa/ or navigation data, and turn off Rocket Loader and the other features that write into the HTML. It changes no setting of the whole zone, leaves a DNS record that points elsewhere alone, and keeps no Cloudflare token. Running it again changes nothing. Without cf it prints the steps, and --cloudflare=false skips Cloudflare. See Set up with a plan.

[0.1.5] - 2026-11-20

Added

  • A site with site.url serves /sitemap.xml with lastmod and the hreflang links of each page, a default /robots.txt that allows everything and names the sitemap, and /llms.txt and /llms-full.txt for language models. The pages without parameters are in them on their own. tifa.SetSitemap in OnStart lists the pages with parameters, leaves routes out with Exclude, and adds titles, dates and translations. A page that shows a content entry has a Markdown version at its URL with .md, which llms.txt links to. A public/robots.txt or a route of the app at one of these paths wins, and a site without site.url gets none of them. A site with pages with parameters and no SetSitemap logs one line at start. A mistake in what SetSitemap returns, such as a route with parameters it neither lists nor excludes (a blog with no posts yet), a path that matches no route, a wrong language or a page listed twice, leaves that page or pattern out: the files still answer, and each request logs one error line per kind of mistake naming them. Only an error the function itself returns answers 500 through OnError. See Search engines and language models.
  • tifa build writes the Markdown of each content entry next to its HTML, with the URLs the HTML has. Drafts are left out, as before.

Changed

  • With site.url, every page has a canonical link, also on a site with one language and on a page with one version. Before, only a page with several versions had one. A 404 or an error page still has none.
  • The canonical link keeps the query parameters the Load and Layouts of the page read, as the server renders the page, and drops the others. /store/products?page=2&utm_source=news now names /store/products?page=2 when its Load reads page, where it named /store/products and told search engines that page 2 was a copy of page 1. The browser writes the same link after it hydrates and after a navigation. The hreflang links stay without a query.

Fixed

  • Server rendering runs on slowjs v0.31.10. An await on a promise whose constructor getter throws now throws at the await, so a catch or finally around it runs. Before, the async function stayed stuck there. The instructions of one render are within 0.03% of v0.31.9.

[0.1.4] - 2026-11-19

Fixed

  • Server rendering runs on slowjs v0.31.9. A render that sat just under its memory limit ran a full collection each time an array grew, and could end at the render timeout. It now finishes. toLocaleString on an array passes its locales and options to each element, so [1234.5].toLocaleString("de") gives 1.234,5 as in the browser. The instructions of one render are within 0.1% of v0.31.8.

[0.1.3] - 2026-11-19

Fixed

  • tifa new pins github.com/liustack/sqlite v0.1.7. A write no longer waits behind readers that keep every core busy, and a pool of connections no longer reads slower beside writes. An existing app can upgrade with go get github.com/liustack/sqlite@v0.1.7.

[0.1.2] - 2026-11-19

Fixed

  • A render that ran up against the memory limit could, in rare cases, leave a freed shape in an object, and a later collection then stopped the engine. That render's request answered 500 and the VM was replaced. Server rendering now runs on slowjs v0.31.8, which fixes it. The bug was in slowjs v0.31.4 to v0.31.7, so in Tifa v0.0.14 to v0.1.1. The HTML and the instructions of one render are the same.
  • tifa dev could take 5 seconds to stop when a browser opened a connection at the moment it began to stop.

[0.1.1] - 2026-11-19

Fixed

  • Server rendering runs on slowjs v0.31.7, a release of engine fixes: a timeout, an interrupt or running out of memory now stops compiling, async functions, generators, modules and promise jobs cleanly, and loading many modules takes linear time. The HTML is the same. Instructions of one render: +0.08% on the shop's workbench pages, +0.10% on the storefront, -0.08% on the MUI test app.
  • The v0.1.0 module carried a 41 MB tifa binary that was committed by mistake, so go get downloaded it with the source. It is gone, and v0.1.0 is retracted, so go get and go list -m -u point to v0.1.1.

[0.1.0] - 2026-11-18

Added

  • Compatibility says what Tifa keeps stable from v0.1 and what may still change. A change that breaks what it promises now comes in a minor version, never in a patch.
  • tifa new --empty writes a skeleton in place of the todo list app: the root files with the sessions table, a root Layout with its error component and a home page of one line. It builds, passes its own go test and go vet, and starts. Without the flag nothing changes.
  • A sign-in over plain HTTP from a host that is not localhost logs a warning, once per process: browsers drop the Secure session cookie there, so the user stays signed out with no other sign. Requests over TLS, with X-Forwarded-Proto: https or Forwarded: proto=https, and to localhost do not warn.

Changed

  • The content package spells the language out, as the rest of Tifa does. Entry.Lang is Entry.Language (JSON lang becomes language), Translation.Lang is Translation.Language, and the parameters of Get and In are named language. A front matter key language is now one of the names Tifa sets, and lang is free again. The vfile data of a Markdown plugin has file.data.tifa.language in place of lang. Upgrading: rename .Lang to .Language on entries and translations, and Lang: to Language: in content.Entry and content.Translation literals (tests that use tifatest.SetContent have them). In TypeScript that reads an entry or a translation from a Load result, rename lang to language in the type and in uses such as post.lang. A remark or rehype plugin that reads file.data.tifa.lang reads file.data.tifa.language. A schema or front matter field of your own named language must be renamed.
  • The names a page imports from Tifa are fixed for good: tifa/client, tifa/i18n and @tanstack/react-router. The paths of the app's tsconfig.json is now one line for all of them, "tifa/*": ["./.tifa/tifa/*"], and .tifa/tifa/ holds only the public entry files, so a module added later needs no change to any tsconfig. tifa/client also exports the SessionData type, so a page no longer imports @/.tifa/session.gen. Upgrading: in tsconfig.json, replace the lines "tifa/client": ["./.tifa/runtime/client.ts"] and "tifa/i18n": ["./.tifa/runtime/i18n.tsx"] with the one line "tifa/*": ["./.tifa/tifa/*"]. Run go tool tifa build or go tool tifa dev once so that .tifa/tifa/ exists before the editor looks for it. In code, replace import type { SessionData } from '@/.tifa/session.gen' with import type { SessionData } from 'tifa/client'. Imports of tifa/client and tifa/i18n stay as they are. Tifa does not edit your code or your tsconfig for you.
  • RouteError is gone. Pages have one error class, TifaError, with status, message and fields. A failed Load, a 404 and a failed handler call all give a TifaError, so one instanceof check covers them. fields is an empty object unless the answer came from a tifa.Fields. Upgrading: replace every RouteError in your pages with TifaError, and drop it from imports that list both (import { TifaError } from 'tifa/client'). Checks like error instanceof RouteError && error.status === 404 become error instanceof TifaError && error.status === 404.
  • The error and 404 component that page.tsx, layout.tsx and layout_.tsx export is now called ErrorBoundary. The old name Error hid the global Error in the whole file, so error instanceof Error compared against a component and was always false. A module that still exports Error fails the build and says to rename it. Upgrading: in every page.tsx, layout.tsx and layout_.tsx that has export function Error( or export const Error =, rename it to ErrorBoundary. Where another file imports it, such as import { Error as RootError } from '../../layout', import ErrorBoundary instead (import { ErrorBoundary as RootErrorBoundary } from '../../layout').
  • Breaking. Three names changed before v0.1. tifa.MemoryStore and tifa.NewMemoryStore are no longer exported: the memory store is the default, sized by session.memory_limit, and tifa.SetSessionStore(nil) brings it back. c.IsData() is now c.IsDataRequest(). tifatest.WithSession(c, &s) is now tifatest.SignIn(t, c, &s). Upgrading: replace tifa.NewMemoryStore(n) with the setting session.memory_limit (in a test of your own store, pass your store to tifatest.TestSessionStore), c.IsData() with c.IsDataRequest(), and tifatest.WithSession(c, &s) with tifatest.SignIn(t, c, &s).
  • Breaking. cache_control.s_maxage is now cache.s_maxage, with the flag --cache-s-maxage and the variable CACHE_S_MAXAGE. The old key, flag and variable still start the program and the build, but the value is not used: each prints one "no longer used" warning, and pages with const Cache = true get the default 1m until the new key is set. Upgrading: in tifa.yaml, the file of -c, .env and your deployment, rename cache_control.s_maxage (s_maxage under cache_control:) to cache.s_maxage (s_maxage under cache:), --cache-control-s-maxage to --cache-s-maxage and CACHE_CONTROL_S_MAXAGE to CACHE_S_MAXAGE.
  • Retired settings no longer fail. A key or flag that Tifa dropped (cache.size, cache.whole_page, cache.ignore_query, cache_control.s_maxage) prints one "no longer used" warning that says what replaces it, and the program starts and builds. Before, the program refused to start. They are listed in the configuration page of that release. Tifa will use the same list for each key it drops later.
  • Breaking. c.Bind and c.BindQuery name a field by its json tag, then its Go name, the same as the input of a typed handler. They no longer read form tags, and tifa build fails on a form tag in a struct passed to them, as it does for a typed input. Upgrading: in a struct you pass to c.Bind or c.BindQuery, move each form:"name" to json:"name" (a field with both keeps the json name), and remove the form tag.
  • Pages that use MUI or emotion's styled render faster. A styled component no longer copies its array of styles when no registered class name adds to it, copies its props with a spread when they have a plain shape, and processStyleVariants of @mui/system reads each variant's props once. On the MUI test app the three pages run 2.5% to 3.2% fewer instructions per render (2.9% fewer over the three, counted with callgrind, not timed) with the same HTML, and the pages of the example shop, which has no MUI or emotion, are the same bundle.
  • tifa new pins github.com/liustack/sqlite v0.1.5. The WAL file stops growing past 64 MiB (_wal_limit in the DSN changes it, 0 turns it off), writes next to overlapping reads are faster, queries of computing run 6% to 10% faster, and a connection that hit an out of memory, I/O or disk full error is dropped once its transaction ends. Two rules changed. A connection in a read transaction that tries to write while another holds the write lock gets SQLITE_BUSY at once, no longer after busy_timeout. When a group commit ends because one statement failed, the statements of the group that ran before get SQLITE_ABORT_ROLLBACK, and the caller decides whether to run them again. Errors are of the exported type sqlite.Error, with the result code. Existing apps: go get github.com/liustack/sqlite@v0.1.5.
  • Pages with links render faster. The router no longer repeats work for each link that gives the same answer every time: it checks the first characters of an href before a regular expression, and writes a query into one string, leaving plain names and values as they are. The check that lets prefix links skip a URL is cheaper too. On the example shop the storefront pages run 0.4% to 4.7% fewer instructions per render (1.4% fewer over its seven pages in both languages) and the workbench pages 0.1% to 0.3% fewer. The MUI test app runs the same, within 0.04% (counted with callgrind, not timed). The pages are byte for byte the same.

Fixed

  • Server rendering runs on slowjs v0.31.6, a release of engine fixes: the garbage collector could stop while an array moved, WeakRefs and young WeakMap keys were mishandled during a collection, the shape cache had a fault, and some built-ins went wrong when they ran out of memory. The HTML is the same. Instructions of one render: -0.37% on the shop's workbench pages, -0.06% on the storefront, +0.19% on the MUI test app.
  • ssr.timeout limited compiling the SSR bundle and loading each VM too, not only a render, so a busy or slow machine could fail to start a program whose ssr.timeout is short, with ssr: compile bundle: InternalError: interrupted. Starting now has a limit of its own of one minute, which only stops top level code that never ends, and ssr.timeout is the budget of a render, as documented.
  • Pages render about 0.7% faster again on the shop's workbench pages and the MUI test app (0.6% on the storefront pages), with the same HTML. A change of 2026-11-13 that writes out small functions whose body throws, such as React DOM's resolveCurrentlyRenderingComponent that every hook calls, stopped working on 2026-11-16 when the Tifa host script got a tifaThrow of its own, so every SSR bundle kept those calls. The build now reuses a top-level tifaThrow that only throws its argument, and still leaves alone any other function of that name. Instructions of one render, 20 pages of the shop: -0.71% on the workbench, -0.56% on the storefront, -0.59% in all. MUI test app: -0.73%.

[0.0.18] - 2026-11-17

Fixed

  • The Node process of tifa dev no longer grows with every rebuild of the SSR bundle. Each build kept about 5 MB alive on its worker thread, more with a larger Vite config, and the process grew about 8 to 10 MB per rebuild with garbage on top: past 2.8 GB after 200 edits on a one-core Linux machine. The SSR bundle now moves to a new worker thread every 10 builds, which frees it all. On the test app over 150 edits the process stays between 700 and 970 MB, and rebuilds no longer slow down as it grows.
  • When a Vite plugin ended the thread that builds the SSR bundle in tifa dev with an error it did not catch, every later build failed with that error until tifa dev restarted, also once the plugin was fixed. The next build now runs on a new thread.

[0.0.17] - 2026-11-17

Fixed

  • Under tifa dev, the server render and the browser read the same import.meta.env.MODE, DEV, PROD and BASE_URL. Before, a page that read one of them rendered other text on the server than in the browser and failed to hydrate. React keeps its production build in the render.

Added

  • tifa build and tifa dev warn when app code reads import.meta.env.VITE_*, once for each name, with the place of the first read. The value is fixed when the build runs, and a value that is known only when the program runs comes from Load. See the new guide Values from the environment.
  • go tool tifa errors also lists the warnings of the Tifa plugin in Vite, such as the one for a read of import.meta.env.VITE_*, under Warnings. A build that no longer has one drops it.
  • go tool tifa upgrade [version] moves an app to a newer Tifa, the latest release without a version. It runs go get -tool and go mod tidy, and then the new Tifa does the rest: it sets the versions of the packages tifa new pins in package.json (React, React DOM, TanStack Router, Vite and the others, only when the app lists them with an exact version older than the pin: a newer one stays, a range such as ^19.2.0 is never guessed at, and both get a line that says so. TanStack Router is the exception, since the build needs exactly the pinned one), installs, writes the skill and the block of AGENTS.md again, prints the migration notes of the changelog entries between the two versions, and runs tifa check. It refuses an older version or the same one, and changes none of the app's code. Before, an upgrade was go get -tool and go mod tidy, and then finding out by hand which packages and files had to follow. See Upgrading Tifa.
  • tifa new writes .vscode/settings.json, which makes VS Code label the tabs of page.tsx, layout.tsx, route.go, route_test.go and route.gen.ts with their folder, such as orders/page.tsx. Before, a dozen open tabs all said page.tsx. It is not in .gitignore, so a team shares it. See tifa new.

Changed

  • Pages that use i18next render faster. The key of the translation cache is no longer rebuilt for each t call when it is the same as the call before. On the example shop the storefront pages run 1.1% to 1.5% fewer instructions per render, and the article pages 0.2% (counted with callgrind, not timed).
  • tifa build and tifa dev that stop because another tifa dev or tifa build runs now say that go tool tifa check and go tool tifa gen can run meanwhile.
  • The notes of a new app, and go tool tifa agents, now point to the docs on reloading page data after a write, next to the line that a call never reloads it.
  • Server rendering runs on slowjs v0.31.5. The HTML is the same. On the example shop a render, with the garbage collection that follows it, takes 1.5% less time on the storefront and 1.9% less on the workbench. A VM holds about 0.8% more memory (20.2 MB against 20.0 MB after a 20 minute run).
  • docs/app.md is split by topic into routes.md, pages.md, ssr-and-cache.md, server-render.md, styles.md, hooks.md and testing-apps.md, so an agent reads only the part it needs. go tool tifa docs lists each, and the notes of a new app point to them. "Pages open while you deploy" moved to deploy.md.

[0.0.16] - 2026-11-17

Changed

  • Pages of a site with languages render faster. Every link used to make a URL in the render, and a plain link no longer does. On the example shop a render runs 1.6% to 5.0% fewer instructions on the English storefront pages, 3.3% to 9.4% fewer on the Chinese ones and 0.6% to 0.8% fewer on the workbench pages (counted with callgrind, not timed). The HTML is the same.
  • An app that does not use sessions no longer logs tifa: sessions are kept in memory at startup.

[0.0.15] - 2026-11-17

Fixed

  • A site with languages holds less memory in each render VM and collects less often. Each render's router used to stay in memory until the next full collection, so a VM grew by about 26 KB per render between full collections, and now it does not grow. Serving the example shop for 20 minutes at 58 requests a second, its one VM holds 20 MB where it held 34 MB, and the process peaks at 85 MB where it peaked at 111 MB.

[0.0.14] - 2026-11-17

Added

  • tifa.Stats().SSR has two more fields: Replaced, how many VMs the pool replaced because they grew (they held more than half of ssr.vm_memory after a collection), and Memory, what the loaded VMs hold now in bytes, by the engine's count after each VM's last collection, the size ssr.vm_memory limits. A monitoring route can now see how much memory the VMs hold and how often one is replaced. The example shop's /metrics writes them as tifa_vms_replaced_total and tifa_vms_memory_bytes. See Metrics.

Changed

  • The docs are in English only. The README and the example shop's README keep a Chinese version, and the other *.zh-CN.md files and CHANGELOG.zh-CN.md are gone.
  • Server rendering runs on slowjs v0.31.4. The HTML is the same. Renders take about 0.5% to 0.9% less time by the engine's own timing.
  • An import cycle through the root package is reported as Go reports it, without a rule about where the root package may import from. The generated AGENTS.md, the skill and the docs no longer say the root package imports nothing under app/: they say what Go allows, that the root package cannot import a domain that uses DB, and how to call such code from hooks.go.
  • The i18n guide says that a folder with a _locales folder that holds only the default language's file is served at one URL, for pages as well as API routes.
  • go tool tifa docs prints about 2 KB, not 43 KB: one line for each doc about writing an app. --when adds when to read each doc, and --all also lists the docs about developing Tifa itself. The skill no longer sends an app to the example shop on GitHub, and its examples use an app-neutral module path.
  • The database guide has a section on rejecting a duplicate row with ON CONFLICT ... DO NOTHING RETURNING and what the driver gives to tell a constraint error from others.
  • The background work guide starts with the simple case: one loop every minute, started in OnStart, stopped in OnShutdown, with its function in a package that does not import the root.
  • The big number refusal is described exactly in the generated AGENTS.md, the skill and the JSON rules: a handler result is checked only for a call with the header X-Tifa-Call (what the generated function of a page sends). A test pins a handler by posting with X-Tifa-Call: 1.
  • tifatest.Start refuses a number above 2^53 in the data of Load and Layout, as the program does, and the test sees a 500. Before, only StartPages did.

Fixed

  • go tool tifa check no longer fails with Cannot find module .../.tifa/driver-NNN/driver.mjs when tifa dev rebuilds at the same moment. tifa dev cleaned out the driver folder that check had just made in .tifa/. It now leaves the driver folders of other processes alone.

[0.0.13] - 2026-11-17

Added

  • tifa new writes a pnpm-workspace.yaml with minimumReleaseAge: 4320, so pnpm 10.16 or later installs no package version that is less than 3 days old. A npm package that is compromised is usually found and pulled within days. The versions package.json pins are all older than that. See tifa new.
  • tifa errors now also lists the warnings of the last build, after the errors, and --json has a warnings list: the warnings of the analysis (such as a number above 2^53 going into a field that pages read), of the check for code of other frameworks and of the content. Before, they only scrolled by in the output of tifa dev, which an agent that started tifa dev --background never sees. They are not errors: the exit status stays 0 when there are only warnings. See tifa errors.
  • Coming from another framework says what to use instead of static generation and prerender (the render memo and const Cache), next/image and next/font (a plain <img>, public/, @font-face) and loading.tsx (Suspense, or fetch from the browser). tifa check now reports next/image and next/font with that advice, and the messages for getStaticProps, getStaticPaths, generateStaticParams, revalidate and loading.tsx point to the new sections.

Changed

  • Server renders of pages with emotion styles do less work for each component. getRegisteredStyles of @emotion/utils, which every MUI component calls, walks its class names without making an array and a function. The HTML is the same. Counted with callgrind, the three pages of the MUI test app run 1.0% fewer instructions.

Fixed

  • An app with many distinct pages no longer has its VMs replaced over and over. A VM grows as each kind of page renders for the first time and as caches fill, then stays: the example shop's VMs settle at 2 to 2.5 times what they hold after loading, and the pool replaced any VM past twice that, so a fresh VM grew past it again within about a hundred renders (116 replacements in 10.5 minutes in a soak with one VM). A VM is now replaced when it holds more than half of ssr.vm_memory after a collection, 64 MiB with the default limit. When the VM loaded in its place grows past that too within 2,048 renders, the pool logs once that ssr.vm_memory is too low for the app and waits a minute before it replaces a grown VM again, longer each time. See Memory.
  • go tool tifa agents no longer rewrites an AGENTS.md with CRLF line ends on every run. It compares the block as if the file had LF line ends, and writes a refreshed or appended block with the line ends of the file. --check now passes on such a file.
  • A route.go or other file of a package under app/ that imports its own package now gets a message that says what is wrong: the file is already in that package, so drop the import and use its names directly. Before, the build only said could not import ... (import cycle: [...]). A cycle that goes through the root package and a package under app/ now also says that the root package must not import app/. See which way imports go.

[0.0.12] - 2026-11-17

Changed

  • Server rendering runs on slowjs v0.31.3. The HTML is the same. Timed by slowjs on an AMD EPYC 7B13 as the mean of 16 code layouts, the storefront pages of the example shop take 4.2% less time than on v0.31.2, the workbench pages 3.5% less and three pages of an MUI app 1.7% less, and every shop page is faster (2.8% to 6.6%). A VM uses 0.4% to 1.4% more memory, for a cache the engine keeps at each place that reads a property by name. A regular expression may have up to 32,767 capture groups, which the grammars of shiki need. replace and split with a custom exec, a very long regular expression literal and Intl on a long list of locales now stop when a render is stopped.
  • A number a browser would read as another number is no longer sent. A browser, and the server render, read every JSON number as a double, so an integer above 9007199254740991, such as a snowflake ID, a uint64 hash or time.UnixNano(), used to arrive rounded without any error. Now the request fails as an unexpected error (OnError, a 500, the dev page and tifa errors) with a message that names the Load, Layout, handler or session, the path of the number such as rows[3].id, and the number as written and as a browser reads it. It applies to the results of Load and Layout, the session data of Exposed and the result of a handler called from the generated function of a page. A handler answering a client that does not send X-Tifa-Call and what an app writes with c.JSON are unchanged. A float64, timestamps in milliseconds and counters never trigger it. tifa build, tifa check and tifa dev also warn, with the file and line, where code puts such a number straight into a field of a type a page reads: a constant above 2^53, time.Time.UnixNano, the unbounded math/rand functions, a Sum64 hash or binary.Uint64 of bytes from crypto/rand, in a composite literal or an assignment to a field, through a conversion or one local variable. Nothing is warned from the type or the name of a field alone. Add json:",string" to the field to send it as a string (typed string), or send milliseconds. See JSON rules.
  • Apps install @tanstack/react-router 1.170.46, which depends on @tanstack/router-core 1.171.39. tifa build refuses another version, so change the version in package.json and install again. tifa new writes the new one. The router tests, the SSR tests and the shop pass on it unchanged.
  • Server renders do less work in each useCallback call, in each lookup of the i18next cache and in each lookup of the cache of lucide-react icons. The HTML is the same. Counted with callgrind, the example shop's storefront pages run 1.24% fewer instructions, its workbench pages 0.79% fewer and the pages of an MUI app 0.40% fewer. A stack trace of an error thrown while React compares the dependencies of a useCallback names tifaUseCallback where it named useMemo.

[0.0.11] - 2026-11-16

Added

  • tifa dev --background starts the dev server detached from the terminal and returns once the app answers, so a coding agent or a script can start it and go on working. Every other flag and environment variable reaches the server, and everything it prints goes to .tifa/dev.log. tifa dev status [--json] says whether it runs, its address, process ID, start time and whether the last build worked. tifa dev logs [-n lines] [-f] prints the log. tifa dev stop stops it and waits until the lock is free. What runs is judged by the lock .tifa/dev.lock, not by the process ID in the file, so a leftover file after a restart or a crash is not running and nothing is signalled. A second tifa dev now says to use tifa dev status and tifa dev stop. The AGENTS.md that tifa new writes tells agents to use them. See Agents and scripts.
  • Validate on a handler input may take the Ctx: func (in SignUp) Validate(c *tifa.Ctx) error. It can read the request, so a message can be in the visitor's language with c.Language(). func() error still works. tifa build fails when Validate, or a function it passes the Ctx to, writes the response, reads the body again, changes the session or calls tifa.Use. The forms and i18n guides say when to translate in Go and when to return codes that the page translates.
  • c.Path() is the path of the page as the visitor sees it in the address bar, with the language prefix and without the query: /en-US/store/items/a%20b. A page load and the data request of a client navigation give the same path, a method handler gets its own, and tifatest.NewCtx and tifatest.Start agree. A Load can use it for a next address without c.Request(), which Load may not call. tifa build refuses it in a Layout, whose data is shared by every page below it.
  • tifa check, tifa build and tifa dev recognize code written for Next.js, Remix, React Router, TanStack Start, SvelteKit and other Go web frameworks: imports such as next/link, the directives 'use client' and 'use server', exports such as getServerSideProps, loader and metadata, folders such as [id] and (group), files such as +page.svelte and middleware.ts, and route.go handlers that take http.ResponseWriter, *gin.Context, echo.Context or *fiber.Ctx. Each is reported with the file and line, the name of the framework and the Tifa way to write it, as an error (the app cannot be right) or a warning (it builds and does nothing). Names Tifa allows are not reported. See Coming from another framework.
  • go tool tifa agents writes the Tifa skill into the app (.claude/skills/tifa/) and refreshes the block between the tifa:begin and tifa:end lines of AGENTS.md, both from the Tifa version the app uses. Before, the skill was a copy of a repository folder that stayed as it was after an upgrade, with links to the docs on GitHub main, and nothing ever refreshed the block. The skill now links to the docs of the installed version. Run the command again after an upgrade. --check changes nothing and exits with 1 naming the files that are out of date, for CI. A file Tifa wrote is overwritten, edits included, a file it did not write is left alone, and the text of AGENTS.md outside the markers is never touched. An AGENTS.md with no markers gets the block appended, and with no AGENTS.md one is written. tifa new runs the same code, and tifa check prints one line when the files of an app that has them are out of date. See tifa agents.

Changed

  • The sign-in guide has a RequireUser guard that sends a signed-out visitor to /login?next= with c.Path(), and tests the whole sign-in and sign-out with tifatest.Start.
  • A call from the page to a handler with no input and no result, such as func POST(c *tifa.Ctx) error { return tifa.ClearSession(c) }, now brings the new session to the browser when the handler wrote nothing. Before, SignedIn, SignedOut and useSession kept the old state until the next navigation. The answer is 200 with X-Tifa-Session: 1 and the session as its body, and the generated TypeScript does not change. A handler that writes its own response is unchanged.
  • The skill in skills/tifa covers tifa dev --background with status, logs and stop, the check for other frameworks' idioms, and a sign-out handler with no input. Its links are paths into the docs of the installed version, not GitHub.
  • The README.md that tifa new writes says what the app is: a working starter to replace with your own domain, not a todo list product.

Fixed

  • tifa dev rebuilds once for a file saved in place, also when the machine is busy or a poll looks at the file in the middle of the save. It could take the empty file for a settled change and rebuild twice, the second time for the finished file. Before it takes a batch, it now lets the file watcher catch up with its events and polls.

[0.0.10] - 2026-11-16

Changed

  • Server rendering runs on slowjs v0.31.2. The HTML is the same. Timed by slowjs on an AMD EPYC 7B13 as the mean of 16 code layouts, three pages of an MUI app take 3.0% less time than on v0.31.1 and the storefront pages of the example shop 2.7% less, and the workbench pages show no change beyond 1%. The engine now writes the start tags of img and the other void elements, of input and of an inline style, and hashes emotion's styles in C. The extra bytes v0.31.1 gave every regular expression go only to those that use them. Intl.NumberFormat has formatRange and formatRangeToParts.

[0.0.9] - 2026-11-16

Changed

  • The whole-visits tables in the README and in Performance count a full load as every request the server answered with a whole page (the landing of a visit, and a search or another action that loads a page) and a client navigation as every one the router answered with data alone. They counted the first page of a visit as the full load and the three after it as client navigations, although about a tenth of those load a whole page. Same run, same page views a second. Full loads: Tifa 39.5 / 80 ms (P50 / P99), TanStack Start 34.9 / 73 ms, Next.js 51.6 / 146 ms. Client navigations: Tifa 2.4 / 30 ms, TanStack Start 3.3 / 24 ms, Next.js 16.6 / 139 ms.

[0.0.8] - 2026-11-16

Changed

  • The whole-visits comparison in the README and in Performance is two tables now. The throughput table has page views, full loads and client navigations a second, with the three reference rows (Tifa with the render memo off, TanStack Start with gzip, Next.js with prefetch off). The latencies have a table of their own. The whole-request comparison of 2026-11-06, measured with an older engine, is gone from both.

Fixed

  • tifa dev puts back a file in .tifa/ that another tool changed or deleted, on the next rebuild. It used to leave the file as it was until a route changed.
  • tifa dev no longer deletes and copies all of public/ on every rebuild. Saving a TS file with large images or videos in public/ is fast again, and a request for a public file during the rebuild no longer gets a 404. Only files you added or changed are copied, and removed ones are deleted.

[0.0.7] - 2026-11-16

Changed

  • The whole-visits comparison in the README and in Performance is the run of 2026-11-16, with the traffic of today (4 page views a visit, searches, filters, crawlers, the same warm-up for every server): Tifa answers 97.0 page views a second on one core, Next.js 29.5 and TanStack Start 76.5. React Router is no longer part of the comparison.

Fixed

  • tifa build --dir apps/shop -o out/app writes the executable to out/app under the folder you stand in. It wrote it under the app folder and still printed built out/app.
  • tifa build without -o names the executable shop for the module example.com/shop/v2, as go build does. It named it v2.

[0.0.6] - 2026-11-16

Changed

  • A page whose component throws, or whose render uses up ssr.vm_memory, no longer slows the whole site when it is requested again and again. The built app remembers the failure and the error page for 5 seconds, so a request for the same page with the same data and session in that time gets the same answer without a render (X-Tifa-Render: memo), and requests that arrive together share the renders that place the error. OnError still sees every request, and after the first one it gets the first line of the error with a note that the page did not render again, so the log does not repeat the stack trace. tifa dev remembers nothing (see Errors on a page).
  • A page whose render uses up ssr.vm_memory renders its error page once, in place of the outermost Layout, instead of once at every level with the same data, each of which used up the memory again and replaced another VM (see Errors on a page).
  • Pages render a little faster: the engine now writes the start tag of every a whose href is not empty and of every button that has no name or form props, where React DOM wrote them itself. The 14 storefront pages of the example shop run 2.2% fewer instructions and the 6 workbench pages 2.4% fewer, with the same HTML.

Fixed

  • tifa new built with a Go development toolchain writes a valid go line to go.mod, such as go 1.27, not go .0.
  • tifa build, tifa dev, tifa gen and tifa check stop at once with tifa needs Node 20.19, 22.12 or later to run Vite, found Node X on an older Node, instead of an error from inside Vite.
  • A symbolic link in public/, to a file or to a folder, or a public/ that is itself a link, is followed by tifa build and tifa dev. Such files were left out of the build without a word. A link that leads back into the folder being copied, or to nothing, fails the build.
  • A file named index.html in public/, such as public/docs/index.html, is served at its own path. It was answered with a redirect to its folder.
  • tifa dev no longer calls the app ready when another program holds its address, such as Vite's dev server on a port that was free when both were chosen. The dev server asked only whether the port was open, so a browser request could get Vite's Cannot GET /__tifa/vite/ while the app had failed to listen. It now waits for the app itself to answer, and when the app exits instead, shows why.

[0.0.5] - 2026-11-16

Added

  • performance.now() and performance.timeOrigin exist in the server render, so libraries that read the time while rendering, such as framer-motion's motion values (useMotionValue, useTransform, useSpring), render on the server instead of failing the page with ReferenceError: 'performance' is not defined.
  • A tifa installed with go install github.com/liustack/tifa/cmd/tifa@latest hands the command to the version an app pins when run inside the app, like go tool tifa, so it never generates code for another Tifa version. go tool tifa stays the main way (see Installing the command globally).
  • tifa gen writes the generated code into .tifa/ and builds nothing, so editors and tsc see the types of a fresh clone. The package.json of tifa new runs it from its prepare script, so pnpm install or npm install is enough. Existing apps: add "prepare": "go tool tifa gen" to the scripts of package.json (see tifa gen).
  • Built-in languages. A folder of app/ with a _locales folder holding zh-CN.json, en-US.json and so on is offered in those languages, with its pages and API routes. The default language, named by i18n.default in tifa.yaml, keeps the plain URL (/store/cart) and each other language is the first segment (/en-US/store/cart). i18n.prefix: always prefixes the default language too. Write site.url in tifa.yaml and Tifa writes <html lang>, the hreflang and x-default links and a canonical link. In code, c.Language() and useLanguage() give the language, useAlternates() gives the page's URL in each language for a language switch, c.SetAlternates says which versions a page has when its slug differs, tifa.Languages() gives the languages for a content collection (Languages: tifa.Languages()), and the new tifa/i18n adapter translates with one i18next instance for all languages and react-i18next, with formatters added in onStart of hooks.ts. Links such as <Link to="/store/cart"> and root-relative links in Markdown get the prefix by themselves. See A site in several languages. Apps that kept the language in their own lang+ folder and have no _locales folder work as before. To move one over, put the strings in _locales, replace the lang+ folder with its contents, delete the Layout that checked the language and the hand-written hreflang and lang, and drop the Accept-Language redirect unless you still want it. A top-level folder of app/ named like a language of the site, and a lang in htmlAttributes on such a site, now fail the build.
  • hooks.ts at the app root exports onStart(), which runs once before the first render in each VM of the server and in the browser before hydration, for what the whole app sets up once on the JavaScript side, such as i18next formatters or dayjs plugins. It is the JavaScript side of hooks.go. Another export fails the build, naming it. If onStart throws, the program does not start, and in the browser the page stays the HTML the server sent (hooks.ts).
  • The build fails, naming the file and line, for an i18next formatter written in place in add or addCached that calls Date.now(), Date(), new Date() without arguments, Math.random(), performance.now(), crypto.randomUUID() or crypto.getRandomValues() itself. Such a formatter writes another text for the same call, so the server would keep the text of one request for the next ones and the browser would write a different one (i18next cache).
  • The two sides of the example shop share their data. The first shop of the workbench has the products of the storefront at /projects/studio/products, where staff change the price, the stock and the title and description in both languages, and the storefront shows a change on its next request: the render memo renders the page again because its data changed, and serves it from the memo after that. The second shop has a product list and edit page of its own. A checkout in the storefront becomes the next order of the first shop (SH-1043 and on, where it was a random SS- number). Every order takes its pieces from the stock of its shop, a checkout and an order staff place alike, and an order of more than is left answers 409. The three comparison apps do the same.
  • The example shop has /metrics, the counts of tifa.Stats() in the text format of Prometheus as Deploy writes them, for signed-in staff. A PATCH of a product changes only the fields it sends (one that sends none is refused with 422), and the shop keeps up to 100,000 carts, was 10,000, as do the comparison apps.
  • tifa build warns, with file and line, of app code that reads, while rendering, a query parameter the server does not render it with: by its name from useLocation, useRouterState, useSearch({ strict: false }) or the useSearch of a route, and the whole search, searchStr or href of the location. page.tsx and layout.tsx are checked against the parameters of their Load and Layouts, which .tifa/vite.js now gives the plugin, other modules warn of every such read, and reads in useEffect or useLayoutEffect pass. The server renders with the parameters the Loads read only, so such a read can hydrate differently. The build goes on (Query parameters in the server render).
  • tifa.Stats().Memo.Evictions counts the pages the render memo dropped, least recently used first, to make room for another, so a memo that is too small for the pages it is asked for shows. The example shop writes it at /metrics as tifa_memo_evictions_total (Deploy).
  • The example shop has a robots.txt, in its public folder, that keeps crawlers out of the search results and the filtered product lists and lets them into the lists of the categories, the sorts and the pages of a list. The three comparison apps serve the same file.

Changed

  • Pages that highlight code with rehype-highlight render faster. rehype-highlight made a new highlight.js with its 37 languages on every render of a Markdown component, and the SSR bundle now keeps one for each languages object. The two article pages of the example shop run 15.9% and 20.0% fewer instructions in a render, with the same HTML. A call with the aliases option works as before. See Build.
  • A URL that matches no route and whose last segment has a file extension (/wp-login.php) or that has a segment starting with a dot (/.env, /.git/config) now gets the plain text 404 that a missing file under /assets/ gets, with no Load and no render, where it got the 404 page. Scanners ask for such paths by the hundred. A URL that a route matches, a catch-all route included, and navigation data requests are not affected, nor is a route or a public file under /.well-known/, and OnRequest still runs (404).
  • The server render takes URL and URLSearchParams from the engine, which parses URLs in Go, in place of the core-js polyfill the host script carried, so the host script is smaller and a VM holds less. On a site with languages the router makes a URL for each link it writes, so those pages render in less time, with the same HTML: on one core of an AMD EPYC 7B13, three storefront pages of the example shop take 0.703 of the time and its six workbench pages 0.886. A site without languages makes no URL in a render and gains nothing. What a page can see changes in three ways, each as in a browser: a URL has no property of its own, a host name that breaks the Bidi rule of UTS 46 is invalid, and an invalid URL throws TypeError: Failed to construct 'URL': Invalid URL. URL.createObjectURL and URL.revokeObjectURL are gone, as there is no Blob (What the server render has).
  • The storefront of the example shop sells 150 products, was 28. The new ones are other colours and names of the first 28 and share their photos: a product names the folder of its photos (photo in its data), and the pages take the photos from there, not from the slug. The products are one file, app/store/products/catalogue.json, which the shop embeds and the comparison apps read too. The product list has 7 pages and each language 150 product pages.
  • Upgrading from v0.0.4: a page with const Cache is no longer kept in the program. Its Loads run on every request and the render memo skips a render whose data did not change, so the origin never answers old data. The page keeps its anonymous request and the build check, and its HTML still sends Cache-Control: public, max-age=0, s-maxage=<seconds>, stale-if-error=86400 for a CDN in front, unless OnRequest, a Load or a Layout made it private. A page with SSR = false and Cache no longer has an ETag. Cache is now true, false or a duration: const Cache = true takes its time from the new setting cache_control.s_maxage (1m by default, --cache-control-s-maxage, CACHE_CONTROL_S_MAXAGE), and a duration still sets the time of the page. Removed: cache.whole_page, cache.ignore_query (--cache-whole-page, --cache-ignore-query and their environment variables), tifa.ExpirePages (purge the CDN instead, Tifa has no copy to expire) and the Age and Cache-Status headers of such a page. Renamed, with no old names kept: the render cache is the render memo. RenderCache = false is Memo = false, cache.size is ssr.memo_size (--cache-size and CACHE_SIZE are --ssr-memo-size and SSR_MEMO_SIZE), tifa.Stats().RenderCache is tifa.Stats().Memo (CacheBytes and CacheSize are MemoBytes and MemoSize, the type CacheStats is MemoStats, and PageCache is gone), X-Tifa-Render: cache is X-Tifa-Render: memo, and docs/render-cache.md is docs/memo.md The old names are errors, not silent defaults: a route.go with RenderCache fails the build, and cache.size, cache.whole_page and cache.ignore_query fail the start (and tifa build for tifa.yaml), whether they come from a file, a flag or the environment. A redirect from a Load of a page with Cache gets the shared policy too (Cache for CDNs, The render memo).
  • ssr.wait_timeout now defaults to 3s, was 1s, the same as ssr.timeout. A request waits at most 3 seconds for a VM and then renders at most 3 seconds, 6 seconds in all for the SSR part, inside the 10 second server.write_timeout. OnRequest, Load, encoding, compression and writing the answer share the same timeout, so leave room for them when you raise either value. On a machine where 32 waiting renders take longer than 1 second to run, such as one core with pages that take more than 31 ms to render, a burst used to be answered 503 after 1 second and now waits up to 3 seconds, unless ssr.queue_limit is reached first. Set ssr.wait_timeout: 1s to keep the old limit (Render queue).
  • The SSR bundle of an app on react-i18next 18 no longer prints tifa rewrite not recognized. react-i18next 18 wraps the i18n object in a Proxy instead of copying it, so the plugin leaves useTranslation as it is. The end-to-end tests of the i18n app now run i18next 27.0.1 with react-i18next 18.0.0 (The i18next adapter).
  • The i18next cache of the server render now also keeps the strings of calls that run a formatter or post-processor of the app, which it translated on every render before. The example shop's storefront pages, whose amounts and dates go through its formatters, take 0.937 of the time they took, and 0.778 of the time without the cache, with the same HTML. Such code must give the same text for the same language, options and value, as a React component does for the same props. A formatter or post-processor that reads the request or the time should take that value from the options of t instead (i18next cache).
  • The file where an app defines its own options with tifa.String and the like is now options.go, not config.go (see Options of the app). Existing apps: rename config.go to options.go with one git mv. A config.go that still calls tifa.String or the like fails the build, naming the file and saying to rename it. What an app defines there is now called the options of the app, and the settings of Tifa are the ones in tifa.yaml.
  • The performance doc and the README now compare with React Router as well as Next.js and TanStack Start, and measure with gzip requested, as browsers do. The new render memo doc says what the render memo is, why it is safe on every page, signed-in ones included, and what Tifa does with cookies, the session and Authorization for each kind of answer.
  • A client that takes both gzip and zstd, as browsers do (Accept-Encoding: gzip, deflate, br, zstd), now gets gzip. zstd is sent only to a client that takes no gzip or ranks zstd higher with q. This holds for pages, cached pages, navigation data and everything else server.compress compresses.
  • The render memo keeps one form of a page: gzip with server.compress on, HTML otherwise. A page was kept as HTML with a gzip and a zstd copy before, and compressed twice on every miss, which cost about 8% of a miss. Now it is compressed once, a page takes about a fifth of its HTML in the memo, and a hit for a client that takes gzip sends the stored bytes. A client that takes no compression gets the HTML unzipped as it is written, with its Content-Length, and a client that takes zstd and no gzip, or ranks zstd higher, gets zstd made as it is written.
  • Server rendering runs on github.com/liustack/quickjs v0.30.1, the new path of the engine that was github.com/liustack/slowjs from v0.28.0 to v0.29.11. The HTML is the same. If an app builds with the engine's build tags, slowjs_intl_nonames, slowjs_intl_nocjdict and slowjs_anygo are now quickjs_intl_nonames, quickjs_intl_nocjdict and quickjs_anygo. Errors of the engine's root package start with quickjs: where they started with slowjs:. Since v0.30.1 the render timeout (ssr.timeout) also stops a page that is flattening a long string, running String.prototype.repeat, or compiling a very long regular expression or a very large character class. Compiling a very long regular expression under a timeout could kill the VM before.
  • Server rendering runs on quickjs v0.30.2, whose register interpreter replaces the stack interpreter of QuickJS. Pages render the same HTML in less time, and each VM holds more memory, since the engine keeps the register code of every function that ran. WeakRef now keeps its target to the end of the job, as in Node.
  • Server rendering runs on quickjs v0.30.3, the second batch of the register interpreter. The HTML is the same. Intl and Temporal now throw a RangeError for a very long locale tag or option, where they read it whole, and a destructured array no longer makes an iterator. A closure now holds the value of a variable nothing changes, so a WeakRef to an object only a suspended async function held can empty sooner.
  • Server rendering runs on quickjs v0.30.5, the third batch of the register interpreter, now built with a profile of page renders. The HTML is the same and pages render in less time: on one core of an AMD EPYC 7B13, the six workbench pages of the example shop take 0.894 of the time they took on v0.30.3, three of its storefront pages 0.905 and three pages of an MUI app 0.885. {..."ab"} now gives the characters, as in Node. ssr.timeout now also stops a call of Intl on a very long text, a list of locales with a tag longer than 16,384 characters is a RangeError, and a VM that would pass its memory limit with one large block collects garbage first.
  • Server rendering runs on quickjs v0.30.6, which answers more built-in functions inside the interpreter loop, such as Array.isArray, push, includes, indexOf, startsWith, Object.hasOwn and has and get of a Map or Set. The HTML is the same. On one core of an AMD EPYC 7B13, three storefront pages of the example shop take 0.986 of the time they took on v0.30.5 and its six workbench pages 0.996, and three pages of an MUI app take as long as before.
  • Server rendering runs on quickjs v0.30.7. The HTML is the same. Timed by quickjs on an AMD EPYC 7B13 as the mean of 16 code layouts, the workbench pages of the example shop take 2.3% less time than on v0.30.6, three pages of an MUI app 1.7% less and the storefront pages 1.6% less. A spread no longer calls return on an iterator whose step threw, as in Node, and Object.defineProperty with a descriptor whose getter or has trap throws now ends with that error.
  • Server rendering runs on github.com/liustack/slowjs v0.31.0: the engine is named slowjs again, as it was from v0.28.0 to v0.29.11. The HTML is the same. If an app builds with the engine's build tags, quickjs_intl_nonames, quickjs_intl_nocjdict and quickjs_anygo are slowjs_intl_nonames, slowjs_intl_nocjdict and slowjs_anygo again, and errors of the engine's root package start with slowjs:. Timed by slowjs on an AMD EPYC 7B13 as the mean of 16 code layouts, the pages of the example shop and of an MUI app take as long as on v0.30.7, within 0.5%, and a long Markdown page takes 8% less.
  • Server rendering runs on slowjs v0.31.1. The HTML is the same. Timed by slowjs on an AMD EPYC 7B13 as the mean of 16 code layouts, the workbench pages of the example shop take 1.5% less time than on v0.31.0 and three pages of an MUI app 1.1% less, and the storefront pages take as long as before. Known limit, until the next release of the engine: a very long Markdown page, one that compiles thousands of regular expressions a render, takes about 3% more time, and in the engine's own test a process that rendered it after a shorter page peaked at 460 MB where it peaked at 258 MB. A power of two prints its shortest digits, as in Node: 2 ** -44 is 5.684341886080802e-14, where 54 such numbers printed one digit too many. Object.isFrozen and Object.isSealed ask isExtensible first, as the specification says.
  • tifa new pins github.com/liustack/sqlite v0.1.4. v0.1.3 fixed a nil pointer panic when one commit groups more than 64 different SQL statements, common when values are written into the SQL text. v0.1.4 brings group commit and fixes from a full review and for Windows, and one rule changed: with named arguments, every parameter number up to the largest needs a value, as with positional ones (SELECT ?2, :x needs ?1 too). Existing apps: go get github.com/liustack/sqlite@v0.1.4.
  • The example shop's storefront no longer uses const Cache (it is gone from its five pages), so the browse comparison runs one Tifa. Its pages are answered by the render memo alone, and every request runs its Load. The shop README says so.
  • The browse comparison plays one scenario, the shop with shoppers and staff in one mix. The scenario with twice the staff visits and product edits is gone, and so are SCENARIOS and -scenarios. The staff share stays a row of the mix table of the report.
  • The browse comparison has a fifth row in its throughput and latency tables: Tifa with its render memo off (--ssr-memo-size 0), which keeps no finished render but may still answer navigation data with no render, share a render in progress and answer 304, marked as a reference and not compared. It runs by default, with the same data and checks as the others.
  • The throughput and latency tables of the browse report name in bold each server that compressed no answer, with the body it sent a page view against the frameworks compared that did, from the rounds. TanStack Start, whose Nitro server sends its answers uncompressed as it ships, is measured as it ships.
  • The appendix of the browse report splits the answers of Tifa, by kind of page, into those from the render memo, those that shared a render in progress and those rendered in a VM, and these into the first request of a URL in the round, a URL it had answered before (as the client tells by URL), and the private pages with and without a cart cookie, with the limits of a split made on the client.
  • The visits of the browse comparison see 4 page views each on average, one full load and three clicks, exactly in every block, from about 4.3 page views a session (Contentsquare 2025) with a click counted as a page view. The lengths are geometric, from 1 to 12. Before, a visit saw 2.6 page views and at most 5. The adds to the cart and the checkouts are the same share of the visits.
  • A browse run asks each Node app, before its first round, for the documents and the navigation data its traces replay, twice each, and stops when an answer carries a sign that a cache could keep it (an ETag, a Last-Modified, a positive max-age or a Next.js cache header).
  • A browse report that does not come from a formal run (settings other than the defaults, no pinning, not run by browse.sh, or not every server) says so at the top, with every way it differs.
  • The example shop keeps its orders with indexes and running totals that every write updates, so the order list, an order and the stats read their data in about the same time with 50 orders or 5000. Before, every read copied and sorted all the orders of the shop. A filter, a search or the sort by amount still goes through all of them. The order page no longer repeats how each carrier did for the shop, which the stats page shows.
  • The server render of a page sees the path and the query parameters its Load and the Layouts above it read, sorted by name, and the render memo and the ETag are keyed by the same. Other parameters, such as utm_source, fbclid or a random one, no longer make a new memo entry and render, and another order of the parameters is the same page. The address bar keeps every parameter and its value, and OnRequest, the Loads and the navigation data still see the whole URL. Upgrading: a component that reads, while rendering, a parameter no Load reads now gets nothing on the server and hydrates differently. Read that parameter in the Load, and in the component by its name (Query parameters in the server render).
  • Server rendering writes out more calls of small functions, with the same HTML: also those whose body has expression statements before its return or an if that throws, and up to 64 syntax nodes, was 32. React DOM runs several such functions for every hook a component calls. A render runs 0.66% fewer instructions on the example shop's workbench pages, 0.29% on its storefront pages and 0.77% on the MUI test app. The SSR bundles grow by about 0.6%, and an error thrown by such a function shows the place of its call, one frame less in the stack. See Frontend output.
  • Server rendering calls React's hooks with one function call less, with the same HTML. React 19 exports each hook as a function that only hands its arguments to the dispatcher React DOM sets for a render, and the SSR bundle now calls the dispatcher directly: React.useRef(v) becomes React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.H.useRef(v). The plugin reads which hooks have that form from React's react.production.js, and prints a warning and changes nothing when the file has another form. A render runs 0.28% fewer instructions on the example shop's workbench pages, 0.24% on its storefront pages and 0.44% on the MUI test app. The SSR bundles grow by about 2% to 3%, and a hook called outside a render throws the same TypeError before its arguments are worked out. See Frontend output.
  • ssr.vms defaults to the CPUs the process may use, at most 4, no longer one VM for each CPU however many. A container with a memory limit and no CPU limit sees every CPU of its host, and loaded a VM for each. An app on more than 4 CPUs that wants one VM per CPU, as before, sets it, such as ssr.vms: 8 or SSR_VMS=8. A value an app sets is used as it is.

Fixed

  • A client that left in the middle of a request is no longer reported as an error of the app. When the request's own context was canceled, a page with Memo = false that waited for a VM, a Load that returned context.Canceled, and a write to a closed connection no longer reach OnError or the error log. A context.Canceled from somewhere else while the client is still there is still an error.
  • The temporary files of a multipart upload over 32 MiB stayed in the temp folder when the request was a copy of the one net/http made, as on a site with languages and behind a middleware that calls r.WithContext. They are now removed when the request ends, whichever request the form was read on.
  • An answer that failed after part of it was written, such as a streamed reply that broke off or a download that stopped, used to end as if it were whole: the browser, curl and any proxy took the cut-off body for complete. The connection is now cut (reset over HTTP/2), so the reader gets an error. OnError still hears of the failure once, and the log line stays.
  • The build changes seroval 1.8 again. seroval 1.8.0 moved its code out of dist/index.js into files beside it, so the plugin no longer found the two places it changes, printed tifa rewrite not recognized: seroval 1.8.1 twice, and an app with newly installed packages wrote the data of its pages the slow way. The plugin now looks in every file of seroval that the bundle loads.
  • A small function whose call the SSR bundle writes out no longer reads a variable, a property or a name of the global object before an argument with effects that the call worked out first. function f(x) { return n + x } called as f((n = 2, 0)) gave 1 where the call gives 2, and a getter in the body ran before the argument, or threw before it ran. Such a call now stays: before the last argument with effects the body may only use parameters, compare with === or !== and read names of the module that are set once and surely set at the call (Frontend output).
  • The search box in the header of the example shop's Chinese storefront searches the Chinese list (/zh-CN/store/products?q=). It sent the visitor to the English one.
  • The pages of reviews on a product page of the example shop's Chinese storefront link to the Chinese URLs (/zh-CN/store/products/<slug>?reviews=2). They linked to the English page.
  • The redirects the router makes while rendering a page (/%61 to /a) are now kept by the render memo like other pages, so a repeat is a hit (X-Tifa-Render: memo) and not a render. A 404 page and the page of a failed Load are rendered for each request and not kept, so random URLs do not fill the memo, and requests for the same one at the same time share one render. They carry no ETag, and OnError sees every failure (The render memo).
  • A missing file under /assets/, such as a chunk of an older build that a tab opened before a deploy asks for, now gets a plain text 404 with Cache-Control: no-store. It used to go through OnRequest, run the Loads of the root Layout and render the app's 404 page (Page requests).
  • A page larger than ssr.memo_size is compressed once: a client that takes gzip gets the form made for the memo, which was thrown away and made again before. The key of every render no longer copies the data it hashes, about 98 KB less garbage a request for 92 KB of data (Optimizations).
  • The SSR bundle of an app on i18next 27 no longer prints tifa rewrite not recognized for fixedT, looksLikeObjectPath and createCachedFormatter. The first two are sped up as in 26. i18next 27.0.1 bounds its formatters itself, so the plugin leaves them, and 27.0.0 gets the plugin's bound. build.i18next_cache now works with i18next 27.0.0 and 27.0.1 as it does with 26, and hydrate empties the cache of its instance (i18next cache).
  • The i18next cache of the server render no longer gives the text of an earlier call to a later call that differs only in an option under a Symbol key, which a post-processor can read. A call with such an option is not kept (i18next cache).
  • A server that formats many different amounts, dates or names with i18next no longer grows without end. i18next keeps a formatter for each value it formats through number, currency, datetime and the other formats, and through those added with addCached, and never lets them go (i18next/i18next#2227): 20,000 new values took 28 MB in a VM, which the server then replaced. The SSR bundle now keeps at most 1,024 for each format, with the same text (i18next).
  • A route that writes several meta tags of one name in its head, such as a theme-color for light and one for dark mode or several og:image, now gets all of them on the page. Only the last one was kept, so a page in light mode showed the dark theme-color. A deeper route that writes the name still replaces them all.
  • The render memo held up to twice the memory of ssr.memo_size with server.compress on: it counted the length of the compressed pages but kept the larger buffers they were made in, and left out the Content-Security-Policy of each page. It now keeps exactly sized copies and counts what it keeps, so the live heap of the cache stays within ssr.memo_size. The peak memory of a program that fills the cache with writes drops with it.
  • The 308 the server sends for another spelling of a URL (/%6Eews?utm_source=mail&page=2, /news/?page=2) keeps the query parameters the render did not see. The render memo also keeps the redirect for each spelling of the parameters it saw, and every request gets its own parameters back.
  • On a site with languages, a page opened with a query the router spells another way, such as ?q=a%20b, ?next=%2Fa or a key given twice around another, no longer asks for its data again right after it hydrates, and under a language prefix keeps that spelling in the address bar. The router replaced it with its own (?q=a+b, ?next=/a). A site without languages never did either. A URL that differs in its path still goes to the router's own.
  • A page with SSR = false opened with a key given twice around another (?x=1&y=2&x=3) takes its first data from the document again. It asked the server for that data once more, with one language or several.
  • tifa gen and tifa check no longer break a running tifa dev. They wrote .tifa/ as a build does, which replaced the main.go and the reload client of tifa dev, so the app did not start after the next Go change. While tifa dev or tifa build runs in the app, tifa gen now leaves .tifa/ alone and prints one line saying so, and tifa check still checks the app but writes nothing into .tifa/ (see tifa gen).
  • tifa build, tifa gen and tifa check start Node with the Vite driver as a file, no longer as an argument of node -e, which Windows refuses above 32,767 characters.
  • tifa dev builds the SSR bundle again when a file that it read changes, whatever the type, such as a Markdown or YAML file imported with ?raw. It rebuilt only for .ts, .tsx, .js, .jsx, .mjs, .css and .json files, so the server render kept the old text while the browser showed the new one (What each change triggers).
  • A tifa installed globally, which hands the command to the version the app pins, now reads a relative --dir or -o from where you typed the command. It read them from the root of the app, so tifa build --dir apps/shop failed from the parent folder and -o bin/x wrote into the app.
  • A Go panic while the server loads a new VM in the background, or closes one, no longer ends the process. The engine turns a fault into a panic. A load is now retried as a failed load is, and a close counts as a failed close, which shutdown reports.
  • A FinalizationRegistry callback runs right after the collection between renders that queued it, under the time budget and memory limit of a render, and no longer in the render of the next request, which a callback that threw made fail. One that throws or runs out of time now retires its VM and is logged. A callback of the bundle's own top level code runs when the VM loads.
  • i18n.t of tifa/i18n in the head of a route translates in the language of the page. On the server it used the language of the last page the VM rendered, or none in a fresh VM, which gave the key, and the render memo kept that title. In the browser the title became the key once the page hydrated.

[0.0.4] - 2026-11-05

Added

  • A field of type *multipart.FileHeader or []*multipart.FileHeader in the input of a POST, PUT or PATCH handler holds uploaded files. The generated function takes them as Blob | null and Blob[] and sends the input as a multipart form, so a page uploads a file as it sends any other input, with Validate, tifa.Fields and TifaError as usual. A JSON body for such an input gets 415 (see Files in the input and Uploads).
  • BodyLimit and ReadTimeout in a route.go, constants or variables such as a setting of the app, replace server.body_limit and server.read_timeout for the requests its method handlers answer. The read time is lifted before OnRequest, and the answer gets server.write_timeout after it (see Body limit and read time of a route).
  • A request body that does not arrive before the read deadline is answered with 408, no longer with 400.
  • tifatest.File(t, name, data) gives the *multipart.FileHeader of a file, for a test that calls a handler or Validate with an input that holds one.
  • route.gen exports PageSearch and LayoutSearch, the query parameters the Load or Layout of the folder reads, and the route gets them, so Link, navigate and useSearch know them: every value a string or string[] when read, since a key can come more than once in a URL (c.Query in Go takes the first), every key optional, and other keys open. Only the types change: nothing runs on the query in the browser (see Query parameters in Link and navigate).
  • tifa.Secret("smtp.password", "SMTP password") defines a setting of the app for a password, a token or a key. It comes from the environment, .env or the file of -c, a flag for it stops the program and says where to put it, and ./bin/app config writes where it came from and not its value. The email guide uses it.
  • server.csp: on sends a Content-Security-Policy that lets only the site's own scripts run. Tifa adds the hashes of the inline scripts it writes into a page to the policy of that page, so pages hydrate, and the render cache, the whole-page cache and ETags work as before. server.csp_policy changes the policy, and report-only only reports (see Content-Security-Policy).
  • tifatest.Start(t, tifaapp.App) runs the whole app in go test and returns an *httptest.Server, so a test can walk through what a browser does: open a protected page and get the redirect, sign in, see the session cookie, and read the page. OnStart, OnRequest, decoding, Validate, sessions, redirects and OnError run as in the program, OnShutdown runs when the test ends, and the client keeps cookies and does not follow redirects. Without a front end, pages answer the data of their Loads as JSON by route ID. tifatest.StartPages also renders the pages with the front end of tifa build or tifa dev, on at most two VMs in the test binary, which later tests with the same build reuse, and fails the test when .tifa/dist is missing or a file it was built from has changed since. Import the app from a test in a package of its own, such as package login_test (see Testing a whole request).
  • tifa build and tifa dev write .tifa/dist/inputs.json: a hash of each file the front end was built from, which StartPages checks.

Changed

  • A multipart.FileHeader anywhere but in a field of a POST, PUT or PATCH input, such as in a result, the data of Load or the session, fails the build. A route.go that declares BodyLimit or ReadTimeout with another meaning, or without a method handler, fails the build too.
  • A value other than a string for a query parameter that Go reads, such as search={{ page: 2 }}, is now a type error. Write page: String(n): the router wrote it as text anyway.
  • Every answer now carries Referrer-Policy: strict-origin-when-cross-origin and Content-Security-Policy: frame-ancestors 'self', next to X-Content-Type-Options: nosniff. Another site can no longer show the pages in a frame: change the header in OnRequest for pages that a partner shows (see Security headers).
  • tifa new pins github.com/liustack/sqlite v0.1.2, which builds with Go 1.26.6 to 1.27 and stops the build on a newer Go. After upgrading Go, upgrade the driver too.
  • The generated table of routes moved from .tifa/routes.go into the package .tifa/tifaapp, as tifaapp.App, so tests can import it. .tifa/main.go serves tifaapp.App. A test that imports it needs .tifa, so in a fresh checkout go vet, go test and go mod tidy fail until tifa check, tifa build or tifa dev has run.

Fixed

  • The docs said a page or Layout remounts when a query parameter its Load reads changes. It never did, and now the docs and the generated remountDeps say what happens: a route remounts for a path parameter it reads, and another query loads the data again and keeps the component and its state, as TanStack Router does by default. State set up from Load data follows a new query only through a key or an effect of the app.
  • A slice type that reads and writes itself as text, such as type Tags []string with MarshalText and UnmarshalText, in a GET or DELETE input or a form input with files, passed the build: TypeScript sent it as one string such as "a,b", Go put that string in one element without calling UnmarshalText, and a slice of numbers got 400. It now fails the build, like a field whose element has those methods. c.BindQuery and the decoding of an input with files return an error for such a field whatever the request holds, and a form sent to an input that also takes JSON answers 400 for a value of such a field instead of filling it wrongly (see Method handlers with input and result).
  • Under systemd socket activation with HTTPS, server.addr may stay unset when systemd passes its socket. The program refused to start on the default address, which it does not listen on then.
  • With HTTPS on, the plain HTTP address server.http_addr now reads and writes under server.read_timeout and server.write_timeout, like server.addr. It kept 10 seconds whatever they said.
  • A handler under tifatest.NewCtx that wrote a 1xx status, such as 103 Early Hints, before SetSession and its answer left the recorder with the 1xx and without the Set-Cookie: httptest.ResponseRecorder takes any status as the final one. The recorder now keeps 1xx statuses out, as the server sends them before the answer.
  • The test in Sign-in read two requests from one recorder, whose Result() keeps the headers of its first call, so it never saw the cookie of the second. It now makes a NewCtx per request.

[0.0.3] - 2026-11-05

Changed

  • The tifa new template uses the SQLite driver github.com/liustack/sqlite instead of modernc.org/sqlite. It is pure Go and needs Go 1.27 or later, on Linux and macOS (amd64 and arm64) and Windows (amd64). Moving an app over from modernc.org/sqlite needs two checks. The driver rejects DSN parameters it does not know, so _foreign_keys=1 and the like must become _pragma=foreign_keys(1). And double quotes in SQL only name columns and tables, so a string value written as "text" must become 'text'. Both drivers register the name sqlite, so remove the old import completely.

[0.0.2] - 2026-11-04

Added

  • tifa.ExpirePages("/blog/"+slug, "/blog") has the whole-page cache make those pages again on their next request, for every query string, host and scheme of each path. Call it after a write that changes what pages with Cache show. A page made from data read before the call is not kept, and the old page still stands in when making the new one fails. It clears the memory of the program only, not a CDN in front (see Making a page again after a write).
  • tifa.Stats() returns the VM pool (VMs loaded, rendering and waited for, renders, failed renders, their time, and renders refused with 503) and the hits, misses, shared makes and entries of the render cache and the whole-page cache, with the bytes they hold. Renders and cache lookups count with atomics and take no new lock. Deploying shows a health check route and a route that writes the numbers for Prometheus without a library, and what to read in them.
  • server.read_timeout and server.write_timeout (flags --server-read-timeout and --server-write-timeout, variables SERVER_READ_TIMEOUT and SERVER_WRITE_TIMEOUT) set the time to read a whole request and the time to write its answer. Both stay 10s by default. A handler that streams or takes a large upload lifts them for its own request with http.NewResponseController(w), which reaches the connection through Tifa and the compression (see Long requests).
  • tifa.ShuttingDown(ctx) returns a channel that closes when the program starts to stop. A stream with no end of its own, such as server-sent events, returns when it closes, so a stop no longer waits the whole server.shutdown_timeout for it.
  • Under systemd socket activation the program serves on the sockets systemd passes it (LISTEN_FDS), so a restart keeps the port open and queues new connections instead of refusing them. With HTTPS, the two sockets are told apart by FileDescriptorName=server.addr and FileDescriptorName=server.http_addr. Without these variables nothing changes. Deploying has the .socket and .service units.
  • The tifa new template keeps sessions in its SQLite database (sessions.go, set with tifa.SetSessionStore in OnStart), so a restart no longer signs everyone out.
  • tifatest.NewCtx takes the deadlines a streaming handler sets through http.NewResponseController.
  • Streaming shows server-sent events and an answer streamed piece by piece, with the browser code, the caches, the stop and a test.

Changed

  • Answers with Content-Type: text/event-stream are sent uncompressed. A compressed stream held an encoder of about 1 MiB for gzip for as long as it stayed open. Other streamed answers are still compressed and still flush.

Fixed

  • A page with Cache that a content entry expired early, sent as the old page because making the new one failed, kept the s-maxage of its whole time, so a CDN in front counted it as fresh until that time ran out. Its s-maxage is now no larger than its Age.
  • A built program given a flag it does not know, such as --addr for --server-addr, started with the defaults as if the flag were not there. It now stops with unknown flag: --addr. Flags of the settings of the app still work, and other environment variables and other keys of a file are still left alone.

[0.0.1] - 2026-11-04

Added

  • Content collections: an app keeps posts, docs and other writing as Markdown files under content/ and reads them in Go as typed values. content.go at the root declares each collection, var Blog = content.Define[Post](content.Source{Dir: "blog", Languages: []string{"zh-CN", "en"}}), where Post embeds content.Entry and its json names are the front matter keys. A folder with an index.md is one entry with the files below it (a page bundle), every other .md file is an entry, and Match narrows the choice. Blog.All(), Blog.In(lang), Blog.Get(lang, id) (tifa.ErrNotFound when there is none or the entry cannot be seen yet) and Blog.Languages() return the entries with their ID, slug, path, date, translations and word count. tifa build and tifa check check the declarations, the files and every front matter (required keys, types, keys that are not fields with the nearest name, slugs, duplicate IDs and paths, links that lead out of the collection, .mdx files), and fail on a folder of content/ that no collection reads, also in an app without content.go. Entries without a version in some language get a warning. The program runs the Validate method of each entry before OnStart and does not start when one fails. Tests read the content with tifatest.LoadContent(t) or set it with tifatest.SetContent (see Content).

  • The bodies of content entries become HTML at build time. entry.Body() returns the HTML of an entry as tifa.HTML for <HTML>, and entry.Headings() its headings with the id each has in the HTML, for a table of contents. The conversion runs in the Vite plugin with unified and needs unified@11 remark-parse@11 remark-gfm@4 remark-rehype@11 rehype-raw@7 rehype-stringify@10 in the app, and the build says which to add. It reads GitHub-flavored Markdown, keeps the HTML written in it, drops HTML comments and gives headings the ids of GitHub. Apps add their own plugins with tifa({ markdown: { remarkPlugins, rehypePlugins } }) in vite.config.ts. Images and other files the body points to with a relative URL are found next to the entry or next to its version in the default language, and are served from /assets/ with a hash in the name. A relative link to a .md file, a missing file and a file outside the collection fail the build. The bodies are put into the program under dist/content/ and never served by themselves. An app without pages, such as one whose only route writes a full-text feed, converts too, with the plugins of its vite.config.ts. In go test, Body() returns a placeholder that names the entry and Headings() returns nil (see Markdown to HTML).

  • Drafts and dates of content entries. An entry with draft: true is not converted and is not in the program. An entry whose date is still to come is in the program but hidden: it comes out at its date while the program runs, without a new build or a restart, and from that moment All, In and Get return it and the Translations of its other versions list it. A date alone is midnight UTC, and a timer that wakes at least once a minute also catches a clock that was set or a machine that slept. Pages with Cache made before that moment are made again by the next request, so a list of posts shows the new one at once. The program logs tifa: content: blog en/202611/release-notes is published (date 2026-11-20 09:00 +08:00), and tifa build and tifa check list the entries that wait for their date. tifatest.SetContentTime(t, tm) has a test see the entries of tm. Under tifa dev both drafts (with Draft true) and entries whose date is still to come are shown, so a writer sees them in lists and on their pages (see Drafts and dates).

  • tifa dev follows content/: a change of a Markdown file, its front matter or a file next to it, such as an image, rescans the content in Go, converts only the entries it touches and has the running app load them, without go build or a restart. The app runs Validate again and takes the new content, the whole-page cache expires, and open pages reload. A change of content.go or a schema type, or of vite.config.ts and its plugins, converts every entry. A front matter error, an undeclared folder or a plugin error shows the message of tifa build in the overlay, and an entry that fails Validate shows The app did not load the content, while the app keeps the content it had, with its old bodies (see tifa dev).

  • A field of type tifa.HTML holds markup the app trusts, such as an article turned from Markdown into HTML, and <HTML value={post.body} as="article" /> of tifa/client shows it, in one of the elements of ordinary content as takes. Its TypeScript type is HTML, not string. A page the server renders carries each value once, in its markup, and its hydration data a small marker, so a long article is not sent twice. Navigation data and pages with SSR = false carry the string. tifa.HTML cannot be a map key, a handler input, in the session or the whole result of a Load or Layout. Sanitize HTML from users before you convert it (see Showing HTML the app trusts).

  • Links inside <HTML> go through the router like a Link: a click on a link to a page of the app shows it without loading the whole document, and a hover or a focus of 50 ms, or a touch, preloads it. The browser still follows links with a modifier key, target, download or rel="external", links to other sites and schemes, a #hash of the same page, public files, /assets/, /__tifa/ and paths without a page such as API routes. Handlers of the app on <HTML> run first and keep the router out with preventDefault (see Showing HTML the app trusts).

  • New go tool tifa errors prints the errors since the last build of the tifa dev that runs in the app, so a coding agent that sees neither the browser nor the terminal can check a change: a build that failed or an app that did not start, stopped or did not load the SSR bundle, unexpected request errors with the status, the message users see and the stack trace in your sources, the errors of the browser that open pages had (hydration mismatches, uncaught errors, unhandled rejections) with the page, and pages whose two renders differ. Each kind keeps the last 20 with a count for repeats, a build drops what came before it, and a run during a build waits for it. It exits with 0 without errors, 1 with errors and 2 when no tifa dev runs, and --json prints every field. The dev client now sends the errors of the panel to tifa dev as well. Built apps have none of this. The AGENTS.md that tifa new writes tells agents to run it (see Tifa errors).

  • Apps define their own settings in config.go at the root: var DBURL = tifa.String("db.url", "app.db", "Database file"), and tifa.Strings (comma-separated text), tifa.Int, tifa.Bool, tifa.Duration and tifa.Size. Each returns a plain value, read from the flag --db-url, the variable DB_URL, .env and the file of -c like the settings of Tifa, and the default in go test. A bad value stops the program before OnStart with every other bad value. ./bin/app config lists the settings of Tifa and of the app with their values and where each value comes from. tifa build fails on a call anywhere else, on a key that is no string literal or no valid key, and on two settings with the same flag or variable (see Settings of the app).

  • The program reads the file .env in the folder it runs in, below the real environment variables. One file per machine, no variants, not put into the program. Under tifa dev the app reads the .env of the app root, and a change of it restarts the app without a build (see .env).

  • The program reads PORT and HOST of hosting platforms for server.addr, below SERVER_ADDR. PORT alone listens on every interface, as Cloud Run and the like need (see PORT and HOST).

  • -c is the short form of --config.

  • A second tifa dev in the same app no longer starts Vite and fails with a bare address already in use. It prints tifa: tifa dev is already running in this app at http://<address> (pid <N>) and exits with an error. tifa build stops the same way while a tifa dev runs, since both write .tifa/dist. Without --addr, a taken port 9527 moves tifa dev on to 9528 and up (ten ports in all), and a taken --addr fails with the address in the message. The lock is the file .tifa/dev.lock (see tifa dev).

  • tifa dev shows errors of the browser in a small panel in the corner of the page: Hydration mismatch (with React's diff and the component stack), Recoverable error, Uncaught error and Unhandled rejection. The same error again raises a counter, the panel keeps the last 20, and each can be dismissed. The panel leaves the page usable, and the overlay of a build error stays on top of it. Built apps have none of this code (see tifa dev).

  • A fresh clone of an app now says what to do. tifa dev and tifa build stop at once with the command to run (pnpm install when pnpm is on PATH, npm install otherwise) when the app has a package.json and Vite is not installed, where tifa build printed Vite is not installed in the application, install it with: pnpm add -D vite @vitejs/plugin-react, advice that was wrong for an app that already lists Vite, and tifa dev showed the same text in its overlay. An app without pages has no package.json and is not checked. The README of an app made by tifa new has a line on what to run after cloning (see tifa dev).

  • tifa docs prints where the docs of the Tifa version the app uses are, found with go list -m so a replace works too, and an index of them in the format of scripts/docs-list.sh: each doc's summary and when to read it. The AGENTS.md that tifa new writes tells a coding agent to run go tool tifa docs first and no longer links to the docs on GitHub's main branch, which may be another version than the app uses. The part of AGENTS.md that Tifa writes sits between <!-- tifa:begin --> and <!-- tifa:end -->, with the notes about the app itself under ## This app after it (see Tifa docs).

  • tifa check runs every check of an app with one command: the analysis of the routing conventions, the code generation, go vet ./..., go test ./... and the TypeScript type check, with the tsc the app installs (npm and pnpm both work), and stops at the first step that fails with an error that names it and a non-zero exit status. An app without pages skips the TypeScript step and needs no Node (see tifa check). The AGENTS.md that tifa new writes names this as the one command to run before finishing a change, in place of the separate test and type check commands.

  • A folder can hold layout_.tsx in place of layout.tsx. Its pages, and the pages below it, show without any Layout above it, the root Layout included, and the Layout functions above do not run for them, neither for a page, nor for the navigation data of the browser, nor for the 404 of a URL below it. The root Layout's htmlAttributes and documentHead and OnRequest still apply. The Layout in its folder gives it data, Layouts below it nest inside it, and when it fails the framework's default page shows. The build fails for layout_.tsx in app/, for layout.tsx next to layout_.tsx, and for tifa.Use of a Layout that a layout_.tsx drops (see A Layout without the Layouts above). The storefront of the example shop uses it, so its pages no longer carry the root Layout's empty workbench data, a URL that matches no page shows the shops in the workbench sidebar, and a language the store does not have shows a 404 of the store in Chinese and English.

  • A site in several languages in docs/app.md: the language folder, checking the language in its Layout, lang and hreflang in its head, the redirect of the URL without a language and loading the translations synchronously. The storefront of the example shop follows it: /store redirects to /store/zh-CN or /store/en-US by the browser's Accept-Language, and its page for the rest of the path is gone.

  • A package may import a Node module it uses only on Node, such as node:fs for code a render never reaches, and the app loads and renders. Each imported name is a stand-in that throws when a render uses it, with the export, the module, the package and the place in its source. The bundle used to turn such an import into a require, which failed as each VM loaded it, even when only an import() reached the module. tifa build still lists the Node modules left in the SSR bundle (see Packages that import Node modules).

  • A component that suspends on work promises settle by themselves, such as a React.lazy component of a module in the bundle or use of a promise, renders on the server: the server waits for it and writes the page whole, as the browser shows it once loaded. Such a page used to fail with the error that a component suspended. Work that waits for a timer or a request still fails with that error. Pages that do not suspend render the same HTML in the same time (see Components that wait).

  • AsyncLocalStorage in the server render, as a global and from node:async_hooks with AsyncResource, as Cloudflare Workers has them: run, exit, getStore, bind and snapshot. A store follows await and promise callbacks. fumadocs, which keeps the state of a page in one, now builds and renders with no setting but its own collections alias.

  • Packages and page code may use top-level await in the server render, as fumadocs-mdx does for its collections. A build with one used to fail. Each VM waits for it while it loads, before its first render. It must settle with promises alone, such as await import() of a module in the bundle: one that waits for a timer or a request never settles, and the VM fails to load.

  • The server render keeps the strings i18next translates and gives them again for the same key and options. The example shop's storefront pages take 0.798 of the time to render, with the same HTML. It is on by default, and build.i18next_cache: false in the project file turns it off. Calls that run a formatter or post-processor of the app translate each time, as do all calls of an instance made with cloneInstance, so such code may read the request. An app that changes i18next's resources or options without i18next's API after the first render, or gives i18next other functions that read the request, such as an overloadTranslationOptionHandler, should turn it off, or pages may show stale translations. For an i18next whose code the plugin does not know, the build prints a warning and the bundle is the one without the cache (build.md).

  • The SSR pool replaces VMs whose live memory after collection has grown too far from their warmup baseline. It loads one spare at a time while the render queue is empty and exchanges it only with an idle VM, keeping render capacity during loading. Failed loads keep the old VM and retry with backoff. Allow memory for one extra VM during replacement, see Memory.

  • tifa.WithRenderClock(ctx, now) gives one server render a fixed or controlled clock shared by Date, Temporal.Now and Intl. The clock is cleared before VM reuse, and also applies to replacement VMs. Production keeps the live clock by default. Module initialization still runs during prewarming.

  • SSR VMs provide Temporal and Date.prototype.toTemporalInstant, installed on first use. Temporal.Now uses the live system clock and defaults to UTC, consistent with Date and Intl. Temporal locale formatting uses Intl. Browser support is still the app's responsibility.

  • The SSR VM provides atob, btoa, DOMException, crypto.getRandomValues, crypto.randomUUID and structuredClone. Random bytes come directly from Go before or during rendering, including module loading. The host APIs retain the built-ins they use across VM reuse. getRandomValues rejects views on shared or resizable buffers with TypeError. Cloning preserves cycles, shared references and common JavaScript built-ins. Transfer, SharedArrayBuffer and views on resizable ArrayBuffers remain unsupported. Unlike browsers, transparent proxies of ordinary objects and arrays are cloned through their traps. There is no crypto.subtle.

  • SSR waits are bounded by ssr.queue_limit (32) and ssr.wait_timeout (1s). A full queue or an expired wait answers 503 with Retry-After: 1 and Cache-Control: no-store, without using a VM or calling OnError. Apps can match the rejection with errors.Is(err, tifa.ErrSSRBusy). ssr.timeout still limits execution only.

  • The HTML of a page preloads the chunks of its Layouts and route with <link rel="modulepreload"> right after the tags of the build, so they download alongside the entry script. When a Load fails, it preloads only the levels the router shows. build.json lists the chunks under preload.

  • HTTPS from the program itself, off by default. server.tls_domains gets and renews certificates from Let's Encrypt, kept in server.tls_cache. server.tls_cert and server.tls_key serve your own certificate and load it again when the files change, without a restart. With HTTPS on, browsers get HTTP/2, server.http_addr (:80) answers Let's Encrypt and redirects the names HTTPS has a certificate for to HTTPS with 308, and server.hsts adds Strict-Transport-Security. HTTPS on the default server.addr refuses to start and says to set addr: :443, and another loopback address starts with a warning. tifa dev stays on plain HTTP.

  • The example app has a storefront for customers in Chinese and English under /store: product search and filters, product pages, a cart, a checkout form, and a journal written in Markdown with highlighted code.

  • A route's head can return htmlAttributes, the attributes of <html> for its pages, such as lang on a site in several languages. They merge over the root Layout's htmlAttributes one attribute at a time, the deepest route winning, and null takes one away. The browser keeps them in step after each navigation, also on pages without SSR. It writes an attribute only when the value Tifa wants for it changes, and takes away only attributes Tifa wrote, so a class or lang that a script of the page set stays until a route wants another value. Apps that do not use it get the same HTML, and in the browser Tifa still leaves <html> alone after the first render, whatever scripts of the page change on it. The example storefront sets its language this way, and a path it has no page for is a 404 in the language of the URL.

Changed

  • Breaking: Tifa writes and reads the JSON of apps with encoding/json/v2 (the data of Load and Layout, the arguments and results of handler functions, c.JSON, c.Bind and sessions). The generated TypeScript types follow it. What changes for apps (see JSON rules):
    • A nil slice is written as [] and a nil map as {}, where both were null. Their TypeScript types lose | null, so days?: string[] | null is days: string[].
    • A [N]byte array is a base64 string, as []byte is, where it was an array of numbers. A slice or array whose element is a named byte type stays an array of numbers.
    • A type whose MarshalText has a pointer receiver is written as a string wherever it sits, also as a value in a field or slice, where only pointers to it were. Such types may be map keys.
    • omitempty leaves out only null, "", [] and {}, so it no longer drops false and 0. Use omitzero to leave out zero values.
    • The string option is accepted only on number fields.
    • The build rejects time.Duration, also as a map key, which json v2 cannot write. Return a number in the unit you want, or a string.
    • The build rejects structs json v2 would fail on: two fields with the same JSON name in one struct, an unexported field with a json tag, a struct with fields but no exported field and no tag, an embedded field of a non-struct type without a JSON name, and an embedded struct with tag options or with JSON or text methods.
    • <, > and & are written as they are in JSON answers and page data, where they were <, > and &. Where Tifa puts JSON into the page HTML it still escapes them.
    • Bytes in a string that are not UTF-8 are written as U+FFFD, as before.
    • Reading is strict. c.Bind and handler arguments answer 400 for a name that matches a field only in another case, a name twice in one object, a string that is not UTF-8, a time that is not RFC 3339, base64 with line breaks, or an array of the wrong length for a Go array.
    • A session record kept in an outside store that does not read back under these rules signs the visitor out.
    • GOEXPERIMENT=nojsonv2 is not supported.
    • The JSON of tifa routes --json and tifa errors --json has [] in place of null and no < escapes.
  • Breaking: environment variables of settings have no TIFA_ prefix: TIFA_SERVER_ADDR is SERVER_ADDR, TIFA_SSR_VMS is SSR_VMS. tifa dev gives the app its address in SERVER_ADDR. To update a deployment, drop the prefix from each variable.
  • Breaking: the program reads only its own settings. A file key, an environment variable or a flag that is no setting is left alone, where an unknown key or TIFA_* variable stopped the program. A misspelt name now changes nothing, so check with ./bin/app config. A build.* key in the file of -c is left alone too.
  • Breaking: settings are YAML only. tifa.json and JSON deployment files are no longer read: rename tifa.json to tifa.yaml and write it as YAML (JSON is valid YAML). tifa build checks tifa.yaml and builds its values into the program as Go code, and no longer embeds the file.
  • Breaking: Vite reads no .env (envDir: false), so the VITE_ variables of .env files no longer reach the browser bundle. Pass such values from a Load. tifa dev no longer rebuilds the bundle for .env.* files.
  • The example shop reads SHOP_OPEN as the setting shop.open of its config.go, so ./bin/shop config lists it and --shop-open works too.
  • Breaking: a handler function no longer loads the page data again after a successful POST, PUT, PATCH or DELETE, and the invalidate option of the call is gone. A call only sends its request and applies the session of the answer. A redirect only navigates, and a redirect to the page that is showing stays where it is. Tifa does not guess what a write changes, as TanStack Router does not. To show the result of a write, call router.invalidate() after the call (await router.invalidate({ sync: true }) waits until the page shows the new data), or refresh your own state. To update, delete invalidate: false from calls, and add await router.invalidate({ sync: true }) after each call whose page should show what it wrote.
  • Breaking: the routes of tifa build use TanStack Router's default freshness, where they had staleTime: Infinity and preloadStaleTime: Infinity, and the router no longer sets defaultStaleReloadMode: 'blocking'. Data counts as stale at once, so going back to a page you visited shows its cached data and loads it again in the background with a ?_tifa= request, and preloaded data is reused for 30 seconds. A page that must not show old data of someone else after a sign-out calls router.clearCache().
  • Breaking: Session.In and Session.Out of tifa/client are replaced by SignedIn and SignedOut. Each takes exactly one element as its child, renders no node of its own, and shows that element only to a signed-in or signed-out visitor, where the old components wrapped their children in a <span>. A typo in a component name fails the build, and a misspelled data-session attribute by hand failed without a word, so the attribute is now private to Tifa and the docs no longer tell you to write it. In development a child component that does not pass its props on to its DOM element fails when it mounts, with a message that says so. To update an app, replace <Session.In className="x">…</Session.In> with <SignedIn><div className="x">…</div></SignedIn>, and the same for Session.Out (see In the browser).
  • Breaking: the method of the session type that gives the browser its part is Exposed() M, where it was Browser() M. The new name says what it does: whatever it returns is written into the page HTML and kept in the visitor's localStorage, so it must hold no credentials and nothing secret. To update an app, rename the method. The build checks it as before (see Sessions).
  • The text of tifa.ErrSSRBusy is tifa: render queue busy, where it was ssr: render queue busy, so every error value of Tifa starts with tifa: . A script or alert that matches the old text needs the new one.
  • Breaking: c.QueryAll(name) is now c.QueryValues(name). It returns a slice, and since Go 1.23 an All function returns an iterator, as maps.All and slices.All do. http.Header.Values is the closest name in the standard library. To update an app, rename the calls. The build check is the same (see How Load may use Ctx).
  • Breaking: redirects are tifa.Redirect(url, status), a function of the package, where c.Redirect(url, code) was a method of Ctx that never used c. It panics when status is not 3xx, as WriteHeader does for a code it cannot send, where it returned a plain error that ended as a 500. The Code field of tifa.RedirectError is now Status, the name tifa.Error already uses. c.Redirect is gone. To update an app, replace c.Redirect( with tifa.Redirect( and redirect.Code with redirect.Status. The answer to the browser is unchanged (see route.go).
  • Breaking: OnStart is func OnStart(ctx context.Context) error, like OnShutdown. The context is the one the program runs with, which ends on SIGINT or SIGTERM, so a start that waits for a database can stop when the program is stopped. To update an app, add the parameter. The build rejects the old signature (see hooks.go).
  • New Fields.Err() returns the Fields as an error, or nil when it has no entries. A validator that collects messages in a tifa.Fields{} ends with return fields.Err() and needs no len check. The server still answers an empty tifa.Fields that is returned directly with 422, because it is an error (see Method handlers with input and result).
  • The example shop's storefront uses the whole-page cache. Its home page, journal list and product pages are kept for 10 minutes, the product list for 5 and a journal post for an hour, so a visitor of a cached page gets the answer from memory with Cache-Status: tifa; hit and no Load runs. The pages no longer hold anything of the visitor: the storefront Layout has the language, the menu and the free delivery price, and the cart in the header and the recently viewed rows come from the new /store/{lang}/mine route, which the browser asks after the page has loaded. A product page tells it which product is open. See The storefront cache.
  • Pages can opt in to a whole-page cache with const Cache = 10 * time.Minute in their route.go. For that long every visitor gets the same answer from memory, without the Load running or a render, and a CDN in front keeps it for the same time minus Age: Cache-Control: public, max-age=0, s-maxage=<Cache in seconds>, stale-if-error=86400, Age and Cache-Status: tifa; hit. Such a page is anonymous: its GET and HEAD, and the data requests of navigations to it, lose Cookie and Authorization before OnRequest, tifa.Session is nil, SetSession and ClearSession return an error, and the Set-Cookie of its HTML is removed. The build fails when its Load, a Layout around it or a function they call reads c.Cookie, c.Header or tifa.Session. Its request keeps only a short list of headers (Host, Accept-Encoding, If-None-Match, Origin, Sec-Fetch-* and a few more), so a header such as X-User-ID cannot reach a Load. The key is the scheme, the Host header, the path and the query without tracking parameters (utm_*, gclid, fbclid and the like, the list is the new setting cache.ignore_query), sorted. After the time is over the next request makes a new page and the others wait for it, and if that fails (a Load error, a failed or timed out render, a busy pool) the old page is served for up to a day. Only GET and HEAD answers with status 200, 301, 302 or 308 are kept, and not one that says private, no-store or no-cache or varies on more than Accept-Encoding. The answers to navigations stay private, no-cache. Pages share cache.size with the render cache. tifa routes has a CACHE column and the manifest of --json has cache. Cache must be a time.Duration of at least a second, and Cache = true still fails the build. See The whole-page cache.
  • The browser asks for the data of a navigation with the page URL and the query parameter _tifa=<build>.<digits> (one digit for each Load on the chain, 1 for the ones it wants), where it sent the headers X-Tifa-Route and X-Tifa-Build. A page and its data now have two URLs, so a cache that keys by URL cannot mix them up, and the Vary: X-Tifa-Route line is gone. The parameter is taken off the request before your code runs, so c.Query, OnRequest and the rendered URL never see it, and a Load that reads a parameter named _tifa fails the build. A preload of the router ends the value with .p, which tells it apart in a log (it is not a way to count page views). The answer to a navigation request is never public: a Cache-Control of the app that is not no-store or private, no-cache is replaced by private, no-cache. In a middleware set with tifa.SetHTTPHandler, r.Pattern is now the route template once the handler has returned, so metrics can count by route. A 400 answers a digit count that is not the number of Loads on the chain, and 409 still answers another build. Handler function calls are unchanged. See Page requests.
  • The render cache is on for every page, and Cache = true is gone. Pages whose Load and Layout data, URL, build and session are the same are rendered once and answered from the cache of cache.size (64 MiB by default, 0 turns it off), and requests that miss the same page at the same time share one render. This was only so for pages with Cache = true. A hit still runs the Load and Layout functions and hashes their data, and answers 2,865 requests a second against 38 for a render, with one VM and one request in flight on the machine of the study, and 4.6 times as many as a Next.js ISR hit there. The new const RenderCache = false in route.go turns it off for a page that shows the time or a random number on purpose. Breaking: the build fails on Cache with the advice to delete it, and on the lower case names cache, rendercache, ssr and layoutssr, which were skipped without a word. Delete every const Cache = true. A page that read the time or a random number while rendering now keeps the value it had at the first render, so check such pages: tifa dev renders every page twice and says in the terminal and the overlay when the two differ, and where. A request with tifa.WithRenderClock skips the cache. tifa routes has a RENDERCACHE column where it had CACHE, and the manifest of --json has renderCache for cache. See SSR and cache.
  • The example shop has a sign-in. Its workbench under /projects needs the demo account owner@shanhai.example with the password shanhai-demo, and the storefront does not. A visitor who is not signed in goes to /login and comes back to the page they asked for. The top bar shows the name and a sign-out button, or a link to sign in. The shop keeps sessions in memory, with no store configured. Start it with SHOP_OPEN=1 to see the workbench without signing in, which the comparison with Next.js and TanStack Start and the page benchmarks do. See Sign in.
  • The session reaches the browser. A page carries who is signed in, and the server writes <html data-session="in"> for someone signed in. useSession(), Session.In and Session.Out from tifa/client show it, any element with data-session="in" or "out" shows or hides itself from the first paint, and the browser keeps a copy in localStorage. Navigation data answers are now {"routes": ..., "session": ...} where they were {route ID: result}. A handler function call answers {"result": ..., "session": ...}, and {"session": ...} with 200 where an input-only handler answered 204 and the call signed someone in or out. Requests without X-Tifa-Call get the answers they got. New GET /__tifa/session. data-session on <html> is kept by Tifa. See Sessions.
  • The build checks the session of the app. tifa build and tifa check fail when tifa.SetSession and tifa.Session are called with different types, when Session or ClearSession is called with no SetSession, when the session type is not a struct that reads back from JSON, when Load or Layout reaches SetSession or ClearSession, and when a page, an API route or a file in public/ uses the path /__tifa/. A session type with a method Browser() M gets its SessionData type in .tifa/session.gen.ts (see Checks at build time).
  • New sessions. tifa.SetSession(c, &s) signs the request in with a new random token and a cookie that lasts 30 days, tifa.Session[S](c) returns who is signed in (or nil) in OnRequest, Load, Layout and method handlers, and tifa.ClearSession(c) signs out. The record is JSON of at most 4 KiB, stored under the SHA-256 of the token. Without a store the server keeps sessions in memory up to session.memory_limit and signs everyone out on restart. tifa.SetSessionStore(s) in OnStart switches to your own tifa.SessionStore, and tifatest.TestSessionStore checks it. The cookie is __Host-tifa_session (tifa_session without Secure under tifa dev), set by session.cookie and session.max_age. An answer that sets the cookie is no-store and never a 304. tifatest.NewCtx has a session store per test and tifatest.WithSession sets up a signed-in request (see Sessions).
  • New tifa.SetHTTPHandler(wrap), called in OnStart, wraps the handler of the whole server with plain net/http middleware or handlers, such as /debug/pprof/ or OpenTelemetry's otelhttp. The wrapper is outside static files, the cross-site check and the routes, so it sees every request, the 403 of a refused cross-site write included, with the original http.ResponseWriter. It does not go through OnRequest, OnError or the cross-site check, and a shutdown still waits for its requests. Calling it after the server listens panics (see Setting up in OnStart).
  • Tifa logs through log/slog instead of log, with levels and fields. A failed request is ERROR with method, path and err, a refused cross-site write is WARN, the listening address is INFO, and a request's own context goes with the message where there is one, so a handler can add a trace id. The lines about startup are written after OnStart returns. slog.SetDefault in OnStart moves all of them to the new handler, and Tifa reads slog.Default() for every message. The text of the lines changed to msg key=value, so a script that reads the old lines needs an update, but the listening line still contains tifa: listening on http://ADDR (see Changing the log handler).
  • Breaking: OnRequest is func OnRequest(c *tifa.Ctx, next func(*tifa.Ctx) error) error. next(c) runs the matched route, once, where c.Next() did. c.SetContext is replaced by c.WithContext(ctx), which returns a copy of c that carries ctx and leaves c alone, as http.Request.WithContext does: return next(c.WithContext(ctx)). c.Next, c.SetContext and tifatest.SetNext are gone, and a test calls OnRequest(c, func(c *tifa.Ctx) error { ... }) with its own closure for next. To update an app, change the signature, replace c.Next() with next(c), and pass the context you used to c.SetContext to next(c.WithContext(ctx)). The build rejects the old signature (see hooks.go).
  • tifa.RedirectError is exported. It is the type of the error that c.Redirect returns, so OnRequest and app tests can recognize a redirect with errors.As(err, &redirect) and read its URL and Code.
  • A page left open across a deploy reloads once for the new build, whatever shows the mismatch. A 409 on a data request already did, and now it names the build the server runs in the X-Tifa-Build response header. A handler function sends the build of its page, and the server refuses a call from another build with the same 409 before the handler runs, so an old page cannot write with types the new handler no longer reads. The call throws a TifaError with status 409, the page reloads, and the call is not sent again. A 409 that your own handler returns reloads nothing, and a call without X-Tifa-Build, from curl say, is not checked. A code chunk that fails to load (Vite's vite:preloadError) reloads the page too. Each reload happens once per build, remembered in sessionStorage. A page reloads only after it has written the mark and read it back. Where the browser blocks the storage, the page does not reload and shows the failure, whose message says to reload the page. A page that comes back still stale does not reload again: navigation data fails with the 409, a call throws it, and a failed import reaches the Error of the route (see Pages open while you deploy).
  • Every answer of the app is sent with Cache-Control: private, no-cache unless the app sets Cache-Control itself. Pages, 304s, 404 pages, navigation data, method handler answers and redirects had no header (navigation data had no-cache). CDNs such as CloudFront with its default policy keep an answer without Cache-Control for a day or more, and Azure Front Door for days, so a page for one visitor could reach another. Now a shared cache stores nothing, and the browser still keeps the page and asks again with the ETag, which ends in a 304. Set Cache-Control in OnRequest, a Load, a Layout or a handler to choose another value. Error answers, which are JSON errors, the plain error page from Go, the page with an error and the busy answer, say no-store unless the app set Cache-Control before the error. The 404 page of the app keeps the default. Files under /assets/ and public/ keep their headers (see SSR and cache).
  • The Vite plugin makes three fewer rewrites of the SSR bundle, with the same HTML and the same render time. React's JavaScript cache of HTML escapes and its replaceAll chain were for a VM without the engine's escape, which every VM of the pool has, so no render ran them. Working out the key of an element only when something reads it saved less than the 0.11% by which two runs of one bundle differ. Every other rewrite was measured again on the C engine of slowjs v0.29.8 and still pays, see Optimizations.
  • Breaking: a POST, PUT, PATCH or DELETE that a browser sends from another site is refused with 403 before OnRequest and before any route, for every app (see Cross-site writes). It uses Go's http.CrossOriginProtection: Sec-Fetch-Site decides, an old browser is judged by its Origin against the Host, and a request with neither header, such as curl or a webhook, passes. The answer is JSON like every other error, with Cache-Control: no-store, and OnRequest does not see the request. No setting turns it off. The new server.trusted_origins lets the pages of chosen origins write, and server.cross_site_paths takes path patterns such as POST /auth/apple/callback whose requests are not checked. To update an app, delete an Origin check in OnRequest that only does this. An app that a page of another origin writes to, such as a front end on http://localhost:3000, lists that origin in server.trusted_origins. An app that receives browser callbacks posted from another site, such as a sign-in that posts a form, lists their paths in server.cross_site_paths and checks those requests itself. Behind a proxy that rewrites Host, pass Host through. The example shop drops its own check.
  • Server rendering writes out the calls of small functions, with the same HTML. In the SSR bundle, before it is minified, a call of a function whose body is an expression, a few assignments or ifs that return (up to 32 syntax nodes) becomes that body, in your code and in every package, when the function is set once, does not use this or arguments, and the call works out its arguments as often and in the same order as before. The plugin looks at the shape of the code and knows no library. A render runs 0.63% fewer instructions on the example shop's workbench pages, 2.63% on its storefront pages, 1.58% on the MUI test app and 0.83% on the bench app. The SSR bundles grow by about 1%, and the error of such a function shows the place of its call, one frame less in the stack. See Frontend output and Optimizations.
  • Server rendering hands each node to retryNode without calling renderNodeDestructive, with the same HTML. React DOM sends every node it renders through that function, which only passes it on, and a call costs more than the work it does. The Tifa plugin writes its body where it is called. A render runs 1.15% fewer instructions on the example shop's workbench pages, 0.76% on its storefront pages, 0.89% on the MUI test app and 2.33% on the bench app. A stack trace of a render error has no frame for that function. The change applies to the string renderer of React DOM 19.3.0 and 19.3.1. With another React DOM the build prints a warning and keeps the calls.
  • Server rendering writes an attribute that React DOM has written before with one lookup of its name, with the same HTML. React DOM checked the name of every attribute against its cases, its alias and its validity again each time. Now the module keeps what it found for each name, and a string or a number goes out as the chunk before the value, the value and a quote. A render runs 2.54% fewer instructions on the example shop's workbench pages, 2.28% on its storefront pages, 0.43% on the MUI test app and 1.81% on the bench app. The change applies to the string renderer of React DOM 19.3.0 and 19.3.1. With another React DOM the build prints a warning and keeps the old way.
  • Pages that join class names with clsx render a little faster: the plugin writes clsx 2.0.1 to 2.1.1 so that a call of up to six arguments, which covers the calls of MUI and of class-variance-authority, joins them without a loop over the arguments object and without a call for each string. The MUI test app runs 0.25% fewer instructions, the storefront of the example shop 0.15% and its workbench pages 0.08%, with the same HTML. When a release of clsx has another text, the build prints a warning and the file stays as it is (build.md).
  • Server rendering runs on slowjs v0.29.7, with the same HTML. On linux/amd64 the engine's C files are optimized again after they are linked, so calls between them are inlined. Locals of a function that are never live at the same time share one slot, so a call sets and frees fewer of them. JSON.parse reads plain keys and strings straight from the text, so it runs 31% fewer instructions on the orders of the example shop and 60% fewer on a table of 1000 rows. A render runs 1.4% fewer instructions on the workbench pages of the shop, 1.0% on its store pages and 0.8% on the MUI test app from the shared slots, and 3.9% fewer on the table page of the bench app from JSON.parse. On linux/amd64 the table page took 0.968 of the time and /inject/1 0.831, and the other pages moved less than 3%.
  • Breaking: page.tsx and layout.tsx no longer export NotFound. A 404 shows in Error, which gets it as a RouteError with status 404, and a NotFound export fails the build with a message that says so. To update an app, move what each NotFound shows into the Error of the same file, under error instanceof RouteError && error.status === 404. A route with no Error of its own or above it shows the framework's default 404 page, as before.
  • A URL that matches no page shows its 404 inside the deepest Layout it matches, where it showed the root Layout's NotFound alone. The Layout functions from the root down to that Layout run, so the 404 keeps the app's navigation and, below a language folder, the language of the URL. Navigation in the browser shows the same, and its data request answers with the data of those Layouts and status 404. OnRequest still sees an empty c.Pattern(), and its c.Next() now runs those Layouts. A page for the rest of the path is no longer needed to show a 404 inside a Layout (see 404). A page whose Layout fails no longer preloads the chunk of that Layout, whatever the status.
  • A component that throws while the page renders on the server shows the Error of the page, inside its Layouts, where the browser got Go's plain error page. If that render fails too, the error moves up one route at a time, and Go's plain page comes only when the error fails in place of the root Layout as well. OnError sees the error once and picks the status and the public message as before, the answer is never cached, and the browser hydrates with the error where the server put it. Under tifa dev the stack trace shows in an overlay over the page, which reloads after you save a fix. A render that used up ssr.vm_memory tries again the same way on a fresh VM, one that ran past ssr.timeout does not, and all the renders of one request keep to one ssr.timeout (see Errors on a page).
  • Breaking: a folder has at most three convention files, and layout.go and route.tsx are gone. route.go holds every Go name of the folder: Layout, LayoutSSR, Load, SSR, Cache and the method handlers. Declaring one in another file of the package, layout.go included, fails the build. page.tsx is the page component, where route.tsx was, and a route.tsx fails the build with a message to rename it. layout.tsx stays. A route.go with only Layout gives the pages below it their Layout data and is no API route, and Load is allowed only next to a page.tsx. The generated +route.ts and +layout.ts are replaced by one route.gen.ts for each folder with a page, a Layout or a method handler. It exports page and layout (replacing route), PageData and LayoutData (replacing Data), Params, and the method functions with their <METHOD>Input and <METHOD>Output types. Import it as ./route.gen. To update an app, rename each route.tsx to page.tsx, move the Layout and LayoutSSR of each layout.go into the route.go of the folder, and change the imports of ./+route and ./+layout to ./route.gen. Page HTML is unchanged.
  • Server rendering writes the calls of jsx and jsxs as the elements they return, with the same HTML. In the SSR bundle, a call whose config is an object literal with no spread, ref, key or computed name, and whose key is missing, a literal or a plain variable, becomes the object itself, when the React in the app is 19.3.0 or 19.3.1. With another React the build prints a warning and keeps the calls. A render runs 1.6% fewer instructions on the workbench pages of the example shop, 1.0% on its store pages, 3.0% on the bench app and 0.5% on the MUI test app. On linux/amd64 the workbench pages took 0.987 of the time, the store pages 0.992, the bench pages 0.959 and the MUI pages 0.995. The bundle of the example shop is 4.5% larger.
  • Server rendering runs on slowjs v0.29.6, with the same HTML. A call between the functions of the generated engine takes its result from a register instead of reading it back from the stack, and the compiler drops the checks of a let, const or class variable where it can see the variable was written first. A render runs 0.8% to 1.6% fewer instructions on the pages of the example shop and the MUI test app, and the workbench pages of the shop took 0.978 of the time on linux/amd64.
  • Server rendering runs on slowjs v0.29.5, with the same HTML. Renders take less time: 0.976 of the time on the workbench pages of the example shop, 0.980 on its store pages and 0.943 on the pages of the bench app. A call costs less for each local of the function, object literals of the same keys share one shape, and common pairs of steps, such as a read of a local and then of one of its properties, or a typeof test, run as one. The render timeout (ssr.timeout) now also stops a page inside a long compare of strings of exactly 65,536 characters, a search through an array of thousands of long strings of one length, and a long copy in JSON.parse or JSON.stringify. 23 fixes of upstream QuickJS are in, so a few built-ins answer as Node does where they did not (BigInt.asUintN of a negative BigInt, among others).
  • Pages with a long Load result render faster. When the JSON text of a Load's data is 4,096 code units or longer, the render no longer writes it into the hydration script itself. It writes a short slot there, and Go fills the slot with the text once the VM is free, escaped the way seroval escaped it, so quotes, </script>, U+2028 and U+2029 in data stay harmless. A render runs 0.3% to 0.4% fewer instructions on the pages of the example shop and the MUI test app, 5.9% fewer on a table of 1,000 rows of two UUIDs (92 KB of data), 7.5% fewer on a page with 1 MB of data and 29% fewer on one with 0.5 MB. A page with no long text renders as before. The browser reads the same data. Where a text is over 16K code units, the router used to split the hydration script into three script tags, and now writes one, as it does for a small page, so such a page is 80 bytes shorter. The browser bundle changed by a few bytes, so its file names changed.
  • Server rendering runs on slowjs v0.29.4, with the same HTML. Calls of built-in functions written in C skip a step of the interpreter, and object literals keep their properties in the block of the object: a render runs 0.1% to 2.3% fewer instructions, and a VM holds 1% to 2.4% less after a render. Recursion goes exactly as deep as before.
  • Server rendering runs on slowjs v0.29.3, with the same HTML. The render timeout (ssr.timeout) now stops a page within a few polls of the engine when it is inside one long call that walks a string, an array, a Map or a Set without calling anything for each item (Object.fromEntries, spreading a Set, Iterator.prototype.toArray, the methods of Set), a replace or replaceAll with a string pattern, a slice, substring, trim or split that cuts out more than a million characters, or a Map or Set operation on a key of millions of characters. Such a call used to run to its end, or long enough to get the VM killed.
  • Server rendering runs on slowjs v0.29.2, with the same HTML. The render timeout (ssr.timeout) now stops a page within a few thousand characters or elements when it is inside one long call of split, padStart, padEnd, trim, isWellFormed, toWellFormed, encodeURI, decodeURI and the like, Array.from or a typed array constructor, or when it joins or compares long strings built with +. Such a call used to run to its end. Object spread ({...o}), the rest of a destructuring and Object.assign look up each key when its turn comes, as in Node: a getter that deletes a later key or makes it not enumerable leaves it out of the copy, and one that makes a later key enumerable has it copied.
  • Server rendering runs on the C engine of slowjs v0.29, its only engine: QuickJS in C, compiled to Go assembly that the module ships. Building needs no C compiler, and CGO_ENABLED=0 stays. Pages render the same HTML in less time (see Performance below). What apps can see:
  • tifa dev renders a page the second time with the clock 36 hours on, so it also finds a page that shows the date, the time to the minute or "3 hours ago", which two renders in a row almost never told apart. The warning now lists where your code read the time or a random number (Date.now(), new Date(), Date(), Math.random(), crypto) by file and line, leaving out React, TanStack Router and Tifa itself (see Log).
    • An app builds for linux and darwin, on amd64 and arm64, and windows/amd64. A build for another target stops with an error from slowjs that names them.
    • JSON.parse nests 2,000 levels at most in a render, so a page whose data nests deeper fails with RangeError: JSON nesting too deep where it rendered before.
    • ssr.vm_stack_depth is still 10000 by default and at most 10000. It counts calls now, where the engine before counted slots of its stack. Plain recursion goes as deep in a render as in Node, as before. A render that recurses without end grows the process by up to 26 MB on linux/amd64 and 14 MB on darwin/arm64, where it grew it by up to 24 MB of goroutine stack (see Stack depth).
    • ssr.vm_memory limits what the engine's own allocator holds. The same heap counts 13% to 15% less than before, so the same limit leaves that much more room.
    • modernc.org/libc is no longer a dependency of Tifa. The SQLite release that tifa new pins no longer has to match a libc version.
    • build.goasm is gone from the project file, since there is no Go interpreter to switch to. A project file that sets it fails with an unknown key.
  • tifa build no longer compiles apps with a CPU profile (PGO). The build.pgo setting and the default.pgo file of an app are gone, and a project file that sets build.pgo fails with an unknown key. The engine is Go assembly, which PGO does not change, and the profile made no difference you can measure with it: on linux/amd64 the shop's, the MUI app's and the bench app's pages took 0.998, 0.999 and 1.004 of the time with it as without it, a render executed 0.9987 to 1.0003 of the instructions, and on darwin/arm64 the shop's pages took 1.002 (see Optimizations). With the engine before the C engine it made pages about 3% faster on linux/amd64 and 7% on darwin/arm64. Nothing needs collecting again when slowjs is upgraded.
  • A VM that waits idle gives its free memory back to the system. A VM that has not rendered for a second hands back the pages its renders left free and the stack they touched, and the full collection between renders does the same, where it gave back nothing before. In the program, a VM of the example shop takes 9.6 MiB when idle instead of 12.8 MiB, and one of the MUI test app 5.6 MiB instead of 7.7 MiB, about a quarter less (see Memory). A VM that renders at least once a second keeps its memory, so sizing for load does not change. The first render after the wait takes 1 to 2.5 ms more, and render times are the same.
  • The example shop has a new look and pages as heavy as a real shop's. It looks like a printed catalogue, with Latin headings in Newsreader, bundled with the app, and Chinese headings and body text in the system fonts. Every product has three photos in AVIF at three widths. The storefront gained a category menu, a cart drawer, a carousel, product galleries, reviews in pages with photos, questions and products to buy together. The product list has facets with counts, quick filters, chosen conditions, a grid and list view and a quick view of each product, and a product page has the whole specification and a comparison with similar products. The workbench order list shows 25 rows a page, with product photos, filters by date, carrier and amount, row menus and bulk actions. An order shows a log of what happened, internal notes, payment, a stock check, a packing list and the way of its parcel, and the stats page has a table of every product, a heatmap of when orders come, carriers and the best customers. Its pages take longer to render because they hold more: Optimizations has the new numbers, which are not a change in Tifa's speed. The built bin/shop grew from 31.1 MB to 35.9 MB on darwin/arm64 with the font and photos it embeds.
  • Pages with a large Load result render faster. The JSON text of each Load's data now goes to the render as an argument of its own, so Go no longer escapes it into the JSON of the input and the VM no longer parses it twice. A table of 1,000 rows of two UUIDs takes 0.986 of the time to render (0.965 to 0.991, faster in 6 of 6 rounds), and the server takes 0.665 of the time to prepare its render input (0.655 to 0.682). The example shop's workbench and storefront pages, whose data is a few KB, stay within the spread of the rounds (a group of pages between 0.987 and 1.008 of the time). Same HTML, same browser bundle.
  • Apps that install rolldown 1.2.15 or seroval 1.7 keep the speedups of the Tifa plugin. rolldown 1.2.15 starts each module with a // path comment rather than //#region path, and seroval 1.7 passes the plugins it asks to parsePlugin, so the plugin warned and left React's namespaces with getters and arrays of route data in seroval's own form, which render more slowly. A new app gets these versions. Pages render the same HTML.
  • Server rendering runs on slowjs v0.28.6. On linux/amd64, it runs JavaScript in slowjs's interpreter in Go assembly, which slowjs now uses by default there. Pages render the same HTML in less time: with one VM the example shop's workbench pages take 0.940 of the time and the pages of the MUI test app 0.850, and with 8 VMs on 8 hyperthreads the program renders 1.085 times as many shop pages a second and 1.211 times as many MUI pages.
  • Server rendering runs on slowjs v0.28.5, which keeps an async context across promise jobs, for the AsyncLocalStorage of the server, and lists the own keys of ordinary objects from their shape, for Object.keys, for in, object spread and JSON.stringify.
  • Server rendering runs on slowjs v0.28.4, which frees the top-level function of a module once it has run, with the variables it kept.
  • The SSR bundle runs in strict mode, as the browser bundle does: it is now an ES module, which each VM evaluates as a module (see Top-level await and strict mode). A package that only works outside strict mode now fails on the server too. tifa build compiles the SSR bundle as the server does, without running it, so syntax that only sloppy mode allows, such as a with statement in a CommonJS file, fails the build with the place in the source file rather than the start of the server. An assignment to a variable that was never declared throws a ReferenceError where it runs. Pages render the same HTML.
  • Server rendering runs on slowjs v0.28.3. Regexps with the v flag accept what the specification allows and Node accepts, such as [\&\;] and /-/v, where they threw a SyntaxError. The regexps shiki makes compile, apart from those with more than 254 capture groups.
  • Server rendering runs on slowjs v0.28.0, the new name of the quickjs engine (github.com/liustack/slowjs, it was github.com/liustack/quickjs). It is the engine of quickjs v0.27.3 under a new name, and pages render the same HTML. slowjs supports Linux and macOS on amd64 and arm64, and Windows on amd64, so an app can no longer be built for FreeBSD, 32-bit targets or other CPUs.
  • Server rendering runs on quickjs v0.27.3. The pool uses VM.RunYoungGC between renders. String searches (includes, indexOf and lastIndexOf) skip with Go's bytes package and count the searched text toward the interrupt check.
  • Server rendering runs on quickjs v0.27.2. The render timeout (ssr.timeout) now stops a page that compiles regexps or builds strings in a loop within a few milliseconds, where such a loop could run on for seconds past it: compiling a regexp and the built-ins that parse source or build a string (JSON.parse, JSON.stringify, join, repeat, replaceAll and the like) count toward the engine's interrupt check. One long call of such a built-in still runs to its end. The GC between renders frees the WeakMap entries whose keys are gone in one collection, also when a value points back to its key, where such entries stayed in a reused VM. The HTML is the same (see Performance below).
  • Server rendering runs on quickjs v0.27.1, which renders the same HTML in less time (see Performance below).
  • Pages styled with emotion, such as MUI's, render faster: the hash emotion takes of every style is computed in Go, with the same result. The pages of the MUI test app take 28% to 29% less time to render, with the same HTML.
  • Server rendering runs on quickjs v0.27.0. Every Intl constructor and every calendar Chromium has now work while a page renders, and localeCompare sorts by the locale's rules, as browsers do, where it compared code points. A program now carries go-intl's data and code, so it ships six notice files where it shipped LICENSE-DATA alone (build.md).
  • tifa build and tifa dev stop with an error when an app with pages installs React or React DOM older than 19.3.0.
  • The build prints a warning that names each module outside React DOM with $$FORM_ACTION in its code, since such a form gets a different key than React writes without the plugin.
  • In the browser, route modules that export head load with their routes, as other route modules did, instead of being part of the entry script. The example shop's entry went from 224 KB to 146 KB with gzip. Code at the top level of such a module now runs when its route first loads, so setup that every page needs belongs in the root Layout. A module of the entry that imports a route module keeps it in the entry, with the bundler's INEFFECTIVE_DYNAMIC_IMPORT warning.
  • An address that cannot be listened on names its setting, and a port only root may take says to use setcap cap_net_bind_service=+ep.
  • tifa build leaves the DWARF debug info out of the program with -ldflags=-w, after the flags of the -ldflags in GOFLAGS. The example shop's program on darwin/arm64 went from 26.4 MB to 21.2 MB. Panics, runtime.Caller and pprof still give files and lines, but debuggers such as Delve cannot step through the program. build.debug_info: true in the project file keeps the debug info. tifa dev keeps it as before.
  • A panic in the render of a Cache = true page reaches OnRequest and OnError as an error of the render, tifa: render page: tifa: panic: ..., with the stack of the render, rather than the plain tifa: panic: ... it gave before, which a panic in a Load still gives. Under tifa dev its error page says the request failed while rendering on the server, not only that it failed.

Performance

  • Pages render faster on the server: slowjs writes the start and end tags of most elements in C, where React DOM wrote each tag with a dozen calls of JavaScript functions. The engine writes the whole start tag as one string and hands back to React any element it cannot be sure to write the same, which happened for none of the 469,530 tags on the pages of the example apps. A page takes 7.9% less time on the shop's workbench, 7.5% on its storefront, 4.4% on the MUI test app and 32% on the bench app. The pages are the same byte for byte. The change applies to React DOM 19.3.0 and 19.3.1: a React DOM in which any of the 28 parts the C functions stand for differs gets a warning, and React writes every tag (build.md).

  • MUI pages render faster on the server: memoTheme of @mui/system keeps the styles it made from the theme across renders. ThemeProvider spreads the theme into a new object on every render, so memoTheme, which kept them only for the same object, made them again each time. The plugin now takes a plain-object theme with the same own keys and values as one it saw as that theme. The MUI test app makes its 107 such styles once per VM, and its pages take 0.917 of the time and run 9.3% fewer instructions (linux/amd64, 16 code positions), with the same HTML. An app that changes an object inside its theme after a render and passes a new theme object with the same objects keeps the old styles, so make a new theme to change it. A memoTheme of another text gets a warning and stays as it is (build.md).

  • React makes the arrays called key paths only for a bundle with a module that has $$FORM_ACTION in its code, where it made one for every element it renders. Pages render the same HTML, with 1.2% fewer instructions on the shop's workbench pages, 0.7% on its storefront pages and the MUI test app and 1.8% on the bench app. The change applies to the string renderer of React DOM 19.3.0 and 19.3.1, whose text the plugin has read, and a build with another file prints a warning and keeps the key paths. The key that useActionState writes into a form with a server action is the same as before when a module of the bundle has $$FORM_ACTION in its text, which is how the plugin tells. A property name put together while the program runs is not recognized, and its key is hashed from empty key paths. Tifa has no server actions of its own (build).

  • Pages render a little faster, with the same HTML. React DOM asks three times, for almost every attribute, whether its value is a function, a symbol or a boolean, which it does not write. The Tifa plugin asks first whether the value is a string, which it is nearly every time, and asks the other questions only for another type. A render runs 0.30% fewer instructions on the example shop's workbench pages, 0.24% on its storefront pages, 0.19% on the bench app and 0.07% on the MUI test app. When the code in React DOM differs from 19.3's, the build prints a warning and renders as before.

  • React's createElement and cloneElement copy their config into the props of an element in the engine. slowjs has the loop that does it as a C function (RegisterCopyProps), each VM of the pool has it as __tifa_copy_props, and the build makes both functions ask it before their loop. It copies only a config where the loop cannot do otherwise, and any other (a proxy, a getter, a class instance, an array, more than 32 keys) goes through React's loop. A render runs 2.9% fewer instructions on the shop's workbench pages of the example app, 2.1% on its storefront pages and 4.1% on the MUI test app, with the same HTML, and the pages take 0.988, 0.989 and 0.980 of the time (linux/amd64, 8 code positions, inside their spread, so the instruction counts carry it). A VM without the function and a React the plugin does not know keep React's loop (build.md). It needs the slowjs version with RegisterCopyProps.

  • Pages that translate with react-i18next render faster: the copy of the i18n object that every useTranslation call makes is built from a list of the object's keys when the object has only plain properties, and from its descriptors as before for any other. The shop's storefront pages take 0.967 of the time to render and run 6.0% fewer instructions, with the same HTML. When a release of react-i18next changes createI18nWrapper, the build prints a warning and the function stays as it is (build.md).

  • Pages with asChild components of shadcn/ui render a little faster: Slot of @radix-ui/react-slot merges props with a loop that tells handlers from other props by the codes of their names, where it tested a regexp for each prop. The shop's workbench pages run 0.58% fewer instructions and its storefront pages 0.24% fewer, with the same HTML. When a release of react-slot changes mergeProps, the build prints a warning and the function stays as it is (build.md).

  • React DOM's escape of every text and attribute value runs in the engine. slowjs has escapeTextForBrowser as a C function (RegisterEscapeText), each VM of the pool has it as __tifa_escape, and the build makes React's string renderer call it in place of its JavaScript function with the cache and replaceAll. A render runs 2.5% fewer instructions on the shop's workbench pages of the example app, 2.4% on its storefront pages, 0.7% on the MUI test app and 4.5% on the bench app, with the same HTML. At 8 code positions on linux/amd64 the workbench pages render in 0.974 of the time, the storefront pages in 0.975 and the bench pages in 0.938. A VM without the function and a React DOM the plugin does not know keep the cache and replaceAll (build.md). It needs a slowjs release with RegisterEscapeText.

  • React DOM's pushAttribute writes class, tabindex, dir, role, viewBox, width, height and the XLink and XML attributes without calling pushStringAttribute, and looks a name up in the cache of valid names before it calls isAttributeNameSafe. A render runs 0.8% fewer instructions on the shop's workbench pages of the example app, 0.7% on its storefront pages, 1.0% on the bench app and 0.1% on the MUI test app, with the same HTML. At 8 code positions on linux/amd64 the pages take 0.993 to 0.997 of the time, within the spread of the positions. When one of these functions differs from React DOM 19.3's, the build prints a warning and pages render as before (build.md).

  • Server rendering runs on slowjs v0.29.1, with the same HTML. slowjs measured each of its changes against the one before, without PGO on linux/amd64 at 8 code positions. An object literal of plain keys is made at its final shape at once: the workbench pages of the example shop render in 0.956 of the time, the MUI pages in 0.969 and the table page of the bench app in 0.942. A call then sets and frees its values in fewer steps, and React's for in loops with hasOwnProperty.call no longer make the two calls: the workbench pages take 0.982 of the time, the MUI pages 0.976 and the bench pages 0.952. An ordinary object, such as the props of a React element, takes 48 bytes instead of 72, so a long Markdown page holds 3.8% less at its peak.

  • The C engine of slowjs renders the pages of the example shop's workbench, the MUI test app and the bench app in 0.834 to 0.860 of the time slowjs took before v0.29.0 with the profile Tifa shipped, with the same HTML and without a profile (11 pages, one VM on one core, faster at each of 8 code positions, see Engine). The pause of Go's garbage collector while VMs render stays as short: a P99 of 131 to 164 µs with one VM and 197 µs with three, and a longest stop of 3.1 ms and 0.9 ms against 4.2 and 2.1 ms. A VM of the example shop takes 8.5 to 8.6 MiB of the process after loading, 12.8 MiB after rendering and 9.6 MiB once idle, and one of the MUI test app 3.9, 7.4 to 7.6 and 5.3 to 5.5 MiB (see Memory).

  • Icons of lucide-react render faster: each VM keeps what lucide-react built for an icon with the same props and hands it out again. The shop's workbench pages take 4.3% less time to render and its storefront pages 5.8% less, with the same HTML. When a release of lucide-react changes the files the cache depends on, the build prints a warning and icons render as before (build.md).

  • Pages that translate with i18next render faster: the t of getFixedT and useTranslation copies the options of i18next only for a key or key prefix that is a function, and i18next keeps the regexp it tells keys with a namespace from sentences with. The shop's storefront pages take 5.2% less time to render, with the same HTML. When a release of i18next changes either function, the build prints a warning and that function stays as it is (build.md).

  • The VMs of the SSR pool share one copy of the source text of the bundle's functions and of the tables that give error stacks their line numbers, with slowjs's SharedBytecode, so each VM of the example shop holds 2.35 MiB less after loading (9.0 MB rather than 11.5) and each VM of the MUI test app 1.22 MiB less. toString, error stacks and the HTML stay the same. That copy does not count toward ssr.vm_memory. Render time does not change.

  • The SSR bundle runs fewer bytecode instructions: after minifying, tifa build and tifa dev write the statements a && b;, a || b; and a ? b : c; as if statements and !0 and !1 as true and false, in the SSR bundle only. The pages of the MUI test app render in 0.989 of the time (faster in 6 of 6 rounds), the shop's workbench pages in 0.994, within the spread of the rounds, with the same HTML and the same places in error stacks.

  • quickjs v0.27.2 renders the shop's workbench pages and the pages of the MUI test app in the same time as v0.27.1, within 1% with or without PGO (1.006 and 0.991 of the time without PGO, 0.993 and 0.996 with it), with the same HTML. After a GC a VM holds up to 0.6 MiB less memory from its allocator.

  • quickjs v0.27.1 renders the shop's workbench pages in 0.991 of the time of v0.27.0 without PGO and in 0.982 with PGO, and the pages of the MUI test app in 0.986 and 0.980, with the same HTML and memory. Together with emotion's hash computed in Go, the MUI pages render in 0.70 of the time they took on v0.27.0 before that change, with or without PGO, and the shop in 0.987 without PGO and 0.984 with it.

  • quickjs v0.27.0 renders the shop's workbench pages in 0.982 of the time of v0.26.17 without PGO, and in the same time with PGO, which already got what its changes give. A page that makes the same regexps on every render, such as one that highlights code, compiles them once per VM: the shop's journal post that highlights CSS renders in 0.893 of the time without PGO.

  • The entry script holds all code every page loads in one file instead of four. Over HTTP/1.1 at 150 ms round trips the shop's pages hydrate 11 to 192 ms sooner than before, at 40 ms 4 to 77 ms sooner, and they paint 8 to 24 ms later (8 to 48 ms over HTTP/2). Served by Tifa itself over HTTP/1.1, an app whose pages need 17 to 20 files hydrates 58 to 100 ms later at 150 ms round trips. A proxy or CDN that speaks HTTP/2 in front avoids that.

  • Four more rewrites of the SSR bundle by the Vite plugin: React escapes HTML with replaceAll, builds no component stacks, gets plain values in place of the getters of its namespaces, and leaves component names out of key paths. Together the example shop renders 6.5% to 7.5% faster and pages of plain text 17.6% to 18.3% faster, with the same HTML.

  • The data of a route whose Load returns an array, such as a slice, now goes into the page as the JSON text Go wrote, as objects already did. A table of 1,000 rows takes 39% less time to render. When seroval's code has another form, the build prints a warning and pages render as before.

  • Go writes characters above U+FFFF, such as emoji, in the data it gives the render as the escapes of their surrogate pairs, so one emoji no longer makes the shop's order list render 9% slower. The browser reads the same values.

  • quickjs v0.26.16: without PGO, two of its changes make renders take 0.971 of the time of v0.26.15, and the other three take 0.955 of that, with the same HTML. Each VM keeps the shapes of recent objects and a cache of freed small blocks for reuse, so it holds about 0.7 MiB more after a garbage collection, 647 KiB of it for the shapes. Pages that make many objects whose keys no other object has can make the shapes take up to about 6 MiB. The shapes count against ssr.vm_memory.

  • Requests for a Cache = true page that miss the cache at the same time with the same data share one render, so a burst on a cold page, such as right after a deploy, renders it once. Each request keeps its own headers and gets its own encoding, the render compresses the page once for all of them, a failed render is the answer of every request that waited for it, and the requests that took the render another one started carry X-Tifa-Render: shared. A request whose client goes away while it waits has its connection cut, with no answer sent and no call to OnError. A render that fails once no request waits for it is logged. 50 requests at once for a cold order page of the shop took 50 renders and 146 to 221 ms before, and now take one render and 30 to 52 ms.

  • The pool runs a young garbage collection after each render, which looks only at the objects the render made, and a full one only when a VM has grown 1.5 times past what the last full one left, after the engine collected during a render, and every 256 renders. With one VM, the P99 of a render of the example shop is 0.748 of what it was and that of the MUI pages 0.940, with two VMs 0.796 and 0.919. The P50 and CPU stay within 2.1%, the HTML is the same, and peak memory is 0.82 to 0.88 of what it was.

  • The pool collects the garbage of renders between renders, after the answer has gone out, instead of the engine collecting in the middle of a render. With one VM, the P99 of a render of the example shop is 12% to 41% lower and that of the MUI pages 4% to 7% lower, while the P50, throughput and HTML stay the same and a VM holds 3% to 14% less memory after a render. When every VM is busy and requests wait, the next request still waits for the collection.

Fixed

  • Under tifa dev, a page loaded right after a save now shows the new server render. Before, a request in the first 100 ms or so, before the files went quiet and the rebuild started, got the old one. Saving a page.tsx or layout.tsx that exports head, htmlAttributes or documentHead makes Vite reload the page at once, so the browser often hit that window: the page kept the old text and React reported Hydration failed. Such a request now waits for the rebuild (see What each change triggers).
  • The pages of an app made by tifa new now show a new todo, and a todo marked done, at once. They did not: the comments said the page data loads again after a write, but Tifa never reloads it, so the list stayed old until a reload. The add form and the done button now call router.invalidate() after the write, and the comments say so (see Calling method handlers from the browser).
  • tifa dev no longer puts the tags that a Vite plugin adds with transformIndexHtml into the head, except the Vite client and the React refresh runtime. tifa build never ran that hook, so such a tag was in the page under tifa dev and silently missing in production. tifa dev now prints a warning that names each tag it leaves out. Put the tag in the head of the root layout.tsx to have it in both.
  • tifa dev gives the namespaces of React and React DOM plain values in its SSR bundle, as tifa build does, and no longer prints tifa rewrite not recognized: react, react-dom. The bundle of tifa dev is not minified and keeps the license comments of React, so the rewrite did not find the modules of React and pages in dev called a getter for each export they read.
  • In an app with a parameter folder at the root of app/ (such as app/lang+), a link to a file of the public folder no longer asks for navigation data. /favicon.svg matched the page /{lang} in the browser router, though the server answers public files first, so <Link to="/favicon.svg"> and router.navigate fetched page data for it. The generated routes now list the public files, and a navigation to one of them, or to a path under /assets/ or /__tifa/, loads the document. Every page route also carries a marker, and the new isPage(router, pathname) of the runtime tells a page from these paths and from URLs that show a 404 (see Route tree).
  • tifa dev runs the bundle step when a file is added to the public folder or removed from it, since the generated code lists these files. Editing the content of one still builds nothing (see what a change runs).
  • The error page that follows a component throwing during the server render now has the head of an error page. Its head was the one worked out for the page that failed, so tags of a page that rendered stayed on the 500 page: hreflang and canonical links, the title, and htmlAttributes such as lang. The browser works the head out again from the matches when it hydrates, so the two could differ. Now the route the error replaces runs its head without data, the routes below it give no tags, and the head of the routes above it runs again with the failed route in matches, as for a page whose Load failed. See Errors on a page.
  • The example shop no longer links a missing page to itself in other languages. A 404 under /store/<language>/ (a product that does not exist, or a URL no page has) answered with hreflang alternate links to that URL in each language, which tell search engines the missing URL is a real page. The recipe in A site in several languages is fixed the same way: the head of the language Layout leaves the links out when the page shows an error.
  • tifa dev rebuilds and restarts the app when a file that go:embed takes in changes, such as a Markdown post. It used to look only at Go, TypeScript, CSS and JSON files, so an edit to an embedded .md file did nothing until some other file changed. A new or removed embedded file runs the static analysis too, and an embedded front end file runs the bundle as well.
  • A URL that is only another spelling of a page now answers 308, a permanent redirect, where it answered 307. That covers a trailing slash (/store/en-US/ to /store/en-US), a double slash, a dot segment and a percent-encoded letter (/%61 for /a). Search engines take a permanent redirect as the sign of the canonical URL and ignore a temporary one, and 308 keeps the request method, as 307 did. A redirect that c.Redirect or a Load asks for keeps its own status.
  • Server rendering runs on slowjs v0.29.8, with the same HTML. JSON.stringify that runs out of memory throws, where it could keep an element alive or return text without the keys of a replacer list. A space argument built by joining strings indents with its text, not bytes of the engine. Setting the length of an array to fewer elements and then writing past it works as in Node, and is 17% faster on 100,000 elements. Iterator.prototype.reduce and Iterator.concat close their iterators as the specification says.
  • Server rendering runs on slowjs v0.29.9, with the same HTML. A page that runs out of memory while it makes an array with the prototype of another class (Reflect.construct(Array, [], F)) or while it sets the prototype of an object whose shape is shared (Object.setPrototypeOf) now gets the out of memory error. The first used to write through a null pointer and end the process, and the second kept the new prototype alive.
  • tifa dev: the app and Vite no longer outlive it. Closing the terminal that runs tifa dev (SIGHUP) now stops it as Ctrl-C does. When tifa dev is killed (SIGKILL), the app it started shuts down as it does on SIGTERM, where it used to keep running with its port until someone killed it by hand. A tifa dev started with nohup still ignores SIGHUP. The app and Vite also no longer hold the files tifa dev inherited, such as the lock a script keeps with flock.
  • tifa dev: after Vite's dev server restarts (a change to vite.config.ts or a .env file, or the switch to polling), an edit made right away could be missed for good, and a module the dev server had already served stayed old until the file changed again. The dev server now answers requests once its file watcher has read the app's files.
  • Files from the public folder get an ETag, so a browser that revalidates them gets a 304 instead of the whole file again. They go out with Cache-Control: no-cache, but the copy embedded in the program has no modification time and had no ETag, so every revalidation downloaded the file in full. tifa build now writes the content hash of each public file into build.json, and the server sends it as a strong ETag, which turns weak (W/"…") when the file goes out compressed. Files of the browser bundle are unchanged, and tifa dev keeps the modification time of the files it serves.
  • quickjs v0.26.17: Intl converts options, values and locale lists as ECMA-402 does, so a Symbol or a BigInt where a string or a number is wanted throws a TypeError, and Intl.NumberFormat formats a wrapped BigInt exactly where it rounded it through a double. A page that changes Array.prototype, JSON or other built-ins no longer changes what Intl does. Intl's functions have the shape of built-ins, and the formatters are shared by every VM of the process, so a VM that has used Intl holds a few KB less.
  • The SSR bundle keeps every line of React DOM in place, so the places in render error stacks point at the right lines.
  • A page no longer carries the time its data was loaded. TanStack Router wrote the time of the render into every page, so tifa dev warned that every page with the render cache read the time, and the render cache gave the time of the first render to later visitors, whose browser then dropped data it could have kept when they went back to the page. The page now carries a fixed time, its answer says how old its data may be in Server-Timing: tifa-age;dur=<ms>, and the browser dates the data at the time it sent the request less that age. Only an answer that every cache must check with the server again carries it, so a page of the whole-page cache, or one whose Cache-Control lets caches keep it, has none. Where the answer has no age or the browser cannot read it (Firefox over plain HTTP, a page from the back and forward history), the data counts as old and loads again when you come back to the page (see SSR and cache).

2026-10-19

Added

  • server.compress, on by default: pages, navigation data, JSON and other text go out with zstd or gzip to clients that accept them, so a Tifa program needs no proxy to compress. Set it to false when a proxy in front compresses.
  • tifa build writes a gzip file next to each text file of the browser bundle, and the program sends that file to clients that accept gzip, at no CPU per request.
  • Pages and JSON answers carry Content-Length when they go out uncompressed.
  • A performance guide: how fast pages render, how throughput grows with cores, and how to size CPUs, ssr.vms and memory.

Changed

  • quickjs v0.26.14: the engine build stops where an upstream change could make it fix the generated code wrong, and NewVM no longer leaks when it cannot make a context. Pages render as before.

Performance

  • quickjs v0.26.15: renders take 0.843 of the time of v0.26.14 without PGO and 0.859 with a new profile, and whole requests with 6 VMs on 3 cores serve 1.17 times as many. On an Apple M4, 10 VMs serve 1.80 to 1.88 times as many as before, since they no longer wait on the allocator lock.
  • Cached pages keep their gzip and zstd forms, so a compressed cache hit is not compressed again and costs less CPU than an uncompressed one.
  • Pages are written without copying them.

2026-10-18

Added

  • tifa build compiles apps with pages with a CPU profile of page renders (PGO), and build.pgo picks it: auto, off or a file. With quickjs v0.26.15 pages render about 2.4% faster on linux/amd64.

Fixed

  • quickjs v0.26.8: Tifa builds on linux and freebsd again, which v0.26.6 and v0.26.7 broke. A string cut inside an emoji renders as Node renders it.
  • quickjs v0.26.9: Intl names daylight saving time as ICU does on every system. On Linux, Europe/Dublin and a few other zones swapped their summer and winter names.
  • quickjs v0.26.10: invalid bytes in a Go string passed to JavaScript become U+FFFD instead of cutting the string short.

Performance

  • quickjs v0.26.12: a JavaScript call no longer allocates under libc's global lock. Renders take about 11% less time on linux/amd64 and 14% less on darwin/arm64, and several VMs no longer hold each other back.
  • quickjs v0.26.13: the interpreter loop does less work with the stack, and adding a property to a plain object takes a fast path. Renders take about 18% less time on linux/amd64.
  • Three rewrites of the SSR bundle by the Vite plugin: React joins the chunks it writes, checks a Set before its long switch statements, and seroval escapes short strings with JSON.stringify. Together the example shop renders 11% to 14% faster and pages of plain text 17.5% to 22% faster, with the same HTML.

2026-10-17

Added

  • ssr.vm_stack_depth limits how deep JavaScript calls nest in a render.
  • tifa build refuses a TanStack Router version Tifa is not tested with. build.skip_tanstack_check turns the check off.

Changed

  • Breaking: the generated client functions type a handler's result as Out | undefined.
  • quickjs v0.26.4: Intl reads fraction digits as ECMA-402 does since 2021, so a currency format no longer needs both digit limits.
  • quickjs v0.26.6: running out of memory and the render timeout can no longer be caught by page code, and endless recursion throws a RangeError instead of killing the process.
  • quickjs v0.26.7: the render timeout runs on the monotonic clock.

Fixed

  • -0 in a Load's data hydrates as -0: the page carries the JSON Go wrote.
  • quickjs v0.26.5: a VM close to its memory limit reports out of memory instead of a JSON decode error.
  • An interrupt of the engine counts as the render time budget.
  • tifa dev runs the app in the app root.

Performance

  • The Vite plugin caches React's HTML escapes in each VM. The example shop renders 8% to 10% faster on an Apple M4, whose Tailwind class names are full of characters to escape.

2026-10-16

Added

  • Every SSR VM has Intl, with every modern CLDR locale (quickjs v0.26.2).
  • tifa dev warns about Intl calls that rely on the server's default locale or time zone.
  • The time zone database is embedded in the program.
  • Ctx.QueryAll, collected as a query parameter of Load.
  • tifa dev shows render errors with their stack, and reloads once they are fixed.
  • tifa dev logs slow build steps and shows a page during the first build.

Changed

  • quickjs v0.26.3: a script's local time is UTC in every VM, so a page renders the same on a laptop and on a server.

Fixed

  • A VM whose render panics is replaced.
  • A relative redirect of a data request resolves as a 3xx does.
  • A handler call follows a redirect, and resolves once the page shows its new data.
  • tifa dev keeps working when the system runs out of file watches: it polls the folders it cannot watch.
  • The build refuses c.BindQuery and c.Bind in Load and its helpers.

Performance

  • Load data goes into the page as the JSON text Go wrote, in place of TanStack's serializer, which takes several times as long.
  • quickjs v0.26.1 builds an Error's stack only when it is read, which makes React's development build render faster.

2026-10-15

Added

  • tifa new starts an app in an empty folder: a SQLite todo list, tifa.yaml with every setting, and AGENTS.md and CLAUDE.md for coding agents. It uses npm when pnpm is not on PATH.
  • Tailwind CSS through @tailwindcss/vite, the @/ alias to the app root, and fonts and images that stylesheets reference.
  • tifa dev uses Vite's dev server, with hot updates and React refresh, and loads a rebuilt SSR bundle into the running app.
  • Render errors name the package and place of a failed require, and point into the sources.

Changed

  • Breaking: the default port is 9527, for tifa dev and built apps.
  • Breaking: the front end is bundled by the app's own Vite 8 instead of esbuild. An app with pages needs Node, vite, @vitejs/plugin-react and a vite.config.ts, and @/ and tifa/client resolve by the app's tsconfig paths. The built program still needs no Node.
  • A require left in the SSR bundle is a warning with its place, not a build failure.

Fixed

  • The ETag of a page covers the SSR bundle, so a new build does not answer 304 with an old page.

Removed

  • The esbuild bundler.

2026-10-14

First version.

Added

  • The tifa package: Ctx, Error, ErrNotFound and Use.
  • Routes from folders, Layouts, Load with its result typed in TypeScript, and method handlers with typed input and result and generated client functions.
  • A static check of route code: where the Ctx may go in Load, and which JSON shapes are allowed.
  • tifa build makes one executable in bin/, with the front end embedded. tifa dev, tifa routes and tifatest for testing route code.
  • Layered config from files, flags and environment variables, and a server with OnRequest and an error flow.
  • Server rendering in a pool of prewarmed QuickJS VMs, on the fork github.com/liustack/quickjs v0.26.0, which no longer leaks memory when a VM runs out of it.
  • Page caching with Cache = true, ETags and 304, navigation data requests, and client-only components.
  • The example shop app.