feat: enhance UI and add GitLab + Bitbucket platform integrations#29
Open
DealPatrol wants to merge 9 commits into
Open
feat: enhance UI and add GitLab + Bitbucket platform integrations#29DealPatrol wants to merge 9 commits into
DealPatrol wants to merge 9 commits into
Conversation
- Landing page: add multi-platform sign-in CTAs (GitHub, GitLab, Bitbucket),
platform logo strip, platform deep-dive section, and improved footer with links
- Repositories page: replace single-platform view with tabbed UI supporting
GitHub, GitLab, and Bitbucket simultaneously; green dot indicates connected
platforms; import button aggregates selections across all tabs
- Dashboard header: add mobile hamburger menu with full-screen drawer nav
- lib/platform-config.ts: add Bitbucket platform, add color field to all platforms
- app/api/auth/gitlab/{login,callback}: GitLab OAuth 2.0 flow with state cookie
- app/api/auth/bitbucket/{login,callback}: Bitbucket OAuth 2.0 with HTTP Basic Auth
- app/api/gitlab/repos: paginated GitLab project listing via access token cookie
- app/api/bitbucket/repos: paginated Bitbucket repository listing via access token cookie
To activate GitLab: set GITLAB_CLIENT_ID + GITLAB_CLIENT_SECRET env vars.
To activate Bitbucket: set BITBUCKET_CLIENT_ID + BITBUCKET_CLIENT_SECRET env vars.
https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
… platform IDs 'replit' and 'netlify' that don't exist in the PLATFORMS type union, causing a type mismatch and build failure.
This commit fixes the issue reported at components/platform-selector.tsx:73
## Bug Explanation
The `platform-selector.tsx` component was referencing platform IDs ('replit' and 'netlify') that don't exist in the `PLATFORMS` configuration defined in `lib/platform-config.ts`.
The `PLATFORMS` config defines four platforms: `github`, `gitlab`, `bitbucket`, and `vercel`. However, the component:
1. Had `platformIcons` with entries for `replit` and `netlify` (which don't exist)
2. Was missing an entry for `bitbucket` (which does exist)
3. Had conditional rendering checks comparing `platform.id` against 'replit' and 'netlify', which are not valid values in the type union `'"github" | "vercel" | "gitlab" | "bitbucket"'`
This caused a TypeScript error at compile time:
```
Type error: This comparison appears to be unintentional because the types '"github" | "vercel" | "gitlab" | "bitbucket"' and '"replit"' have no overlap.
```
## Fix Applied
1. **Removed invalid platform icons**: Removed `replit: Code2` and `netlify: Zap` from the `platformIcons` record
2. **Added missing platform icon**: Added `bitbucket: GitBranch` to the `platformIcons` record
3. **Fixed conditional rendering**: Replaced the invalid `replit` and `netlify` comparisons with a valid `bitbucket` comparison
4. **Cleaned up unused import**: Removed the unused `Code2` import from lucide-react
The build now completes successfully with no TypeScript errors.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: DealPatrol <colecollins763@gmail.com>
- package.json: "name": "repofuse" - app/layout.tsx: updated title, description, and metadataBase to repofuse.com - app/page.tsx: all brand name references updated - app/pricing/page.tsx: header logo text updated - app/api/export/pdf/route.ts: footer attribution updated - app/api/repositories/route.ts: User-Agent header updated - app/api/gitlab/repos/route.ts: User-Agent header updated - app/api/bitbucket/repos/route.ts: User-Agent header updated - components/dashboard-header.tsx: wordmark updated - components/repositories-list.tsx: copy updated - components/repository-selector.tsx: copy updated - components/platform-selector.tsx: copy updated - lib/auth.ts: User-Agent header updated - lib/github.ts: User-Agent header updated - lib/init-demo.ts: description and error log prefix updated https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
1. app/page.tsx — add missing ERROR_MESSAGES for gitlab_oauth_not_configured, bitbucket_oauth_not_configured, gitlab_oauth_failed, bitbucket_oauth_failed, and update generic messages to be platform-agnostic 2. api/auth/gitlab/login + api/auth/bitbucket/login — accept ?from=dashboard query param; store it in a cookie so the callback knows where to redirect errors (dashboard repos page instead of the home page) 3. api/auth/gitlab/callback + api/auth/bitbucket/callback — read the gitlab_oauth_from / bitbucket_oauth_from cookie and redirect error responses to the correct page; clear the from cookie after use 4. api/repositories/route.ts — fix URL parser to handle GitLab (gitlab.com) and Bitbucket (bitbucket.org) URLs in addition to GitHub; fetches public repo metadata from each platform's API; uses stable negative integer IDs for non-GitHub repos to satisfy the github_id UNIQUE constraint without conflicts 5. components/repositories-list.tsx — add PLATFORM_ERROR_MESSAGES map so OAuth error codes from query params render as human-readable text; update Connect buttons to pass ?from=dashboard so errors return to the dashboard https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
Documents GITLAB_CLIENT_ID, GITLAB_CLIENT_SECRET, BITBUCKET_CLIENT_ID, BITBUCKET_CLIENT_SECRET with step-by-step setup instructions for each platform's OAuth app/consumer registration. Also updates NEXT_PUBLIC_APP_URL to repofuse.com and cleans up the full env template. https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
- app/page.tsx: remove Bitbucket button, icon, platform strip entry, deep-dive card, footer link, and error messages; update copy to mention GitHub and GitLab only - components/repositories-list.tsx: remove Bitbucket tab, state slices, imports, icon component, and all copy references - lib/platform-config.ts: remove BITBUCKET platform entry - .env.example: remove Bitbucket OAuth variables API routes (auth/bitbucket, api/bitbucket) kept in place but no longer surfaced in the UI. https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
… routes - Deleted 5 unused components: platform-selector, repo-picker, repository-selector, code-intelligence-dashboard, app-suggestions - Deleted duplicate hook files in components/ui/ (canonical versions live in hooks/) - Deleted lib/init-demo.ts (never imported) - Deleted app/api/auth/debug/route.ts (temp debug endpoint) - Deleted app/api/auth/connect-platform/route.ts (legacy, superseded by per-provider OAuth routes) https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
- Enforce monthly analysis limits per plan before running analysis (free = 3/month, pro = unlimited); return 403 with upgrade prompt - Increment analyses_used_this_month when a run actually starts - Detect subscription renewals in webhook (new period_end > stored) and reset monthly usage counter automatically - Add upgrade success banner on /dashboard after checkout completes (reads ?upgraded=true, cleans URL, dismissible) - Fix pricing page: logged-in users get a direct checkout button; non-logged-in users see "Sign in to Upgrade" → GitHub OAuth https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR
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.
platform logo strip, platform deep-dive section, and improved footer with links
GitHub, GitLab, and Bitbucket simultaneously; green dot indicates connected
platforms; import button aggregates selections across all tabs
To activate GitLab: set GITLAB_CLIENT_ID + GITLAB_CLIENT_SECRET env vars.
To activate Bitbucket: set BITBUCKET_CLIENT_ID + BITBUCKET_CLIENT_SECRET env vars.
https://claude.ai/code/session_01X3LqF9XU1ccQbcrReQzEtR