Skip to content

feat: --project filter on issues list#88

Merged
flipbit03 merged 9 commits intoflipbit03:mainfrom
lightstrikelabs:feat/issues-list-project-filter
Mar 6, 2026
Merged

feat: --project filter on issues list#88
flipbit03 merged 9 commits intoflipbit03:mainfrom
lightstrikelabs:feat/issues-list-project-filter

Conversation

@lightstrike
Copy link
Contributor

Summary

Users can now filter issues by project when listing: lineark issues list --project "My Project". Accepts project name or UUID, and combines with existing filters like --team and --mine.

Also exposes comment UUIDs in issues read output, enabling the comments delete workflow.

Changes

  • Add --project NAME-OR-ID flag to IssuesAction::List, using existing resolve_project_id helper
  • Add id field to CommentSummary so comment UUIDs appear in issues read
  • Update lineark usage reference

Test plan

  • cargo clippy --workspace -- -D warnings — clean
  • cargo fmt --check — clean
  • cargo test --workspace — all passing
  • lineark issues list --project "Project Name" --limit 5
  • lineark issues list --project <uuid> --team ENG
  • lineark issues list --help shows --project flag
  • lineark issues read ENG-123 includes comment IDs

@lightstrike lightstrike marked this pull request as ready for review February 20, 2026 02:02
Copy link
Owner

@flipbit03 flipbit03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally it LGTM, but I think this PR has a bit of "scope creep" that shouldn't be tackled here. Let's keep PRs focused on the mark. If some of the comments are really useless, we open up an issue to evaluate the value proposition of some of these comments, and then we tackle that work item separately.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test additions look fine to me, but the comment removals are unrelated to the work being done, and I think some of these comments are contextually important enough in explaining crevices we explored during development - we shouldn't remove then without some planning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. I have some logic in my Claude harness to remove comments for "self-descriptive code" -- of course some subjectivity there. I'll revert.

@flipbit03 flipbit03 added the safe-to-test Maintainer-approved: run online tests with API secrets label Feb 23, 2026
@flipbit03
Copy link
Owner

flipbit03 commented Feb 23, 2026

@lightstrike PS: I wasn't expecting such an influx of PRs - Thanks a lot for your interest! To serve the project better and allow external PRs to be online-tested, I'm working to create a harness so that your PRs can also be tested against the online token after reviewing them. I think it's important that PRs test against an actual Linear workspace, to really confirm they work.

@flipbit03 flipbit03 added safe-to-test Maintainer-approved: run online tests with API secrets and removed safe-to-test Maintainer-approved: run online tests with API secrets labels Feb 23, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer-approved: run online tests with API secrets label Feb 23, 2026
@lightstrike
Copy link
Contributor Author

@flipbit03 Thanks for starting this project! It's a great foundation to build from. Great idea to have the harness in place and agreed it's important to make sure all of these work with real projects before merging in.

@flipbit03
Copy link
Owner

flipbit03 commented Feb 24, 2026

@lightstrike thanks for the tweaks! We can most surely address comment's signal-to-noise ratio in a further PR. issue opened in #97. I think you need to rebase this, and it's good to go

@flipbit03
Copy link
Owner

@lightstrike needs to be rebased on top of the current main. After that, just give me a ping and it's good to go! Thanks!

Allow filtering issues by project name or UUID, same pattern as --team.
Also expose comment IDs in issues read output for use with comments delete.
Linear's API may delay project availability for issue creation.
Use retry_with_backoff for issue creation, RAII guards for cleanup,
and the CLI's projects create instead of SDK for consistency.
Newly created projects may not be immediately available for issue
creation in Linear's API. Use an existing workspace project instead
to avoid flakiness from API propagation delays.
@lightstrike lightstrike force-pushed the feat/issues-list-project-filter branch from 2a27fc5 to d2d9a98 Compare February 28, 2026 21:59
@lightstrike
Copy link
Contributor Author

@flipbit03 Ready for review again — rebased onto main and reverted the unrelated comment deletions. All CI checks passing.

@flipbit03 flipbit03 added the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
Copy link
Owner

@flipbit03 flipbit03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@github-actions github-actions bot removed the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
@flipbit03
Copy link
Owner

The new test fails online. I'll attempt to fix it - seems trivial

---- issues_list_with_project_filter ----
test panicked: workspace must have at least one project


failures:
    issues_list_with_project_filter

test result: FAILED. 49 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 49.52s

error: test failed, to rerun pass `-p lineark --test online`
Error: Process completed with exit code 101.

Instead of assuming the workspace already has projects (which fails
in CI), the test now creates its own project and issue with RAII
cleanup guards. Also adds proper status checks with readable error
messages before parsing JSON output.
Document that online tests must be self-contained: create their own
resources with RAII guards, use retry_with_backoff for eventual
consistency, and check command status before parsing JSON output.
@flipbit03
Copy link
Owner

flipbit03 commented Mar 6, 2026

Hey @lightstrike — I pushed a fix for the failing test (two commits on the branch) - thanks for letting me push commits to your fork!

What happened: The issues_list_with_project_filter test assumed the workspace already had projects, but our CI test workspace is bare — so it panicked at "workspace must have at least one project".

What I changed:

  • Rewrote the test to be self-contained: it now creates its own project and issue, uses RAII guards (ProjectGuard, IssueGuard) for automatic cleanup, and retry_with_backoff to handle Linear's eventual consistency.
  • Added proper output.status.success() checks with stdout/stderr in assertion messages before parsing JSON — the original .unwrap() on JSON parsing was hiding the real error (e.g. an auth failure would show up as "EOF while parsing a value" instead of the actual 401 message).

Going forward: I've also added a section to CLAUDE.md documenting these online test conventions (self-contained tests, RAII guards, status checks before JSON parsing) so future contributors have clear guidance.

Confirmed passing locally against the live API. Should be good to merge now!

@flipbit03 flipbit03 added the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
Avoid name collisions with zombie resources from previously-failed
test runs by appending a UUID suffix. Also document this pattern
in CLAUDE.md.
@flipbit03 flipbit03 added the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
Append UUID suffixes to every hardcoded test resource name (issues,
projects, milestones, documents) to prevent name collisions from
zombie resources left by previously-failed test runs.
@flipbit03 flipbit03 added the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
@github-actions github-actions bot removed the safe-to-test Maintainer-approved: run online tests with API secrets label Mar 6, 2026
@flipbit03 flipbit03 merged commit a3f75aa into flipbit03:main Mar 6, 2026
9 checks passed
@flipbit03 flipbit03 deleted the feat/issues-list-project-filter branch March 6, 2026 17:56
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.

2 participants