Skip to content

fix(tui): avoid opentui-spinner color type conflicts#26116

Open
gmnstr wants to merge 1 commit intoanomalyco:devfrom
gmnstr:fix/spinner-colorgenerator-type
Open

fix(tui): avoid opentui-spinner color type conflicts#26116
gmnstr wants to merge 1 commit intoanomalyco:devfrom
gmnstr:fix/spinner-colorgenerator-type

Conversation

@gmnstr
Copy link
Copy Markdown

@gmnstr gmnstr commented May 7, 2026

Issue for this PR

Closes #26119

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This fixes a package typecheck failure in packages/opencode/src/cli/cmd/tui/ui/spinner.ts caused by importing ColorGenerator through opentui-spinner.

The problem is that the repo uses @opentui/core@0.2.2, while opentui-spinner@0.0.6 is typed against @opentui/core@^0.1.49. That causes Bun to install two different @opentui/core type graphs, and the branded ColorInput / RGBA types stop matching.

This PR replaces the imported ColorGenerator type with an equivalent local structural alias in spinner.ts.

Why this works:

  • it avoids pulling the conflicting nested @opentui/core types through opentui-spinner
  • runtime behavior does not change because this is type-only wiring
  • bun typecheck succeeds again in packages/opencode

How did you verify your code works?

From packages/opencode:

  • bun typecheck

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

bun typecheck fails from opentui-spinner ColorGenerator type mismatch

1 participant