Skip to content

Conversation

@mcncl
Copy link
Contributor

@mcncl mcncl commented Dec 16, 2025

Description

We have implemented duplicate typing in the CLI for rendering output, which might cause drift if go-buildkite structs change and we utilise them in the CLI but don't update our models.

Changes

  • Implements a Viewable method which renders our output for us, without the need for individual models
  • Deletes a load of code
  • Adds some testing for our Viewable method
  • Deletes more code

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

I used Claude (via OpenCode) to identify duplicate typing that we could remove; it scanned the files for locations where we create a struct which already exists in go-buildkite. This allowed me to create a function using generics ([T]) which performs our text based rendering, removing the need for packages like lipgloss

@mcncl mcncl requested a review from a team as a code owner December 16, 2025 05:25
@mcncl mcncl merged commit 0fee024 into main Dec 16, 2025
1 check passed
@mcncl mcncl deleted the SUP-4966/duplicate_typing branch December 16, 2025 09:31
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.

3 participants