Files modal — edit any text file, preview images

Overview

Usage

Tap the Files item in the file toolbar dropdown (next to the composer). The modal opens with the project root listed on the left and an empty state on the right.

The browser is not capped at the project root: you can navigate up (via the Up button, the breadcrumb, or by typing an absolute path in the path input) to browse and edit files anywhere under the user's home directory. With MOUAIF_ALLOW_ANY_ROOT=1 set on the server, the whole filesystem is reachable. The Up button and breadcrumb stop at the natural boundary (home, or / when allow-any-root is on) rather than at the project root, so the list never asks the server for a directory the home guard would reject.

Tap on a list rowResult
Folder (…)Recurse into that folder
Text file (.js, .json, …)Editor opens with the file content
Text file with no extension (LICENSE)Editor opens (sniffed as text)
Image (.png, .jpg, …)Preview opens in the right pane
SVG (.svg)Preview opens by default; Edit in the header swaps to the editor
Other binaryRow is greyed out and not tappable

Right-hand pane modes

Layout toggle — split vs full-editor

The modal opens in split view by default. On tablet/desktop the file list sits on the left (38% width) and the editor/preview on the right. On phones the list is stacked above the editor. While no file is open, the list and the empty state share the body. Once a file or image is open, the list shrinks to fit its rows, up to 40% of the body, and scrolls past that. The editor gets the rest of the space.

A layout toggle in the header switches to full-editor mode, which hides the file list (and the breadcrumb + list-status rows that go with it) so the editor/preview takes the whole pane. The header is also reduced: the path input, Up / Go / Refresh buttons, and breadcrumb all disappear in full-editor mode, leaving only the toggle and Close.

The toggle is a single on/off switch for the file list. It is the same button in both headers: