{# WORKSPACE FILE TREE — one directory's entries (project-scoped). Rendered for a single directory under the selected project's repo_root and returned as an HTMX fragment. The ROOT listing is included by _workspace.html; each folder lazy-loads ITS OWN children (this same fragment) on first expand. Vars: entries : list[workspace.Entry] (dirs-first, then lexicographic; hidden incl.) ws_project_key : the scoped project key (for child hx-get URLs) ws_parent : rel-path of the directory these entries belong to ("" = root) ws_error : set when the directory could not be listed (escape / missing) Behaviour (matches the prototype): - Folder rows toggle open client-side (toggleTreeNode) and lazy-load children. - FILE rows OPEN IN THE CENTER PANE on click (openWsFile → preview, with an Edit toggle). Right column is the tree only; the center is preview + edit. - Every row carries a drag handle (move via drag-drop onto a folder) and a ⋯ button + right-click that opens the context menu (open · rename · move · new file/folder · delete). Hidden dotfiles render dimmed. #} {% if ws_error %}