fix(projects): route commit links to source repo

Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
This commit is contained in:
Wrench
2026-08-24 00:41:14 -04:00
parent 69a30f2ea1
commit 1f31f09fd8
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import test from "node:test";
const source = readFileSync(
new URL("./ProjectHomeWorkspaceSheet.tsx", import.meta.url),
"utf8",
);
test("aggregated commit detail uses the repository that owns the selected commit", () => {
const detailPanel = source.match(/<ProjectCommitDetailPanel[\s\S]*?\/>/)?.[0];
assert.ok(detailPanel, "expected the commit detail panel to be rendered");
assert.match(detailPanel, /project=\{selectedCommitRepository\}/);
});

View File

@@ -341,7 +341,7 @@ export function ProjectHomeWorkspaceSheet({
diffLoading={commitDiffQuery.isLoading}
originAgentName={selectedCommitPullRequest?.originAgentName}
originChannelId={selectedCommitPullRequest?.channelId}
project={repository}
project={selectedCommitRepository}
/>
) : (
<ProjectHomeCommitsPanel