Skip to content

Commit c35dc26

Browse files
limgitclaude
andcommitted
feat: display issue state in issue view command
Show the issue state (e.g., Todo, In Progress, Done) in the metadata line of `linear issue view`, positioned before Project/Milestone/Cycle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 91866c0 commit c35dc26

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/commands/issue/issue-view.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ export const viewCommand = new Command()
122122

123123
const { identifier } = issueData
124124

125-
// Build metadata line with project and milestone
125+
// Build metadata line with state, project and milestone
126126
const metaParts: string[] = []
127+
if (issueData.state) {
128+
metaParts.push(`**State:** ${issueData.state.name}`)
129+
}
127130
if (issueData.project) {
128131
metaParts.push(`**Project:** ${issueData.project.name}`)
129132
}

test/commands/issue/__snapshots__/issue-view.test.ts.snap

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ snapshot[`Issue View Command - With Mock Server Terminal No Comments 1`] = `
2828
stdout:
2929
"# TEST-123: Fix authentication bug in login flow
3030
31+
**State:** In Progress
32+
3133
Users are experiencing issues logging in when their session expires. This affects the main authentication flow and needs to be resolved quickly.
3234
3335
## Steps to reproduce
@@ -50,6 +52,8 @@ snapshot[`Issue View Command - With No Comments Flag 1`] = `
5052
stdout:
5153
"# TEST-123: Fix authentication bug in login flow
5254
55+
**State:** In Progress
56+
5357
Users are experiencing issues logging in when their session expires.
5458
"
5559
stderr:
@@ -60,6 +64,8 @@ snapshot[`Issue View Command - With Comments Default 1`] = `
6064
stdout:
6165
"# TEST-123: Fix authentication bug in login flow
6266
67+
**State:** In Progress
68+
6369
Users are experiencing issues logging in when their session expires.
6470
6571
## Comments
@@ -168,6 +174,8 @@ snapshot[`Issue View Command - With Parent And Sub-issues 1`] = `
168174
stdout:
169175
"# TEST-456: Implement user authentication
170176
177+
**State:** In Progress
178+
171179
Add user authentication to the application.
172180
173181
## Parent
@@ -190,7 +198,7 @@ snapshot[`Issue View Command - With Project And Milestone 1`] = `
190198
stdout:
191199
"# TEST-789: Add monitoring dashboards
192200
193-
**Project:** Platform Infrastructure Q1 | **Milestone:** Phase 2: Observability
201+
**State:** In Progress | **Project:** Platform Infrastructure Q1 | **Milestone:** Phase 2: Observability
194202
195203
Set up Datadog dashboards for the new service.
196204
"
@@ -202,7 +210,7 @@ snapshot[`Issue View Command - With Cycle 1`] = `
202210
stdout:
203211
"# TEST-890: Implement rate limiting
204212
205-
**Project:** API Gateway v2 | **Cycle:** Sprint 7
213+
**State:** Todo | **Project:** API Gateway v2 | **Cycle:** Sprint 7
206214
207215
Add rate limiting to the API gateway.
208216
"

0 commit comments

Comments
 (0)