Skip to content

Terminal hyperlink targets can become inaccessible in bb #2469

Description

@fdx-peter

Summary

Terminal programs can render named links using OSC 8 escape sequences. In bb terminals, the child process is not told that hyperlink support is available, so programs that conditionally emit OSC 8 may output only a plain-text label and leave the target inaccessible.

On desktop/web, copying a terminal selection from the context menu can also return only the clicked visual row when the selection spans soft-wrapped rows.

Versions

  • bb 0.40.0
  • macOS
  • Reproduced in a bb terminal
  • Confirmed against origin/main at commit 31d66d9d45bc8ff1483d5e4c6401c434b610dc4b

Steps to reproduce

  1. Open a terminal in bb.

  2. Check whether hyperlink support is advertised:

    printf 'FORCE_HYPERLINK=%s\n' "${FORCE_HYPERLINK:-<unset>}"
  3. Run any terminal program that emits a named OSC 8 hyperlink only when terminal hyperlink support is detected.

  4. Try to activate the rendered label.

  5. Print a URL long enough to soft-wrap:

    python3 -c 'print("https://example.com/" + "abcdefghij" * 20)'
  6. Select the wrapped URL and copy it using the terminal context menu.

Expected behavior

  • Child processes can detect OSC 8 hyperlink support.
  • Named hyperlinks can be activated through the existing safe external-navigation flow, with the exact target disclosed before opening.
  • Copying from the terminal context menu returns the exact xterm selection across soft-wrapped rows.

Actual behavior

  • Hyperlink capability is not advertised to child processes, so named links may be flattened to labels with no usable target.
  • Context-menu copying may capture only one visual row of a soft-wrapped selection.

Relevant code

Existing-issue check

Priority

Medium

AGENT GENERATED

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproBug reproduced independently; see linked reportuiApp shell, sidebar, composer, renderingworkspacesWorktrees, environments, git, shells

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions