Skip to content

Conversation

@andreiborza
Copy link
Member

We have many e2e test apps and it can be cumbersome to type in which exact app you want to run. This PR adds a Makefile that uses fzf to give a better experience:

Screenshot.2026-01-23.at.12.01.44.mp4

Note: Requires having fzf installed via brew install fzf or other package managers.

cursor[bot]

This comment was marked as outdated.

echo "Error: fzf is required. Install with: brew install fzf"; \
exit 1; \
fi
@ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run
Copy link

Choose a reason for hiding this comment

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

Bug: The Makefile uses xargs -r, which is a GNU-specific flag. This will cause the command to fail on macOS, which uses BSD xargs by default.
Severity: MEDIUM

Suggested Fix

Remove the -r flag from the xargs command. The default behavior of BSD xargs (used on macOS) is to not run the command if the input is empty, which achieves the same goal. This change will make the command compatible with both GNU and BSD systems.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: dev-packages/e2e-tests/Makefile#L8

Potential issue: The `make run` command in `dev-packages/e2e-tests/Makefile` pipes
output to `xargs -r`. The `-r` flag is a GNU extension and is not supported by the BSD
version of `xargs` that is the default on macOS. Since the project's documentation
explicitly instructs macOS users to install dependencies using Homebrew, it is a primary
target development platform. Consequently, any developer on macOS attempting to use this
documented command will encounter an `xargs: illegal option -- r` error, preventing the
test runner from executing.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it runs on mac.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

echo "Error: fzf is required. Install with: brew install fzf"; \
exit 1; \
fi
@ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run
Copy link

Choose a reason for hiding this comment

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

xargs -r flag incompatible with macOS

High Severity

The xargs -r flag is a GNU extension not available in BSD xargs on macOS. Since the documentation instructs users to install fzf via brew (macOS-specific), the Makefile will fail on macOS with error xargs: illegal option -- r. This prevents the entire feature from working on its primary target platform.

Fix in Cursor Fix in Web

.PHONY: run list

run:
@if ! command -v fzf &> /dev/null; then \
Copy link

Choose a reason for hiding this comment

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

Bash-specific redirection syntax breaks on POSIX shells

High Severity

The &> redirection syntax is bash-specific and not POSIX-compliant. Since the Makefile doesn't specify SHELL := /bin/bash, it defaults to /bin/sh which is dash on many Linux systems including Ubuntu. This causes a syntax error preventing the fzf check from working on non-bash systems. The POSIX-compliant alternative is >/dev/null 2>&1.

Fix in Cursor Fix in Web

@andreiborza andreiborza enabled auto-merge (squash) January 23, 2026 11:24
@andreiborza andreiborza merged commit 6119cf2 into develop Jan 23, 2026
184 checks passed
@andreiborza andreiborza deleted the ab/e2e-make branch January 23, 2026 11:32
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.

3 participants