TL;DR: I implemented internal file linking for the markdown preview (360fc9f). Now that I'm using it, I've changed my mind about how directory links specifically should behave: they should work like GitHub's folder view, not open the Mac Finder.
Backstory
When I built link support for the markdown preview, a link resolving to a directory (rather than a file) had no obvious in-app destination, so I made it reveal the folder in Finder. It seemed reasonable at the time, better than opening a dead tab.
But now that I'm using it day to day (in one of my repos, whose README links straight to each project's subfolder, e.g. [some-project](some-project/)), it feels wrong. GitHub renders a folder listing page for that same link. Termic instead punts out of the app entirely into Finder, which breaks the flow of reading a README, especially since other links in the same file (to actual files) open fine in a tab right there in the editor.
What I want instead
Directory links should do something GitHub-like, staying inside termic, not jumping to the OS file manager. The most natural fit is focusing/expanding the target directory in the sidebar file tree (switching workspace/member first if needed). Keep the Finder-reveal as a fallback only for paths the sidebar genuinely can't represent (e.g. outside the open workspace).
Where
src/components/workspace/MarkdownPreview.tsx — the is_dir branch in onClick (currently calls workspaceRevealPath)
- Sidebar/file-tree "reveal this path" API, whatever
FileTree/sidebar store exposes
Repro
- Open a repo's
README.md whose links point to a subfolder (trailing slash) in the markdown preview.
- Click one of those directory links.
- Finder opens instead of anything happening in termic.
TL;DR: I implemented internal file linking for the markdown preview (360fc9f). Now that I'm using it, I've changed my mind about how directory links specifically should behave: they should work like GitHub's folder view, not open the Mac Finder.
Backstory
When I built link support for the markdown preview, a link resolving to a directory (rather than a file) had no obvious in-app destination, so I made it reveal the folder in Finder. It seemed reasonable at the time, better than opening a dead tab.
But now that I'm using it day to day (in one of my repos, whose README links straight to each project's subfolder, e.g.
[some-project](some-project/)), it feels wrong. GitHub renders a folder listing page for that same link. Termic instead punts out of the app entirely into Finder, which breaks the flow of reading a README, especially since other links in the same file (to actual files) open fine in a tab right there in the editor.What I want instead
Directory links should do something GitHub-like, staying inside termic, not jumping to the OS file manager. The most natural fit is focusing/expanding the target directory in the sidebar file tree (switching workspace/member first if needed). Keep the Finder-reveal as a fallback only for paths the sidebar genuinely can't represent (e.g. outside the open workspace).
Where
src/components/workspace/MarkdownPreview.tsx— theis_dirbranch inonClick(currently callsworkspaceRevealPath)FileTree/sidebar store exposesRepro
README.mdwhose links point to a subfolder (trailing slash) in the markdown preview.