Vibe-code an arguably better user interface#1
Merged
casperdcl merged 9 commits intoraw-content:mainfrom Apr 5, 2026
Merged
Conversation
Check response.ok on all fetch calls, show user-friendly error messages for 404 (not found), 403 (rate limited), and missing paths. Also adds basic CSS styling and file/folder icons to the listing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes "Cannot read properties of undefined (reading 'map')" when the URL targets a file like README.md — now redirects to the raw GitHub URL instead of trying to list it as a directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Splitting "owner/repo/main/" produces an empty string at the end, causing traverse to fail with "Path not found: ". Fix by filtering out empty segments after split. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Handle 404 errors and add basic CSS
- Primer color palette with full dark mode support (prefers-color-scheme) - System font stack, Octicon SVGs for file/folder icons - Bordered listing with hover rows, matching GitHub's file browser - Interactive breadcrumb: owner and repo link to GitHub, path segments navigate within the app - Landing page with usage hint when no query string provided - Spinner loading state, sorted listing (directories first) - Handle 404s, rate limits, missing paths, and file-path redirects - XSS-safe: all user content HTML-escaped via esc() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split the breadcrumb into two distinct zones: - Repo header (owner / repo): immutable, links to GitHub, larger text with the repo name in bold - Toolbar: branch dropdown button + path breadcrumb on a subtle background, visually connected to the listing below The branch selector is a dropdown that lazy-loads branches from the GitHub API on first click, highlights the active branch with a checkmark, and navigates to the selected branch preserving the current path. Uses Octicon SVGs for the git-branch and chevron icons. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the user selects a different branch from the dropdown, the current path may not exist in the new branch. Instead of navigating blindly and showing a "Path not found" error, we now walk the tree in the target branch and resolve the deepest valid prefix of the current path. For example, if the user is at src/lib/old-module and switches to a branch where src/lib exists but old-module doesn't, they land at src/lib. If src doesn't exist either, they land at the branch root. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When clicking a file, its content is now fetched and displayed inside the listing area with line numbers (sticky on horizontal scroll) and a "Raw" button linking to the raw.githubusercontent.com URL. - Text files: rendered in a monospace pre block with line count and byte size in the header - Images (png, jpg, gif, svg, webp, etc.): rendered as an img tag - Binary files (zip, pdf, exe, etc.): show a download prompt - File links in directory listings now use app URLs so the breadcrumb, branch selector, and back navigation all work seamlessly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redesign with Primer tokens and functional styling
casperdcl
reviewed
Apr 5, 2026
Member
casperdcl
left a comment
There was a problem hiding this comment.
nice; though I have a slight preference for spinning off the css & svg into separate files :)
Contributor
Author
|
@casperdcl, what happened to #2? 😇 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.