Skip to content

fix: keep hardcoded visibility for backwards compatibility#922

Merged
mbevc1 merged 2 commits into
mainfrom
20260531_fix_visibility
May 31, 2026
Merged

fix: keep hardcoded visibility for backwards compatibility#922
mbevc1 merged 2 commits into
mainfrom
20260531_fix_visibility

Conversation

@mbevc1
Copy link
Copy Markdown
Contributor

@mbevc1 mbevc1 commented May 30, 2026

Restore payload removed in #918 to make it compatible with older Kosli instances.

Recent Kosli servers accept flow create/update without visibility, but older instances might still reject the payload without it. Keep sending visibility: "private" for backwards compatibility, with a comment marking it for removal once the minimum supported server version no longer requires the field.

Recent Kosli servers accept flow create/update without `visibility`, but
older instances might still reject the payload without it. Keep
sending `visibility: "private"` for backwards compatibility, with a
comment marking it for removal once the minimum supported server
version no longer requires the field.
@mbevc1 mbevc1 added bug Something isn't working go Pull requests that update go code labels May 30, 2026
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 30, 2026

Claude finished @mbevc1's task in 1m 52s —— View job


Review of PR #922

  • Run static analysis (build, vet, mod tidy)
  • Review code changes
  • Post review feedback

Static Analysis

All checks pass: go build, go vet, go mod tidy — no issues.

Review Summary

This PR looks good. It's a small, focused backwards-compatibility fix that restores the Visibility field removed in #918.

What's done well:

  • The TODO comment on the struct is thorough — it explains why the field exists, when it can be removed, and what to clean up (both the field and the run() assignment). This is exactly the kind of comment worth keeping.
  • Setting the value in run() rather than as a struct default keeps the logic in one place and means test helpers don't need to know about it.
  • The change is minimal and self-contained.

No issues found with correctness, security, or performance. The existing createFlow tests exercise both the template-file and legacy code paths, and Visibility is unconditionally set in run(), so the field will be present in all requests regardless of which path is taken.

@mbevc1 mbevc1 enabled auto-merge (squash) May 30, 2026 23:36
Comment thread cmd/kosli/createFlow.go Outdated
Comment thread cmd/kosli/createFlow.go
Comment thread cmd/kosli/createFlow.go
@mbevc1 mbevc1 merged commit 168dbc9 into main May 31, 2026
20 checks passed
@mbevc1 mbevc1 deleted the 20260531_fix_visibility branch May 31, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants