Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe("createTerminalKeyEventHandler", () => {
expect(xterm.input).not.toHaveBeenCalled();
});

it("treats Node-style \"darwin\" platform as Mac, not Windows", () => {
it('treats Node-style "darwin" platform as Mac, not Windows', () => {
const xterm = terminal();
const event = keyboardEvent({
key: "Enter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
markTerminalSessionReady,
rejectTerminalSessionReady,
} from "renderer/lib/terminal/session-readiness";
import { installTerminalKeyEventHandler } from "renderer/lib/terminal/terminal-key-event-handler";
import { electronTrpcClient } from "renderer/lib/trpc-client";
import { useTabsStore } from "renderer/stores/tabs/store";
import { killTerminalForPane } from "renderer/stores/tabs/utils/terminal-cleanup";
Expand All @@ -24,7 +25,6 @@ import {
} from "../helpers";
import { isPaneDestroyed } from "../pane-guards";
import { coldRestoreState, pendingDetaches } from "../state";
import { installTerminalKeyEventHandler } from "renderer/lib/terminal/terminal-key-event-handler";
import type {
CreateOrAttachMutate,
CreateOrAttachResult,
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/commands/tasks/list/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default command({
priority: string()
.enum("urgent", "high", "medium", "low", "none")
.desc("Filter by priority"),
assignee: string().desc("Filter by assignee user id"),
assigneeMe: boolean().alias("m").desc("Filter to my tasks"),
Comment on lines +11 to 12
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Conflicting filters can be silently combined

--assignee <userId> and --assignee-me are mutually exclusive from a user-intent perspective, but neither the CLI nor the underlying tRPC call enforces that constraint. If a user accidentally passes both, both assigneeId and assigneeMe will be forwarded to the API together. Depending on how the tRPC procedure combines those predicates (AND vs OR), it may silently return an unexpected result set instead of an error. A short guard or at least a description note (e.g. "Filter by assignee user id (mutually exclusive with --assignee-me)") would make the behaviour explicit.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/cli/src/commands/tasks/list/command.ts
Line: 11-12

Comment:
**Conflicting filters can be silently combined**

`--assignee <userId>` and `--assignee-me` are mutually exclusive from a user-intent perspective, but neither the CLI nor the underlying tRPC call enforces that constraint. If a user accidentally passes both, both `assigneeId` and `assigneeMe` will be forwarded to the API together. Depending on how the tRPC procedure combines those predicates (AND vs OR), it may silently return an unexpected result set instead of an error. A short guard or at least a description note (e.g. `"Filter by assignee user id (mutually exclusive with --assignee-me)"`) would make the behaviour explicit.

How can I resolve this? If you propose a fix, please make it concise.

creatorMe: boolean().desc("Filter to tasks I created"),
search: string().alias("s").desc("Search by title"),
Expand All @@ -24,6 +25,7 @@ export default command({
const result = await ctx.api.task.list.query({
statusId: options.status ?? undefined,
priority: options.priority,
assigneeId: options.assignee ?? undefined,
assigneeMe: options.assigneeMe ?? undefined,
creatorMe: options.creatorMe ?? undefined,
search: options.search ?? undefined,
Expand Down
Loading