Repository navigation
TypstDrive 2.3.2 brings version history for whole projects, much faster previews, two-factor authentication, public slides with a speaker view, Markdown files in projects, many new editor and admin settings, and new API endpoints. It also fixes several cases where edits could be lost.
Highlights
Version history for projects
Projects now keep versions, just like single documents (#23).
- A version is a snapshot of every file in the project, including images, and of which file is the main file. A file that did not change between versions is stored only once.
- Versions are saved when someone who changed a file leaves the project, from File > Save Version, or with Ctrl+S / Cmd+S. Automatic saves within 15 minutes of each other are merged.
- File > Version History shows every version with who edited it. The file list marks files as added, removed or changed, and each file shows its line-by-line changes. You can compare a version with the previous one or with the project as it is now.
- Restoring puts every file back, brings back deleted files, removes files added since, and resets the main file. The current project is saved as a version first, so a restore can be undone. Files that are open in someone's editor update right away.
- Administrators can turn automatic versions off, limit how many versions each project keeps, and leave files above a size limit out of versions (Site Settings > Storage).
Faster previews
- Typst's cache stays warm between compiles, pages are exported in parallel, and only pages the browser does not already have are sent.
- The last preview is kept on disk and in the browser, so it appears at once after a restart and a reopened project only downloads the pages that changed.
- Only changed preview pages are re-rendered, off-screen work is skipped, and one compile runs at a time with a follow-up queue.
- Binary project files and files loaded from web addresses are cached between compiles.
- Compiles are limited per server and per user and time out when they run too long, so one document cannot slow everyone down.
Two-factor authentication and safer accounts
- Two-factor authentication with an authenticator app or email codes, with backup codes.
- Administrators get one-time temporary passwords to hand out instead of setting passwords, and users must change them at their first sign-in.
- Administrators need two-factor turned on before they can create, change or remove users.
- New admin settings for the minimum password length, how long temporary passwords last, and which two-factor methods are allowed.
Public slides and speaker view
- Public links now have separate formats: a PDF, slides at
/slides/namethat present from any computer, and a password-protected speaker view with notes at/slides/name/speaker. - Administrators can turn each format on or off, and see separate view counts.
Better project editing
- Editor tabs that remember each file's cursor and scroll position.
- tinymist suggestions and go to definition in projects, including labels and citation keys after
@(#32). - Markdown files with highlighting, a toolbar and a live preview that shows the project's images, and a toolbar for plain text files.
- The preview can open in a separate window (#35).
New editor settings
In Settings > Editor, saved per browser:
- Editing: word wrap, indent size (2 or 4 spaces), and closing brackets and quotes automatically.
- Tabs: turn multiple tabs off so opening a file replaces the current one, reopen your tabs when you come back to a project, and limit how many tabs stay open.
- Preview: turn editor and preview sync on or off, and choose how long the preview waits after you stop typing (0.25 to 2 seconds).
New admin settings
- Site Settings > Content > Editor Suggestions: turn the language server on or off for the whole site, and set how many sessions the server and each person can use.
- Site Settings > Storage: separate version settings for documents and projects.
- Compile limits, caches, warm-up and language server sessions can be set with environment variables, listed in the settings reference.
API
GET /v1/mereturns your account, the space the key acts in (personal or a team) and the key's name, prefix, scopes and expiry.GET /v1/storagereturns storage used and the quota of that space.GET /v1/usagereturns your requests today, your daily quota, the key's rate limit and how many keys you have.- These use the existing
readscope. They never return your email address, administrator status, sign-in settings or details of your other keys. - The API rate limit now applies per account as well as per key.
Upgrade notes
- The database upgrades itself on start (schema version 25 adds the project version tables). Back up your database before upgrading, as always.
- Docker Compose now reads settings only from the
.envfile. Every option is listed inexample.env. Move any settings fromdocker-compose.ymlinto.envbefore upgrading. - Administrators must turn on two-factor authentication in Settings > Security before they can manage users. Signing a user out everywhere still works without it.
- Ctrl+S / Cmd+S in a project now saves a project version instead of showing an autosave notice.
- Public PDF links are now called public links. Existing links keep working.
LSP_MAX_SESSIONSandLSP_MAX_SESSIONS_PER_USERstill set the defaults until an administrator saves values in Editor Suggestions.- A
devDocker image (ghcr.io/sirblobby/typstdrive:dev) is now published for every push todev, for trying changes before a release. Keep usinglatestfor production.
Fixes
- Changes that only delete text are now saved (#40).
- Re-uploading a file, restoring a version or adding a citation is no longer overwritten by an editor that has the file open.
- The editor no longer reports "package not found" for an
@typstdrivepackage imported after the editor opened. - Documents that import a published package compile again.
- An older preview no longer replaces a newer one in the document editor.
- The first preview waits until the open files have synced.
- Public links compile once when several requests arrive together, instead of once per request.
- The saved team workspace is cleared when you sign out.
- Stored previews of deleted documents and projects are removed.
- WebSocket connections check their origin, DOI redirects are guarded, IPv6 sign-in lockouts are grouped, and desktop link codes are fully random.
All changes
Updates
- Highlighted Typst code with the Lezer parser from codemirror-lang-typst, so function calls such as tables are colored (#21, 259df2d, 749c110)
- Sped up previews: Typst's cache stays warm between compiles, pages export in parallel, and only pages the browser does not already have are sent (f81938b, c0a2c87)
- Kept the last preview on disk so it shows at once after a restart, and warmed up recently edited documents on start (9a1a09e)
- Kept the last preview in the browser, so a reopened project downloads only the pages that changed (#29, 4a71d30)
- Ran one preview compile at a time, with a follow-up queue, in projects and documents (f37a38c, 9a67ccf)
- Re-rendered only the preview pages that changed, lowered the browser preview cache size and skipped preview hashing while a document is warm (1c4acde, 865a902, 30ec5c9)
- Loaded only the packages a document imports, and let documents use published packages (50db525)
- Limited how many Typst compiles run at once and for each user, and timed out long ones (935358c)
- Cached files that documents load from web addresses, with a limit per compile (ffc4eac)
- Cached binary project files between compiles (bdfc2c2)
- Timed out pandoc conversions and limited how many run at once (d2e507a)
- Applied the API rate limit per account as well as per key, and wrote API usage counts in batches (329322c, 9962026)
- Logged internal errors on the server and returned a generic message to clients (9924e4d)
- Made the upload size limit configurable with
UPLOAD_MAX_MB(6147f6d) - Bundled the icons with the app instead of fetching them from Iconify (4734ac8)
- Sanitized preview SVG with a DOM parser (7127bae)
- Loaded CodeMirror, charts, image cropping and theme YAML only on the pages that need them (eb26bf1, 4f620fb)
- Paused comment and suggestion polling in hidden tabs (fa7fabb)
- Redesigned the error page with a message and actions for each status (3bc3ede)
- Showed which environment variables use their default value on the Server page (63f14d8, 7b109ec)
- Renamed public PDF links to public links, with separate PDF, slides and speaker view formats (8cb547b)
- Replaced admin-set passwords with one-time temporary passwords that users must change at their first sign-in (1cab466)
- Required two-factor authentication before administrators can create, change or remove users (1cab466)
- Read Docker Compose settings only from the
.envfile, with every option listed inexample.env(f867004) - Widened the Share dialog, and tracked
bun.lockandCargo.lockfor repeatable builds (30ccaa3) - Removed unused WebAssembly setup and overrode a vulnerable selector parser package (fc9af00)
- Published a
devDocker image for every push to thedevbranch (b576194) - Replaced the code comment check in CI with an emoji-only check, removed Dependabot, and explained when code comments are welcome in the contributing guide (1d351c3, 2b9b7ad, 6239874)
- Grouped related server modules into folders (9247d55)
- Grouped the frontend code by feature and updated packages, including patched lettre, cookie and sqlx releases (04cd16f, bbb1cef, cf19130)
Additions
- Two-factor authentication with an authenticator app or email codes, with backup codes (1cab466)
TWO_FACTOR_RESET_EMAILto turn off two-factor for an account that lost its authenticator (1cab466)- Admin settings for password length, temporary password lifetime and allowed two-factor methods (ccadd9c)
- Public slides at
/slides/nameand a password-protected speaker view with notes at/slides/name/speaker(8cb547b) - Admin switches for public PDFs, slides and speaker views, with separate view counts (8cb547b)
- Editor tabs in projects that keep each file's cursor and scroll position (83ddb83)
- tinymist completion and go to definition in projects, including labels and citation keys after
@(#32, c452467) - Preview in a separate window (#35, d1b108d)
- Version history for projects: whole-project snapshots saved automatically and with Save Version or Ctrl+S / Cmd+S, a History page with the changes in each file, and restore (#23, #30, 077dc0e, 568c4d4)
- Markdown files in projects with highlighting, a toolbar, and a live preview that shows project images, plus a toolbar for plain files (938fc95, 62b67f4)
- Sandstone theme (075e16e)
- Editor settings for word wrap, indent size, closing brackets and quotes, tabs (on or off, reopen, limit), preview sync and preview update delay (db874b0)
- Admin settings for project versions (limit, automatic versions, largest file) and editor suggestions (on or off, session limits) (23509e3)
- API endpoints
GET /v1/me,/v1/storageand/v1/usagefor the key's account, storage and usage (b133fb8) - Settings for compile limits, caches, warm-up and language server sessions, listed in the settings reference (935358c, 9a1a09e, 1ae9558)
- Discord link in the README and documentation (013d4e8)
Fixes
- Fixed changes that only delete text not being saved (#40, 4504289)
- Fixed re-uploads, version restores and citation updates being overwritten by an open editor (60a8328)
- Fixed "package not found" in the editor for
@typstdrivepackages imported after the editor opened (8291972) - Fixed documents not compiling when they import a published package (50db525)
- Fixed public PDF links compiling once per request when several arrive together (be19762)
- Fixed an older preview replacing a newer one in the document editor (9a67ccf)
- Compiled the first preview only once the open files have synced (74a956a)
- Fixed the saved team workspace staying selected after signing out (3eefc8e)
- Removed stored previews of deleted documents and projects (3a85688)
- Checked the origin of WebSocket connections, guarded DOI redirects, grouped IPv6 lockouts and made desktop link codes fully random (5178115)
Contributors
Thanks to @nikhilweee for Typst call highlighting (#21), the project save shortcut (#30), language server support in projects (#32) and the separate preview window (#35), and to @douxev for the browser preview page cache (#29).
Join the discussion on Discord.
Full Changelog: 2.3.1...2.3.2