diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx index d35092c147b..a4e275f0bdc 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/WorkspaceSidebar/hooks/useChangesTab/components/ChangesFileList/components/FileRow/FileRow.tsx @@ -63,8 +63,8 @@ export const FileRow = memo(function FileRow({ onOpenFile, onOpenInEditor, }: FileRowProps) { - const { dir: fullDir, basename } = splitPath(file.path); - const dir = hideDir ? "" : fullDir; + const { basename } = splitPath(file.path); + const displayPath = hideDir ? basename : file.path; const oldBasename = file.oldPath && (file.status === "renamed" || file.status === "copied") ? splitPath(file.oldPath).basename @@ -108,15 +108,17 @@ export const FileRow = memo(function FileRow({ > - {dir && {dir}} {oldBasename && ( - + {oldBasename} )} - - {basename} + + {displayPath} @@ -216,7 +218,9 @@ export const FileRow = memo(function FileRow({ {rowButton} - {policy.hint} + + {file.path} + onSelect?.(file.path)}> diff --git a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx index d5a60fa0826..1a6c8558c44 100644 --- a/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx +++ b/apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/DiffPane/components/DiffFileHeader/DiffFileHeader.tsx @@ -44,13 +44,6 @@ export function DiffFileHeader({ const { copyToClipboard, copied } = useCopyToClipboard(); const policy = useSidebarFilePolicy(); - // Split into directory + basename so the basename stays visible when the - // header is narrow — the directory truncates with ellipsis first, and the - // basename truncates only as a fallback (very narrow pane or no directory). - const lastSlash = path.lastIndexOf("/"); - const dir = lastSlash >= 0 ? path.slice(0, lastSlash + 1) : ""; - const name = lastSlash >= 0 ? path.slice(lastSlash + 1) : path; - return (
- {policy.hint} + {path} diff --git a/apps/desktop/src/renderer/stores/changes/store.ts b/apps/desktop/src/renderer/stores/changes/store.ts index 1667fbe7c6c..12eed9390ff 100644 --- a/apps/desktop/src/renderer/stores/changes/store.ts +++ b/apps/desktop/src/renderer/stores/changes/store.ts @@ -66,7 +66,7 @@ interface ChangesState { const initialState = { selectedFiles: {} as Record, activeTab: "diffs" as ChangesSidebarTab, - viewMode: "side-by-side" as DiffViewMode, + viewMode: "inline" as DiffViewMode, fileListViewMode: "grouped" as FileListViewMode, expandedSections: { "against-base": true, @@ -231,7 +231,7 @@ export const useChangesStore = create()( }), { name: "changes-store", - version: 5, + version: 6, migrate: (persisted, version) => { const state = persisted as Record; if (version < 2) { @@ -246,6 +246,9 @@ export const useChangesStore = create()( if (version < 5) { state.activeTab = "diffs"; } + if (version < 6) { + state.viewMode = "inline"; + } state.sectionOrder = normalizeChangeSectionOrder( state.sectionOrder as ChangeCategory[] | undefined, ); diff --git a/apps/desktop/src/renderer/stores/settings.ts b/apps/desktop/src/renderer/stores/settings.ts index 2b7ae9ecc85..624bcc86f0a 100644 --- a/apps/desktop/src/renderer/stores/settings.ts +++ b/apps/desktop/src/renderer/stores/settings.ts @@ -13,10 +13,20 @@ interface SettingsStore extends Settings { export const useSettings = create()( persist( (set) => ({ - diffStyle: "split", + diffStyle: "unified", showDiffComments: true, update: (key, value) => set({ [key]: value }), }), - { name: "settings" }, + { + name: "settings", + version: 1, + migrate: (persisted, version) => { + const state = (persisted ?? {}) as Record; + if (version < 1) { + state.diffStyle = "unified"; + } + return state as unknown as SettingsStore; + }, + }, ), );