Shared file type icons
FileTypeIcon (apps/web/components/files/file-type-icon.tsx) draws the complete coloured set of Pierre Trees (@pierre/trees, Apache 2.0 with NOTICE), upstream SVG paths and filename mapping unchanged. The icon is decorative next to a visible filename and hidden from accessibility APIs.
| Aspect | Rule |
|---|---|
| Surfaces | Sidebar and central Files page (shared FileTree, Pierre's React renderer), file tabs, split picker, review list, composer file suggestions |
| Size | 16px in file rows, 14px in tabs; row height, indentation and folder controls unchanged |
| Matching | Basename after normalising separators and case. Exact filename before extension; dotted parent directories do not count. |
| Special names | AGENTS.md Markdown, CLAUDE.md Claude, Git metadata Git |
| Unknown file | Neutral document icon |
Names like constructor | Names and extensions matching inherited object properties take the default icon before the resolver sees them |
| Colour | Recognisable in light and dark themes |
| Folders, controls | Lucide, unchanged |
Filename or path, then basename, then FileTypeIcon, then SVG. No file reads, network, state, persistence, permissions or mutation. Attachment upload states, file cache, drafts, review state, and folder expansion, guides, search and opening are unaffected; existing labels and focus stay authoritative.
Sources compared
| Source | Finding |
|---|---|
| Installed Codex | Its file-tree assets for default files, Markdown and Python match Pierre's SVGs. OpenProgram takes the public upstream set and extracts nothing from the Codex distribution. |
| React Symbols | MIT React SVG library with file and extension resolution; not used |
| Material Icon Theme | File and folder SVGs with a manifest; needs asset integration rather than React rendering |
| Lucide alone | Generic outlines do not tell languages apart |
Acceptance
- Python, TypeScript, shell, JSON, Markdown and Git examples resolve to distinct SVGs.
CLAUDE.md,AGENTS.md, uppercase extensions, Windows paths and unknown types render correctly.- Every listed surface uses the shared renderer; expanding a folder and opening a file behave as before.
Implementation status
| Status | Items |
|---|---|
| Implemented | Every surface above. In the default dark App: filled generic files, green Markdown, orange JSON, purple database, unchanged Lucide folders. |
| Not yet | Manual light-theme and other-theme acceptance in the App; light colours are checked against the upstream palette only |
Last updated · 2026-11-25