Daily Workflow
File Previews
Crab Desktop renders rich previews for 20+ file formats directly in the editor pane. Previews are generated server-side by the Rust agent, keeping the renderer lightweight even for multi-gigabyte files.
How Previews Work
When you open a file, the app detects its format by extension and routes it to the appropriate preview renderer. For large files, only metadata or a sample is read — a 100 GB SafeTensors file previews in under 10ms because only the header is parsed.
Supported Formats
Code & Text
| Format | Extensions | Preview |
|---|---|---|
| Source code | .rs, .ts, .py, .go, etc. | Syntax-highlighted editor (Monaco) |
| Markdown | .md, .mdx | Rendered markdown with headings, links, code blocks |
| JSON | .json | Collapsible tree view with syntax highlighting |
| CSV | .csv, .tsv | Table view with sortable columns |
Machine Learning
| Format | Extensions | Preview |
|---|---|---|
| SafeTensors | .safetensors | Tensor names, shapes, dtypes, memory estimate |
| PyTorch Checkpoint | .pt, .pth | State dict keys and tensor shapes |
| ONNX | .onnx | Graph nodes, inputs, outputs, operator types |
| NumPy | .npy | Array shape, dtype, first elements |
| NumPy Archive | .npz | File listing with per-array metadata |
| HDF5 | .h5, .hdf5 | Dataset hierarchy, shapes, dtypes |
Data
| Format | Extensions | Preview |
|---|---|---|
| Apache Parquet | .parquet | Schema + sample rows as a table |
| SQLite | .sqlite, .db | Table list + interactive query panel |
| DuckDB | .duckdb | Table list + query interface |
| Protobuf | .proto | Message definitions and field types |
| GeoJSON | .geojson | Map visualization with feature properties |
Media
| Format | Extensions | Preview |
|---|---|---|
| Images | .png, .jpg, .svg, .webp | Inline image with zoom |
| Video | .mp4, .webm, .mov | Video player with controls |
| Audio | .mp3, .wav, .ogg | Audio player with waveform |
.pdf | Page-by-page document viewer | |
| 3D Models | .glb, .gltf | Interactive 3D viewer (Three.js) |
| STL | .stl | 3D mesh viewer with rotation |
Archives
| Format | Extensions | Preview |
|---|---|---|
| ZIP | .zip | File listing with sizes and compression ratios |
| Jupyter Notebook | .ipynb | Rendered cells (markdown + code + outputs) |
Preview Controls
Each preview type has format-specific controls:
Parquet
- Row limit: Configure how many sample rows to display (default 100)
- Column selection: Show/hide columns
- Sort: Click column headers to sort
SQLite / DuckDB
- Table browser: Click tables in the sidebar to view their schema
- Query panel: Write and execute SQL queries
- Result table: Paginated results with export option
3D Models
- Orbit: Click and drag to rotate
- Zoom: Scroll wheel
- Pan: Right-click and drag
- Reset: Double-click to reset camera
- Wireframe: Toggle wireframe overlay
Jupyter Notebooks
- Cell types: Markdown cells rendered, code cells syntax-highlighted
- Outputs: Images, tables, and text outputs displayed inline
- Collapse: Click cell headers to collapse individual cells
Preview Size Limits
To prevent the app from reading excessively large files:
- Max preview size: Configurable in Settings → Previews (default 100 MB)
- Files above the limit show a "File too large to preview" message with the option to override
- Binary files without a recognized format show a hex dump of the first 1 KB
Crab Pointer Files
When a file is dehydrated (pointer only), the preview shows:
- The pointer metadata (hash, size, chunk count)
- A Hydrate button to download the full content
- After hydration, the format-specific preview loads automatically
Performance
- Previews are fetched on demand (not pre-loaded)
- The agent reads only what's needed (headers, footers, first N rows)
- Large previews are streamed incrementally
- Switching files cancels the in-flight preview request
- Cached previews are evicted under memory pressure
Unsupported Formats
Files without a recognized format show:
- File size and modification date
- MIME type (if detectable)
- Hex dump of the first 1 KB
- Option to open with an external application