Repository navigation
Pre-release - #10
Merged
Merged
Pre-release#10
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares the bubblecomplete library for a v2 pre-release by switching the module path to /v2, updating public docs/examples, and tightening correctness around path completion/validation and completion rendering on narrow terminals.
Changes:
- Bump module/import paths to
github.com/dotopototo/bubblecomplete/v2and update README, examples, and add a v2.0.0 changelog entry. - Fix/guard completion rendering and Tab behavior for filesystem path completions (including narrow terminal width clamping) and expand tests for these regressions.
- Improve validation/path error wrapping (so
PathNotFoundcan unwrap to underlyingfs/oserrors) and make small hot-path perf tweaks (LRU touch rotation, Unicode-safe punctuation sorting).
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| validation.go | Pass through underlying os.Stat not-exist error when producing PathNotFound. |
| validation_test.go | Fix test-case typos; assert PathNotFound unwraps to fs.ErrNotExist. |
| validation_errors.go | Extend errPathNotExist to store the underlying error in ValidationError.Err. |
| update_test.go | Add regression test ensuring rendered rows never exceed terminal width on narrow terminals. |
| render.go | Clamp titleWidth to the clamped box width; refine truncation footer gating and comments. |
| README.md | Update pkg.go.dev links, install/import snippets, and godoc references for /v2. |
| pathresolve.go | Refactor/condense documentation around quoting and path resolution semantics. |
| pathcomplete.go | Make trailing-space detection token-aware; condense docs; keep path completion invariants. |
| pathcache.go | Optimize LRU “touch” to avoid per-hit slice reallocations; clarify cache key semantics. |
| path_integration_test.go | Add integration regressions for Tab drill-down edge cases and quoted-space pathState behavior. |
| model.go | Minor doc clarifications for FilesystemCompletions, completion interface, and SetWidth. |
| history.go | Doc tightening around history persistence behavior and failure handling. |
| go.mod | Change module path to /v2. |
| example/main.go | Update imports to /v2; ensure CPU profile file is closed on StartCPUProfile failure and via defer. |
| example/commands.go | Update example imports to /v2. |
| completions.go | Unicode-safe punctuation detection (avoid panic on empty/UTF-8 edge cases); doc tightening. |
| CHANGELOG.md | Add v2.0.0 changelog entry outlining breaking changes, additions, and fixes. |
| bubblecomplete.go | Adjust Tab no-op guard to exempt path candidates (but see review comment). |
| .golangci.yml | Add gosmopolitan and recvcheck linters. |
| .github/workflows/ci.yml | Run CI on beta branch pushes in addition to main. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.