-
Notifications
You must be signed in to change notification settings - Fork 731
[WIP] gitbutler tui #11580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
1
commit into
master
Choose a base branch
from
copilot/rewrite-pr-with-new-but-api
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] gitbutler tui #11580
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Copilot stopped work on behalf of
schacon due to an error
December 18, 2025 09:45
f1e79f5 to
645b218
Compare
Comment on lines
63
to
82
| generate-ts-definitions: | ||
| needs: changes | ||
| if: ${{ needs.changes.outputs.node == 'true' || needs.changes.outputs.rust == 'true' }} | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Rust Cache | ||
| uses: Swatinem/[email protected] | ||
| with: | ||
| shared-key: ts-def-gen | ||
| save-if: ${{ github.ref == 'refs/heads/master' }} | ||
| # Node is needed for the formatting of typescript files. | ||
| - uses: ./.github/actions/init-env-node | ||
| - name: Dependencies for 'keyring' | ||
| run: sudo ./scripts/install-minimal-debian-dependencies.sh | ||
| - run: ./scripts/generate-ts-definitions-from-rust.sh |
Check warning
Code scanning / zizmor
overly broad permissions Warning
overly broad permissions
9be65e7 to
9cac379
Compare
Wanted to see how far I could get towards LazyGit functionality with GitButler APIs. Turns out we can get pretty far, pretty fast if we make Agents do most of the work. Initial plan Remove large unused CLI and metrics modules Compile with `cargo build -p but` and fix issues by removing or stubbing out large, unused modules that caused build problems. The args and metrics modules were deleted and lib.rs updated to stop referencing removed modules and to import CommandName where needed. Also disabled the incomplete legacy lazy module (commented out) and cleaned up metrics usage sites to use the re-exported CommandName to resolve compilation errors. Make lazy TUI runnable Add optional crossterm and ratatui dependencies, expose a hidden "Lazy" CLI subcommand and wire the lazy module into the CLI so the experimental Lazy TUI can be launched. Update Cargo.lock to include the new crates and versions required, and make numerous code changes to adapt the lazy UI to recent upstream API and structural changes: replace removed CommandContext usage with TODO stubs and safe fallbacks, adjust status/diff API usage, switch to command::legacy::status::assignment paths, provide temporary IdMap construction, and stub out upstream/update/reword/squash/uncommit operations until they are reimplemented without CommandContext. These changes were needed to make the Lazy TUI runnable again after refactors that removed CommandContext and changed diff/status APIs. The commit brings in the terminal UI crates, registers the CLI entry point, and makes conservative code changes (stubbing or converting calls) so the lazy interface can start while leaving TODOs to fully restore interactive operations. Fix compile errors and update lazy modules Address multiple compilation errors caused by API/type changes and missing imports. Replace now-invalid commit detail handling with a placeholder implementation that returns empty file changes and zeroed stats (note: needs reimplementation using Context). Import anyhow::anyhow macro and tidy up unused code by removing duplicate/reset methods that conflicted with function signatures. Also apply minor type conversion fixes hints (use Into::into and deref suggestions) documented for future work. Fix warnings by removing unused imports/fields and dead code paths Resolve multiple compiler warnings by cleaning up unused imports, constants, and struct fields, and by adjusting unreachable code paths in lazy UI modules. Specifically: - Removed unused imports and the unused DATE_ONLY constant from lazy/app.rs, and simplified collection imports. - Marked several target-info structs with #[allow(dead_code)] to silence dead-code warnings for fields currently unused. - Adjusted upstream_integration import usage to only bring in needed types. - In squash.rs and uncommit.rs, renamed pattern-bound variables to _target and converted early-return Err(...) with a return into direct Err(...) expressions; commented out legacy CommandContext-dependent code and removed statements after early errors that made code unreachable. These changes clean up the codebase to eliminate unreachable code and unused-item warnings while preserving the placeholders and TODOs for future reimplementation.
9cac379 to
02e5c9a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@gitbutler/desktop
@gitbutler/no-relative-imports
@gitbutler/ui
@gitbutler/web
rust
Pull requests that update Rust code
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.
Rewrite Lazy TUI to Use New But APIs
Completed
but_api::legacyinstead of directgitbutler_*importsCommandContextwithbut_ctx::ContextthroughoutContext::new_from_legacy_project)load_from_default_path_creating_without_customizationcrosstermandratatuidependencies to but crateFileAssignment::from_assignmentsto useIdMapparameterstatus::assignment(nowcommand::legacy::status::assignment)Lazycommand to CLI argsTODO/Known Issues
get_commit_changesis stubbed - needs implementation usingbut-core's commit change APIsChanges Made
The lazy TUI has been updated to work with the current master branch APIs:
but_ctx::Contextinstead of the removedCommandContextbut_api::legacynamespaceOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.