Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
chore(pr): merge main into composer history
vastsacbd761ea5029
diff --cc apps/desktop/src/components/Composer.tsxindex cf48a0947,aa85549b3..5da4c2699--- a/apps/desktop/src/components/Composer.tsx+++ b/apps/desktop/src/components/Composer.tsx@@@ -448,14 -444,7 +451,14 @@@ export function Composer(submit,} = submitController;+ // Both submit entry points (the composer's Enter and the toolbar's Send)+ // leave history browsing before the draft is cleared.+ const submitFromComposer = (steering?: boolean) => {+ inputHistory.exitBrowsing();+ return submit(steering);+ };+- const voiceEnabled = !!settings?.voice?.enabled;+ const voiceEnabled = import.meta.env.DEV && !!settings?.voice?.enabled;const voice = useVoiceInput({enabled: voiceEnabled,onTranscriptionComplete: (text) => {diff --cc docs/spec/08-meta/decisions-log.mdindex 25b365510,c0e0cb841..4130b880e--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@@ -7069,51 -7070,153 +7071,202 @@@ must keep splitting are covered by `martheme schema, or permission change. See `04-ux/08-component-spec.md` andE2E-CHAT-opaque-floating-decision-and-retry-surfaces.- ## 2026-09-25 — Composer recalls its own conversation's submissions with ArrowUp/ArrowDown (D625)+ ## 2026-09-25 — Model settings unify around one AI service list and a chosen-models summary (D625)++ - The model settings page asked too much before a user could connect anything.+ API-key services opened on a closed Service menu, vendor subscriptions had+ their own button and dialog further down the page, and plugin-declared+ services sat elsewhere again, so the first decision was where to look rather+ than what to connect. Users reported the flow as needlessly heavy. This+ redesign keeps the immersive, borderless D297 tone (in-flow surfaces use+ `--ds-tile`/`--ds-raised` and spacing, no borders; only floating menus and+ dialogs keep a 0.5px stroke and a shadow) and collapses the choices into one+ list and one add flow.+ - API services, plugin-declared services and vendor subscription accounts now+ share a single AI service list (`ServiceList`, `ServiceRow`). A row is itself+ the way in — a click or Enter opens its editor — so the only controls left on+ a row are the enable switch and one overflow menu; the click lives on the row+ element rather than a button so a card drag still starts anywhere on the card.+ An account row still lives and dies through the vendor-account editor and+ `deleteOauthAccount`, never the provider CRUD, so ownership boundaries are+ unchanged even though the two kinds render in one list.+ - Adding a service starts on a searchable chooser (`ServiceChooser`), not a+ closed menu: subscriptions and API-key services sit side by side as tiles and+ the custom endpoint comes last, because it is the one choice that asks for+ more than a key. Filtering never talks to the host. Picking a tile moves to+ the service form (`ProviderSetupDialog`, two views), and the credential rows+ live in their own component (`ProviderConnectionFields`, D310 + D625).+ - Both the service dialog and the vendor-account dialog open on a chosen-models+ summary (`ChosenModelsSummary`) with the full two-pane picker+ (`ModelSelectionPanes`) one click away, because most people keep the models a+ service starts with. A new API service preselects recommended models+ (`recommended-models.ts`, `useRecommendedModelSelection`): only tool-capable+ chat models are candidates, and when models.dev metadata is present the newest+ stable model per family wins (up to `RECOMMENDED_MODEL_LIMIT`), with the first+ pick becoming the service default — so saving a key is enough to start+ chatting. Without trustworthy discovery (a rejected key, a timeout or a+ network failure) nothing is preselected; a named vendor that simply has no+ `/models` route still counts as accepting the key.+ - Covered by `apps/desktop/test/service-chooser.test.mjs`,+ `service-catalog.test.mjs`, `service-row-status.test.mjs`,+ `recommended-models.test.mjs`, `provider-form-layout.test.mjs`,+ `default-model-display.test.mjs` and the updated `settings-general.test.mjs`,+ plus the `scripts/e2e/provider-api-style.tsx` probe (chooser tiles keyed by+ `data-service-id`, the custom endpoint last, and the account dialog opening on+ `provider-models-summary` with per-model controls behind Manage models and a+ folded Advanced disclosure). ADR 0098 still governs vendor OAuth accounts.++ ## 2026-09-25 — The custom endpoint leads the API-key group (D626)++ - The service chooser listed its API-key tiles in the shared preset order and+ put the custom endpoint after all of them, so reaching one's own address+ meant scrolling past every named host first. The custom endpoint now leads+ the group instead: it is the one choice that needs nothing found before it,+ and the group still reads as "connect with an API key". The groups keep+ their order (subscriptions above API-key services), and the keyboard walk+ still enters the grid at its first tile.+ - Covered by the updated `apps/desktop/test/service-chooser.test.mjs` and the+ `scripts/e2e/provider-api-style.tsx` probe, which now asserts that the first+ `[data-service-id]` tile is `custom` rather than the last.++ ## 2026-09-25 — Model settings open on the two panes, and the fallback list is complete (D627)++ - Editing a service or a vendor account used to land on a chosen-models summary+ (`ChosenModelsSummary`) with the real picker one click away, so reaching a+ per-model control cost two decisions before it cost any work. Both dialogs now+ render the two panes (`ModelSelectionPanes`) straight away — the service's own+ list on the left, the models this credential will run on the right — and the+ summary plus its Manage models / Collapse pair are gone, along with the+ `autoPicked` hint that only the summary could show. Preselection is unchanged+ (`recommended-models.ts`, `useRecommendedModelSelection`); the panel simply+ states it where the picks are. A recommended model is a starting point, never+ the only thing on screen.+ - The catalog stand-in for a service that publishes no model list is now the+ provider's published set as a whole (`modelsForProvider({ includeNonChat: true })`+ from the settings handler), so embedding, speech, image and reranking+ endpoints a key can call appear next to the chat models instead of silently+ missing. The default stays text-only, because session and agent paths ask for+ what they can actually run, and automatic preselection still filters to+ tool-capable chat models.+ - Covered by the updated `apps/desktop/test/provider-form-layout.test.mjs`+ (both dialogs render the panes with no summary to fold),+ `apps/desktop/test/settings-general.test.mjs`,+ `apps/desktop/test/service-chooser.test.mjs` and the new+ `apps/desktop/test/provider-model-list-scope.test.mjs` (the default list is+ text-only, `includeNonChat` adds the hidden endpoints without dropping or+ duplicating an id), plus the `scripts/e2e/provider-api-style.tsx` and+ `scripts/e2e/image-generation-ui.tsx` probes, which no longer click Manage+ models.+ ## 2026-09-26 — User-selectable application update behavior (D628)++ - Settings → Info now stores Automatic / Manual per installation. Supported+ installer builds default to Automatic; Windows ZIP/portable packages and+ packages without an automatic-install lane default to Manual. Choosing Manual+ disables automatic download and install-on-quit but keeps scheduled checks.+ - Manual mode announces an available version once. Host settings remember the+ last reminded version across restarts; the renderer also suppresses a second+ banner after route remount. The Settings row remains available for checking+ status and opening the fixed Releases page.+ - Windows ZIP/portable users may explicitly opt into Automatic only after a+ warning that the NSIS installer can replace the extracted copy. No database+ migration or host protocol version change is required.+ - Covered by `apps/desktop/test/update-preference.test.mjs`, the updated+ `apps/desktop/test/auto-update.test.mjs`, and E2E-UPDATE-preference-and-once-only-reminder.++ ## 2026-09-26 — Bound aggregate image history without an arbitrary message cutoff (D629)++ - Vision history restoration keeps the existing 10 MB per-image ceiling and adds+ a 30 MB aggregate raw-byte budget per runtime rebuild. Eligible refs are+ considered newest-first; every image remains a provider image block when the+ history fits, and only older attachments beyond the budget fall back to a+ safe `@path`. The current prompt row is excluded before hydration so it cannot+ consume the history allowance.+ - The sidecar reads only files admitted by the budget and clears stale transient+ base64 from restored attachment objects. Durable host messages remain+ metadata/ref-only. See ADR 0101, `03-runtime/01-ipc-protocol.md` §5.1,+ `03-runtime/02-agent-runtime.md` §5c, and E2E-102j.++ ## 2026-09-27 — Routed model metadata uses conservative last-segment matching (D630, PR #1047)++ - Supersede D622's broad catalog aliases for runtime enrichment. Compare only+ the case-insensitive final `/` segment, so a routed or gateway wire ID can+ reach a catalog row without treating arbitrary thinking, release-date,+ deployment-marker, or vendor-dash suffixes as model identity.+ - When a leaf has multiple catalog candidates, select a unique official/source+ provider only when its provider family agrees with an explicit model source;+ otherwise borrow metadata only when all candidates expose identical+ capabilities and thinking metadata. If neither rule proves identity, leave+ the row unmatched. A known provider may still borrow the exact ID from other+ publishers; unknown providers do not use unanchored consensus or marker+ fallback.+ - Composer keeps the complete configured wire ID on model rows. Unmatched+ models expose the canonical thinking ladder for manual opt-in, but start a+ new draft/session at `off` unless an explicit binding default exists. An+ empty binding level array is the generic unknown-model seed, not an explicit+ disable; a non-empty binding override remains authoritative. Known catalog+ matches retain the D303 binding-default/highest-enabled behavior.+ - The change is metadata/UI projection only: it does not rewrite persisted wire+ IDs, provider identity, or host capability ownership. See+ `03-runtime/13-model-catalog-and-selection.md` §11.3 and+ `04-ux/08-component-spec.md` §11.++ ## 2026-09-27 — Agent workspace search is available from turn one (D631)++ - Amend D185 / D208 and ADR 0069's Agent activation boundary: `Glob` and+ `Grep` are included with `Read`, `Bash`, `Edit`, and `Write` in the first+ Agent request. Routine workspace discovery no longer needs a `ToolSearch`+ round trip.+ - `BrowserPreview`, plugin tools, and plugin-development helpers remain+ deferred; ToolSearch, successful-activation restoration, host permissions,+ and the Plan/Goal tool sets are unchanged.+ - See the 2026-09-27 amendments to ADR 0048, ADR 0069, and ADR 0230, plus+ `03-runtime/03-tools-and-permissions.md` and E2E-013/E2E-019e.++++## 2026-09-27 — Composer recalls its own conversation's submissions with ArrowUp/ArrowDown (D632)++- The composer had no way to reuse what was just sent: repeating or tweaking an+ instruction meant retyping it or copying it back out of the transcript, even+ though a terminal, a shell history, and this app's own plugin launcher (D219)+ all keep recent input one keystroke away.+- The history belongs to the conversation. Recalling shows only the prompts+ accepted in the conversation on screen, so a draft never appears with another+ conversation's context and a deleted conversation's prompts cannot surface in a+ live one. Store shape: one renderer-local `localStorage` key+ (`pi.desktop.composerInputHistory`) holding bounded buckets newest-written+ first, 100 entries per conversation and 20 conversations, with consecutive+ duplicates collapsed. No schema, host, or IPC change.+- Scoping by conversation also settles attachments. Picked, pasted, and dropped+ files are copied into the sending session's scratch directory, and the image+ input loader accepts them only under the current project, the current session+ scratch, or `data_dir/attachments`; a recalled entry therefore always belongs+ to the session whose scratch root holds its files, so its chips and previews+ come back with its text and no "attachments were left behind" notice is+ needed. (An earlier shape of this change kept one global history and stripped+ attachments on a cross-session recall, which is why that notice and its i18n+ string existed; both are gone.)+- Recording happens only on an accepted submission. The four accept paths — a+ normal or steering prompt, a dispatched extension command, a dispatched+ builtin or palette command, and a mode command with a body — record the+ submitted draft under the submitting conversation; a blocked slash source, an+ unconfigured model, an empty draft, and a rejected send do not. A rejected send+ restores its draft exactly as before and leaves history untouched. The empty+ home composer has no conversation, so it recalls nothing, and a prompt sent+ from home is recorded under the session that submission materialized — the+ first prompt of a new conversation is recallable from inside it.+- ArrowUp starts browsing only from an empty draft (no text and no references),+ which is what keeps the feature out of the way of a multi-line draft where the+ same key has to move the caret. Once browsing, ↑/↓ keep driving history —+ including through a recalled multi-line entry — until a user edit, a+ submission, or a conversation change (the draft key) ends browsing. IME+ composition and an open autocomplete menu are checked first, so ↑/↓ still cycle+ menu items and a confirming Enter during composition still commits text rather+ than sending it (D125).+- Storage is best-effort, matching `plugin-launcher-history.ts`: an unreadable+ store, malformed JSON, a row that fails validation, a payload in the earlier+ array shape, or a throwing `setItem` degrades to no history instead of failing+ a send. The source-level coverage in `composer-input-history.test.mjs` pins the+ per-conversation isolation, the caps, the browse sequence, the restored+ references, the keydown branch order (IME guard, autocomplete, history, send),+ the four record points, and the exit points; the real recall loop in the+ renderer and the rendered chips remain a Draft UI scenario+ (E2E-COMPOSER-input-history-recall).