Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
packages/inbox/codeAttachment.test.tsx
packages/inbox/links.test.tsx
packages/inbox/attachmentKinds.test.tsx
packages/inbox/updates.test.tsx
packages/ui/components/blocks/QuestionBlock.test.tsx
packages/ui/components/blocks/QuestionBlock.host.test.tsx
packages/ui/components/blocks/QuestionBlock.decisionToggle.test.tsx
Expand Down
15 changes: 10 additions & 5 deletions AGENTS.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ The install script also updates the Claude Code plugin when it is already instal

### Update check

Once a day, when a session starts, the `plannotator` binary asks GitHub for the latest stable release and caches the answer. When a newer one exists, a review you started yourself in a terminal ends with one line: `Plannotator X is available (you have Y). Update: plannotator update`.
Once a day, the machine asks GitHub for the latest stable release and caches the answer. When a newer one exists:

Turn the check off with `{ "updateCheck": false }` in `~/.plannotator/config.json` or `PLANNOTATOR_UPDATE_CHECK=0`. Off stops that request and auto-update, which needs it; `plannotator update` still checks when you run it.
- the Inbox shows an **Update** button above Settings, which opens a dialog with what's new and **Update now** (see [the Inbox](/docs/reference/inbox/#update));
- a review you started yourself in a terminal ends with one line: `Plannotator X is available (you have Y). Update: plannotator update`.

Turn the check off in the Inbox's **Settings → About**, with `{ "updateCheck": false }` in `~/.plannotator/config.json` or `PLANNOTATOR_UPDATE_CHECK=0`. Off stops that request and auto-update, which needs it; `plannotator update` still checks when you run it.

### Automatic updates (opt-in)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ All Plannotator environment variables and their defaults.
| `PLANNOTATOR_FEEDBACK_HISTORY` | enabled | Set to `0` or `false` to stop archiving the feedback you submit under `~/.plannotator/feedback/` (or `PLANNOTATOR_DATA_DIR`). When enabled, every plan decision, code review submission, and annotate submission appends one JSON record — plus a readable markdown copy when it carries content — so a review survives an agent that timed out or a terminal you closed. It stores your own review text, the document and code excerpts it quotes, and annotation metadata; it never stores the diff itself, and nothing prunes the directory, so delete `~/.plannotator/feedback/` (or one project subdirectory) to forget. Annotate sessions also honor `PLANNOTATOR_ANNOTATE_HISTORY=0`, which keeps them fully stateless. A review posted straight to GitHub, GitLab or Bitbucket is delivered to the platform and is not archived locally. Can also be set via `~/.plannotator/config.json` (`{ "feedbackHistory": false }`); the env var takes precedence. |
| `PLANNOTATOR_REVIEW_PROGRESS` | enabled | Set to `0` or `false` to stop code review remembering viewed files across sessions. When enabled, each file you mark viewed or unviewed in a local Git or pull-request review gets a small record under `~/.plannotator/review-progress/` (or `PLANNOTATOR_DATA_DIR`) that includes the file's path in plain text. Nothing prunes these records; delete the directory to forget them, and `plannotator uninstall --purge` removes it. When disabled, viewed marks are kept with the annotation draft instead. Can also be set via `~/.plannotator/config.json` (`{ "reviewProgress": false }`); the env var takes precedence. |
| `PLANNOTATOR_AUTO_UPDATE` | off | Set to `1` or `true` to let the `plannotator` binary update itself: at most once a day, after a session starts, it checks GitHub for a newer stable release and, when no other Plannotator session is open, runs the normal install script for that exact version in the background. It never downgrades and never delays a session. Output goes to `~/.plannotator/update.log` (or `PLANNOTATOR_DATA_DIR`), and the next UI load shows "Updated to vX" or "Auto-update failed". Only the binary the install script manages is updated; development builds and the OpenCode and Pi plugins are not. The update reuses the install flags you last ran the script with (recorded in `install-flags.json`). It needs update checks (`PLANNOTATOR_UPDATE_CHECK`): with checks off it never runs. Set to `0` or `false` to force it off. Can also be set via `~/.plannotator/config.json` (`{ "autoUpdate": true }`) or **Settings → General → Keep Plannotator up to date**; the env var takes precedence. See [Updating](/docs/getting-started/installation/#updating). |
| `PLANNOTATOR_UPDATE_CHECK` | on | The update check. Once a day per machine (no sooner than 6 hours after a failed check), the `plannotator` binary asks GitHub for the latest stable release when a session starts, and caches the answer in `~/.plannotator/update-state.json` (release notes in `update-notes/`). When a newer release exists, a review you started yourself in a terminal ends with one line saying so. GitHub receives your IP address and the user agent `plannotator-update-check`, nothing else. Set to `0`, `false`, `off` or `disabled` to stop that request, the terminal line and auto-update; `plannotator update` still checks when you run it. Can also be set via `~/.plannotator/config.json` (`{ "updateCheck": false }`); the env var takes precedence. |
| `PLANNOTATOR_UPDATE_CHECK` | on | The update check. Once a day per machine (no sooner than 6 hours after a failed check), the `plannotator` binary asks GitHub for the latest stable release when a session starts, and caches the answer in `~/.plannotator/update-state.json` (release notes in `update-notes/`). When a newer release exists, the Inbox shows an **Update** button above Settings, and a review you started yourself in a terminal ends with one line saying so. GitHub receives your IP address and the user agent `plannotator-update-check`, nothing else. Set to `0`, `false`, `off` or `disabled` to stop that request, the Inbox button, the terminal line and auto-update; `plannotator update` still checks when you run it. Can also be set via `~/.plannotator/config.json` (`{ "updateCheck": false }`) or the Inbox's **Settings → About**; the env var takes precedence. |
| `PLANNOTATOR_UPDATE_API_URL` | GitHub | Testing or mirror knob: the URL answering like GitHub's `releases/latest` for the update check. Only `https:` or loopback `http:` is accepted. |
| `PLANNOTATOR_INSTALL_SCRIPT_URL` | plannotator.ai | Testing or mirror knob: the install script that `plannotator update`, Update now and auto-update download and run. Only `https:` or loopback `http:` is accepted. |
| `PLANNOTATOR_ANNOTATE_HISTORY` | enabled | Set to `0` or `false` to keep annotate sessions fully stateless: no per-file version history (so no annotate version diff), no durable submitted-feedback records, and no feedback-archive records from any annotate surface. Can also be set via `~/.plannotator/config.json` (`{ "annotateHistory": false }`); the env var takes precedence. |
Expand Down
10 changes: 8 additions & 2 deletions apps/marketing/src/content/docs/reference/inbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,15 @@ The Pi or OpenCode connection could not find a `plannotator` binary to start a s

The Inbox moved to another port, because the old one was taken when it restarted, and browsers grant notifications per address. The Inbox shows "The Inbox moved to a new address. Allow notifications again." once. Turn them on again there or in **Settings**.

### "A new version is ready"
### Update

The `plannotator` binary on disk was updated while the Inbox kept running. Click **Restart** in the sidebar: the Inbox restarts on the new binary, and the page reloads.
When a newer Plannotator release is out, the sidebar shows an **Update** button above **Settings**. The machine checks GitHub once a day (never your browser); turn this off in **Settings → About** ("Tell me when a new version is out"), with `{ "updateCheck": false }` in `~/.plannotator/config.json`, or `PLANNOTATOR_UPDATE_CHECK=0`.

Click **Update** to see what's new and what will happen, then **Update now**: the install script runs for that version with the choices from your last install, the button reads **Updating…**, and when the new binary is in, the Inbox restarts on it and the page reloads. Open reviews keep running on the old version until you finish them. **Remind me tomorrow** hides the button for that version for a day. Tick **Install new versions automatically** to let Plannotator do this by itself from then on.

If the binary was already updated (by auto-update, `plannotator update`, or the install script), the button restarts the Inbox at once; if you are typing a reply, it asks first. If an update you started fails, the button reads **Update failed** and shows the exit code and the log. After an update, **What's new in X** sits above Settings for that run.

A copy of Plannotator that the install script did not install cannot update itself: the dialog shows the command to run instead.

### The Inbox does not start

Expand Down
26 changes: 24 additions & 2 deletions packages/core/inbox-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,30 @@ export interface InboxHealth {
version: string;
serverSession: string;
pid: number;
/** Set when the binary on disk reports a different version: restart to update. */
update: { available: true; version: string } | null;
/**
* The sidebar's update button (packages/server/inbox-updates.ts), or null.
* `available` and `version` keep the older `{ available, version }` shape.
*/
update: InboxUpdate | null;
}

/** The Inbox's update control: what the button says and does. */
export interface InboxUpdate {
available: true;
/**
* `available`: a newer release exists, nothing installed yet. `updating`:
* the install script runs. `ready`: a different binary is on disk (restart
* to update). `failed`: an install the person started exited non-zero.
*/
state: "available" | "updating" | "ready" | "failed";
/** The version the button names. */
version: string;
/** The version this Inbox runs. */
current: string;
/** `script`: Update now runs the install script. `copy`: the binary is not the script's; the dialog shows the command. */
action: "script" | "copy";
releaseUrl: string;
publishedAt?: string;
}

export function isInboxHealth(value: unknown): value is InboxHealth {
Expand Down
Loading
Loading