Add repositories page with filtering and navigation#136
Add repositories page with filtering and navigation#136premsathisha wants to merge 125 commits intostylessh:mainfrom
Conversation
Integrate ultracite as the Biome configuration preset across the monorepo, replacing manual biome.json configs with extends-based biome.jsonc files. Set up husky pre-commit hook with lint-staged to auto-fix staged files on commit.
…tylessh#9) - Create @quickhub/icons package wrapping @hugeicons/react with stable aliases - Add horizontal topbar with user avatar dropdown, nav tabs, and theme switcher - Establish layout shell: muted background surface with rounded content card - Add surface tokens (surface-0/1/2) for layered background levels - Tune typography: 13px body at weight 450, 500 for interactive elements - Configure dark mode with inverted surface hierarchy and elevated popovers - Update button, dropdown, and select components for consistent radius and transitions - Move dashboard route from /dashboard to / with protected layout wrapper
* Share local D1 state across worktrees * Only share local D1 state in worktrees
* Redesign overview page with metric cards and PR comment preview Rebuild the overview page with a contained max-w-3xl layout featuring Luma-style metric cards (open PRs, issues, review requests), a recent pull requests list with state-colored icons and inline comment preview, and a shared GitHub Flavored Markdown renderer in the UI package. * Extract PullRequestRow component and add custom scrollbar Move PullRequestRow into #/components/pulls/ for feature-based organization. Add custom scrollbar styles with stable gutter, thumb-only rendering, and auto-hide on inactivity. Add welcome header to overview. * Fix markdown images breaking inline flow in table cells
Build detail pages at /$owner/$repo/pull/$id and /$owner/$repo/issues/$id with two-column layout: content on the left (header, description, activity timeline with comments, comment box) and metadata sidebar on the right (reviewers, participants, assignees, milestones, details). PR view includes merge status card with CI checks, review state, branch status, and update branch action. Stacked participant avatars with tooltips. Smaller tooltip styling globally. Issue rows now link internally instead of to GitHub.
* Improve dashboard caching and preloading * Refine dashboard detail route loading
Configure remote D1 deployment
… polish (stylessh#24) - Add shiki-based syntax highlighting to markdown code blocks with custom Vercel light/dark themes, copy button, and React Suspense for flash-free rendering - Move issue labels to sidebar with theme-aware label pill styling - Add icons to PR detail sidebar rows (calendar, clock, message, file, commit) - Restructure PR header layout with copyable branch badges - Add diff boxes visualization to PR stats bar - Darken green-500 in light mode, switch to Geist Mono variable font
* Add PR review page with diff viewer, inline comments, and file tree Introduces a dedicated code review page at /$owner/$repo/review/$pullId powered by @pierre/diffs for syntax-highlighted diffs with multi-line comment support via gutter drag selection. Includes resizable file tree sidebar, review submission (Comment/Approve/Request Changes), and proper dark/light theme integration. * Fix CF Workers deployment: exclude shiki from server bundle Shiki's bundled language grammars (~1.5 MB) were being included in the server bundle via @pierre/diffs and markdown.tsx, pushing the worker over the 3 MiB free plan limit. - Add Vite plugin to stub shiki in SSR environment - Lazy-load PatchDiff component to avoid SSR import chain to shiki - Guard shiki highlighter initialization to client-only in markdown.tsx
* fix: hide merge section for users without merge permissions * feat: merge commit form, close/reopen PR, and reviewers empty state - Add inline commit message form when merging (title + extended description, pre-filled from first commit) - Add close/reopen PR button next to send in comment box - Add updatePullState server function - Pass commitTitle and commitMessage through to GitHub merge API - Add empty state in reviews section when no reviewers added - Style commit form with surface background to match other sections * fix: simplify merge bypass to rely on server-provided status Remove client-side guesswork from bypass logic. Now only uses server-derived isMergeBlocked, canBypassProtections, and hasConflicts. No auto-bypass — user must explicitly opt in. Bypass hidden for conflicts since GitHub rejects those regardless of permissions.
* feat: add inbox page for GitHub notifications Adds a split-view inbox page (Linear-style) with notification list sidebar and content preview pane that renders actual PR/Issue detail pages. - Notification list with unread/all filter, mark as read/done, archive actions - Avatar stack showing all participants (author, assignees, reviewers, commenters) - Subject state-aware icons and colors (open/closed/merged) - Prefetch next notification's data on selection for instant navigation - Fix closed PR merge status display in detail header and activity feed - Repo name in preview header links to repo overview - Hoisted regexes and memoized components for performance * fix: use typed route params for repo link in inbox preview header * feat: add unread notification dot to inbox tab and polish inbox list - Show blue dot on Inbox nav tab when unread notifications exist - Remove bottom border from last inbox list item
Render RepoActivityCards (Pull Requests, Issues, Discussions) into the SidePanelPortal on the pulls and issues list pages, matching the repo overview layout. Also ensure the "View all" link always appears in activity cards even when there are no open items.
- Add "Browser extension" card in settings that detects whether the DiffKit extension is installed and prompts to install if not - Guard dashboard-presence.js with an origin check so it only sets data-diffkit-extension on DiffKit origins (fixes Firefox injecting the script on all sites when broader host permissions are granted) - Update Firefox extension store URL to canonical /addon/diffkit/ path
* feat: add test script and CI check for pull requests Wire up `pnpm test` via Turborepo to run Vitest across all workspace packages, and add a required Test job to the PR checks workflow. https://claude.ai/code/session_01Tw4Aikrys2TqqyAmC9AEXe * fix: align github.server and github-cache tests with refactored source - Mock `@tanstack/react-start/server` in github-cache tests to avoid slow dynamic import that caused a timeout on the first test - Add `Octokit.defaults` to the octokit mock so installation client tests can call the static method - Mock `configureGitHubRequestPolicies` and update assertions to match the refactored code that delegates request policies instead of configuring throttle/retry inline https://claude.ai/code/session_01Tw4Aikrys2TqqyAmC9AEXe * chore: rename test CI check to "Test Suite" https://claude.ai/code/session_01Tw4Aikrys2TqqyAmC9AEXe --------- Co-authored-by: Claude <noreply@anthropic.com>
* Fix shortcut hints * Polish shortcut navigation * Remove PR screenshot assets --------- Co-authored-by: Prem Sathisha Etagi <premsathisha@users.noreply.github.com>
* feat: add drag-to-reorder tabs and "close merged" context menu option - Add native HTML drag-and-drop to reorder dashboard tabs, persisted to localStorage - Add "Close merged" context menu option with purple PR icon to bulk-close merged PR/review tabs - Track merged state on tabs via explicit `merged` field with iconColor fallback for existing tabs * fix: add merged field to useRegisterTab type signature
…lob/tree routes * feat: add file explorer with tree sidebar, syntax highlighting, and blob/tree routes Add a split-panel code explorer accessible from the repo overview file tree. Clicking any file or folder navigates to tree/blob routes matching GitHub's URL convention. The explorer features: - Resizable left sidebar with recursive file tree (lazy-loaded directories) - Folder view with commit messages and timestamps in the right pane - Shiki syntax-highlighted code viewer with line numbers, copy, and raw download - File-specific latest commit bar (fetches last commit affecting that file) - Progressive BFS prefetching of all tree nodes to eliminate loading spinners - Mobile drawer pattern for file tree (matches review page) - Ref parsing from splat URLs with longest-branch-match strategy * feat: shared file search, per-entry commits, image preview, and UI polish - Extract file search card into shared component for reuse across repo sidebar and PR review page - Add fuzzy file search library (fuzzy-file-search.ts) - Fetch per-entry last commit data in folder view and file tree (commit message + relative time) - Render image files (png, jpg, gif, etc.) as media preview instead of blob content - Add preview/code toggle for SVG files - Fix long-line background rendering by moving overflow to outer wrapper with sticky line numbers - Split directory node click: arrow toggles expand, name navigates to folder - Center README content with max-w-3xl and increased vertical padding - Use bg-surface-1 for latest commit bar - Align search card top padding with content pane - Add F shortcut to focus search in PR review page * perf: optimize re-renders and batch commit queries - Batch per-entry commit messages into a single GraphQL query with aliased history fields instead of N separate REST calls - Add explorer-path-store (useSyncExternalStore) so tree nodes subscribe to derived isActive booleans — only 2 nodes re-render on navigation - Memoize scope objects in route components to stop busting memo on every child - Prevent same-URL navigation on already-active tree nodes - Stabilize callbacks in RepoExplorerLayout (useCallback + imperative reads from store) - Isolate pathname subscription in dashboard-tabs via ScrollActiveTabIntoView renderless component - Fix branch switch in blob view navigating to tree route - Add light-mode border to branch selector button
* feat: filter private repos by GitHub App installation access Build a cached installation access index that tracks which repos/owners the GitHub App is installed for. Private repos are only shown if the owning account has an "all" installation or the specific repo is in the "selected" set. Public repos always pass through. - Add `installationAccess` signal key and cache policy (30 min stale) - Webhook events (installation, installation_repositories, github_app_authorization) invalidate the index immediately - `getInstallationAccessIndex` fetches installations and paginates selected repos, cached via getOrRevalidateGitHubResource - `isRepoVisibleWithInstallationAccess` filter utility (fail-open when no app is configured) - Apply filter in `getUserRepos` (parallel fetch with repo list) - Expose `getInstallationAccess` server function for other consumers - 7 new tests covering all filter scenarios * feat: extend installation access filtering to all GitHub data flows Add isPrivate to RepositoryRef and all GraphQL repository fragments so the installation access filter can be applied everywhere, not just getUserRepos. - Add isPrivate to RepositoryRef type and GitHubGraphQLRepositoryRef - Update buildRepositoryRef, parseRepositoryRef, mapGraphQLRepositoryRef - Add isPrivate to GraphQL fragments for pull search, issue search, pull detail, and issue detail queries - Add generic filterItemsByInstallationAccess helper and specialized filterMyPullsResult / filterMyIssuesResult wrappers - Apply filter in getMyPulls, getMyIssues (parallel fetch with result) - Apply filter in searchCommandPaletteGitHub (parallel with search) - Apply filter in getNotifications (parallel with notification fetch) - Apply filter in getUserPinnedRepos * chore: add debug logs throughout installation access filtering Add debug() calls so the access index building and filtering behavior is fully observable in local dev: - Log when fetching the index (cache miss vs resolved from cache) - Log each installation's access mode (all/selected/suspended) - Log the full built index (owners, repos, counts) - Log whenever items are filtered out, with repo names and counts (getUserRepos, getMyPulls, getMyIssues, command palette, notifications, pinned repos) * feat: refresh installation access cache when returning from GitHub Add visibilitychange listener to /setup page and access dialog that busts the server-side installation access cache and invalidates all GitHub queries when the user returns from configuring permissions. * fix: address review feedback on installation access filtering - Paginate GET /user/installations (handles >100 installations) - Let transient API errors propagate instead of silently failing open - Use app-user client (not OAuth) for listInstallationReposForAuthenticatedUser - Default unknown repo visibility to null instead of false (public), so REST search results are checked against the access index - Wrap refreshInstallationAccess in try/finally so client-side cache invalidation runs even if the server call fails
…elect * feat: add open current page on github shortcut and command to cmd+k select * chore: reconsidered ui change * feat: Do not apply extension redirects for certain referers.
|
good start, i will take this as base and do some tweaks |
* feat: persist selected clone protocol in code explorer * apply suggestion
|
Awesome, happy to help! |
a15d2b4 to
57c6538
Compare
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughAdds a Repositories page with list/filter UI, commit-sparkline charts, repo data fetching/pagination, new route and navigation entries, icon updates, and supporting cache/query utilities. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Browser as Browser/Router
participant Loader as Route Loader
participant Cache as Query Cache
participant API as GitHub API
participant UI as RepositoriesPage
User->>Browser: Navigate to /repos
Browser->>Loader: run loader (read cookie, prefetch hub + user repos)
Loader->>Cache: request repos hub / user repos
alt Cache miss
Cache->>API: fetch paginated repos & participation
API-->>Cache: return repo list / participation stats
end
Loader->>UI: render RepositoriesPage with prefetched data
UI->>UI: init filters, debounce search
UI->>Cache: query repoParticipation per-visible repo (on view / lazy)
Cache->>API: getParticipationStats(owner,repo)
API-->>Cache: weeklyCommits[]
Cache-->>UI: sparkline data → RepoCommitSparkline renders AreaChart
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
|
I also fixed the merge conflicts on this branch so it is up to date with main. |
… link, custom star icon - Table-style repo rows, visibility icons, recharts activity chart - GitHub participation stats API + caching; inactive styling when no commits - Move Repositories from topbar tabs into user menu - Custom Lucide-style StarIcon; SquareLock02 for private
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
apps/dashboard/src/components/layouts/dashboard-topbar.tsx (1)
288-293: Add visible shortcut hint for consistency with adjacent nav items.Line 288 introduces a good new entry, but unlike “Profile”/“Settings” it doesn’t show its key chord (
G,O) in-menu.💡 Suggested tweak
<DropdownMenuItem asChild> <Link to="/repos"> <FolderLibraryIcon size={16} strokeWidth={2} /> Repositories + <DropdownMenuShortcut keys={["G", "O"]} /> </Link> </DropdownMenuItem>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/dashboard/src/components/layouts/dashboard-topbar.tsx` around lines 288 - 293, The new DropdownMenuItem for the Repositories entry is missing the visible shortcut hint shown on adjacent items; update the DropdownMenuItem (the one wrapping Link to "/repos" with FolderLibraryIcon) to include the same shortcut element/markup used by “Profile”/“Settings” (the small right-aligned key-chord display, e.g. the same <kbd> or span element and classes used there showing "G", "O") so the Repositories item renders the same key-chord hint for consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/dashboard/src/components/repo/repository-row.tsx`:
- Around line 133-137: RepositoryRow currently mounts RepoCommitSparkline for
every row which triggers a separate participation fetch per repo; instead either
(A) include participation stats in the repo list payload and change
RepositoryList/loader to populate each repo object with a participation field
and pass that into RepoCommitSparkline (look for RepositoryRow and
RepoCommitSparkline props) or (B) lazy-mount/fetch sparkline only when the row
is visible by adding an IntersectionObserver in RepositoryRow that only renders
RepoCommitSparkline (or triggers a batched fetch) once the row becomes visible;
update the relevant prop names (e.g., repo.participation or a visible boolean)
and corresponding data-fetching code so sparklines no longer cause N additional
GitHub requests on initial render.
In `@apps/dashboard/src/lib/github.functions.ts`:
- Around line 4866-4898: The mapping inside getCachedPaginatedGitHubRequest is
dropping fork counts: update the mapData mapping for AuthenticatedUserRepo ->
UserRepoSummary to include repo.forks_count (e.g., add a forks or forkCount
field on UserRepoSummary and set it from repo.forks_count in the mapData
callback), ensure the UserRepoSummary type/interface definition includes this
new field, and then surface that field in the repo row UI logic so the new
repositories page can render or hide forks as intended.
- Around line 7070-7088: The 202 branch currently treats "Accepted" like 404/403
and returns an empty weeklyCommits that gets cached; change the handling so that
when error.status === 202 you do NOT return a cached empty result—either enqueue
a short retry with backoff or return a response that bypasses normal caching
(e.g., set metadata to indicate no-cache / zero freshness) so the client will
retry later; update the conditional block that checks error instanceof
RequestError and error.status to separate the 202 case from 404/403, and use
createGitHubResponseMetadata and normalizeResponseHeaders to produce a metadata
entry that prevents the one-hour repoParticipation cache for 202 responses (or
trigger a retry mechanism) rather than returning { weeklyCommits: [] }.
- Around line 1888-1909: The repo-check is using the wrong Octokit client:
update appInstallationHasRepositoryAccess to call
listInstallationReposForAuthenticatedUser via the GitHub App user client
(appUserOctokit) rather than context.octokit, and make the same change in the
other occurrence that uses listInstallationReposForAuthenticatedUser (the
similar repo-listing call near the other selected-installation check); ensure
you obtain or pass the appUserOctokit instance the same way the file does at the
documented usage and replace context.octokit with appUserOctokit for those calls
so the user-to-server token is used.
---
Nitpick comments:
In `@apps/dashboard/src/components/layouts/dashboard-topbar.tsx`:
- Around line 288-293: The new DropdownMenuItem for the Repositories entry is
missing the visible shortcut hint shown on adjacent items; update the
DropdownMenuItem (the one wrapping Link to "/repos" with FolderLibraryIcon) to
include the same shortcut element/markup used by “Profile”/“Settings” (the small
right-aligned key-chord display, e.g. the same <kbd> or span element and classes
used there showing "G", "O") so the Repositories item renders the same key-chord
hint for consistency.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: af24fe1e-2b6d-45a4-abce-992aa6dac234
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (17)
apps/dashboard/package.jsonapps/dashboard/src/components/filters/filter-bar.tsxapps/dashboard/src/components/filters/index.tsapps/dashboard/src/components/layouts/dashboard-mobile-nav.tsxapps/dashboard/src/components/layouts/dashboard-topbar.tsxapps/dashboard/src/components/repo/repo-commit-sparkline.tsxapps/dashboard/src/components/repo/repository-row.tsxapps/dashboard/src/lib/command-palette/registry.tsapps/dashboard/src/lib/github-cache-policy.tsapps/dashboard/src/lib/github.functions.tsapps/dashboard/src/lib/github.query.tsapps/dashboard/src/lib/github.types.tsapps/dashboard/src/routeTree.gen.tsapps/dashboard/src/routes/_protected/repos.tsxapps/dashboard/src/routes/_protected/settings/shortcuts.tsxpackages/icons/src/index.tspackages/icons/src/star-icon.tsx
- Full install-filtered hub + filter/sort; repo-list-page + repos-hub-filter - Repos route: validateSearch page, prefetch aligned with cookie+page, debounced search - Profile owner: tab/repos hub, load more, layout tweaks - Replace LoaderCircleIcon with @diffkit/ui Spinner in dashboard loading + setup - Nav/palette: ArchiveIcon for repositories; tabs tweak
…en, shortcut) - Lazy-mount RepoCommitSparkline per row via IntersectionObserver - Map forks_count to UserRepoSummary; show fork count in repo row meta - Participation stats: retry on HTTP 202 before failing; do not cache empty as final 202 - appInstallationHasRepositoryAccess: list installation repos with app user Octokit - Repos dropdown: show G O shortcut like Profile/Settings

Summary
This PR adds a dedicated Repositories section to DiffKit:
G then Oshortcut.Why
Note
Validation
pnpm --filter @diffkit/dashboard checkpnpm --filter @diffkit/dashboard check-typespnpm --filter @diffkit/dashboard buildSummary by CodeRabbit
New Features
Chores