agent-zero/webui/components/modals/file-browser/AGENTS.md
Alessandro ffddc3ebcb Promote Files into shared canvas surface
Add Files to the universal canvas rail and sidebar flow, with a reusable floating surface modal chrome that matches Browser/Desktop behavior.

Make the File Browser modal draggable/resizable with Focus mode, keep Editor on the same draggable modal helper, and preserve dock/undock handoff state.

Harden File Browser startup so empty paths resolve to the default workdir, restyle the Up control, compact New file/New folder actions, and hide Modified before Name/Size in narrow containers.

Update DOX contracts and focused regression coverage for the new Files surface, modal chrome, default-path fallback, and compact layout behavior.
2026-06-23 11:19:58 +02:00

1.8 KiB

File Browser Modal DOX

Purpose

  • Own the WebUI file browser workflow for modal and right-canvas Files surface entry points.

Ownership

  • file-browser.html owns file list markup, path/search controls, scoped styles, and modal/canvas footer behavior.
  • file-browser-store.js owns directory loading, remembered-location state, selection, upload/download/delete actions, and surface handoff state.
  • rename-modal.html owns rename and create-folder prompts that reuse the file-browser store.

Local Contracts

  • Keep open(path) as the modal entry point for workflows that await browser close.
  • Keep openSurface(path) as the right-canvas entry point; it must load files without opening or awaiting a modal.
  • The floating file-browser modal must use the shared surface modal chrome so it remains draggable/resizable and exposes Focus mode.
  • Preserve remembered-directory behavior: explicit paths win, then remembered path, then $WORK_DIR.
  • Empty mounted startup states must self-heal to the $WORK_DIR default instead of rendering a blank path and empty list.
  • Keep the file list readable in narrow canvas/modal containers by hiding the Modified date column before sacrificing the Name or Size columns.
  • Keep New file and New folder controls icon-only across canvas and modal modes while preserving accessible labels.
  • Preserve surface actions that route supported files to Browser, Desktop, or Editor.

Work Guidance

  • Share markup and store behavior between modal and canvas modes; branch only on explicit component mode.
  • Keep modal footer relocation compatible with data-modal-footer while allowing canvas mode to render inline controls.

Verification

  • Smoke-test opening Files as a modal and from the right-canvas rail.
  • Run targeted file-browser tests after behavior changes.

Child DOX Index

No child DOX files.