Skip to content

EXT-19: add lc issue view command with v alias - #196

Merged
ruby-automation merged 1 commit into
mainfrom
ext-19-issue-view-command
Sep 3, 2026
Merged

EXT-19: add lc issue view command with v alias#196
ruby-automation merged 1 commit into
mainfrom
ext-19-issue-view-command

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

Adds 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 (mirroring gh issue view/gh pr view).

  • "v" => "view" registered in @subcommand_aliases["issue"]lc i v ISSUE_ID routes to the new command. No conflict with the existing top-level "v" => "version" alias (separate maps, different processing stage).
  • view: subcommand spec added under issue: in spec/0 with a required issue_id positional arg (same pattern as develop/pr/assign).
  • dispatch([:issue, :view], ...) clause + Commands.issue_view/1 function: expands id, fetches via Linear.issues/1, calls Display.show/2 with full: true.
  • --output json works for free via Display.show/2's existing JSON path.
  • bin/lcls left unchanged — it wraps issue list specifically; lc issue view/lc i v are the canonical forms. Explicitly decided, documented in commit message.
  • Readme.adoc alias table updated with issue view / v row; usage example added.
  • 3 new tests: text output, JSON output, lc i v alias routing.

Test plan

  • mix test — 347/355 pass; 8 failures all pre-existing LinearCli.GitTest environment 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_ID prints full issue with header, description, comments.
  • lc i v ISSUE_ID routes to same output via alias.
  • --output json returns the full issue struct as JSON.

Closes EXT-19.

🤖 Generated with Claude Code

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.
@ruby-automation
ruby-automation merged commit 8207063 into main Sep 3, 2026
3 checks passed
@ruby-automation
ruby-automation deleted the ext-19-issue-view-command branch September 3, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant