fix: improve external file and path handling

Open external context files read-only
Preserve leading-dot paths in UI
Keep workspace write operations guarded
This commit is contained in:
Bohdan Triapitsyn
2026-04-28 14:06:25 +03:00
parent 15338be265
commit 4f51abddf4
11 changed files with 98 additions and 43 deletions
@@ -37,7 +37,7 @@ export const ChangedFilesList: React.FC<ChangedFilesListProps> = ({ files, curre
<>
<span
className="min-w-0 truncate text-muted-foreground"
style={{ direction: 'rtl', textAlign: 'left' }}
style={{ direction: 'rtl', textAlign: 'left', unicodeBidi: 'plaintext' }}
>
{dirPart}
</span>
@@ -271,6 +271,7 @@ const renderReadFilePath = (displayPath: string) => {
color: 'var(--tools-description)',
direction: 'rtl',
textAlign: 'left',
unicodeBidi: 'plaintext',
}}
>
{displayDir}
@@ -1299,7 +1299,7 @@ const renderPathLikeGitChanges = (path: string, grow = true) => {
return (
<span
className={cn('min-w-0 truncate typography-ui-label text-foreground', grow && 'flex-1')}
style={{ direction: 'rtl', textAlign: 'left' }}
style={{ direction: 'rtl', textAlign: 'left', unicodeBidi: 'plaintext' }}
title={path}
>
{path}
@@ -1315,7 +1315,7 @@ const renderPathLikeGitChanges = (path: string, grow = true) => {
return (
<span className={cn('min-w-0 flex items-baseline overflow-hidden typography-ui-label', grow && 'flex-1')} title={path}>
{hasAbsoluteRoot ? <span className="flex-shrink-0 text-muted-foreground">/</span> : null}
<span className="min-w-0 truncate text-muted-foreground" style={{ direction: 'rtl', textAlign: 'left' }}>
<span className="min-w-0 truncate text-muted-foreground" style={{ direction: 'rtl', textAlign: 'left', unicodeBidi: 'plaintext' }}>
{displayDir}
</span>
<span className="flex-shrink-0">
@@ -1360,6 +1360,7 @@ const renderAnimatedPathWithIcon = (path: string, _animate = true, grow = true,
color: 'var(--tools-description)',
direction: 'rtl',
textAlign: 'left',
unicodeBidi: 'plaintext',
}}
>
{displayDir}