feat(terminal): Sprint 2.3 - URL Recognition & Clicking#16
Merged
Conversation
- Comprehensive architecture analysis of Zed's hyperlink system - 4-phase implementation blueprint leveraging existing Zed code - Data flow diagrams for mouse events and URL opening - Testing plan and risk assessment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Align code snippets with per-workspace terminal architecture - Add warning about noisy path regexes - Clarify modifier key handling (Cmd on macOS, Ctrl on Windows/Linux) - Update hover state clearing logic Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 1 of Sprint 2.3 - URL Recognition & Clicking - Add DEFAULT_PATH_REGEXES constant with file path patterns - Pass regex patterns to TerminalBuilder for URL detection - Zed's terminal crate handles the actual regex matching Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 & 3 of Sprint 2.3 - URL Recognition & Clicking Mouse event wiring (Phase 2): - Add handle_mouse_move, handle_mouse_down, handle_mouse_up methods - Wire GPUI mouse events to Zed terminal handlers - Forward events for hyperlink detection and click handling Event handling (Phase 3): - Handle TerminalEvent::Open to launch URLs in browser - Handle TerminalEvent::NewNavigationTarget for hover state - Add open crate for cross-platform URL launching Ctrl/Cmd+click on URLs now opens them in the default browser. Zed's terminal crate handles URL detection internally. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix #1: CloseTerminal now closes correct tab by matching terminal entity instead of always removing active tab - Fix #4: PathLike targets now open files with default app (line:col stripped) - Fix #5: Subscriptions stored in TerminalTab, auto-dropped when tab removed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements URL recognition and clicking functionality for TerminalG's terminal pane by leveraging Zed's existing hyperlink infrastructure.
Sprint 2.3 Phases Completed:
Key Changes
Phase 1: URL Regex Configuration
DEFAULT_PATH_REGEXESconstant with file path patternsTerminalBuilderfor URL detectionPhase 2: Mouse Event Wiring
handle_mouse_move(),handle_mouse_down(),handle_mouse_up()methodsPhase 3: Event Handling
TerminalEvent::Opento launch URLs in browser viaopencrateTerminalEvent::NewNavigationTargetfor hover state trackingHow It Works
TerminalEvent::Openis emittedopen::that()Test plan
cargo test- 60/60 tests passingcargo clippy -- -D warnings- cleancargo build --release- successhttps://example.comopens browserDesign Document
See
docs/sprints/phase-2-sprint-3-design.mdfor full architecture details.🤖 Generated with Claude Code