Skip to content

Upgrade Charm TUI stack to v2 and add dispatch repo links#1048

Merged
gtrrz-victor merged 5 commits intomainfrom
glamour-v2-migration
Apr 30, 2026
Merged

Upgrade Charm TUI stack to v2 and add dispatch repo links#1048
gtrrz-victor merged 5 commits intomainfrom
glamour-v2-migration

Conversation

@gtrrz-victor
Copy link
Copy Markdown
Contributor

@gtrrz-victor gtrrz-victor commented Apr 27, 2026

https://entire.io/gh/entireio/cli/trails/237

Summary

Migrate the entire Charm TUI stack to v2: glamour, bubbletea, lipgloss, huh, and bubbles. Also use OSC 8 terminal hyperlink support for dispatch repo headings.

What Changed

  • Swapped Charm dependencies to charm.land/glamour/v2, charm.land/bubbletea/v2, charm.land/lipgloss/v2, charm.land/huh/v2, and charm.land/bubbles/v2.
  • Migrated TUI models (activity, dispatch, search) to the v2 declarative tea.View API: View() returns tea.View, alt-screen/cursor are set on the view, KeyMsg becomes KeyPressMsg.
  • Updated textinput/viewport callers to the new getter/setter API (SetWidth, SetHeight, Styles()/SetStyles(), virtual cursor opt-in).
  • Wrapped huh.ThemeDracula in huh.ThemeFunc to satisfy the new huh.Theme interface.
  • Added trusted GitHub repo URL derivation for dispatch repo groups and prompt payloads.
  • Instructed local dispatch generation to render repo headings as markdown links when a trusted URL exists.
  • Added regression coverage for repo URL validation, prompt payload URLs, local/cloud dispatch repo URLs, and OSC 8 hyperlink output.
  • Moved specific interface-return allowances into .golangci.yaml and removed redundant per-line suppressions.

Test plan

  • mise run test (unit + integration)
  • mise run test:e2e:canary (Vogon E2E)
  • mise run lint
  • mise run check

Copilot AI review requested due to automatic review settings April 27, 2026 15:41
@gtrrz-victor gtrrz-victor requested a review from a team as a code owner April 27, 2026 15:41
@gtrrz-victor gtrrz-victor marked this pull request as draft April 27, 2026 15:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the dispatch TUI’s terminal markdown rendering to Glamour v2 to support OSC 8 hyperlinks, and threads a “trusted” GitHub repo URL through dispatch data so repo headings can be rendered as links (and included in generator payloads).

Changes:

  • Switch terminal markdown rendering dependencies/imports from github.com/charmbracelet/glamour to charm.land/glamour/v2.
  • Add GitHub repo URL derivation (githubRepoURL) and propagate it through local/cloud dispatch repo groups and dispatch prompt payloads.
  • Add regression tests for URL validation, URL propagation, and hyperlink rendering output.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Swaps Glamour dependency to charm.land/glamour/v2 and updates related indirect deps.
go.sum Records new/updated module checksums for Glamour v2 and related transitive deps.
cmd/entire/cli/dispatch_tui.go Updates Glamour imports for v2 terminal rendering.
cmd/entire/cli/dispatch_tui_test.go Adds a test asserting OSC 8 hyperlink sequences appear in rendered output.
cmd/entire/cli/dispatch/types.go Extends RepoGroup with a URL field for trusted repo link propagation.
cmd/entire/cli/dispatch/repo_url.go Introduces githubRepoURL helper with validation to derive trusted GitHub URLs.
cmd/entire/cli/dispatch/repo_url_test.go Adds table-driven tests for githubRepoURL validation behavior.
cmd/entire/cli/dispatch/mode_local.go Populates RepoGroup.URL during local grouping.
cmd/entire/cli/dispatch/mode_local_test.go Asserts local mode populates trusted repo URL.
cmd/entire/cli/dispatch/mode_cloud.go Populates RepoGroup.URL when mapping API response to dispatch model.
cmd/entire/cli/dispatch/mode_cloud_test.go Adds coverage verifying URL derivation is applied and unsafe names omit URL.
cmd/entire/cli/dispatch/generate.go Updates prompt requirements to allow linked repo headings and includes url in prompt payload repos.
cmd/entire/cli/dispatch/generate_test.go Adds assertions that prompt and payload include trusted repo URLs and linked-heading guidance.
cmd/entire/cli/dispatch/consts_test.go Adds testRepoURL constant for reuse across tests.
cmd/entire/cli/dispatch/cloud.go Adds url field to APIRepo for JSON compatibility (omitempty).

Comment thread cmd/entire/cli/dispatch/generate.go
gtrrz-victor and others added 2 commits April 28, 2026 16:02
Migrate to charm.land/v2 module paths for the Bubble Tea ecosystem now that
v2 is GA. View() returns tea.View instead of string, KeyMsg becomes
KeyPressMsg, viewport/textinput moved to getter/setter API, and huh.Theme
is now an interface backed by ThemeFunc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 7bb6c3cc8d74
@gtrrz-victor gtrrz-victor force-pushed the glamour-v2-migration branch from 9769ce5 to b04d01d Compare April 28, 2026 14:15
Entire-Checkpoint: 9bea7df4af2a
Entire-Checkpoint: 9dd6ebc2417a
@gtrrz-victor gtrrz-victor changed the title Migrate dispatch rendering to Glamour v2 Upgrade Charm TUI stack to v2 and add dispatch repo links Apr 28, 2026
@gtrrz-victor gtrrz-victor marked this pull request as ready for review April 28, 2026 14:57
# Conflicts:
#	cmd/entire/cli/versioncheck/autoupdate.go
Copy link
Copy Markdown
Contributor

@toothbrush toothbrush left a comment

Choose a reason for hiding this comment

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

Man, that renamed package really pollutes the diff!

@gtrrz-victor
Copy link
Copy Markdown
Contributor Author

Man, that renamed package really pollutes the diff!

I know, it looks way more than what it really is.. Thanks for the tick!

@gtrrz-victor gtrrz-victor merged commit c276c78 into main Apr 30, 2026
9 checks passed
@gtrrz-victor gtrrz-victor deleted the glamour-v2-migration branch April 30, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants