Improve GitHub panel toolbar and loading states (#1664)
* feat(app): add toolbar and loading states to the GitHub PR panel Adds a toolbar under the PR title with a refresh button (refreshes git and GitHub status + timeline in one tap), an always-visible View Pull Request button, and a Merge control with a method dropdown that is disabled-with-reason when the PR can't be merged yet. The merge control reuses the existing git-actions policy verbatim via a new buildPrPanelMergeActions selector fed into GitActionsSplitButton, so no merge readiness/squash/auto-merge logic is duplicated. Also replaces the empty-state flash with skeletons: a full-panel skeleton while PR status loads and an activity skeleton while the timeline loads, with empty states shown only when loaded-and-empty and an error state with retry. * refactor(app): tidy PR panel skeleton (i18n, shared pulse, index) Addresses review feedback on the PR panel work: - Localize the skeleton's "Checks" label via t() instead of hardcoding. - Hoist the shared SkeletonPulse + useSkeletonPulse into activity-skeleton so pane-skeleton reuses them instead of duplicating the pulse driver. - Export PullRequestPaneError/Skeleton from the module index and import them through it, matching the module's existing public surface. * test(app): remove mock-based PR pane test * fix(app): simplify PR panel toolbar * fix(app): report PR panel retry failures
This commit is contained in:
@@ -243,6 +243,7 @@ describe("translation resources", () => {
|
||||
expect(en.workspace.git.actions.commit.label).toBe("Commit");
|
||||
expect(en.workspace.git.diff.binaryFile).toBe("Binary file");
|
||||
expect(en.workspace.git.pr.sections.checks).toBe("Checks");
|
||||
expect(en.workspace.git.pr.actions.viewPullRequest).toBe("View");
|
||||
expect(en.review.comment.placeholder).toBe("Leave a comment");
|
||||
});
|
||||
|
||||
|
||||
@@ -717,6 +717,9 @@ export const ar: TranslationResources = {
|
||||
failedOpen: "فشل في فتح مساحة العمل",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "عرض",
|
||||
},
|
||||
sections: {
|
||||
checks: "الشيكات",
|
||||
reviews: "التعليقات",
|
||||
|
||||
@@ -724,6 +724,9 @@ export const en = {
|
||||
failedOpen: "Failed to open workspace",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "View",
|
||||
},
|
||||
sections: {
|
||||
checks: "Checks",
|
||||
reviews: "Reviews",
|
||||
|
||||
@@ -744,6 +744,9 @@ export const es: TranslationResources = {
|
||||
failedOpen: "No se pudo abrir el espacio de trabajo",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "Ver",
|
||||
},
|
||||
sections: {
|
||||
checks: "cheques",
|
||||
reviews: "Reseñas",
|
||||
|
||||
@@ -743,6 +743,9 @@ export const fr: TranslationResources = {
|
||||
failedOpen: "Échec de l'ouverture de l'espace de travail",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "Voir",
|
||||
},
|
||||
sections: {
|
||||
checks: "Chèques",
|
||||
reviews: "Avis",
|
||||
|
||||
@@ -736,6 +736,9 @@ export const ru: TranslationResources = {
|
||||
failedOpen: "Не удалось открыть рабочую область",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "Открыть",
|
||||
},
|
||||
sections: {
|
||||
checks: "Чеки",
|
||||
reviews: "Отзывы",
|
||||
|
||||
@@ -711,6 +711,9 @@ export const zhCN: TranslationResources = {
|
||||
failedOpen: "打开 workspace 失败",
|
||||
},
|
||||
pr: {
|
||||
actions: {
|
||||
viewPullRequest: "查看",
|
||||
},
|
||||
sections: {
|
||||
checks: "Checks",
|
||||
reviews: "Reviews",
|
||||
|
||||
Reference in New Issue
Block a user