fix: make chat and terminal links open reliably in default browser#980
fix: make chat and terminal links open reliably in default browser#980arnestrickmann merged 2 commits intogeneralaction:mainfrom
Conversation
|
@naaa760 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR fixes link clicking behavior in chat and terminal components. Previously, links sometimes did nothing on click. The changes:
The implementation properly validates URLs (checks for Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| src/renderer/components/TerminalPane.tsx | Removed confirmation modal for terminal links, now opens URLs directly via openExternal |
| src/renderer/components/ui/markdown-renderer.tsx | Added onClick handlers to markdown links to call openExternal directly, preventing default navigation |
Sequence Diagram
sequenceDiagram
participant User
participant Renderer as Renderer<br/>(Chat/Terminal)
participant IPC as Electron IPC
participant Main as Main Process
participant Shell as OS Shell
User->>Renderer: Clicks link
Renderer->>Renderer: Validate URL (https?://)
Renderer->>Renderer: e.preventDefault()
Renderer->>IPC: openExternal(url)
IPC->>Main: app:openExternal handler
Main->>Main: Validate URL type
Main->>Shell: shell.openExternal(url)
Shell-->>User: Opens in default browser
Last reviewed commit: 1809f98
|
thanks @naaa760, do you know what was the issue before that opening links wasnt working consistently? Could you run pnpm run format before I'm merging this? |
|
|
great, have you tested it? |
|
@arnestrickmann |
|
amazing, thank you. could you run pnpm run format? |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks! @naaa760 |
fix : #977
description:
What changed
Files
src/renderer/components/ui/markdown-renderer.tsx
src/renderer/components/TerminalPane.tsx