feat(web): center settings save surface (#2466)

This commit is contained in:
Carlos Florêncio
2026-08-10 22:37:07 +01:00
committed by GitHub
parent 5ac632cbc1
commit 5e60dd5d10
234 changed files with 2730 additions and 963 deletions
@@ -182,7 +182,7 @@ export function IssueWatchTable({
)}
<TableCell className="font-medium">{formatRepoNames(t, watch)}</TableCell>
<TableCell className="text-xs text-muted-foreground">
{formatLabels(watch) || "—"}
{formatLabels(watch) || "-"}
</TableCell>
<TableCell className="text-xs text-muted-foreground">
{Math.round(watch.poll_interval_seconds / 60)}m
@@ -89,7 +89,7 @@ export const DEFAULT_PR_PRESETS: GitHubActionPreset[] = [
hint: "Apply review comments",
icon: "message",
prompt_template:
"Review the feedback on the pull request at {{url}}. Evaluate each comment critically — apply changes that improve the code, push back on suggestions that are unnecessary or harmful, and explain your reasoning. Push the changes when done.",
"Review the feedback on the pull request at {{url}}. Evaluate each comment critically - apply changes that improve the code, push back on suggestions that are unnecessary or harmful, and explain your reasoning. Push the changes when done.",
},
{
id: "fix_ci",
@@ -59,7 +59,7 @@ function buildAllFailedMessage(checks: CheckRun[]): string {
const failed = checks.filter(isFailedCheck);
const parts = [`### ${failed.length} CI Check${failed.length !== 1 ? "s" : ""} Failed`, ""];
for (const check of failed) {
parts.push(`**${check.name}** — ${check.conclusion}`);
parts.push(`**${check.name}** - ${check.conclusion}`);
if (check.output) parts.push(check.output);
if (check.html_url) parts.push(`URL: ${check.html_url}`);
parts.push("");
@@ -99,7 +99,7 @@ export function ChecksSection({
return () => clearInterval(id);
}, [hasRunning]);
const summary = checks.length > 0 ? ` \u2014 ${formatSectionSummary(checks, t)}` : "";
const summary = checks.length > 0 ? ` - ${formatSectionSummary(checks, t)}` : "";
const hasFailed = checks.some(isFailedCheck);
return (
+1 -1
View File
@@ -258,7 +258,7 @@ function buildWorkflowMessage(group: WorkflowGroup): string {
"",
];
for (const job of failed) {
lines.push(`- **${job.name}** — ${job.conclusion || job.status}`);
lines.push(`- **${job.name}** - ${job.conclusion || job.status}`);
if (job.output) lines.push(` ${job.output}`);
if (job.html_url) lines.push(` ${job.html_url}`);
}
@@ -196,7 +196,7 @@ describe("shouldHideApproveButton", () => {
});
// Regression: pre-fix this returned false (button shown), so the green
// Approve button appeared on every PR — including the viewer's own — during
// Approve button appeared on every PR, including the viewer's own, during
// the brief window before /api/v1/github/status resolved client-side.
it("hides when current user is unknown (status not loaded yet)", () => {
expect(shouldHideApproveButton(makeTaskPR({ author_login: "alice" }), null, null)).toBe(true);
@@ -244,7 +244,7 @@ describe("shouldHideApproveButton", () => {
it("prefers feedback.pr.author_login over taskPR.author_login when both present", () => {
// taskPR may be stale; live feedback wins. Here the stored author looks
// like a different user but feedback says it's actually us — must hide.
// like a different user but feedback says it is actually us, so it must hide.
const feedback = makeFeedback({ pr: { author_login: "bob" } });
expect(shouldHideApproveButton(makeTaskPR({ author_login: "alice" }), feedback, "bob")).toBe(
true,
@@ -503,8 +503,9 @@ describe("PRDetailContent persistent request expiry", () => {
feedbackMocks.value = makeFeedback({ reviews: [dismissedReview()] });
reviewMocks.requestReviewers.mockResolvedValue({ requested: true });
renderPRDetail();
const timersBeforeRequest = vi.getTimerCount();
await act(async () => fireEvent.click(screen.getByTestId(RE_REQUEST_BUTTON)));
expect(vi.getTimerCount()).toBe(1);
expect(vi.getTimerCount()).toBe(timersBeforeRequest + 1);
act(() => vi.advanceTimersByTime(5 * 60 * 1000));
@@ -52,7 +52,7 @@ function buildReviewMessage(review: PRReview, prUrl: string): string {
function buildAllReviewsMessage(reviews: PRReview[], prUrl: string): string {
const parts = ["### All PR Reviews", ""];
for (const r of reviews) {
parts.push(`**${r.author}** — ${reviewStateLabel(r.state)}`);
parts.push(`**${r.author}** - ${reviewStateLabel(r.state)}`);
if (r.body) parts.push(r.body);
parts.push("");
}
@@ -114,7 +114,7 @@ function computeSectionSummary(
const summaryParts: string[] = [];
if (submittedSummary) summaryParts.push(submittedSummary);
if (pendingCount > 0) summaryParts.push(`${pendingCount} pending`);
const summary = summaryParts.length > 0 ? ` \u2014 ${summaryParts.join(", ")}` : "";
const summary = summaryParts.length > 0 ? ` - ${summaryParts.join(", ")}` : "";
return { pendingCount, summary, totalCount: reviews.length + pendingCount };
}
@@ -149,7 +149,7 @@ function PRSingleButton({
triggerRef?: TriggerRef;
}) {
const addPRPanel = useDockviewStore((s) => s.addPRPanel);
const tooltip = `${pr.owner}/${pr.repo} #${pr.pr_number} — ${pr.pr_title}`;
const tooltip = `${pr.owner}/${pr.repo} #${pr.pr_number} - ${pr.pr_title}`;
const {
usesTouchDrawer,
open,