feat(issue): add -w/--web flag to lc issue view - #204
Merged
Conversation
Adds `--web`/`-w` to `lc issue view`: when given, opens the issue's Linear URL in the system default browser and skips terminal output, mirroring `gh issue view -w`. - Add `url` attribute to Issue resource and include it in both `base_fields/0` and `full_fields/0` GraphQL selections. - Create `LinearCli.Browser.open_url/2` — cross-platform browser open (`xdg-open`/`open`/`cmd /c start`) with an injectable `opener` for test doubles, same pattern as `IssueHelpers.create_pr!/3`'s `runner`. - Add `--web`/`-w` flag to the `view` subcommand spec. - Update `issue_view/1` → `issue_view/2` to check `flags.web` and delegate to `Browser.open_url/2` when set, skipping `Display.show/2`. - Add tests for `--web`, `-w`, and `--web --output json` (all open browser, produce no output). - Document `--web`/`-w` in `Readme.adoc`. Closes EXT-20 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Sep 3, 2026
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
--web/-wflag tolc issue view: resolves the issue normally, then opens its Linear URL in the system default browser and skips terminal output — matchinggh issue view -wbehaviorurlattribute to the Issue resource (included in bothbase_fields/0andfull_fields/0GraphQL selections)LinearCli.Browser.open_url/2— cross-platform browser launcher (xdg-open/open/cmd /c start) with an injectableopenerfor test doubles, same pattern asIssueHelpers.create_pr!/3'srunnerReadme.adocwith--web/-wusage examplesCloses
EXT-20
Test plan
--webopens the issue URL in the browser and prints nothing (injectable opener, asserts URL)-wshort flag works via the same injectable-opener path--web --output jsonstill opens browser and prints nothing (browser wins)LinearCli.Browser.open_url/2unit test with injected opener and error pathissue viewtests (text, JSON, alias) pass unchangedmix ciclean (format, credo, usage_rules, tests) — one pre-existing flaky test ingit_test.exsunrelated to these changes🤖 Generated with Claude Code