Improve search preload and cache reliability#134
Improve search preload and cache reliability#134premsathisha wants to merge 126 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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds numeric ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 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)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/filters/use-list-filters.ts`:
- Around line 246-265: The current filter branch for isHashNumberQuery is
exclusive and treats a bare "#" as matching everything; change it so
ticket-number matching is additive to the normal text checks: inside the
result.filter where isHashNumberQuery is used, only treat it as a ticket-number
check when normalizedNumberQuery is non-empty and isNumericQuery is true,
otherwise fall back to the same text checks used in the else branch; when
normalizedNumberQuery is present, return true if either the text checks
(item.title, item.repository.fullName, item.author?.login) match OR the number
check (typeof item.number === "number" &&
String(item.number).startsWith(normalizedNumberQuery)) matches so ticket
searches are additive rather than exclusive.
In `@apps/dashboard/src/components/issues/issue-row.tsx`:
- Around line 27-29: The preloadDetail handler currently discards the promise
from preloadRouteOnce(router, href) causing potential unhandled rejections;
update preloadDetail to explicitly handle errors from preloadRouteOnce(router,
href) (either by making preloadDetail async and using try/catch around await
preloadRouteOnce(...) or by attaching .catch(...) to the returned promise) and
surface the error (e.g., console.error or the app logger) so loader/network
failures are not left unhandled.
In `@apps/dashboard/src/lib/query-client.tsx`:
- Around line 212-218: When localStorage.setItem in the persistence block fails,
remove the stale entry under GITHUB_QUERY_CACHE_STORAGE_KEY before disabling
persistence so old cache won't be rehydrated; update the catch in the same block
(where persistenceDisabled is set) to perform a best-effort
window.localStorage.removeItem(GITHUB_QUERY_CACHE_STORAGE_KEY) (silently ignore
errors) and then set persistenceDisabled = true so the code in this module
(query-client.tsx) no longer persists or rehydrates the stale payload.
In `@apps/dashboard/src/lib/use-github-signal-stream.ts`:
- Around line 83-107: getLatestLocalDataTimestampForSignal currently returns the
max dataUpdatedAt across targets which hides stale targets; change it to detect
"any stale target" instead: update getLatestLocalDataTimestampForSignal to
iterate matching targets and return a boolean (e.g., hasAnyStaleLocalData) that
is true if any target has no queryState or queryState.dataUpdatedAt <
signal.updatedAt, and false otherwise, then update callers that used the
timestamp to use this boolean to add updatedKeys when any target is stale; apply
the same change to the other identical block referenced in the comment.
🪄 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: dea214d0-6c7a-4d74-b5de-a564d8d495e3
📒 Files selected for processing (4)
apps/dashboard/src/components/filters/use-list-filters.tsapps/dashboard/src/components/issues/issue-row.tsxapps/dashboard/src/lib/query-client.tsxapps/dashboard/src/lib/use-github-signal-stream.ts
|
some items are being duplicated on search. |
* feat: persist selected clone protocol in code explorer * apply suggestion
Fixed now |
Summary
This PR improves DiffKit search, issue navigation preload, and local GitHub cache reliability:
124and#124can find matching issue or pull request rows.Why
Validation
pnpm --filter @diffkit/dashboard checkpnpm --filter @diffkit/dashboard check-typespnpm --filter @diffkit/dashboard buildSummary by CodeRabbit
New Features
#123) and improved deduplication of search results before sorting.Bug Fixes
Style