Skip to content

[NOT-488] Sync generated client with staging OpenAPI#50

Merged
leo-notte merged 2 commits into
mainfrom
leo/sync-staging-openapi-client
Jul 10, 2026
Merged

[NOT-488] Sync generated client with staging OpenAPI#50
leo-notte merged 2 commits into
mainfrom
leo/sync-staging-openapi-client

Conversation

@leo-notte

@leo-notte leo-notte commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Regenerate the Go API client from staging OpenAPI
  • Regenerate the session start CLI flags from staging OpenAPI

Validation

  • make check

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

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR regenerates the Go API client and the session-start CLI flags from the staging OpenAPI spec. The changes are mechanical: struct field alignment in the model and a doc-comment update on ApiSessionStartRequestBrowserType.

  • client.gen.go: struct field alignment normalised; ApiSessionStartRequestBrowserType comment changed from the original description to a generic "defines model for..." form.
  • sessionstart_flags.gen.go: the --browser-type flag description regressed to \"browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)\" because the field-level description was removed from the staging OpenAPI spec; this makes the CLI help text for that flag unhelpful.

Confidence Score: 4/5

Safe to merge after addressing the degraded --browser-type help text, or accepting that the OpenAPI spec fix will come separately.

The --browser-type flag's CLI help text now reads 'browser-type (chromium, chrome, firefox, chrome-nightly, chrome-turbo)' — restating the flag name instead of explaining it — which is a real UX regression visible to every user who runs session start --help. The root cause is in the staging OpenAPI spec (field-level description removed), so the fix belongs there. Everything else in the diff is formatting or generic comment updates with no behavioral impact.

internal/cmd/sessionstart_flags.gen.go — the --browser-type flag description needs to be restored in the upstream OpenAPI spec so the next regeneration emits a useful help string.

Important Files Changed

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.

Fix All in Codex

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

Comment thread internal/cmd/sessionstart_flags.gen.go Outdated
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)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 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!

Fix in Codex

@leo-notte leo-notte merged commit bc7276e into main Jul 10, 2026
3 checks passed
@giordano-lucas giordano-lucas changed the title Sync generated client with staging OpenAPI [NOT-488] Sync generated client with staging OpenAPI Jul 12, 2026
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.

1 participant