mirror of
https://github.com/block/buzz.git
synced 2026-11-25 18:52:52 +00:00
polish(desktop): finish Projects navigation and context chrome (#6429)
## Summary After #6396, Projects still split chrome across the workspace header, a copy-link control, and a labeled Actions group that mixed people, create, and metadata. This PR finishes that surface: the right-hand context box is unlabeled actions plus a Details group, people stacks and contribution heatmaps are gone from that box, Create review sits with Create task, and the top chrome is terminal / chat / info with no copy-link. Sent project context collapses to a pill, and review file diffs keep the last good git view instead of flashing empty while queries refetch. This also lands the remaining navigation polish that followed Part 3: overview and list presentation, readme and commit layout, and opening the latest matching conversation from the Channels tab without leaving the project. ### Related issue N/A. Related: #6396 ## Testing - Walked Files, Tasks, Reviews, task/review detail, overview tabs, and chrome chat vs info in the running desktop app - Pre-push: desktop typecheck, unit tests, Tauri checks, and file-size gate passed - Updated Projects smoke specs for the new context groups, Create review, chrome order, and removed copy-link control - Merged current `origin/main`; one conflict in discussion-channel rows kept conversation-panel navigation and took main's bounded channel-name lookup ## Post-Deploy Monitoring & Validation - validate Projects workspace chrome, context box, and review file diffs in the first staging Desktop session - healthy signals: context box shows unlabeled actions then Details, chat toggle sits between terminal and info, review diffs stay populated across selection changes - failure signals: missing Create review, restored heatmap/people in the context box, or empty Files Changed while the review is still selected; mitigate by reverting this PR --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
@@ -46,7 +46,6 @@ export type OverviewContextStat = {
|
||||
|
||||
export type OverviewContextPresentation = {
|
||||
action: OverviewContextAction;
|
||||
activityByDay: Record<string, number> | null;
|
||||
detailsTitle: string;
|
||||
people: string[];
|
||||
stats: OverviewContextStat[];
|
||||
@@ -129,21 +128,6 @@ function uniquePubkeys(pubkeys: Array<string | null | undefined>) {
|
||||
];
|
||||
}
|
||||
|
||||
function summaryActivityByDay(
|
||||
projects: Project[],
|
||||
summaries: Record<string, ProjectActivitySummary> | undefined,
|
||||
) {
|
||||
const merged: Record<string, number> = {};
|
||||
for (const project of projects) {
|
||||
const byDay = summaries?.[project.id]?.activityByDay;
|
||||
if (!byDay) continue;
|
||||
for (const [day, count] of Object.entries(byDay)) {
|
||||
merged[day] = (merged[day] ?? 0) + count;
|
||||
}
|
||||
}
|
||||
return merged;
|
||||
}
|
||||
|
||||
function latestCommitAuthors(
|
||||
summaries: Record<string, ProjectActivitySummary> | undefined,
|
||||
) {
|
||||
@@ -227,18 +211,7 @@ function overviewContextPeople({
|
||||
return projectOwners(projects);
|
||||
}
|
||||
|
||||
function overviewContextActivityByDay({
|
||||
filter,
|
||||
projects,
|
||||
summaries,
|
||||
}: OverviewContextInput): Record<string, number> | null {
|
||||
if (filter === "all" || filter === "projects" || filter === "repositories") {
|
||||
return summaryActivityByDay(projects, summaries);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Title, people, activity, and stats for the Projects overview context pod. */
|
||||
/** Title, people, and stats for the Projects overview context pod. */
|
||||
export function projectsOverviewContext(
|
||||
input: OverviewContextInput,
|
||||
): OverviewContextPresentation {
|
||||
@@ -249,12 +222,10 @@ export function projectsOverviewContext(
|
||||
const channelCount = uniqueProjectRelatedChannelCount(projects);
|
||||
const repositories = repositoryCount(projects);
|
||||
const people = overviewContextPeople(input);
|
||||
const activityByDay = overviewContextActivityByDay(input);
|
||||
|
||||
if (filter === "repositories") {
|
||||
return {
|
||||
action: null,
|
||||
activityByDay,
|
||||
detailsTitle: "Repository activity",
|
||||
people,
|
||||
stats: [
|
||||
@@ -284,7 +255,6 @@ export function projectsOverviewContext(
|
||||
if (filter === "channels") {
|
||||
return {
|
||||
action: null,
|
||||
activityByDay,
|
||||
detailsTitle: "Details",
|
||||
people,
|
||||
stats: [
|
||||
@@ -318,7 +288,6 @@ export function projectsOverviewContext(
|
||||
label: "Create task",
|
||||
testId: "projects-overview-create-issue",
|
||||
},
|
||||
activityByDay,
|
||||
detailsTitle: "Details",
|
||||
people,
|
||||
stats: [
|
||||
@@ -352,7 +321,6 @@ export function projectsOverviewContext(
|
||||
label: "Create review",
|
||||
testId: "projects-overview-create-pull-request",
|
||||
},
|
||||
activityByDay,
|
||||
detailsTitle: "Review activity",
|
||||
people,
|
||||
stats: [
|
||||
@@ -382,7 +350,6 @@ export function projectsOverviewContext(
|
||||
if (filter === "all") {
|
||||
return {
|
||||
action: createProjectAction(),
|
||||
activityByDay,
|
||||
detailsTitle: "Details",
|
||||
people,
|
||||
stats: [
|
||||
@@ -423,7 +390,6 @@ export function projectsOverviewContext(
|
||||
|
||||
return {
|
||||
action: createProjectAction(),
|
||||
activityByDay,
|
||||
detailsTitle: "Details",
|
||||
people,
|
||||
stats: [
|
||||
|
||||
Reference in New Issue
Block a user