# UnifiedFiler v1.9.5 Notes

## Theme

v1.9.5 strengthens the Control architecture introduced in v1.9.4 by making `CommandRegistry` the common operation layer for FileExplorer interactions.

The intended flow is now:

```text
Host
  ↓
FileExplorerControl.exec(commandId)
  ↓
CommandRegistry / Command state / Capability checks
  ↓
FileExplorerView.executeAction(action, args)
  ↓
Service / Adapter
```

The internal jQuery View/Controller still owns DOM interaction, but user operations are routed through the Control command model whenever the component is mounted through `FileExplorerControl`.

## Added / changed

- Strengthened `BaseCommand` metadata:
  - `group`
  - `order`
  - `toolbar`
  - `context`
  - `host`
  - `shortcuts`
  - `checked` state support
- Strengthened `CommandRegistry`:
  - `registerMany()`
  - `getStateMap()`
  - `getStates(state, { surface })`
  - `resolveShortcut(event, state)`
- Expanded default explorer commands:
  - `open`
  - `copy`
  - `cut`
  - `paste`
  - `download`
  - `packageInfo`
  - `properties`
  - `selectAll`
  - `focusSearch`
  - navigation, creation, rename, delete, favorite, preview commands
- FileExplorer Toolbar buttons now receive enabled/disabled state from the Control command model when mounted by `FileExplorerControl`.
- Context menus are now generated from `CommandRegistry` command states when a Control command provider is available.
- Keyboard shortcuts are resolved by `CommandRegistry` before falling back to pure view navigation keys.
- Host-side `control.exec()` and UI-triggered actions now pass through the same command lifecycle events:
  - `beforeCommand`
  - `afterCommand`
  - `commandError`
  - `commandStateChanged`
- Command state now incorporates capability information, selection, clipboard state, history state, preview state, and context-menu target information.

## Compatibility

The existing jQuery plugin API remains available:

```javascript
$('#explorer').fileExplorer(options);
```

The preferred Host integration API is:

```javascript
var control = new UnifiedFiler.controls.FileExplorerControl('#explorer', options);
control.mount();
control.exec('rename');
```

When the View is used directly as a jQuery plugin, it keeps legacy fallback behavior for toolbar, context menu, and shortcut handling.

## Notes

v1.9.5 does not fully split `FileExplorerView` into smaller View components yet. That is planned for v1.9.6. The focus of this version is operation unification: Toolbar / ContextMenu / Shortcut / Host API all share the same command model.
