Skip to content

Box-drawing characters not recognized as link separators; tree output never clickable #9909

@rndjams

Description

@rndjams

Pre-submit Checks

Describe the bug

Filenames in tree output (and eza --tree, lsd --tree, and similar tree-drawing listers) are never clickable in Warp, even when the file they name exists on disk under the tree's root.

Example row from tree /tmp/repro:

│   └── alpha.md

alpha.md is not recognized as a clickable filename token. Hovering the filename does not highlight it; clicking does nothing.

The cause is in the tokenizer's separator set: FILE_LINK_SEPARATORS in app/src/terminal/model/grid/grid_handler.rs includes ASCII | and space but not the Unicode box-drawing characters (U+2502), (U+251C), (U+2514), (U+2500), (U+252C), (U+2534), (U+253C) that tree-style commands use to draw their hierarchy. Because these characters are not separators, a row like │ └── alpha.md is tokenized as a single word and alpha.md never appears as a standalone candidate substring for file-path validation.

This is a separate concern from the directory-root resolution bug in #9908: even with listing-aware resolution in place, tree output cannot benefit because the tokenizer doesn't produce the right candidates in the first place.

To reproduce

mkdir -p /tmp/tree-repro/{a,b}
echo hi > /tmp/tree-repro/a/alpha.md
echo hi > /tmp/tree-repro/b/beta.json
cd /tmp/tree-repro
tree

Hover any filename in the output. Observe that nothing is highlighted as a clickable link.

For reference, the output looks like:

.
├── a
│   └── alpha.md
└── b
    └── beta.json

Expected behavior

  1. alpha.md, beta.json, and the directory names a, b must be tokenized as standalone filename candidates by the grid tokenizer.
  2. Once tokenized, standard file-path validation applies — the filenames must be clickable if they resolve against the appropriate directory root. (With the fix for Clickable filenames in ls DIR/ output resolve against CWD, silently opening wrong files #9908 in place, that resolution uses the tree command's argument directory.)

Proposed fix

Extend FILE_LINK_SEPARATORS in app/src/terminal/model/grid/grid_handler.rs to include the Unicode box-drawing characters that appear in common tree/ASCII-art output:

// Add to the existing set:
'│', '├', '└', '─', '┬', '┴', '┼',
// And the double-line variants for completeness:
'║', '╠', '╚', '═', '╦', '╩', '╬',

Add tests in app/src/util/link_detection_test.rs covering:

  • │ └── alpha.md → candidates include alpha.md
  • Multi-byte (Unicode) filenames inside tree output: │ └── 音楽.md → candidates include 音楽.md
  • Absolute path leaves: │ └── /tmp/foo.md → candidates include /tmp/foo.md

Screenshots, videos, and logs

The repro steps above are minimal and deterministic; happy to record a short screen capture on request.

Operating system (OS)

macOS

Operating system and version

macOS 26.4.1 (Darwin 25.4.0, arm64)

Shell Version

zsh 5.9

Current Warp version

v0.2026.04.27.15.32.stable_03

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

tree version tested: tree v2.2.1 (Homebrew). This issue is a prerequisite for the tree part of the scope in #9908. Fixing one without the other still leaves tree output unclickable.

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.bugSomething isn't working.os:macmacOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions