feat(app): polish workspace tabs and changes

Size tabs from rendered labels and switch to horizontal overflow once minimum click targets are reached, keeping the add-tab action adjacent until it must remain fixed.

Make Changes an always-expanded document with an optional desktop navigation tree, keep Git actions in their platform-owned headers, remove pinned and inline split shortcuts, and place review tabs beside Changes.
This commit is contained in:
Mohamed Boudra
2026-08-17 21:14:37 +02:00
parent 6d7606160e
commit 75adf53893
41 changed files with 929 additions and 1901 deletions
+5 -8
View File
@@ -7,7 +7,7 @@ import invariant from "tiny-invariant";
import { useRetainedPanelActive } from "@/components/retained-panel";
import { useIsCompactFormFactor, WORKSPACE_SECONDARY_HEADER_HEIGHT } from "@/constants/layout";
import { isWeb } from "@/constants/platform";
import { DiffLayoutToggle, GitDiffPane, resolveDiffLayout, SharedDiffView } from "@/git/diff-pane";
import { ChangesSurface, DiffDocument, DiffLayoutToggle, resolveDiffLayout } from "@/git/diff-pane";
import { useCommitDiffFiles } from "@/git/use-diff-files";
import { useChangesPreferences } from "@/hooks/use-changes-preferences";
import { useAppSettings } from "@/hooks/use-settings";
@@ -44,10 +44,6 @@ function useDiffPanelPreferences() {
const toggleHideWhitespace = useCallback(() => {
void updatePreferences({ hideWhitespace: !preferences.hideWhitespace });
}, [preferences.hideWhitespace, updatePreferences]);
const toggleViewMode = useCallback(() => {
void updatePreferences({ viewMode: preferences.viewMode === "flat" ? "tree" : "flat" });
}, [preferences.viewMode, updatePreferences]);
return {
preferences,
isCompact,
@@ -56,7 +52,6 @@ function useDiffPanelPreferences() {
toggleLayout,
toggleWrapLines,
toggleHideWhitespace,
toggleViewMode,
};
}
@@ -95,12 +90,14 @@ function WorkingDiffPanel() {
return (
<View style={styles.container} testID="working-diff-panel">
<GitDiffPane
<ChangesSurface
serverId={serverId}
workspaceId={workspaceId}
cwd={cwd}
enabled={isActive}
host="panel"
focusPath={target.focusPath}
focusRequestId={target.focusRequestId}
onOpenFile={handleOpenFile}
onAddToChat={canAddToChat ? addFile : undefined}
/>
@@ -142,7 +139,7 @@ function CommitDiffPanel() {
body = <PanelState message={t("panels.diff.empty")} testID="commit-diff-empty" />;
} else {
body = (
<SharedDiffView
<DiffDocument
files={files}
displayPreferences={panelPreferences.displayPreferences}
mode={mode}