Skip to content

feat(extension): expose CLI task consent and supervision - #5734

Closed
iscekic wants to merge 16 commits into
browser-task-0787-s11from
browser-task-0787-s12
Closed

iscekic wants to merge 16 commits into
browser-task-0787-s11from
browser-task-0787-s12

Conversation

@iscekic

@iscekic iscekic commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator
  • The extension now offers optional browser tasks from Kilo's command-line app. Access starts off and requires the signed-in panel to stay open.
  • Settings now offers separate model, thinking level, and Safe or Dangerous mode choices for these tasks. Changes apply at the next tab approval.
  • Each task asks you to approve or reject a tab, showing the requesting session, goal, page title, address, model, and mode. The usual target selector does not approve access.
  • If a chosen tab disappears, the task goal stays visible while you choose another tab. You can refresh the available tabs before approving.
  • Browser and Agents modes show the browser profile, task owner, approved tab, deadlines, queue order, and latest outcome. Status messages distinguish waiting, connection problems, interruptions, and control held by another panel.
  • You can stop an active task or cancel a queued task without undoing actions already issued.
  • Disabling task access asks for confirmation and ends active and queued tasks.
  • Approvals for saved memories and workflows now remain available in Agents mode.
  • Stop and task details remain inside Settings, model selection, history, and workflow dialogs, including saving and confirmation screens. Keyboard focus stays inside the active dialog and returns when it closes.
  • Recovery controls separate status checks from permission to run. Recovery requires affected tabs to close and browser actions to finish; old tasks never resume, and new tasks need fresh approval.
  • If startup cannot load saved data, Reload panel retries without clearing your account, settings, or safety records. The button waits until browser work stops.
  • When models are available but none is selected, the picker says “Select model” instead of “Loading models...”.

Summary

ExtensionAgentsProvider shares one connection across modes with browserProvider: true, and ExtensionAgentsContextValue.userWebConnection exposes its inferred type. Callers must use ExtensionAgentsStore for Agents; Browser chat, command-line interface (CLI) tasks, settings, and approvals keep the default Jotai store. Account or organization changes replace scoped resources without remounting BrowserTaskProvider, preserving its cleanup barrier across replacements.

Files
  • apps/extension/entrypoints/sidepanel/agents-provider.tsx — Source, modified, +35/−15 lines. Enables browser capability negotiation and mounts the delegated provider on the shared transport. Replaces the connection, manager, client, and private store when the token, email, or organization changes. Retains and releases each connection with its context, while the delegated provider remains mounted. Exports the separate Agents store boundary.
  • apps/extension/entrypoints/sidepanel/auth-views.tsx — Source, modified, +28/−30 lines. Mounts the provider, task surface, supervision, and both save cards across Browser and Agents modes. Keeps Browser chat, Settings, approvals, and workflow request consumption on the default store. Keys only the Agents descendants by account and organization.

BrowserTaskControls binds consent to each invocation and displays approved settings plus authoritative ownerLabel and queuePosition; missing legacy metadata remains unknown. BrowserTaskSettings exposes off-by-default BrowserProviderSettings.enabled and model/mode/thinking choices; BrowserTaskSurface serializes BrowserTaskSettingsContext writes across dialog remounts, preventing stale re-enablement. Recovery uses BrowserRecoveryReadiness only for the unchanged provider snapshot; status retrieval and initialization reload never approve execution or resubmit work.

Files
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx — Source, added, +723/−0 lines. Adds profile, phase, owner, goal, bound-tab, deadline, queue, result, and empty-evidence displays. Refreshes tab choices every two seconds; absent candidates disable approval without discarding the goal. Keeps Stop outside scrolling details and reports cancellation without promising rollback. Separates status refresh, reconnection, readiness preparation, and recovery; provider state changes invalidate readiness. Shows retryable, denied, and interrupted status errors with recovery guidance. Relays closed-tab, drained-lock, unsupported Web Locks, and all-tabs recovery instructions without unsafe clearing. Offers initialization reload only when local and delegated work no longer blocks it, preserving saved data without enabling tasks. Requires a model before enablement, resets thinking effort on model changes, and confirms disablement. Tracks pending settings writes by runtime identity across overlay closure. Supplies live announcements, wrapped content, internal scrolling, and modal focus containment and restoration.

BrowserTaskSupervisionContext supplies BrowserTaskSupervisionSlot inside active dialogs, so Stop remains within each dialog's keyboard boundary. BrowserTaskSurface selects the top modal, cycles focus, and restores prior focus or a stable control when dialogs close. Settings expose delegated options without hiding supervision; long content scrolls and wraps rather than moving Stop out of reach.

Files
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx — Source, modified, +8/−1 lines. Adds task settings and supervision inside the Settings dialog. Extends the scoped lint exemption for the larger composition.
  • apps/extension/entrypoints/sidepanel/conversation-history-button.tsx — Source, modified, +4/−0 lines. Pins task supervision below the history header.
  • apps/extension/entrypoints/sidepanel/workflow-run-prompt.tsx — Source, modified, +7/−1 lines. Pins task supervision inside the workflow prompt and wraps long workflow names.

ModelPicker shows “Select model” when the catalog has entries but no model is selected, rather than implying a pending load. Without a selection, an empty catalog still shows “Loading models...”. Stored model labels remain intact, and the picker keeps task supervision inside its overlay.

Files
  • apps/extension/entrypoints/sidepanel/model-picker.tsx — Source, modified, +6/−1 lines. Distinguishes an unselected model from an empty catalog and pins supervision above the search field.

Recorded automation: the handoff reports 47 passing focused controls/composition tests and passing scoped checks.

Tests: 2 files added — apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx (+919/−0 lines), apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx (+1,234/−0 lines); controls and provider composition coverage.
Generated: 0 files changed.


Verification

No manual verification results are available for this level. Browser-only live and visual verification remains pending in the next stack level. No end-to-end report is attached.

Visual Changes

Visual Changes: N/A

Reviewer Notes

Human steps

  • before merge — The change requires no new environment value, secret, migration, or manual data conversion.
  • after merge — For optional delegated tasks, select a model and enable “CLI tasks” in Settings.
  • after merge — Keep the signed-in panel open while delegated tasks run.

Scope and dependencies

  • Scope: Cloud level 12, browser-task-0787-s11...browser-task-0787-s12; nine changed files, 2,964 added lines, and 48 removed lines.
  • Cloud worktree: /Users/igor/Projects/.worktrees/browser-task-0787; branch browser-task-0787-s12.
  • Command-line interface (CLI) worktree: /Users/igor/Projects/.worktrees/browser-task-0787-kilocode; branch browser-task-0787-s6. This level includes no CLI changes.
  • Runtime prerequisite: Cloud #5716 supplies the delegated provider and browser runner mounted here.
  • Cross-repository dependency: CLI level 6, #13567 supplies the command-line caller for delegated browser tasks.
  • The completion gate still blocks assignment and reviewer requests.

Notes

Browser-only live and visual verification remains pending in the next stack level.

Stacked PRs — merge bottom to top. Each level shows only its own diff.

Runtime verification (E2E, user advocacy, simplify) runs on the tip PR over every level.
Every level keeps its own checks, its own bot review, and its own threads; each one is answered on its own PR.
Each level is its own deliverable: it builds and passes its own checks alone.
A finding on a level is repaired on that level, then carried upward with stack.sh forward.

  1. browser-task-0787 — feat(browser-task): define negotiated job contracts #5638
  2. browser-task-0787-s2 — feat(session-ingest): persist owned browser jobs #5644
  3. browser-task-0787-s3 — feat(session-ingest): route fenced browser providers #5648
  4. browser-task-0787-s4 — feat(cloud-agent-sdk): support browser provider jobs #5653
  5. browser-task-0787-s7 — fix(extension): expose honest browser runner outcomes #5681
  6. browser-task-0787-s8 — feat(extension): coordinate browser execution across panels #5694
  7. browser-task-0787-s9 — fix(extension): invalidate ended browser task approvals #5698
  8. browser-task-0787-s10 — feat(extension): persist browser jobs and profile consent #5702
  9. browser-task-0787-s11 — feat(extension): execute delegated browser jobs in the panel #5716
  10. browser-task-0787-s12 — feat(extension): expose CLI task consent and supervision #5734 ← this PR
  11. browser-task-0787-s13 — test(browser-task): verify delegated jobs and recovery #5742 (tip)

@kilo-code-bot

kilo-code-bot Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
Previous Review Summaries (5 snapshots, latest commit c8cb3a6)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit c8cb3a6)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx

Previous review (commit da53e73)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/extension/entrypoints/sidepanel/agents-provider.tsx
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx
  • apps/extension/entrypoints/sidepanel/auth-views.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx
  • apps/extension/entrypoints/sidepanel/conversation-history-button.tsx
  • apps/extension/entrypoints/sidepanel/model-picker.tsx
  • apps/extension/entrypoints/sidepanel/workflow-run-prompt.tsx

Previous review (commit 05e8ce6)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/extension/entrypoints/sidepanel/agents-provider.tsx
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx
  • apps/extension/entrypoints/sidepanel/auth-views.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx
  • apps/extension/entrypoints/sidepanel/conversation-history-button.tsx
  • apps/extension/entrypoints/sidepanel/model-picker.tsx
  • apps/extension/entrypoints/sidepanel/workflow-run-prompt.tsx

Previous review (commit 087a0b7)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/extension/entrypoints/sidepanel/agents-provider.tsx
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx
  • apps/extension/entrypoints/sidepanel/auth-views.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx
  • apps/extension/entrypoints/sidepanel/conversation-history-button.tsx
  • apps/extension/entrypoints/sidepanel/model-picker.tsx
  • apps/extension/entrypoints/sidepanel/workflow-run-prompt.tsx

Previous review (commit 378a5c2)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • apps/extension/entrypoints/sidepanel/agents-provider.tsx
  • apps/extension/entrypoints/sidepanel/auth-shell.tsx
  • apps/extension/entrypoints/sidepanel/auth-views.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.test.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-controls.tsx
  • apps/extension/entrypoints/sidepanel/browser-task-provider-tree.test.tsx
  • apps/extension/entrypoints/sidepanel/conversation-history-button.tsx
  • apps/extension/entrypoints/sidepanel/model-picker.tsx
  • apps/extension/entrypoints/sidepanel/workflow-run-prompt.tsx

Reviewed by grok-4.6 · Input: 44.3K · Output: 7.1K · Cached: 318.3K

Review guidance: REVIEW.md from base branch browser-task-0787-s11

@iscekic

iscekic commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: the owner stopped this workflow section. The branch is retained.

@iscekic iscekic closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant