Show PR numbers without the # and make header buttons icon-only

PR badges in the sidebar rows, hover card, and right-sidebar PR tab now
show the number alone. The Scripts and Open-in-editor header buttons drop
their labels and gain a min height so they keep the same size icon-only.
This commit is contained in:
Mohamed Boudra
2026-06-18 22:50:40 +07:00
parent 3d5059ab05
commit c3321ea8ff
7 changed files with 11 additions and 9 deletions

View File

@@ -335,7 +335,7 @@ export function PrBadge({ hint }: { hint: PrHint }) {
<ThemedGitPullRequest size={12} uniProps={iconUniProps} />
)}
<Text style={textStyle} numberOfLines={1}>
#{hint.number}
{hint.number}
</Text>
</Pressable>
);

View File

@@ -315,7 +315,7 @@ function PrBadge({ hint }: { hint: PrHint }) {
<ThemedGitPullRequest size={12} uniProps={iconUniProps} />
)}
<Text style={textStyle} numberOfLines={1}>
#{hint.number}
{hint.number}
</Text>
</Pressable>
);

View File

@@ -2,11 +2,11 @@ import { describe, expect, it } from "vitest";
import { formatPrTabLabel } from "./tab-label";
describe("formatPrTabLabel", () => {
it("returns #<number> when a pull request number is present", () => {
expect(formatPrTabLabel(42)).toBe("#42");
it("returns the number when a pull request number is present", () => {
expect(formatPrTabLabel(42)).toBe("42");
});
it("returns #— fallback when the pull request number is null", () => {
expect(formatPrTabLabel(null)).toBe("#—");
it("returns the — fallback when the pull request number is null", () => {
expect(formatPrTabLabel(null)).toBe("—");
});
});

View File

@@ -1,3 +1,3 @@
export function formatPrTabLabel(prNumber: number | null): string {
return prNumber === null ? "#—" : `#${prNumber}`;
return prNumber === null ? "—" : `${prNumber}`;
}

View File

@@ -313,6 +313,7 @@ const styles = StyleSheet.create((theme) => ({
alignItems: "center",
justifyContent: "center",
gap: theme.spacing[2],
minHeight: theme.fontSize.sm * 1.5,
},
splitButtonSpinnerOnly: {
transform: [{ scale: 0.8 }],

View File

@@ -3390,7 +3390,7 @@ function WorkspaceScreenContent({
onScriptTerminalStarted={handleScriptTerminalStarted}
onViewTerminal={handleViewScriptTerminal}
onOpenUrlInBrowserTab={handleOpenUrlInBrowserTab}
hideLabels={showCompactButtonLabels}
hideLabels
/>
) : null}
{!isMobile && workspaceDirectory ? (
@@ -3398,7 +3398,7 @@ function WorkspaceScreenContent({
serverId={normalizedServerId}
cwd={workspaceDirectory}
activeFile={activeFileLocation}
hideLabels={showCompactButtonLabels}
hideLabels
/>
) : null}
{!isMobile && isGitCheckout ? (

View File

@@ -542,6 +542,7 @@ const styles = StyleSheet.create((theme) => ({
alignItems: "center",
justifyContent: "center",
gap: theme.spacing[1.5],
minHeight: theme.fontSize.sm * 1.5,
},
scriptList: {
paddingVertical: theme.spacing[1],