Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useOptionalAuthenticatedClient } from "@features/auth/hooks/authClient";
import { useCurrentUser } from "@features/auth/hooks/authQueries";
import {
SelectReportPane,
SkeletonBackdrop,
Expand Down Expand Up @@ -66,6 +68,21 @@ export function InboxSignalsTab() {
const suggestedReviewerFilter = useInboxSignalsFilterStore(
(s) => s.suggestedReviewerFilter,
);
const seedSuggestedReviewerFilterWithCurrentUser = useInboxSignalsFilterStore(
(s) => s.seedSuggestedReviewerFilterWithCurrentUser,
);

// ── Current user (seeds reviewer filter on first inbox visit) ───────────
const authClient = useOptionalAuthenticatedClient();
const { data: currentUser } = useCurrentUser({
client: authClient,
enabled: !!authClient,
});

useEffect(() => {
if (!currentUser?.uuid) return;
seedSuggestedReviewerFilterWithCurrentUser(currentUser.uuid);
}, [currentUser?.uuid, seedSuggestedReviewerFilterWithCurrentUser]);

// ── GitHub integration ───────────────────────────────────────────────
const { hasGithubIntegration } = useRepositoryIntegration();
Expand Down Expand Up @@ -283,18 +300,12 @@ export function InboxSignalsTab() {
);
} else if (event.metaKey) {
toggleReportSelection(reportId);
} else if (
selectedReportIdsRef.current.length === 1 &&
selectedReportIdsRef.current[0] === reportId
) {
// Plain click on the only selected report — deselect it
clearSelection();
} else {
// Plain click — select only this report
// Plain click — select only this report (no-op if already the sole selection)
setSelectedReportIds([reportId]);
}
},
[selectRange, toggleReportSelection, setSelectedReportIds, clearSelection],
[selectRange, toggleReportSelection, setSelectedReportIds],
);

// Select-all checkbox
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
CaretRightIcon,
EyeIcon,
LinkSimpleIcon,
Plus,
ThumbsDownIcon,
WarningIcon,
XIcon,
Expand Down Expand Up @@ -298,12 +299,25 @@ export function ReportDetailPane({
</Text>
</Flex>
<Flex align="center" gap="2" className="shrink-0">
{headerImplementationPrUrl ? (
<ReportImplementationPrLink
prUrl={headerImplementationPrUrl}
size="md"
/>
) : null}
<Tooltip content="Copy link to this report">
<button
type="button"
onClick={async () => {
try {
await navigator.clipboard.writeText(
`${getDeeplinkProtocol(import.meta.env.DEV)}://inbox/${report.id}`,
);
toast.success("Link copied");
} catch {
toast.error("Failed to copy link");
}
}}
aria-label="Copy link to this report"
className="rounded p-0.5 text-gray-11 hover:bg-gray-3 hover:text-gray-12"
>
<LinkSimpleIcon size={14} />
</button>
</Tooltip>
<Button
size="1"
variant="soft"
Expand All @@ -323,25 +337,22 @@ export function ReportDetailPane({
)}
Dismiss
</Button>
<Tooltip content="Copy link to this report">
<button
type="button"
onClick={async () => {
try {
await navigator.clipboard.writeText(
`${getDeeplinkProtocol(import.meta.env.DEV)}://inbox/${report.id}`,
);
toast.success("Link copied");
} catch {
toast.error("Failed to copy link");
}
}}
aria-label="Copy link to this report"
className="rounded p-0.5 text-gray-11 hover:bg-gray-3 hover:text-gray-12"
{headerImplementationPrUrl ? (
<ReportImplementationPrLink
prUrl={headerImplementationPrUrl}
size="md"
/>
) : canCreateImplementationPr ? (
<Button
size="1"
variant="solid"
className="gap-1 text-[12px]"
onClick={handleCreateImplementationTask}
>
<LinkSimpleIcon size={14} />
</button>
</Tooltip>
<Plus size={12} />
Create PR
</Button>
) : null}
<button
type="button"
onClick={onClose}
Expand Down Expand Up @@ -594,10 +605,6 @@ export function ReportDetailPane({
key={report.id}
reportId={report.id}
reportStatus={report.status}
isAwaitingInput={isAwaitingInput}
onCreateImplementationTask={
canCreateImplementationPr ? handleCreateImplementationTask : undefined
}
/>
</>
);
Expand Down
Loading
Loading