Skip to content

refactor(web): remove domain param from getBrowsePath, use SINGLE_TENANT_ORG_DOMAIN internally#1074

Merged
brendan-kellam merged 1 commit intomainfrom
bkellam/remove-org-domain
Apr 2, 2026
Merged

refactor(web): remove domain param from getBrowsePath, use SINGLE_TENANT_ORG_DOMAIN internally#1074
brendan-kellam merged 1 commit intomainfrom
bkellam/remove-org-domain

Conversation

@brendan-kellam
Copy link
Copy Markdown
Contributor

@brendan-kellam brendan-kellam commented Apr 2, 2026

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Summary by CodeRabbit

  • Refactor
    • Simplified domain handling by centralizing to a single organization domain throughout the application. URLs and navigation paths are now constructed using a unified domain configuration instead of being passed as parameters across multiple components.

…ANT_ORG_DOMAIN internally

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

@brendan-kellam your pull request is missing a changelog!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3bc1ec30-56f5-4419-9440-9112a4d7ca6a

📥 Commits

Reviewing files that changed from the base of the PR and between 7da5d55 and e2bec0d.

📒 Files selected for processing (18)
  • packages/web/src/actions.ts
  • packages/web/src/app/[domain]/browse/[...path]/components/pureTreePreviewPanel.tsx
  • packages/web/src/app/[domain]/browse/components/pureFileTreePanel.tsx
  • packages/web/src/app/[domain]/browse/hooks/useBrowseNavigation.ts
  • packages/web/src/app/[domain]/browse/hooks/utils.ts
  • packages/web/src/app/[domain]/components/pathHeader.tsx
  • packages/web/src/app/[domain]/repos/components/reposTable.tsx
  • packages/web/src/app/[domain]/search/components/searchResultsPanel/fileMatch.tsx
  • packages/web/src/app/api/(server)/repos/listReposApi.ts
  • packages/web/src/ee/features/codeNav/components/exploreMenu/referenceList.tsx
  • packages/web/src/features/chat/components/chatThread/tools/fileRow.tsx
  • packages/web/src/features/chat/components/chatThread/tools/listTreeToolComponent.tsx
  • packages/web/src/features/chat/components/chatThread/tools/readFileToolComponent.tsx
  • packages/web/src/features/chat/components/chatThread/tools/repoBadge.tsx
  • packages/web/src/features/chat/components/chatThread/tools/repoHeader.tsx
  • packages/web/src/features/chat/utils.ts
  • packages/web/src/features/git/getFileSourceApi.ts
  • packages/web/src/features/search/zoektSearcher.ts

Walkthrough

This pull request systematically removes the domain parameter from browse path construction throughout the codebase. The getBrowsePath function is refactored to derive the domain internally from SINGLE_TENANT_ORG_DOMAIN instead of accepting it as an external input. All components and utilities that invoke getBrowsePath are updated to remove the domain argument from their calls.

Changes

Cohort / File(s) Summary
Core Browse Path Utilities
packages/web/src/app/[domain]/browse/hooks/utils.ts, packages/web/src/app/[domain]/browse/hooks/useBrowseNavigation.ts
Removed domain property from GetBrowsePathProps interface. getBrowsePath now derives domain from SINGLE_TENANT_ORG_DOMAIN constant. Updated useBrowseNavigation to require callers to provide domain in props instead of deriving it internally.
Browse & Path UI Components
packages/web/src/app/[domain]/browse/components/pureFileTreePanel.tsx, packages/web/src/app/[domain]/browse/[...path]/components/pureTreePreviewPanel.tsx, packages/web/src/app/[domain]/components/pathHeader.tsx
Removed useDomain hook usage and eliminated domain parameter from getBrowsePath calls in file tree and path header components.
Repository & Search Display Components
packages/web/src/app/[domain]/repos/components/reposTable.tsx, packages/web/src/app/[domain]/search/components/searchResultsPanel/fileMatch.tsx
Removed domain argument from getBrowsePath invocations in repository link and search result link construction.
API & Server-Side Builders
packages/web/src/actions.ts, packages/web/src/app/api/(server)/repos/listReposApi.ts
Removed domain: org.domain field from RepositoryQuery and getBrowsePath calls that build API response URLs.
Chat Tool Components
packages/web/src/features/chat/components/chatThread/tools/fileRow.tsx, packages/web/src/features/chat/components/chatThread/tools/listTreeToolComponent.tsx, packages/web/src/features/chat/components/chatThread/tools/readFileToolComponent.tsx, packages/web/src/features/chat/components/chatThread/tools/repoBadge.tsx, packages/web/src/features/chat/components/chatThread/tools/repoHeader.tsx
Removed SINGLE_TENANT_ORG_DOMAIN imports and stopped passing domain to getBrowsePath in chat tool link generation.
Code Navigation & Search Utilities
packages/web/src/ee/features/codeNav/components/exploreMenu/referenceList.tsx, packages/web/src/features/chat/utils.ts, packages/web/src/features/git/getFileSourceApi.ts, packages/web/src/features/search/zoektSearcher.ts
Removed SINGLE_TENANT_ORG_DOMAIN dependencies and domain parameters from getBrowsePath calls in reference lists, chat utilities, and search response transformations.

Possibly related PRs

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ 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 bkellam/remove-org-domain

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@brendan-kellam brendan-kellam merged commit 81419b2 into main Apr 2, 2026
7 of 8 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/remove-org-domain branch April 2, 2026 03:06
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