Repository navigation
Fix extra space when copying a jq command without flags - #402
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Owen, I recommend merging GitHub CI passed lint, all 94 tests, and the production build. Codex reviewed this head and reported no findings. There are no unresolved review threads. The change is low risk and limited to formatting the copied command. For a direct spot-check, enter |
Fixes the extra space after
jqwhen the playground copies a command with no flags. Closes #398.The Copy button now uses
formatJqCommandto join the executable, nonblank flags in selection order, and the quoted query. The query is copied verbatim.Verification
b912f85, four of nine focused tests failed on extra spaces. With no flags, the formatter returnedjq '.'. Single and multiple flags kept their existing output. The initial missing-export failure was separate from these assertions.ed49ff7,npx vitest run src/lib/utils.test.tspassed all nine tests. These cover empty, omitted, and blank options, flag order, and spaces, pipes, and newlines in queries.npm run lint,npm test(94 tests in seven files), andnpm run build. The baseline also emitted the Vitest config warning and OpenAPI diagnostics.-c, then added-r. A test page recorded the string after each browser clipboard write succeeded. The commands werejq '.',jq -c '.', andjq -c -r '.'.Risk and review
Low risk. The diff changes clipboard text formatting and its unit tests. The existing clipboard notifications and button controls are unchanged. Revert
ed49ff7to restore the previous formatter.The task and whole-branch reviews found no issues. Codex implemented and reviewed the branch. The requested GitHub Codex review uses the same vendor. Owen reviews the final head and decides whether to merge.
Rulings I made