fix(app submit): skip redundant fetch and show raw missing-field names (BEX-454) - #81
Merged
shubham773 merged 2 commits intoAug 31, 2026
Conversation
…s (BEX-454)
The command ran the state preflight and then always fetched the full app before the submittability gate, so a not-submittable app triggered a wasted GET /cli/apps/{id} call. Move the gate to run right after the state read, before the fetch.
Also stop relabelling the missing-field names: the state API returns keys like logoLink / oauth.scopes, which the human path was rewriting to 'Logo URL' / 'Scopes'. Both --json and interactive output now show the names exactly as the API returns them.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
app status ignored any message the state endpoint returns and always rendered locally-canned per-state copy. Prefer the API's message field when present; keep the per-state copy as a fallback for an older server that omits it (or sends a blank string), matching how state / submittable / missing_fields already tolerate an older server. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
harshit-dhawan-sib
approved these changes
Aug 28, 2026
shubham773
merged commit Aug 31, 2026
309a9e9
into
sync/main-into-feature_set-brevo-cli-v2
2 checks passed
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.



What & why
Two fixes to
brevo app submit(public-apps preview surface). Both were visible in a debug run of the command against a not-yet-submittable app.1. No redundant app fetch when the app isn't submittable
The command ran the state preflight (
GET .../state), which already reportssubmittableand the list ofmissing_fields, and then always fetched the full app (GET /cli/apps/{id}) before running the submittability gate. So a not-submittable app made a second, wasted request before erroring out.The submittability gate now runs immediately after the state read, before the fetch — a not-submittable app errors without the extra call.
2. Missing-field names shown exactly as the API returns them
The state API returns raw field keys (e.g.
logoLink,oauth.scopes). The human-readable path was remapping them to friendly labels (Logo URL,Scopes). Both--jsonand interactive output now show the field names exactly as the backend returns them.Notes
distribution_type, which only the app fetch provides, so avoiding the fetch means gating on submittability first.submittableis meaningful only for public apps, so a private app still falls through to the existing not-public error.SKILL.md/AGENTS.md) carry noapp submitreference (gated feature), so no doc sync was needed.Testing
submit.test.tsupdated (raw-key assertions +fetchAppnot-called guards) — 27/27 pass.yarn lintclean.Ref: BEX-454
🤖 Generated with Claude Code