Skip to content

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Jan 27, 2026

Fixes #796

Summary by CodeRabbit

  • Bug Fixes

    • Fixed an issue where loading a file from the search view would fail when the file matched multiple branches.
  • Refactor

    • Updated internal component logic to improve handling of file references across multiple branches, improving reliability of file loading in search scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Adds an optional revisionName prop to PathHeader and updates call sites to pass revisionName instead of branchDisplayName; branchDisplayName now defaults to revisionName when not provided. Also adds a changelog "Fixed" entry for a search-related file-loading bug.

Changes

Cohort / File(s) Summary
Core Component Update
packages/web/src/app/[domain]/components/pathHeader.tsx
Adds revisionName?: string to FileHeaderProps; branchDisplayName defaults to revisionName when absent; internal path-building now accepts revisionName.
Browse Components
packages/web/src/app/[domain]/browse/[...path]/components/codePreviewPanel.tsx, packages/web/src/app/[domain]/browse/[...path]/components/treePreviewPanel.tsx
Replace branchDisplayName prop usage with revisionName when rendering PathHeader.
Search Component
packages/web/src/app/[domain]/search/components/searchResultsPanel/fileMatchContainer.tsx
Derives revisionName from first branch, computes branchDisplayName (e.g., "branch +N") accordingly, and passes revisionName to PathHeader.
Feature Components
packages/web/src/ee/features/codeNav/components/exploreMenu/referenceList.tsx, packages/web/src/features/chat/components/chatThread/referencedFileSourceListItem.tsx
Update PathHeader prop from branchDisplayName to revisionName.
Documentation
CHANGELOG.md
Adds Unreleased "Fixed" entry: file loading from /search failed when matching multiple branches.

Sequence Diagram(s)

(none — changes are API/prop updates and do not introduce new multi-component control flow that requires a sequence diagram.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • msukkari
✨ Finishing touches
  • 📝 Generate docstrings

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 769c4e0 into main Jan 27, 2026
7 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/fix-SOU-293 branch January 27, 2026 06:04
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.

[bug] Failure to read a file from search that has >1 branch matches

2 participants