From a61a96c6d72d4297b2539f4033fbfbd0a3d178ab Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Thu, 3 Sep 2026 01:37:35 -0400 Subject: Link blobs to their history and back Nothing in a commits payload says whether the path it lists is a file or a directory: currentBlobPath, despite the name, is only the path filter, and is set for a directory just the same. GitHub's own UI cannot tell either, and points its browse button at /blob// so that the redirect resolves a file to its blob. We do the same, and the blob route already turns that redirect into one of our own tree URLs. Breadcrumbs now stay in the view they were clicked from, so walking up from a history lands in the history of each parent directory rather than in its listing. The last crumb remains the page you are already on. A path with no commits now says so rather than rendering an empty page. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01R7pRKdmTvNDgT4ZXrwkbH8 --- cgithub/views/blob.eta | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cgithub/views/blob.eta') diff --git a/cgithub/views/blob.eta b/cgithub/views/blob.eta index be9a57e..2014b14 100644 --- a/cgithub/views/blob.eta +++ b/cgithub/views/blob.eta @@ -7,6 +7,9 @@
language: <%= it.language %>
<% } %>
<%= it.size %>
+
+ History +
View raw
-- cgit v1.3.1