[NOT-488] Sync generated client with staging OpenAPI#50
Conversation
|
| Filename | Overview |
|---|---|
| internal/api/client.gen.go | Minor regeneration changes: struct field alignment and the BrowserType type comment changed from descriptive to generic. No functional behavior change. |
| internal/cmd/sessionstart_flags.gen.go | The --browser-type flag description regressed from a human-readable explanation to 'browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)', making the CLI help text unhelpful for that flag. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
internal/cmd/sessionstart_flags.gen.go:66
**Degraded `--browser-type` flag help text**
The generated description for `--browser-type` changed from `"The browser type to use. Can be chromium, chrome or firefox. (chromium, chrome, firefox, chrome-nightly, chrome-turbo)"` to `"browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)"`. The new text just echoes the flag name with no explanation, which will confuse users reading the output of `session start --help`. The root cause is that the `description` field was removed from the `BrowserType` field in the staging OpenAPI spec (the description now lives on the enum type instead of the field). This is worth fixing upstream in the spec so the generator can emit a useful description again.
Reviews (4): Last reviewed commit: "Sync generated client with staging OpenA..." | Re-trigger Greptile
| func RegisterSessionStartFlags(cmd *cobra.Command) { | ||
| cmd.Flags().StringVar(&SessionStartAspectRatio, "aspect-ratio", "", "Viewport shape preset. When set, the backend fits the largest rectangle of this aspect ratio inside the sampled available screen area. Cannot be combined with explicit viewport_width/viewport_height.") | ||
| cmd.Flags().StringVar(&SessionStartBrowserType, "browser-type", "", "The browser type to use. Can be chromium, chrome or firefox. (chromium, chrome, firefox, chrome-nightly, chrome-turbo)") | ||
| cmd.Flags().StringVar(&SessionStartBrowserType, "browser-type", "", "browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)") |
There was a problem hiding this comment.
Degraded
--browser-type flag help text
The generated description for --browser-type changed from "The browser type to use. Can be chromium, chrome or firefox. (chromium, chrome, firefox, chrome-nightly, chrome-turbo)" to "browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)". The new text just echoes the flag name with no explanation, which will confuse users reading the output of session start --help. The root cause is that the description field was removed from the BrowserType field in the staging OpenAPI spec (the description now lives on the enum type instead of the field). This is worth fixing upstream in the spec so the generator can emit a useful description again.
Prompt To Fix With AI
This is a comment left during a code review.
Path: internal/cmd/sessionstart_flags.gen.go
Line: 66
Comment:
**Degraded `--browser-type` flag help text**
The generated description for `--browser-type` changed from `"The browser type to use. Can be chromium, chrome or firefox. (chromium, chrome, firefox, chrome-nightly, chrome-turbo)"` to `"browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)"`. The new text just echoes the flag name with no explanation, which will confuse users reading the output of `session start --help`. The root cause is that the `description` field was removed from the `BrowserType` field in the staging OpenAPI spec (the description now lives on the enum type instead of the field). This is worth fixing upstream in the spec so the generator can emit a useful description again.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Validation
Note: generation still reports the existing unsupported-field warnings for session start extra_http_headers and proxies, but generated code is up to date and the check passes.
Linear: NOT-488 https://linear.app/nottelabsinc/issue/NOT-488/notte-cli-pr-50-sync-generated-client-with-staging-openapi