Skip to content

Release/1.2.1#5

Open
backslash-ux wants to merge 6 commits intomainfrom
release/1.2.1
Open

Release/1.2.1#5
backslash-ux wants to merge 6 commits intomainfrom
release/1.2.1

Conversation

@backslash-ux
Copy link
Copy Markdown
Owner

@backslash-ux backslash-ux commented Apr 28, 2026

Summary

Describe the change and the user-facing outcome.

Related Issue

Link the relevant GitHub issue, discussion, or explain why no public tracking item was needed.

Changes

Validation

  • bun run typecheck
  • relevant bun test coverage for the touched area
  • bun run check:all if shared command behavior, schemas, or output changed

Docs

  • README.md updated if CLI usage changed
  • SKILL.md updated if AI-agent usage changed
  • CHANGELOG.md updated if there is a notable user-facing change

Risks Or Follow-Ups

Summary by CodeRabbit

  • New Features

    • Added --label filter for plane issues list command—repeatable with AND-based filtering logic
    • Improved CLI help output: concise overview with plane --help, detailed syntax with plane <command> --help
  • Bug Fixes

    • Pre-commit hook file size and test coverage checks are now non-fatal
  • Documentation

    • Updated CLI usage and command examples across documentation
  • Chores

    • Version bumped to 1.2.1
    • Updated .gitignore patterns

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

This PR increments the package version to 1.2.1 and introduces a refactored CLI help system with condensed root help output, adds a new repeatable --label filter for plane issues list with AND semantics, changes pre-commit checks to non-fatal, removes unset environment variable instructions from agent docs, and includes corresponding test and documentation updates.

Changes

Cohort / File(s) Summary
Version Management
package.json, src/app.ts
Version incremented from 1.2.0 to 1.2.1; new exported VERSION constant introduced in src/app.ts and wired to CLI runner.
CLI Help System
src/app.ts, src/bin.ts
Root help logic refactored into new exported functions isRootHelpRequest() and renderRootHelp(); entry point now conditionally handles root help requests before invoking normal CLI flow. Root command description shortened to point users to per-command help.
Issue Filtering Feature
src/commands/issues.ts
New repeatable --label CLI filter added to plane issues list; handler now resolves label names to IDs and filters results using AND semantics.
Build Configuration
.gitignore, .husky/pre-commit
Gitignore updated to ignore .opencode and .brv patterns; pre-commit hook file size and test coverage checks changed from fatal to non-fatal via || true appends.
Documentation
AGENTS.md, CHANGELOG.md, README.md, SKILL.md
Release notes added for v1.2.1; CLI help usage patterns and label filtering examples documented; unset environment variable instruction removed from agent commands.
Project Agents
src/project-agents.ts
Removal of PLANE_* environment variable unset snippet from managed agent commands section.
Root Help Tests
tests/app.test.ts
New test suite validates isRootHelpRequest() detection and renderRootHelp() output format, coverage, and exclusions.
Label Filter Tests
tests/issue-commands.test.ts, tests/json-output.test.ts, tests/xml-output.test.ts
Comprehensive test coverage added for label filtering (single, multiple with AND semantics, no-match scenarios); all existing issue tests updated to pass label: [] parameter.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Poem

🐰 A hop and a bound, new features abound!
Version bump and help made lean,
Labels filter with AND, the best we have planned,
Pre-commit checks now serene! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is almost entirely unfilled—it contains only the template structure with empty sections for Summary, Changes, Related Issue, and Risks Or Follow-Ups, making it impossible to understand the intent and scope of the release. Complete all required sections: provide a clear Summary of user-facing changes, explain the Related Issue or rationale, list the specific Changes made, and note any Risks or Follow-Ups.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Release/1.2.1' is partially related to the changeset but is overly broad and vague, not clearly summarizing the main changes (label filtering, help redesign, pre-commit hook fixes, version bump). Provide a more specific title that highlights the primary user-facing changes, such as 'Add label filtering to issues list and improve CLI help output for version 1.2.1' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/1.2.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
src/commands/issues.ts (1)

135-147: Small optimization: dedupe requested labels and use Set lookups.

This keeps behavior the same while reducing repeated checks and improving membership lookup cost.

Suggested refactor
 		if (label.length > 0) {
-			const labelIds: string[] = [];
-			for (const l of label) {
+			const requestedLabels = [...new Set(label)];
+			const labelIds: string[] = [];
+			for (const l of requestedLabels) {
 				const resolved = yield* resolveLabel(id, l);
 				labelIds.push(resolved.id);
 			}
 			filtered = filtered.filter((i) => {
 				if (!Array.isArray(i.labels)) return false;
-				const issueLabelIds = i.labels.map((l) =>
+				const issueLabelIds = new Set(i.labels.map((l) =>
 					typeof l === "string" ? l : l.id,
-				);
-				return labelIds.every((lid) => issueLabelIds.includes(lid));
+				));
+				return labelIds.every((lid) => issueLabelIds.has(lid));
 			});
 		}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/commands/issues.ts` around lines 135 - 147, The label filtering currently
builds labelIds with potential duplicates and uses array.includes repeatedly;
change the logic in the block using resolveLabel, labelIds and the
filtered.filter callback to dedupe requested labels (e.g. collect resolved.id
into a Set) and perform membership checks via Set.has for each issue's label ids
(derive issueLabelIds as before but check every requested id via the Set) to
reduce repeated checks and improve lookup cost while keeping behavior the same.
.husky/pre-commit (1)

12-16: Keep failures visible when checks are non-fatal.

|| true is fine for non-blocking flow, but explicit warning output makes failures harder to miss during commit.

Suggested tweak
-"$BUN" scripts/check-file-size.ts || true
+"$BUN" scripts/check-file-size.ts || echo "warning: file-size check failed (non-fatal)" >&2
@@
-"$BUN" scripts/check-coverage.ts || true
+"$BUN" scripts/check-coverage.ts || echo "warning: coverage check failed (non-fatal)" >&2
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.husky/pre-commit around lines 12 - 16, The pre-commit hooks run scripts
scripts/check-file-size.ts and scripts/check-coverage.ts with "|| true", which
hides failures; change the invocation so you capture the exit status of each
"$BUN" command and, if non-zero, print an explicit warning message naming the
script (e.g. "Warning: scripts/check-file-size.ts failed (exit <code>)") while
still allowing the hook to continue; update both invocations that currently use
"|| true" to perform this check and warning logic so failures remain visible in
the commit output.
tests/issue-commands.test.ts (1)

537-557: Consider extracting a shared log-capture helper in this test file.

The new cases repeat the same console.log interception pattern; a helper would reduce duplication and future edits.

♻️ Suggested refactor
+async function captureLogs(fn: () => Promise<void>): Promise<string> {
+	const logs: string[] = [];
+	const orig = console.log;
+	console.log = (...args: unknown[]) => logs.push(args.join(" "));
+	try {
+		await fn();
+	} finally {
+		console.log = orig;
+	}
+	return logs.join("\n");
+}
-const logs: string[] = [];
-const orig = console.log;
-console.log = (...args: unknown[]) => logs.push(args.join(" "));
-
-try {
-	await Effect.runPromise(/* ... */);
-} finally {
-	console.log = orig;
-}
-const output = logs.join("\n");
+const output = await captureLogs(() =>
+	Effect.runPromise(/* ... */),
+);

Also applies to: 613-633, 662-682

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/issue-commands.test.ts` around lines 537 - 557, The test repeats
console.log interception around calls to issuesListHandler; extract a small
helper (e.g., captureConsoleLogs or withCapturedLogs) that accepts an async
callback, replaces console.log with a collector, runs the callback, restores the
original console.log, and returns the collected logs (and/or callback result);
then replace the inline pattern around issuesListHandler calls with this helper
to remove duplication and reuse it for the other occurrences (the blocks that
currently create logs: string[], save orig, override console.log, try/finally
restore).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.husky/pre-commit:
- Around line 12-16: The pre-commit hooks run scripts scripts/check-file-size.ts
and scripts/check-coverage.ts with "|| true", which hides failures; change the
invocation so you capture the exit status of each "$BUN" command and, if
non-zero, print an explicit warning message naming the script (e.g. "Warning:
scripts/check-file-size.ts failed (exit <code>)") while still allowing the hook
to continue; update both invocations that currently use "|| true" to perform
this check and warning logic so failures remain visible in the commit output.

In `@src/commands/issues.ts`:
- Around line 135-147: The label filtering currently builds labelIds with
potential duplicates and uses array.includes repeatedly; change the logic in the
block using resolveLabel, labelIds and the filtered.filter callback to dedupe
requested labels (e.g. collect resolved.id into a Set) and perform membership
checks via Set.has for each issue's label ids (derive issueLabelIds as before
but check every requested id via the Set) to reduce repeated checks and improve
lookup cost while keeping behavior the same.

In `@tests/issue-commands.test.ts`:
- Around line 537-557: The test repeats console.log interception around calls to
issuesListHandler; extract a small helper (e.g., captureConsoleLogs or
withCapturedLogs) that accepts an async callback, replaces console.log with a
collector, runs the callback, restores the original console.log, and returns the
collected logs (and/or callback result); then replace the inline pattern around
issuesListHandler calls with this helper to remove duplication and reuse it for
the other occurrences (the blocks that currently create logs: string[], save
orig, override console.log, try/finally restore).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0e9a2fa5-2aa5-4f90-b5ed-9e687a0151aa

📥 Commits

Reviewing files that changed from the base of the PR and between f0abdf9 and 254e7a1.

📒 Files selected for processing (15)
  • .gitignore
  • .husky/pre-commit
  • AGENTS.md
  • CHANGELOG.md
  • README.md
  • SKILL.md
  • package.json
  • src/app.ts
  • src/bin.ts
  • src/commands/issues.ts
  • src/project-agents.ts
  • tests/app.test.ts
  • tests/issue-commands.test.ts
  • tests/json-output.test.ts
  • tests/xml-output.test.ts
💤 Files with no reviewable changes (2)
  • AGENTS.md
  • src/project-agents.ts

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