Fix terminal hyperlinks and wrapped selection copying - #2479
Open
fdx-peter wants to merge 1 commit into
Open
Conversation
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.
Human comments
Yeah so basically I tried to claude /login in a terminal and the inability to click the long auth link (or copy-paste) was super fustrating......so I told bb to fix itself.
What was wrong
The host terminal environment did not advertise OSC 8 support, so programs using
supports-hyperlinks-style detection could flatten named hyperlinks into display text and discard the target. The clients also did not install an OSC 8 activation handler, and desktop/web context-menu copying did not use xterm's logical selection, so a soft-wrapped selection could be reduced to one rendered row. See #2469.What changed
FORCE_HYPERLINK=1.HOST_DAEMON_PROTOCOL_VERSIONbump is needed because this changes only the environment of newly spawned PTYs; no server/daemon wire field or message changed.FORCE_HYPERLINKis the available opt-in for programs that do not recognize bb as a terminal. Programs that treat it as an unconditional override may also emit OSC 8 when their output is redirected; callers requiring plain redirected output can setFORCE_HYPERLINK=0for that command.How you verified
pnpm exec turbo run typecheck lint --filter=@bb/app --filter=@bb/host-daemon --filter=@bb/mobile— all tasks passed; lint reported 0 errors.pnpm run build— all 12 production build tasks passed.git diff --checkpassed for the changed source files.Fixes #2469