Skip to content

v2 - #9

Merged
DotoPototo merged 99 commits into
mainfrom
beta
Jul 23, 2026
Merged

v2#9
DotoPototo merged 99 commits into
mainfrom
beta

Conversation

@DotoPototo

Copy link
Copy Markdown
Owner

No description provided.

DotoPototo and others added 30 commits September 24, 2024 21:21
position completion would incorrectly show while entering flag value after typing a space
splitting position args and flags function would add the same invalid flag mulitple times to the slice
…vertical scrollbar, type icons, description dimming
@DotoPototo DotoPototo self-assigned this Jul 23, 2026
@socket-security

socket-security Bot commented Jul 23, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcharm.land/​bubbletea/​v2@​v2.0.699100100100100
Updatedgithub.com/​charmbracelet/​x/​ansi@​v0.1.2 ⏵ v0.11.799 -1100100100100
Addedcharm.land/​bubbles/​v2@​v2.1.0100100100100100
Addedcharm.land/​lipgloss/​v2@​v2.0.3100100100100100

View full report

Copilot AI left a comment

Copy link
Copy Markdown

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 is a major “v2” refactor of the bubblecomplete component, updating the module/dependencies to the Charm v2 ecosystem, expanding filesystem/path completion support, and formalizing validation and configuration surfaces for host applications.

Changes:

  • Introduces structured validation errors (ValidationErrorKind / ValidationError) while preserving legacy error strings, and improves flag/path validation behavior.
  • Adds/expands filesystem completion infrastructure (path parsing/resolution + directory caching) plus richer rendering (match highlighting, scrollbar rendering, path-validity overlay).
  • Modernizes public configuration and integration: new Option constructors, structured Styles/KeyMap, and Bubble Tea v2 tea.View integration.

Reviewed changes

Copilot reviewed 38 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
validation.go Refactors validation flow, flag parsing, path validation, and error construction.
validation_errors.go Adds typed validation errors with kind/token/argument metadata.
validation_test.go Replaces the old quote test with extensive validation coverage and kind inspection.
test_data_test.go Adds shared TestCommands fixture for tests/fuzzers.
parse.go Adds tokenizer producing tokens with byte offsets and quote metadata.
parse_test.go Adds tokenize behavior tests, including invalid UTF-8 offset invariants.
fuzz_test.go Adds fuzz targets for tokenize/validate/completions/render and path helpers.
pathresolve.go Adds quote stripping + pure path resolution (tilde, separators, parent/base/prefix).
pathresolve_test.go Adds unit tests and invariants for resolvePath/stripQuotes.
pathcache.go Adds LRU+TTL cache for os.ReadDir results to amortize filesystem completion costs.
pathcache_test.go Adds cache tests (TTL, LRU, concurrency).
render.go Overhauls rendering: View() tea.View, Render() string, completion row model, truncation, match highlight ranges, scrollbar rendering, and path overlay.
styles.go Moves to lipgloss v2 + introduces structured Styles with DefaultStyles().
options.go Adds functional options (With*) for construction-time configuration.
keys.go Adds structured key bindings (KeyMap) using bubbles v2 key.Binding.
history.go Reworks persistent history (atomic save, size cap, clear/reset behavior, better error surfacing).
history_test.go Adds comprehensive tests for history persistence, limits, atomic writes, and error behavior.
model_test.go Adds validation tests for Command, Flag, and PositionalArgument shapes.
README.md Rewrites documentation: features, v2 usage, filesystem completion semantics, config.
doc.go Adds package-level documentation and usage overview.
CLAUDE.md Adds contributor notes on repo layout + Bubble Tea gotchas.
bubblecomplete.go Updates update loop, key handling, completion state management, and history/validation integration for v2 APIs.
example/main.go Updates example to Bubble Tea v2, new options, new rendering API, improved profiling flow.
example/commands.go Moves example command definitions into a dedicated file.
example.tape Updates VHS tape script to match new example flow and features.
.github/workflows/ci.yml Adds CI (fmt/vet/build/test/race), lint, and govulncheck jobs.
.golangci.yml Adds golangci-lint v2 config with targeted linter set and exclusions.
.gitignore Ignores docs/ and common agent scratch dirs.
go.mod Renames module path, updates to Charm v2 dependencies, updates Go version directive.
go.sum Updates dependency checksums accordingly.
example/go.mod Removes nested example module (example becomes a subpackage).
example/go.sum Removes nested example sums.
testdata/fuzz/FuzzTokenize/c744251721e30157 Adds fuzz seed corpus entry.
Comments suppressed due to low confidence (1)

validation_test.go:68

  • Typo in test case name: "valind" → "valid". Accurate test names make failures easier to triage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread validation_test.go Resolved
Comment thread validation_errors.go Resolved
Comment thread pathcache.go Resolved
@DotoPototo
DotoPototo merged commit bbca868 into main Jul 23, 2026
11 checks passed
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.

2 participants