Skip to content

Commit dca0058

Browse files
brandonkachenclaude
andcommitted
fix: repo path link now displays correctly with hover
Fixed the inline link issue where the repo path wasn't showing up. Changed from inline text approach to a flex row layout so the link can properly support hover/click interactions. The path now displays correctly, is blue, and underlines on hover. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 647f1fe commit dca0058

File tree

2 files changed

+9
-24
lines changed

2 files changed

+9
-24
lines changed

cli/src/chat.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,20 @@ export const App = ({
292292
blocks.push({
293293
type: 'html',
294294
render: () => (
295-
<text>
296-
Codebuff can read and write files in{' '}
295+
<box style={{ flexDirection: 'row', gap: 0, flexWrap: 'wrap' }}>
296+
<text wrap={false}>Codebuff can read and write files in </text>
297297
<TerminalLink
298298
text={displayPath}
299299
color="#3b82f6"
300-
inline={true}
300+
inline={false}
301+
lineWrap={false}
302+
containerStyle={{ flexDirection: 'row', width: 'auto' }}
301303
onActivate={async () => {
302304
await openFileAtPath(repoRoot)
303305
}}
304306
/>
305-
, and run terminal commands to help you build.
306-
</text>
307+
<text wrap={false}>, and run terminal commands to help you build.</text>
308+
</box>
307309
),
308310
})
309311

cli/src/components/terminal-link.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,9 @@ export const TerminalLink: React.FC<TerminalLinkProps> = ({
5050
}
5151
}, [onActivate])
5252

53-
// For inline mode, wrap in a text element with hover support
53+
// For inline mode, render without hover/click support (spans don't support mouse events)
5454
if (inline) {
55-
const content = shouldUnderline ? (
56-
<u>
57-
<span fg={displayColor}>{text}</span>
58-
</u>
59-
) : (
60-
<span fg={displayColor}>{text}</span>
61-
)
62-
63-
return (
64-
<text
65-
wrap={false}
66-
onMouseOver={() => setIsHovered(true)}
67-
onMouseOut={() => setIsHovered(false)}
68-
onMouseDown={handleActivate}
69-
>
70-
{content}
71-
</text>
72-
)
55+
return <span fg={displayColor}>{text}</span>
7356
}
7457

7558
return (

0 commit comments

Comments
 (0)