Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

Merge branch 'pr863-review' into integrate/pr-863

vastsae47b8ce0608c
diff --cc apps/desktop/src/features/scheduled/scheduled-editor.css
index d4055fc3d,b870d3699..67a145dbe
--- a/apps/desktop/src/features/scheduled/scheduled-editor.css
+++ b/apps/desktop/src/features/scheduled/scheduled-editor.css
@@@ -6,11 -6,109 +6,111 @@@
}
.scheduled-fields > * { min-width: 0; max-width: 100%; }
.scheduled-fields .settings-menu-select-trigger {
- height: 36px;
+ /* The editor is a form: its dropdowns are fields, so they take the shared
+ field metric rather than the compact Settings-row pill size. */
+ height: var(--ds-field-height);
border-radius: var(--radius-md);
}
+ .scheduled-instruction-shell {
+ isolation: auto;
+ border-radius: var(--radius-lg);
+ }
+
+ .scheduled-instruction-input.field-textarea {
+ min-height: 104px;
+ max-height: none;
+ display: block;
+ resize: none;
+ overflow-y: auto;
+ border: 1px solid var(--ds-border-strong);
+ border-radius: var(--radius-lg);
+ padding: 12px 14px;
+ background: var(--ds-tile-hover);
+ box-shadow: none;
+ }
+
+ .scheduled-instruction-input.field-textarea:focus {
+ background: var(--ds-tile-hover);
+ box-shadow: none;
+ }
+
+ .scheduled-instruction-input.field-textarea::placeholder {
+ opacity: 1 !important;
+ }
+
+ .scheduled-execution-toolbar {
+ container-type: inline-size;
+ padding: 4px 8px 8px;
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-trigger-leading {
+ display: inline-flex;
+ flex: 0 0 auto;
+ align-items: center;
+ justify-content: center;
+ color: var(--ds-text-muted);
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-trigger.scheduled-execution-trigger {
+ max-width: 100%;
+ background: transparent;
+ box-shadow: none;
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-trigger.scheduled-execution-trigger:hover,
+ .scheduled-execution-toolbar .settings-menu-select-trigger.scheduled-execution-trigger[aria-expanded="true"] {
+ background: var(--ds-bg-hover);
+ color: var(--ds-text-primary) !important;
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-trigger-label {
+ flex: 0 1 auto;
+ font-size: var(--text-sm);
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-trigger > svg {
+ width: 12px;
+ height: 12px;
+ }
+
+ .scheduled-execution-project {
+ max-width: min(190px, 42cqw);
+ }
+
+ .scheduled-execution-permission {
+ max-width: min(160px, 34cqw);
+ }
+
+ .scheduled-execution-model {
+ max-width: min(300px, 48cqw);
+ }
+
+ .scheduled-execution-toolbar .settings-menu-select-anchor,
+ .scheduled-execution-toolbar .settings-menu-select-trigger {
+ min-width: 0;
+ }
+
+ @container (max-width: 440px) {
+ .scheduled-execution-project { max-width: 34cqw; }
+ .scheduled-execution-permission { max-width: 28cqw; }
+ .scheduled-execution-model { max-width: 30cqw; }
+ }
+
+ @container (max-width: 350px) {
+ .scheduled-execution-toolbar .settings-menu-select-trigger-label {
+ display: none;
+ }
+ .scheduled-execution-toolbar .settings-menu-select-trigger.scheduled-execution-trigger {
+ width: 28px;
+ padding: 0 !important;
+ }
+ }
+
+ .scheduled-instruction-shell,
+ .scheduled-execution-toolbar {
+ width: 100%;
+ }
+ .scheduled-permission-warning { color: var(--ds-warning); }
.scheduled-weekday-trigger { max-width: min(300px, 100%); }
.scheduled-weekday-menu { min-width: 132px; }
.scheduled-weekday-option { min-height: 38px; }
diff --cc docs/adr/0305-scheduled-task-execution-settings.md
index 000000000,1331e47fe..889e3f176
mode 000000,100644..100644
--- a/docs/adr/0305-scheduled-task-execution-settings.md
+++ b/docs/adr/0305-scheduled-task-execution-settings.md
@@@ -1,0 -1,74 +1,74 @@@
-# ADR 0304: Keep scheduled-task execution settings task-owned
++# ADR 0305: Keep scheduled-task execution settings task-owned
+
+ - Status: Accepted for implementation
+ - Date: 2026-09-22
+ - Amends: `scheduled-desktop-automations.md`
+
+ ## Context
+
+ Scheduled tasks already own their prompt, cadence and project binding, but they
+ did not own the rest of their execution configuration. Automatic runs always
+ used Ask permission mode and resolved the app's current default provider/model
+ when each run started. Editing a global default could therefore change an
+ unrelated saved task, and the Scheduled form could not move a task to another
+ saved project.
+
+ The conversation composer already defines the supported permission choices and
+ the configured provider/model catalog. Scheduled tasks should use those same
+ choices without sharing mutable draft or session state with a conversation or
+ another task.
+
+ ## Decision
+
+ Store optional `permissionMode`, `providerId` and `modelId` fields alongside the
+ existing `workspacePath` in each task's Host-owned `config_json`. Provider and
+ model are an all-or-nothing pair. The Scheduled form uses the same configured
+ model filtering, aliases and permission labels as the conversation composer,
+ but writes a separate copy to the selected task.
+
+ New tasks default to the current project, Ask permission mode and the current
+ default provider/model when those values exist. Users may explicitly choose
+ another saved project, permission mode or configured model. Both Run now and
+ automatic runs create their session from the task-owned values.
+
+ Compatibility remains additive:
+
+ - a task without `providerId`/`modelId` continues to resolve the app defaults at
+ run time;
+ - a legacy automatic task without `permissionMode` continues to use Ask;
+ - a legacy manual task without `permissionMode` keeps its previous inherited
+ permission behavior;
+ - existing workspace-capture and project-removal rules remain unchanged;
+ - an unavailable saved model remains visible and preserved instead of silently
+ changing to another model.
+
+ Only the trusted desktop management surface may retarget a task. Conversation
+ tools remain scoped to their calling session's project and do not gain project,
+ model or permission parameters.
+
+
+ Tasks also persist optional `thinkingLevel` using the existing session values
+ (including `off` and `omit`). The full Composer model/reasoning picker and
+ controller are reused with a task-draft configuration callback. Both manual and
+ automatic runs apply the saved level. Missing or cleared levels retain the
+ legacy `off` behavior; no database migration is required.
+
+ ## Consequences
+
+ No table migration is required because `config_json` is the existing extension
+ boundary. Older versions ignore the additive fields and fall back to their
+ previous execution behavior. Selecting Auto is an explicit per-task choice and
+ can run restricted actions without waiting for approval; Ask remains the default
+ for new and legacy automatic tasks.
+
+ The public scheduled-task projection and desktop IPC gain optional fields, so
+ Host, shared types, renderer and contract tests must change together.
+
+ ## Alternatives
+
+ Keeping global defaults as the only source was rejected because changing one
+ setting can retarget every automation. Adding physical columns was rejected
+ because the existing validated JSON boundary already owns optional task
+ configuration. Backfilling old rows was rejected because it would turn their
+ dynamic default behavior into a fixed selection during upgrade.
+
diff --cc docs/adr/README.md
index affd17920,0f1fb2b4a..a04a8822d
--- a/docs/adr/README.md
+++ b/docs/adr/README.md
@@@ -331,9 -330,9 +331,10 @@@ Each ADR includes
| 0299 | [Subagent context budget and delegate compaction](0299-subagent-context-budget.md) | Accepted for implementation (amends ADR 0064; extends ADR 0062 / ADR 0279) |
| 0300 | [Host-owned encrypted portable configuration sync](0300-host-owned-encrypted-portable-configuration-sync.md) | Accepted for implementation |
| 0301 | [Explicit append-only WebDAV compatibility mode](0301-explicit-append-only-webdav-compatibility-mode.md) | Accepted for implementation |
-| 0302 | [A failed compaction keeps the recent window, and an oversized summary is chunked](0302-compaction-fallback-recent-window-and-chunked-summary.md) | Accepted for implementation |
-| 0303 | [A skill package carries resources far above the document cap](0303-skill-package-resource-limits.md) | Accepted for implementation |
-| 0304 | [Keep scheduled-task execution settings task-owned](0304-scheduled-task-execution-settings.md) | Accepted for implementation (amends scheduled-desktop-automations) |
+| 0302 | [A failed compaction keeps the recent window, and an oversized summary is chunked](0302-compaction-fallback-recent-window-and-chunked-summary.md) | Accepted for implementation (issue #827; amends ADR 0049 / ADR 0282) |
+| 0303 | [A skill package carries resources far above the document cap](0303-skill-package-resource-limits.md) | Accepted for implementation (amends ADR 0300) |
+| 0304 | [Trust the network endpoints the user enters themselves](0304-user-supplied-endpoint-trust.md) | Accepted for implementation (amends ADR 0243 / 0245 / 0247; follows ADR 0142 / 0257 / 0300) |
++| 0305 | [Keep scheduled-task execution settings task-owned](0305-scheduled-task-execution-settings.md) | Accepted for implementation (amends scheduled-desktop-automations) |
| turn-process-and-thinking-display | [Turn process and thinking presentation](turn-process-and-thinking-display.md) | Accepted |
| provider-display-order | [Provider display order](provider-display-order.md) | Accepted |
| registry-header-variable-spelling | [Remote header variables accept the registry's `{name}` spelling](registry-header-variable-spelling.md) | Proposed |