EXT-19: add lc issue view command with v alias - #196
Merged
Conversation
Add `lc issue view ISSUE_ID` as a dedicated first-class subcommand for displaying full single-issue details — equivalent to `lc issue list --full ISSUE_ID` but discoverable via its own help text and verb. - Register `"v" => "view"` in `@subcommand_aliases["issue"]` so `lc i v ISSUE_ID` routes to the new command (no conflict with the existing top-level `"v" => "version"` alias, which lives in a separate map). - Add `view:` subcommand spec under `issue:` in `spec/0` with a required `issue_id` positional arg (same pattern as `develop`/`pr`/`assign`). - Add `dispatch([:issue, :view], ...)` clause routing to `Commands.issue_view/1`. - Add `issue_view/1` in `commands.ex`: expands the id, fetches the issue via `Linear.issues/1`, and calls `Display.show/2` with `full: true`. - `--output json` works for free (Display.show already handles it). - Leave `bin/lcls` unchanged — it wraps `issue list` specifically; `lc issue view`/`lc i v` are the canonical forms for single-issue display. - Update Readme.adoc alias table and add usage examples. - Add three tests: text output, JSON output, alias routing. Closes EXT-19.
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
Adds
lc issue view ISSUE_IDas a dedicated first-class subcommand for displaying full single-issue details — equivalent tolc issue list --full ISSUE_IDbut discoverable via its own help text and verb (mirroringgh issue view/gh pr view)."v" => "view"registered in@subcommand_aliases["issue"]—lc i v ISSUE_IDroutes to the new command. No conflict with the existing top-level"v" => "version"alias (separate maps, different processing stage).view:subcommand spec added underissue:inspec/0with a requiredissue_idpositional arg (same pattern asdevelop/pr/assign).dispatch([:issue, :view], ...)clause +Commands.issue_view/1function: expands id, fetches viaLinear.issues/1, callsDisplay.show/2withfull: true.--output jsonworks for free viaDisplay.show/2's existing JSON path.bin/lclsleft unchanged — it wrapsissue listspecifically;lc issue view/lc i vare the canonical forms. Explicitly decided, documented in commit message.issue view/vrow; usage example added.lc i valias routing.Test plan
mix test— 347/355 pass; 8 failures all pre-existingLinearCli.GitTestenvironment issues (git not available in test env), unrelated to this change.mix ci— format, credo, usage_rules all pass; test failure is the pre-existing git test only.lc issue view ISSUE_IDprints full issue with header, description, comments.lc i v ISSUE_IDroutes to same output via alias.--output jsonreturns the full issue struct as JSON.Closes EXT-19.
🤖 Generated with Claude Code