fix(logs): correct the --env help text — omitting it reads both envs - #624
Merged
Merged
Conversation
`base44 logs --help` claimed `--env` defaults to `preview`, but omitting it sends no env filter at all: `buildFilters` only sets `filters.env` when the flag is given (logs.ts:71-73), so the API returns both preview and prod rows. The `options.env ?? "preview"` fallback further down only picks the empty-state message for `formatLogs`, it never narrows the query. Say what the flag actually does, and assert the wording in the help spec. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.14-pr.624.af1a615Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.14-pr.624.af1a615"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.14-pr.624.af1a615"
}
}
Preview published to npm registry — try new features instantly! |
DolevEpshtein
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
The
--envoption onbase44 logswas documented as defaulting topreview, which is not what the command does. Omitting the flag applies no env filter at all, so the API returns both preview and prod rows. This PR corrects the help text to sayOmit to read both.and adds a help-output assertion covering the new wording.Related Issue
None
Type of Change
Changes Made
packages/cli/src/cli/commands/project/logs.ts: replaced the misleadingDefault: previewsuffix on the--envoption description withOmit to read both.packages/cli/tests/cli/logs.spec.ts: added an assertion to the existinglogs --helptest so the corrected wording is pinned.Supporting analysis of why the old text was wrong:
buildFilters(logs.ts:71-73) setsfilters.envonly when the flag is present, so no flag means noenvkey in the query sent to the API.options.env ?? "preview"fallback atlogs.ts:474is passed only toformatLogs, which uses it solely to pick the empty-state message (logs.ts:312-318). It never narrows what gets fetched.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
Help-text only — no runtime behavior changes. The command already read both environments when
--envwas omitted; only the documentation of that behavior was wrong. Note that the empty-state message still assumespreviewwhen the flag is absent (logs.ts:314-315), which is out of scope here but may be worth a follow-up.The PR author reports
bun run test tests/cli/logs.spec.tspassing (49 tests) plus a negative-control revert that fails the new assertion; I was not able to execute the suite in this environment to confirm, so the testing boxes above reflect only what is verifiable from the diff.🤖 Generated by Claude | 2026-09-14 10:02 UTC | af1a615