# OneEditor File Menu Delegation Profile (v5.64.2 / clarified in v5.65.0)

This note corrects the v5.64.0 wording around File menu ownership for the OneEditor / OneViewer integration profile. v5.65.0 further clarifies that this is not a universal Host rule.

## Correct model

OneEditor / OneViewer may own and independently render the File menu UI as an integrated Host profile.

`New` and `Open` are OneEditor Host workflows because they decide which file type and which file-processing package will become active.

After the file type is resolved, the integrated Host loads the corresponding package and routes file operations to that package's storage-neutral file commands and capabilities.

```text
Host File menu UI
  New / Open / Save / Save As / Export / Print / Properties
      ↓
Active package resolved from file type
      ↓
UnifiedWriter EditorControl
      ↓
writer.file.* command or import/export capability
```

## Why the package still has file commands

In the OneEditor / OneViewer profile, the Host owns the global File UI and storage provider selection, but the package owns the file-format-specific operation. In WorkbenchControl or ordinary page embedding, the package Workbench may render its own File menu.

For UnifiedWriter, package file commands include:

```text
writer.file.newDocument
writer.file.openPackage
writer.file.savePackage
writer.file.saveAsPackage
writer.file.importContent
writer.file.export
writer.file.printContent
writer.file.properties
```

These commands are storage-provider-neutral. They do not decide LocalDevice, AppStorage, Google Drive or Backend API. They create, parse, serialize, export, print, and inspect UnifiedWriter documents.

## Host commands vs package commands

| Layer | Command examples | Responsibility |
|---|---|---|
| Host UI | `host.file.new`, `host.file.open`, `host.file.save`, `host.file.export` | File menu UI, file picker, file type selection, tab lifecycle, save target, provider choice |
| UnifiedWriter package | `writer.file.newDocument`, `writer.file.openPackage`, `writer.file.savePackage`, `writer.file.export` | DocumentModel creation, package parsing, serialization, export Blob generation, print target generation, properties metadata |

## WorkbenchControl

WorkbenchControl may render a File menu when used standalone or embedded in a normal web page. That File menu is still a shell UI. Its items call `writer.file.*` commands because the Workbench already knows it is hosting UnifiedWriter.

OneEditor / OneViewer usually do not use the Workbench File menu. OneViewer uses EditorControl in view/read-only mode rather than a separate ViewerControl. They build their own File menu and delegate to the active package.

## Import wording

Integrated Host-level `Import` should not be treated as a permanent global File menu item. `Open` opens files and routes by type. Import-like capabilities should be exposed declaratively and rendered by Host according to the workflow:

```text
Open             → open as active document
Insert from file → insert external content into current document
Convert          → convert between formats
Export           → produce another format from current document
```
