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
3 changes: 2 additions & 1 deletion desktop/src/features/projects/ui/ProjectCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ export function ProjectGridCard({
}: ProjectItemProps) {
return (
<Card
className="group relative flex min-h-44 flex-col overflow-hidden border-border/60 bg-card shadow-none transition-colors duration-150 hover:bg-muted/20"
className="group relative flex min-h-44 flex-col overflow-hidden border-border/60 bg-transparent shadow-none transition-colors duration-150 hover:bg-muted/20"
data-projects-grid-card
data-testid={`project-card-${project.dtag}`}
>
<ProjectCardButton onOpen={onOpen} project={project} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from "@/features/profile/lib/identity";
import type { ProjectRepoCommit, ProjectRepoDiff } from "@/shared/api/types";
import { CopyCommitHashButton } from "./ProjectCommitCopyButton";
import { PROJECT_DETAIL_PANEL_CLASS } from "./projectPanelStyles";
import { ProfileIdentityButton } from "./ProjectProfileIdentity";
import { ProjectDiffFilesPanel } from "./ProjectPullRequestFilesChangedPanel";
import { ProjectRichContent } from "./ProjectRichContent";
Expand Down Expand Up @@ -56,7 +57,10 @@ export function ProjectCommitDetailPanel({

return (
<div className="space-y-3">
<header className="space-y-2 rounded-xl border border-border/60 bg-card p-4">
<header
className={`space-y-2 p-4 ${PROJECT_DETAIL_PANEL_CLASS}`}
data-project-detail-panel
>
<p className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
<GitCommitHorizontal className="h-3.5 w-3.5" />
Commit from {authorLabel}
Expand Down
23 changes: 18 additions & 5 deletions desktop/src/features/projects/ui/ProjectDetailFeedPanels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ import {
ProjectFeedRowCluster,
ProjectFeedRowMonoCell,
} from "./ProjectFeedRow";
import {
PROJECT_DETAIL_PANEL_CLASS,
PROJECT_DETAIL_PANEL_MESSAGE_CLASS,
} from "./projectPanelStyles";
import { ProfileIdentityButton } from "./ProjectProfileIdentity";

function pluralize(count: number, singular: string, plural = `${singular}s`) {
Expand Down Expand Up @@ -66,14 +70,17 @@ export function ContributorsPanel({

if (rows.length === 0) {
return (
<p className="rounded-xl border border-border/60 bg-card p-4 text-sm text-muted-foreground">
<p
className={PROJECT_DETAIL_PANEL_MESSAGE_CLASS}
data-project-detail-panel
>
No git contributors are available yet.
</p>
);
}

return (
<div className="overflow-hidden rounded-xl border border-border/60 bg-card">
<div className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
{rows.map((row, index) => (
<div
className={cn(
Expand Down Expand Up @@ -144,15 +151,21 @@ export function ActivityPanel({

if (isLoading) {
return (
<p className="rounded-xl border border-border/60 bg-card p-4 text-sm text-muted-foreground">
<p
className={PROJECT_DETAIL_PANEL_MESSAGE_CLASS}
data-project-detail-panel
>
Loading activity…
</p>
);
}

if (commits.length === 0) {
return (
<p className="rounded-xl border border-border/60 bg-card p-4 text-sm text-muted-foreground">
<p
className={PROJECT_DETAIL_PANEL_MESSAGE_CLASS}
data-project-detail-panel
>
{error
? "Could not load repository activity from git."
: "No commits are available yet."}
Expand All @@ -161,7 +174,7 @@ export function ActivityPanel({
}

return (
<section className="overflow-hidden rounded-xl border border-border/60 bg-card">
<section className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
<div className="flex min-h-14 items-center gap-2 border-border/50 border-b px-4 py-3">
<GitCommitHorizontal className="h-4 w-4 text-muted-foreground" />
<h3 className="min-w-0 flex-1 truncate text-sm font-medium text-foreground">
Expand Down
6 changes: 5 additions & 1 deletion desktop/src/features/projects/ui/ProjectOverviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
} from "@/features/projects/lib/projectLanguages";
import { normalizePubkey } from "@/shared/lib/pubkey";
import { UserAvatar } from "@/shared/ui/UserAvatar";
import { PROJECT_DETAIL_PANEL_CLASS } from "./projectPanelStyles";
import { ReadmePanel } from "./ProjectReadmePanel";
import type { RepoSourceHeaderControls } from "./ProjectRepositorySource";

Expand Down Expand Up @@ -152,7 +153,10 @@ export function ProjectOverviewPanel({
const latestCommit = snapshot?.latestCommit ?? null;

return (
<div className="grid overflow-hidden rounded-xl border border-border/60 bg-card xl:grid-cols-[minmax(0,1fr)_18rem]">
<div
className={`grid xl:grid-cols-[minmax(0,1fr)_18rem] ${PROJECT_DETAIL_PANEL_CLASS}`}
data-project-detail-panel
>
<div className="min-w-0">
{/* ReadmePanel renders its own "no README" fallback while keeping
the branch + source controls reachable. */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import type { UserProfileLookup } from "@/features/profile/lib/identity";
import { useIdentityQuery } from "@/shared/api/hooks";
import { cn } from "@/shared/lib/cn";
import type { ProjectRepoDiff, ProjectRepoDiffFile } from "@/shared/api/types";
import { PROJECT_DETAIL_PANEL_CLASS } from "./projectPanelStyles";
import { ProjectPullRequestInlineCommentThread } from "./ProjectPullRequestInlineComments";

function fileName(path: string) {
Expand Down Expand Up @@ -772,9 +773,7 @@ export function ProjectDiffFilesPanel({
inlineComments?: InlineCommentControls;
subjectLabel: string;
}) {
const outerBorderClass = embedded
? ""
: "rounded-xl border border-border/60 bg-card";
const outerBorderClass = embedded ? "" : PROJECT_DETAIL_PANEL_CLASS;
const [query, setQuery] = React.useState("");
const [selectedPath, setSelectedPath] = React.useState<string | null>(null);
const files = diff?.files ?? [];
Expand Down Expand Up @@ -818,6 +817,7 @@ export function ProjectDiffFilesPanel({
return (
<div
className={cn("p-4 text-sm text-muted-foreground", outerBorderClass)}
data-project-detail-panel={embedded ? undefined : true}
>
Loading changed files…
</div>
Expand All @@ -832,6 +832,7 @@ export function ProjectDiffFilesPanel({
"space-y-1 p-4 text-sm text-muted-foreground",
outerBorderClass,
)}
data-project-detail-panel={embedded ? undefined : true}
>
<p>Could not load changed files for this {subjectLabel}.</p>
{message ? (
Expand All @@ -850,6 +851,7 @@ export function ProjectDiffFilesPanel({
"p-6 text-center text-sm text-muted-foreground",
outerBorderClass,
)}
data-project-detail-panel={embedded ? undefined : true}
>
No changed files are available for this {subjectLabel} yet.
</div>
Expand All @@ -862,6 +864,7 @@ export function ProjectDiffFilesPanel({
"grid min-h-0 overflow-hidden lg:grid-cols-[17rem_minmax(0,1fr)]",
outerBorderClass,
)}
data-project-detail-panel={embedded ? undefined : true}
>
<aside className="border-border/50 border-b bg-background/30 lg:border-r lg:border-b-0">
<div className="space-y-3 p-3">
Expand Down
15 changes: 11 additions & 4 deletions desktop/src/features/projects/ui/ProjectRepositoryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ import { cn } from "@/shared/lib/cn";
import { normalizePubkey } from "@/shared/lib/pubkey";
import { SyntaxHighlightedCode } from "@/shared/ui/markdown";
import { UserAvatar } from "@/shared/ui/UserAvatar";
import {
PROJECT_DETAIL_PANEL_CLASS,
PROJECT_DETAIL_PANEL_MESSAGE_CLASS,
} from "./projectPanelStyles";
import {
type RepoSourceHeaderControls,
RepoSourceDropdown,
Expand Down Expand Up @@ -550,7 +554,7 @@ function FileContentPanel({
const directorySegments = pathSegments.slice(0, -1);

return (
<div className="overflow-hidden rounded-xl border border-border/60 bg-card">
<div className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
<div className="flex min-h-14 items-center gap-1 border-border/50 border-b bg-muted/20 px-3 py-3">
<BreadcrumbButton onClick={() => onOpenPath("")}>
Files
Expand Down Expand Up @@ -687,13 +691,16 @@ export function RepositoryFilesPanel({
if (stateMessage) {
if (!sourceControls) {
return (
<div className="rounded-xl border border-border/60 bg-card p-4 text-sm text-muted-foreground">
<div
className={PROJECT_DETAIL_PANEL_MESSAGE_CLASS}
data-project-detail-panel
>
{stateMessage}
</div>
);
}
return (
<div className="overflow-hidden rounded-xl border border-border/60 bg-card">
<div className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
<div className="flex min-h-14 min-w-0 items-center gap-1 border-border/50 border-b px-3 py-3">
<RepoSourceDropdown controls={sourceControls} />
<RepositoryBranchDropdown
Expand Down Expand Up @@ -733,7 +740,7 @@ export function RepositoryFilesPanel({
}

return (
<div className="overflow-hidden rounded-xl border border-border/60 bg-card">
<div className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
<div className="flex min-h-14 min-w-0 items-center gap-1 border-border/50 border-b px-3 py-3">
{sourceControls ? (
<>
Expand Down
17 changes: 13 additions & 4 deletions desktop/src/features/projects/ui/ProjectWorkspaceTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ import {
PullRequestTabsList,
} from "./ProjectWorkspaceTabList";
import { ProjectPullRequestFilesChangedPanel } from "./ProjectPullRequestFilesChangedPanel";
import {
PROJECT_DETAIL_PANEL_CLASS,
PROJECT_DETAIL_PANEL_MESSAGE_CLASS,
} from "./projectPanelStyles";
import { CreatePullRequestDialog } from "./CreatePullRequestDialog";
import {
CreateIssueDialog,
Expand Down Expand Up @@ -303,7 +307,7 @@ export function WorkspaceTabs({
) : null}
</div>
{selectedPullRequest ? (
<div className="overflow-hidden rounded-xl border border-border/60 bg-card">
<div className={PROJECT_DETAIL_PANEL_CLASS} data-project-detail-panel>
{/* Two full-height columns: the meta rail runs all the way to the
top of the card, alongside the header and tabs. */}
<div className="grid xl:grid-cols-[minmax(0,1fr)_18rem]">
Expand Down Expand Up @@ -409,7 +413,8 @@ export function WorkspaceTabs({
</TabsContent>

<TabsContent
className="m-0 overflow-hidden rounded-xl border border-border/60 bg-card"
className={`m-0 ${PROJECT_DETAIL_PANEL_CLASS}`}
data-project-detail-panel
value="prs"
>
<WorkItemListHeader
Expand Down Expand Up @@ -437,7 +442,8 @@ export function WorkspaceTabs({
</TabsContent>

<TabsContent
className="m-0 overflow-hidden rounded-xl border border-border/60 bg-card"
className={`m-0 ${PROJECT_DETAIL_PANEL_CLASS}`}
data-project-detail-panel
value="issues"
>
<WorkItemListHeader
Expand All @@ -458,7 +464,10 @@ export function WorkspaceTabs({
<TabsContent className="m-0" value="files">
{repoSource === "local" && !localSnapshot && !localSnapshotLoading ? (
<div className="mb-3">
<div className="rounded-xl border border-border/60 bg-card p-4 text-sm text-muted-foreground">
<div
className={PROJECT_DETAIL_PANEL_MESSAGE_CLASS}
data-project-detail-panel
>
No local checkout found.
</div>
</div>
Expand Down
10 changes: 8 additions & 2 deletions desktop/src/features/projects/ui/ProjectsIssuesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ function IssueGridCard({
project: Project;
}) {
return (
<Card className="group relative flex min-h-40 flex-col overflow-hidden border-border/60 bg-card p-4 shadow-none transition-colors duration-150 hover:bg-muted/20">
<Card
className="group relative flex min-h-40 flex-col overflow-hidden border-border/60 bg-transparent p-4 shadow-none transition-colors duration-150 hover:bg-muted/20"
data-projects-grid-card
>
<button
className="absolute inset-0"
onClick={() => onOpen(project, issue)}
Expand Down Expand Up @@ -279,7 +282,10 @@ export function ProjectsIssuesList({
return (
<div className="space-y-3">
{loadNotice}
<div className={PROJECT_LIST_CONTAINER_CLASS}>
<div
className={PROJECT_LIST_CONTAINER_CLASS}
data-testid="projects-list-container"
>
{issues.map(({ project, issue }) => (
<IssueListRow
issue={issue}
Expand Down
10 changes: 8 additions & 2 deletions desktop/src/features/projects/ui/ProjectsPullRequestsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ function PullRequestGridCard({
});

return (
<Card className="group relative flex min-h-40 flex-col overflow-hidden border-border/60 bg-card p-4 shadow-none transition-colors duration-150 hover:bg-muted/20">
<Card
className="group relative flex min-h-40 flex-col overflow-hidden border-border/60 bg-transparent p-4 shadow-none transition-colors duration-150 hover:bg-muted/20"
data-projects-grid-card
>
<button
className="absolute inset-0"
onClick={() => onOpen(project, pullRequest)}
Expand Down Expand Up @@ -305,7 +308,10 @@ export function ProjectsPullRequestsList({
return (
<div className="space-y-3">
{loadNotice}
<div className={PROJECT_LIST_CONTAINER_CLASS}>
<div
className={PROJECT_LIST_CONTAINER_CLASS}
data-testid="projects-list-container"
>
{pullRequests.map(({ project, pullRequest }) => (
<PullRequestListRow
key={pullRequest.id}
Expand Down
5 changes: 4 additions & 1 deletion desktop/src/features/projects/ui/ProjectsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,10 @@ export function ProjectsView() {
})}
</div>
) : (
<div className={PROJECT_LIST_CONTAINER_CLASS}>
<div
className={PROJECT_LIST_CONTAINER_CLASS}
data-testid="projects-list-container"
>
{visibleProjects.map((project) => {
const summary = activitySummariesQuery.data?.[project.repoAddress];
return (
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/features/projects/ui/projectListRowStyles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** Inbox-aligned spacing and typography for top-level Projects list rows. */
export const PROJECT_LIST_CONTAINER_CLASS =
"divide-y divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-card";
"divide-y divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-transparent";

export const PROJECT_LIST_ROW_CLASS =
"group relative px-3 py-3 transition-colors duration-150 hover:bg-muted/20";
Expand Down
8 changes: 8 additions & 0 deletions desktop/src/features/projects/ui/projectPanelStyles.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/** Settings-aligned action button used at the right edge of panel headers. */
export const PROJECT_PANEL_ACTION_BUTTON_CLASS =
"h-auto shrink-0 gap-1.5 rounded-full border-transparent bg-muted px-3 py-1.5 text-sm font-medium text-foreground shadow-none hover:bg-muted/80";

/** Bordered shell that lets the project page surface show through. */
export const PROJECT_DETAIL_PANEL_CLASS =
"overflow-hidden rounded-xl border border-border/60 bg-transparent";

/** Empty or loading state using the same transparent project panel shell. */
export const PROJECT_DETAIL_PANEL_MESSAGE_CLASS =
"rounded-xl border border-border/60 bg-transparent p-4 text-sm text-muted-foreground";
Loading
Loading