mirror of
https://github.com/block/buzz.git
synced 2026-11-08 10:21:46 +00:00
feat(desktop): make project workspaces repository-aware
Unify project navigation, repository controls, contextual agent chat, and compact work-item views so repository state and access recovery stay visible in one workspace. Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
} from "lucide-react";
|
||||
|
||||
import { Button } from "@/shared/ui/button";
|
||||
import type { ProjectRepoUnavailableReason } from "@/features/projects/lib/projectRepoAvailability";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -65,9 +66,7 @@ export function RepositoryBranchDropdown({
|
||||
const RefIcon = selectedTag ? Tag : GitBranch;
|
||||
if (!branch) {
|
||||
return (
|
||||
<span className="truncate font-mono text-sm font-semibold text-foreground">
|
||||
—
|
||||
</span>
|
||||
<span className="truncate text-sm font-semibold text-foreground">—</span>
|
||||
);
|
||||
}
|
||||
return (
|
||||
@@ -80,7 +79,7 @@ export function RepositoryBranchDropdown({
|
||||
variant="outline"
|
||||
>
|
||||
<RefIcon className="h-4 w-4 shrink-0 text-muted-foreground" />
|
||||
<span className="truncate font-mono">{selectedTag ?? branch}</span>
|
||||
<span className="truncate">{selectedTag ?? branch}</span>
|
||||
<ChevronDown className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
@@ -99,7 +98,7 @@ export function RepositoryBranchDropdown({
|
||||
{selectableBranches.map((option) => (
|
||||
<DropdownMenuRadioItem key={option} value={`branch:${option}`}>
|
||||
<GitBranch className="mr-1.5 h-3.5 w-3.5 text-muted-foreground" />
|
||||
<span className="truncate font-mono">{option}</span>
|
||||
<span className="truncate">{option}</span>
|
||||
</DropdownMenuRadioItem>
|
||||
))}
|
||||
{tagOptions.length > 0 ? (
|
||||
@@ -112,7 +111,7 @@ export function RepositoryBranchDropdown({
|
||||
value={`tag:${option.name}`}
|
||||
>
|
||||
<Tag className="mr-1.5 h-3.5 w-3.5 text-muted-foreground" />
|
||||
<span className="truncate font-mono">{option.name}</span>
|
||||
<span className="truncate">{option.name}</span>
|
||||
<span className="ml-auto font-mono text-xs text-muted-foreground">
|
||||
{option.commit.slice(0, 7)}
|
||||
</span>
|
||||
@@ -181,7 +180,10 @@ export type RepoSourceHeaderControls = {
|
||||
localLabel: string;
|
||||
remoteLabel: string;
|
||||
remoteKind?: "buzz" | "external";
|
||||
remoteUnavailableReason?: ProjectRepoUnavailableReason;
|
||||
externalUrl?: string | null;
|
||||
/** Opens repository-scoped assistance when remote access is restricted. */
|
||||
onAskForAccess?: () => void;
|
||||
/** Clones the repository when no local checkout is available. */
|
||||
onCloneLocal?: () => void;
|
||||
clonePending?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user