Expand description
Left panel: the project browser — Premiere’s project panel, in two sub-tabs.
“Imported” is what the project contains, drawn as a real file explorer: nested folders, the assets under them, a “+ New” button (folder / import / sequence / adjustment layer), rename and delete from the context menu, and move-by-drag onto a folder row. “Global” browses the disk instead: the recent files from settings.json plus the folders the user linked, one directory level read per expansion (never an eager recursive walk — that hangs the UI on a media drive) and only inside a node the user linked or opened.
Selection is multi: a click replaces it, Ctrl+click toggles one item, Shift+click takes the range
over the rows in the order they were drawn, and a drag across empty space rubber-bands.
LibraryState.selected / sel_path are the anchor inside the set — app.rs writes selected after
an import, and show notices that write and collapses the set onto it. With something selected the
toolbar grows a batch strip (Import, Convert To, Convert…, Compress…, Remove) that routes through the
same LibraryResponse fields the per-item menus use, so App needs no new plumbing.
The bottom of the pane is a dedicated asset preview: a big picture of the anchor, its format line,
and the ONLY place its description, tags, label and folder are edited — never inline in the list.
Every file row and tile carries a picture: the cached thumbnail, or a painted glyph while there is
none — a speaker for audio, a film strip for video, a camera for stills, a sheet stack for the rest.
The toolbar works over both tabs: search (name/tags/description/folder), kind chips (All/Video/Audio/
Image/Seq, Short SFX ≤ 10 s, Music > 10 s), label colours, “Unused only”, sort, the List/Gallery
switch (LibraryState.view) and the zoom (LibraryState.zoom, the +/- buttons and Ctrl+Scroll) that
scales both gallery tiles and row thumbnails. A search or a filter flattens “Imported” into its hits,
the way an explorer shows search results.
Under the tree, the Imported tab also lists what the project can reuse: its sequences (drag
DragPayload::Sequence, double-click opens), saved templates, and the effects / node graphs /
adjustment layers already in use or saved in settings.json.
Structs§
- Library
Response - Library
State - Preview
Frame - The frame the app’s preview player produced this update, with its pixel size. The preview box paints it instead of the still thumbnail, which is what makes a clicked asset play.
- Tree 🔒
- Shared borrows for the tree rows: they recurse, and would otherwise thread a dozen arguments each.
Enums§
- Art 🔒
- What fills a picture box.
- Label
Pick 🔒 - What a label menu returned.
- LibOp 🔒
- Project mutations collected during the frame, applied after all widgets (one undo per gesture).
- Pick 🔒
- One selectable thing in the browser: a project asset, or a file on disk.
- RecOp 🔒
- Reuse 🔒
- One reusable thing the project already holds.
Constants§
- ARROW 🔒
- Width of the disclosure column.
- AUDIO_
EXTS 🔒 - CLEAR_
RECENT 🔒 - IMAGE_
EXTS 🔒 - ROW_H 🔒
- TILE 🔒
- Gallery cell width and row thumbnail height at zoom 1.
- VIDEO_
EXTS 🔒 - ZOOM_
MAX 🔒 - ZOOM_
MIN 🔒
Functions§
- apply_
click 🔒 - One click on a row/tile, resolved against the rows as they were drawn this frame. Plain replaces the selection, Ctrl toggles one item, Shift takes the range from the anchor (which stays put, so a second Shift+click re-ranges from the same place, like every file explorer).
- asset_
preview 🔒 - band_
select 🔒 - Rubber band over empty space: press, move, and every row the band touches is selected. Derived from the pointer each frame — no state to keep. A press that landed on a row is left alone: that gesture belongs to the drag-and-drop source.
- batch_
strip 🔒 - What to do with everything selected. Every button routes through the
LibraryResponsefields the per-item menus already use, so App needs no new plumbing. ponytail: the Convert and Compress windows each take one file, so those two open on the first asset of the selection. Upgrade: queue one job per asset once those windows accept a list. - browser 🔒
- confirm 🔒
- Yes/No dialog for destructive, non-undoable actions.
- delete_
sequence 🔒 - Remove a sequence and every clip that uses it (main timeline, stash, other sequences).
- dir_key 🔒
- Tree key of a folder on disk (one place, so the tests build the same key).
- dot 🔒
- A filled dot in the label’s colour — painted, because ● is tofu in half the shipped fonts.
- dur_
cell 🔒 - Duration cell of an asset — “Loading…” while its import probe is still out (see engine::import).
- ext_
class 🔒 - 1 video, 2 audio, 3 image, 0 unknown — by extension only.
- external_
select 🔒 - app.rs sets
selectedon its own after an import or a “reveal in library”; the multi-selection follows that write (and only that one — our own writes go throughset_anchor). - fallback_
glyph 🔒 - The painted stand-in for a file with no thumbnail: a speaker for audio, a film strip for video, a camera for stills, a stack of sheets for everything else.
- file_
art 🔒 - The picture of a media file
hpx tall: its cached thumbnail, or the painted fallback for its kind. ponytail: asking for a thumbnail is what queues the decode, so expanding a folder of 500 clips queues 500 of them (LIFO, so what you look at wins). Upgrade: only ask for rows inside the viewport. - folder_
ok 🔒 - Folder filter: None = all, “” = root only, name = that folder and its subfolders.
- folder_
tree_ 🔒names - Every project folder plus the parents only an asset implies (“A/B” with no “A” in
folders), so no branch of the tree hangs off a node that is never drawn. - glyph 🔒
- A painted icon the size of a text label, for the rows that are not files.
- indent 🔒
- Indent of a row
depthlevels into the tree. Rows that hold no disclosure triangle (files, hints) addARROW, so their icon lines up with the folder icons beside them. - inline_
edit 🔒 - TextEdit for inline renames; Some(text) once editing finishes with a non-empty name.
- kind_
rank 🔒 - kind_
tag 🔒 - kind_
tag_ 🔒for_ class - label_
menu 🔒 - “Label ▸” submenu over the project’s own labels; returns the pick (“Edit labels…” included).
- lbl_
color 🔒 - Colour of a label index using the project’s palette (falls back to the built-in colours).
- lbl_
name 🔒 - Name of a label index in the project’s palette.
- matches_
kind 🔒 - Kind chip: 0 All, 1 Video, 2 Audio, 3 Image, 4 Sequences (assets never match), 5 Short SFX (audio ≤ 10 s), 6 Music (audio > 10 s).
- matches_
search 🔒 - Case-insensitive match of the search text against name, tags, description and folder. A search is about the FILE, so it matches the name and what the user wrote about it — never the containing folder. Matching the folder meant searching “pop” returned every file that happened to sit in a folder called pop, which is the opposite of narrowing.
- paint_
art 🔒 - Paint
artinsiderecton the panel fill. The box is drawn even when empty, so names line up. - parent_
of 🔒 - The folder that directly contains
path; “” for a top-level folder. - path_
matches 🔒 - Search + kind chips against a bare path (recents and files on disk have no duration): the SFX/Music chips can only mean “audio” there.
- path_
preview 🔒 - Preview of a file that is not in the project yet: import it from here, and edit the tags it carries as a recent file (the only place a file outside the project can keep any).
- preview_
head 🔒 - Name / path / format, over the picture — shared by both previews.
- preview_
panel 🔒 - The dedicated asset preview: the bottom of the pane, and the only place tags / description / label / folder are edited.
- recent_
clear 🔒 - recent_
matches 🔒 - Same, plus the recent entry’s own tags and colour label.
- recent_
remove 🔒 - rename_
folder 🔒 - Rename a folder (and subfolders); assets follow.
- reuse_
face 🔒 - (name, kind tag, icon, drag payload) of one reusable item.
ponytail: only adjustment layers have a drop target today — the others carry their name as a
Templatepayload becauserow()/tile()are drag sources, and a stray drop just misses. - reuse_
pick 🔒 - What a click on a reusable item asks the app to do.
- reuse_
sections 🔒 - The reusable sections, read straight off the project and settings.json each frame.
ponytail: linear scans + a JSON decode per template (
is_adjustment_template), same as the Presets pane — the lists are short. A dedicated presets store plugs in here as extraReuseitems. - reuse_
ui 🔒 - The reusable sections under the tree, in whichever view the toolbar selected.
- row 🔒
- One list row: a drag source with a click-sensing overlay (select / double-click / context menu) and an optional action button on the right. Returns (row response, button clicked).
- row_art 🔒
- The picture in front of a file row,
hpoints tall (16:9 box, so every row lines up). - scan_
dir 🔒 - One level of a folder on disk: subfolders first, then media files. None = unreadable.
- sequences_
section 🔒 - show
thumbs: the app’s ThumbCache, so rows and the preview can show a picture. None (no cache / headless) draws the painted fallback instead.ytdlp= yt-dlp was found at start-up; the “Import URL…” button only exists when it is installed.- split_
path 🔒 - (“file.mp4”, “C:\dir”) — pure string split on the last path separator.
- split_
tags 🔒 - templates_
section 🔒 - tile 🔒
- Gallery cell: a picture box with the kind tag in its corner and the name under it. Shared by the asset gallery and the reuse sections; the caller decides what the click means.
- tile_
grid 🔒 - Lay
itemsout as a grid of tiles, wrapping every timetile_wmore would not fit the pane.horizontal_wrappedcannot do this for tiles: a tile is a drag source whose size is not known until after its contents are drawn, so the wrap test always says the row still has room and a gallery grows one row deep, sideways, forever. Compute the columns instead. - toolbar 🔒
- The search + filter toolbar: a framed band in the panel fill with a separator under it, so it never
reads as content.
headdraws the tab-specific leading row (New / Open / Import / sort). - zoom_
scroll 🔒 - Ctrl+Scroll (and pinch) over the list scales the thumbnails, like every asset browser.
Type Aliases§
- Labels 🔒
- (name, colour) of every
Project.labelsentry, snapshotted once per frame.