Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ jobs:
- run: npm run i18n -- check
- run: npm run i18n:check-app
- run: npm run build
- name: Review batching and toolbar browser regressions
if: matrix.node == 22
run: |
node --import tsx scripts/check-review-batching.mjs
node --import tsx scripts/check-review-flow.mjs
node --import tsx scripts/check-note-results.mjs
node --import tsx scripts/check-note-options-flow.mjs
env:
PAPILOT_BROWSER_CHANNEL: chromium
# Checks the generated UI demos and local asset links before main.
- run: npm run site
- name: Verify the static playground without a backend
Expand Down
Binary file added docs/images/review-building-toolbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/review-note-drawer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Papilot should compile about as fast as running `latexmk` (or `make`) in the pap

## When builds start

The manuscript compiles as soon as something may have changed its files, not when its view is next opened: after a task is committed or applied, a Git action, or a review decision. A build started meanwhile is followed right away by one of the newest files. The view learns that a build started or finished from the server's event stream and reloads at once; edits saved in another editor are noticed within five seconds while the manuscript is open, and immediately when Papilot's window regains focus.
The manuscript compiles after a task is committed or applied, or after a Git action changes the paper. Individual task decisions and notes do not trigger a manuscript refresh. Older tasks that write accepted changes directly to the manuscript refresh once the last pending change is decided. A build started meanwhile is followed right away by one of the newest files. The view learns that a build started or finished from the server's event stream and reloads at once; edits saved in another editor are noticed within five seconds while the manuscript is open, and immediately when Papilot's window regains focus.

A task that waits to be applied (the default) changes the manuscript only when it is committed or applied, so that build could only start then. Instead, whenever a round is published or a change is accepted or rejected, Papilot asks the review engine what applying the task would write if every pending change were accepted, merged with the files on disk exactly as applying merges them, and compiles that version in the background. When the task is applied, the manuscript's build has the same key: its PDF is already there, or the build already under way is the one it waits for. A rejected change makes a new prediction, which continues from the previous one.
A task that waits to be applied (the default) saves each acceptance, rejection and undo without compiling speculative manuscripts, including after the last decision. Applying the result starts one manuscript refresh for the combined choices. That build can still reuse existing compiler state from the review. Generating a new comparison after an agent revision or an explicit source edit remains a separate operation.

## The review's full paper

A review can show its changes in the whole paper (**PDF** in the review's switch). A round compiles only the changed chapters, so the whole new version is a separate build. While the review engine publishes a round that compiles only some chapters, its job status names the round's new version (`revision`), and Papilot starts compiling the whole paper at once, in the background, alongside the round's own builds instead of after them. It is usually the same version that committing the task will produce, so the commit's prediction often finds it built. A round that compiles the whole paper names no version: its own build is the full PDF, and a build of it here would wait for that one, or hold up the round.
A review can show its changes in the whole paper (**PDF** in the review's switch). A round may compile only the changed chapters, so the whole new version is a separate build requested when that view is opened. The PDF belongs to the published round and stays unchanged while decisions are made. A round that already compiled the whole paper can reuse that PDF.

When the review opens on the full paper before that PDF is complete, it does not wait for it. It first shows the PDF the round itself compiled (`build` in the round's details): the changed chapters, with each change exactly where its strips come from. Then it shows each TeX pass of the whole paper once latexmk follows it with more work, and finally the complete PDF (`passes` in the round's details: `?after=N` answers with the next version, and the PDF route serves it with `?pass=N`). Each version replaces the previous one keeping the change being reviewed at the same place on screen, and pages already painted stay until the new version's replace them.

Expand Down
2 changes: 1 addition & 1 deletion i18n/state/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "e275550822028b5cb54a0d5711b53b4ceef495de5e0d3679a8d51e5ed35d8738",
"revision": "f03f2760a79e714b8fda0931f31e39de4cf77c58417b79a61c19bdb362abce53",
"textHash": "505409b0cde0e505f7ce673cd183cf32f91c5f927b2490f5b7de25d674f52c87",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "05806d16823bc6933f689ef436b50e6fd2b8540cf92598595ee8be546862880e",
"revision": "d83e10fbb72d67d9a6f67bde7d8af74305566dfa608c24b971276a8db0f68feb",
"textHash": "94733f294d13e7a2438b871ce5373382eb5192b7ac8b27bd0606c85cb3b9cda3",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "0953e94f1a424052f933c862517a3edcd17998db19574f66c1eb676c22c047f5",
"revision": "68472a355c23f37c23127432fc3e472dccc4cfff60a49531fbf9c1fee8edbec0",
"textHash": "f8236763d1736f9dc312a5067536d62d411a0958684d9dbb6050fb25846b44b3",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "0e9f1b1a25cb0e8c8e1f40661ae3c7b82287649097e20d93e61ecfee0d8327af",
"revision": "327db58350a6a10c6ed59ca53905a033053dae02de20396539ddac3cc3d103d9",
"textHash": "117542b4dfccf02f8af21f6ccad9a4bc0e578c514acc623b67442d0e3e113235",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "f9bd1529488d56e09a53b5b2a3d521c212cf6e9d3a03afcd5419608f0cdb8898",
"revision": "b3f2cb80e36357b2d6198aae5e8ae777d62a1bc5e677e23342cad172670f14e1",
"textHash": "5b2c7704f726e1b81ed10f9b8bd47fa3055812884ffcdcdb8fd8b4f8170ee6b7",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "546e5f15f093f21abfd1f8916bbd2ad2c829bd3962794dd295a52af572b272c2",
"revision": "80ffc9305d45ac71bac9f30795f554032dfdc6246c32a46c66db20dfdee4a57c",
"textHash": "cfc551f50dcaedb80afa4f981335447a4173ea56c8036ca7bc13f71e4ce72425",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "9f7ca132d2ba0061d9856fdc3a1a7331ea3e2da314955f437d1ef46ea2bd83a6",
"revision": "e8b2ce6f88599eec6a9fd9a9178eb57513fddfe689dbe3dc594ad726a7b36495",
"textHash": "bd4ab0b8c990068df745b5747e69e254139998533089942da3978a56b23a998b",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "0b54b70fa7198e466b1a2f2543bbc1981b6d51a195101d74b8168ae7554380ed",
"revision": "88fd9f188fe67de9e7686f9df2df0242020b2784e3b98544d56f0da5bab3282d",
"textHash": "8884bdbd813f948cf479b6c62cdd73955d1738c4583adbe3c666a0d8c4139951",
"model": "gemini-4-argon-medium"
},
Expand Down
2 changes: 1 addition & 1 deletion i18n/state/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,7 @@
"model": "gemini-4-argon-medium"
},
"Request failed. Please try again.": {
"revision": "fae7b2ccd697914f9bc8164a8673caa57b8178a89c7414b3fcf75a8cfcd48f4e",
"revision": "a5ba07b061e7157c6c7f06453fd467ab48cedc296dee5f4b33df308f4ece814a",
"textHash": "0ce0b5dc3cb5f7c4471b4e0738eb026c182543755d5557bad7b0b543720db80e",
"model": "gemini-4-argon-medium"
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@
"typecheck": "tsc --noEmit && tsc -p desktop/tsconfig.json --noEmit",
"test": "tsx --test tests/*.test.ts",
"test:source-edit": "npm run build && npm --prefix engine run build && node --import tsx scripts/check-source-edit.mjs",
"test:review-batching": "npm run build && npm --prefix engine run build && node --import tsx scripts/check-review-batching.mjs",
"setup:review": "npm --prefix engine ci && npm --prefix engine run build",
"demo": "tsx scripts/demo.ts",
"doctor": "node bin/papilot.mjs doctor",
"service:install": "tsx scripts/service.ts install",
"service:stop": "tsx scripts/service.ts stop",
"test:ui": "npm run build && node scripts/check-system-requirements.mjs && node scripts/check-settings-layout.mjs && node scripts/check-git-workspace.mjs && node scripts/check-ui.mjs && node scripts/check-git-panel.mjs && node scripts/check-task-model.mjs && node scripts/check-comparison-progress.mjs && node scripts/check-appearance.mjs && node --import tsx scripts/check-review-pdf-appearance.mjs && node scripts/check-updates.mjs && node scripts/check-papers.mjs && node scripts/check-workspace-switcher.mjs && node scripts/check-workspace-switcher-notes.mjs && node scripts/check-imports.mjs && node scripts/check-compilation.mjs && node scripts/check-build-problems.mjs && node scripts/check-review-notes.mjs && node --import tsx scripts/check-note-groups.mjs && node --import tsx scripts/check-pdf-tools.mjs && node scripts/check-note-selection.mjs && node scripts/check-ai-review.mjs && node --import tsx scripts/check-note-results.mjs && node --import tsx scripts/check-review-flow.mjs && node scripts/check-skills.mjs && node --import tsx scripts/check-skill-library.mjs && node scripts/check-attachments.mjs && node --import tsx scripts/check-places.mjs && node scripts/check-pdf-words.mjs && node scripts/check-reply-duplicates.mjs && node --import tsx scripts/check-task-permissions.mjs",
"test:ui": "npm run build && node scripts/check-system-requirements.mjs && node scripts/check-settings-layout.mjs && node scripts/check-git-workspace.mjs && node scripts/check-ui.mjs && node scripts/check-git-panel.mjs && node scripts/check-task-model.mjs && node scripts/check-comparison-progress.mjs && node scripts/check-appearance.mjs && node --import tsx scripts/check-review-pdf-appearance.mjs && node scripts/check-updates.mjs && node scripts/check-papers.mjs && node scripts/check-workspace-switcher.mjs && node scripts/check-workspace-switcher-notes.mjs && node scripts/check-imports.mjs && node scripts/check-compilation.mjs && node scripts/check-build-problems.mjs && node scripts/check-review-notes.mjs && node --import tsx scripts/check-note-groups.mjs && node --import tsx scripts/check-pdf-tools.mjs && node scripts/check-note-selection.mjs && node scripts/check-ai-review.mjs && node --import tsx scripts/check-note-results.mjs && node --import tsx scripts/check-note-options-flow.mjs && node --import tsx scripts/check-review-flow.mjs && node scripts/check-skills.mjs && node --import tsx scripts/check-skill-library.mjs && node scripts/check-attachments.mjs && node --import tsx scripts/check-places.mjs && node scripts/check-pdf-words.mjs && node scripts/check-reply-duplicates.mjs && node --import tsx scripts/check-task-permissions.mjs",
"site": "node scripts/build-site.mjs",
"test:site": "npm run site && node scripts/check-site-analytics.mjs && node scripts/check-site-privacy.mjs && node scripts/check-site.mjs && node scripts/check-site-blog.mjs",
"prepack": "npm run build && npm run setup:review",
Expand Down
Loading
Loading