Files
tutti/docs/plans/2026-07-13-browser-node-advanced-actions.md
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

37 lines
2.2 KiB
Markdown

# Browser Node Advanced Actions Implementation Plan
**Goal:** Add device emulation, full-page screenshots, Cookie import, and an in-product browser settings surface without moving browser policy into the desktop renderer.
**Architecture:** Keep reusable contracts, runtime state, Cookie parsing, and Electron guest operations in `@tutti-os/browser-workbench-node`. The desktop host owns native file/directory dialogs and IPC transport. The renderer only presents settings and invokes the package host API. Settings apply to the active browser session for the current app run; popup and external-navigation security policy remains fixed.
## Task 1: Extend package contracts and runtime state
- Add screenshot modes, device presets, Cookie import results, and browser session settings types.
- Add optional host API operations and runtime-store events.
- Cover state transitions with focused unit tests.
## Task 2: Implement Electron guest capabilities
- Capture full-page screenshots through the Chrome DevTools Protocol while preserving existing visible-area capture.
- Enable and disable fixed device-emulation presets.
- Parse JSON and Netscape Cookie exports, validate entries, and import only into the active guest session.
- Support choosing and applying a download directory.
- Add unit tests for parsers, page actions, and manager behavior.
## Task 3: Wire desktop IPC and native dialogs
- Extend shared IPC contracts, main-process registration, preload API, and preload types.
- Use native open/save dialogs for Cookie files, screenshot output, and download directories.
- Avoid exposing Cookie file contents to the renderer or diagnostics.
## Task 4: Build the browser settings experience
- Add device-emulation and screenshot-mode actions to the overflow menu.
- Add a UI System-based settings dialog for device preset, zoom, screenshot mode, download directory, Cookie import, and browsing-data clearing.
- Route all visible copy through BrowserNode i18n resources.
## Task 5: Document and verify
- Update package and architecture documentation for ownership and session-scoped behavior.
- Run focused package tests, desktop/package typechecks, i18n/UI boundary checks, desktop build, and changed-aware validation.