Skip to content

feat(integrations): searchable lazy-loaded repo and channel pickers - #73

Merged
pulkitxm merged 4 commits into
mainfrom
feat/integration-pickers
Jul 24, 2026
Merged

pulkitxm merged 4 commits into
mainfrom
feat/integration-pickers

Conversation

@pulkitxm

Copy link
Copy Markdown
Member

Replace the flat repo/channel lists with a searchable, lazy-loaded picker so GitHub repositories and Slack channels can be endless and mapped to a team from one place.

Verification

lint + comment policy         pass
typecheck (all 8 packages)    pass
web full suite                510 pass, 0 fail (+6 vs main, 0 regressions)
services GitHub pagination    pass

Backend adds cursor-paged GitHub repo listing plus GET /api/integrations/github/repositories and /api/integrations/slack/channels; the client uses TanStack Query infinite scroll and the settings loader no longer blocks on GitHub or Slack to render.

pulkitxm added 3 commits July 24, 2026 19:00
Add cursor-based GitHub repository paging in the github service and two
GET endpoints, /api/integrations/github/repositories and
/api/integrations/slack/channels, that return a page plus the next
cursor so the settings UI can lazy-load endless lists instead of
fetching everything on render.
Replace the flat, all-at-once repository and channel lists with a
search palette. Linked items stay compact on the card; a picker dialog
lazy-loads pages via TanStack Query infinite scroll, filters as you
type, and assigns the selection to a team. Drops the blocking discovery
from the settings loader so the page no longer waits on GitHub or Slack
to render.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulkitxm has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds paginated GitHub and Slack discovery APIs, a shared searchable integration picker, and picker-based repository/channel linking. Settings data now loads persisted linked entities, with updated panel integration and tests.

Changes

Integration picker flow

Layer / File(s) Summary
Paginated discovery APIs
packages/services/src/github/app.ts, packages/services/src/github/app.test.ts, apps/web/src/app/api/integrations/github/repositories/route.ts, apps/web/src/app/api/integrations/slack/channels/route.ts
GitHub repository pagination and Slack channel listing routes provide authorized cursor-based results, with GitHub pagination normalization and tests.
Client paginated fetching
apps/web/src/features/settings/use-integration-lists.ts
Zod-validated infinite-query hooks fetch and paginate repositories and channels.
Shared integration picker
apps/web/src/features/settings/integration-picker.tsx, apps/web/src/features/settings/integration-picker.test.tsx
The picker supports search, selection, linked-item disabling, team or workspace targeting, submission, loading states, and pagination.
Persisted settings and panel wiring
apps/web/src/features/settings/integrations-data.ts, apps/web/src/features/settings/integrations-panel.tsx, apps/web/src/features/settings/integrations-panel.test.tsx
Settings loads persisted linked entities, while GitHub and Slack sections use picker-based linking and retain unlink or disconnect actions.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  actor Admin
  participant IntegrationsPanel
  participant IntegrationPicker
  participant DiscoveryAPI
  participant IntegrationService

  Admin->>IntegrationsPanel: Open repository or channel picker
  IntegrationsPanel->>IntegrationPicker: Render searchable picker
  IntegrationPicker->>DiscoveryAPI: Fetch paginated items
  DiscoveryAPI->>IntegrationService: Query GitHub or Slack
  IntegrationService-->>DiscoveryAPI: Return items and cursor
  DiscoveryAPI-->>IntegrationPicker: Return validated page
  Admin->>IntegrationPicker: Select item and team
  IntegrationPicker-->>IntegrationsPanel: Submit selected item and team
Loading

Possibly related PRs

  • Noveum/orbit#5: Adds Slack conversation pagination used by the new Slack channels discovery route.
  • Noveum/orbit#36: Refactors the integration panel toward picker-backed GitHub and Slack management flows.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the new searchable, lazy-loaded repo and channel picker flow.
Description check ✅ Passed It directly describes the picker, pagination, backend endpoints, and settings changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/integration-pickers

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulkitxm has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
apps/web/src/features/settings/integration-picker.tsx (2)

108-110: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the shared interaction helper for row hover instead of a raw hover:* class.

The selectable row applies hover:bg-surface-2 directly. Prefer the centralized hover/focus helpers from apps/web/src/lib/interaction.ts (e.g. cardHover/surfaceHover) so hover background transitions stay consistent with the shared duration/easing tokens and respect prefers-reduced-motion.

Based on learnings: selectable card/row border/background hover behavior should use the shared interaction helpers (cardHover/surfaceHover) rather than raw Tailwind hover:* classes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/features/settings/integration-picker.tsx` around lines 108 -
110, Update the selectable row class in the integration picker to use the shared
cardHover or surfaceHover helper from interaction.ts instead of the raw
hover:bg-surface-2 utility, while preserving the existing selected, linked,
disabled, and border styling.

Source: Learnings


62-67: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Optional: reset teamId when the dialog closes.

The close effect clears search, selectedId, and submitting, but a previously chosen teamId persists across open/close cycles, so reopening pre-selects the last team rather than the default. Consider resetting it here for a consistent initial state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/features/settings/integration-picker.tsx` around lines 62 - 67,
Update the close-handling useEffect to also reset teamId when the dialog is
closed, alongside search, selectedId, and submitting, so each reopening starts
with the default team selection.
apps/web/src/features/settings/integrations-panel.tsx (1)

198-210: 🎯 Functional Correctness | 🔵 Trivial | ⚖️ Poor tradeoff

Optional: search only matches already-loaded pages.

IntegrationPicker filters items client-side, and the discovery APIs take no search term, so typing a query only matches repositories/channels already paged in. For large installations, a match on a not-yet-fetched page won't appear until the user scrolls/loads more. If server-side search is intended per the PR summary, consider forwarding the search term to the endpoint; otherwise this is an acceptable known limitation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/features/settings/integrations-panel.tsx` around lines 198 -
210, Update the repository search flow around useRepositorySearch and
IntegrationPicker so the active search term is forwarded to the discovery
endpoint and results are filtered server-side rather than only across query.data
pages already loaded. Preserve the existing linkedIds and PickerItem mapping
behavior for returned repositories; if server-side search is not supported,
explicitly retain this as a documented limitation instead of changing unrelated
pagination logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/web/src/features/settings/integration-picker.tsx`:
- Around line 108-110: Update the selectable row class in the integration picker
to use the shared cardHover or surfaceHover helper from interaction.ts instead
of the raw hover:bg-surface-2 utility, while preserving the existing selected,
linked, disabled, and border styling.
- Around line 62-67: Update the close-handling useEffect to also reset teamId
when the dialog is closed, alongside search, selectedId, and submitting, so each
reopening starts with the default team selection.

In `@apps/web/src/features/settings/integrations-panel.tsx`:
- Around line 198-210: Update the repository search flow around
useRepositorySearch and IntegrationPicker so the active search term is forwarded
to the discovery endpoint and results are filtered server-side rather than only
across query.data pages already loaded. Preserve the existing linkedIds and
PickerItem mapping behavior for returned repositories; if server-side search is
not supported, explicitly retain this as a documented limitation instead of
changing unrelated pagination logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1d5cc526-daa5-4426-b5a4-3507ac39eeff

📥 Commits

Reviewing files that changed from the base of the PR and between ceb0f05 and 9c2f359.

📒 Files selected for processing (10)
  • apps/web/src/app/api/integrations/github/repositories/route.ts
  • apps/web/src/app/api/integrations/slack/channels/route.ts
  • apps/web/src/features/settings/integration-picker.test.tsx
  • apps/web/src/features/settings/integration-picker.tsx
  • apps/web/src/features/settings/integrations-data.ts
  • apps/web/src/features/settings/integrations-panel.test.tsx
  • apps/web/src/features/settings/integrations-panel.tsx
  • apps/web/src/features/settings/use-integration-lists.ts
  • packages/services/src/github/app.test.ts
  • packages/services/src/github/app.ts

@pulkitxm
pulkitxm merged commit 96ce943 into main Jul 24, 2026
5 checks passed
@pulkitxm
pulkitxm deleted the feat/integration-pickers branch July 24, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant