Skip to content

Conversation

Caleb-T-Owens
Copy link
Contributor

@Caleb-T-Owens Caleb-T-Owens commented Jul 19, 2025

This is an off-the-clock experiment that probably won’t land. It’s just a fun experiment into what a build of GitButler that isn’t tied to tauri might look like.

Reasons why we might want to do something like this

  • Less tie in with tauri.
    • Tauri is a great framework, but we've pushing some of the boundaries with it. For instance:
      • The use of WebKit makes the dev-exp worse, means we have to support a wide range of browsers.
      • Packaging for linux is a challenge because tauri doesn't bundle it's own browser and compared to electron it's a much less well trodden path.
      • Ctrl Z only works either in rich text mode or in regular text boxes for "reasons"
      • Random characters get inserted into text boxes when hitting arrow keys for "reasons"
  • Less tie on on tauri specific APIs
    • This frees us up to support development containers
    • This would enable us to write true end to end tests that go through the UI and work with real git repositories

electron prototype build

  • App bundling
    • Currently there is only a development script. I've not explored the ins and outs of bundling
  • App updating
  • File picking via the server rather than through electron
    • I added a basic file picker from the electron toolkit, but we really would want to have something that goes through the server so we could pick folders from a remote server.

e2e testing focused changes

  • Rename but-interface to but-api

  • For nowsies don't distribute server in the but cli

  • Unify the tauri & but-server interfaces

    • Currently there is a high level of duplication and it would be very easy for divergence in the interfaces to occur. This would have to be solved before this could ever consider landing.
  • Frontend TODOs

  • File picking...

    • For now in the tests we will just mock it :D
  • Streaming events to the backend

    • General infra
    • File changes
    • Database changes (Could be defered)
    • AI content streaming (Could be defered) (This is more complex because tauri has been drilled deep into the but-action crate)
  • Environment variables or arguments for the but serve port

Commands

  • commands::git_remote_branches
  • commands::git_head
  • commands::delete_all_data
  • commands::git_set_global_config
  • commands::git_remove_global_config
  • commands::git_get_global_config
  • commands::git_test_push
  • commands::git_test_fetch
  • commands::git_index_size
  • zip::commands::get_logs_archive_path
  • zip::commands::get_project_archive_path
  • users::commands::set_user
  • users::commands::delete_user
  • users::commands::get_user
  • projects::commands::add_project
  • projects::commands::get_project
  • projects::commands::update_project
  • projects::commands::delete_project
  • [!] projects::commands::list_projects (tauri specific) - ported
  • [!] projects::commands::set_project_active (tauri specific) - ported
  • projects::commands::open_project_in_window (tauri specific) - not implemented
  • repo::commands::git_get_local_config
  • repo::commands::git_set_local_config
  • repo::commands::check_signing_settings
  • repo::commands::git_clone_repository
  • repo::commands::get_uncommited_files
  • repo::commands::get_commit_file
  • repo::commands::get_workspace_file
  • repo::commands::pre_commit_hook
  • repo::commands::pre_commit_hook_diffspecs
  • repo::commands::post_commit_hook
  • repo::commands::message_hook
  • virtual_branches::commands::create_virtual_branch
  • virtual_branches::commands::delete_local_branch
  • virtual_branches::commands::get_base_branch_data
  • virtual_branches::commands::set_base_branch
  • virtual_branches::commands::push_base_branch
  • virtual_branches::commands::integrate_upstream_commits
  • virtual_branches::commands::update_stack_order
  • virtual_branches::commands::unapply_stack
  • virtual_branches::commands::create_virtual_branch_from_branch
  • virtual_branches::commands::can_apply_remote_branch
  • virtual_branches::commands::list_commit_files
  • virtual_branches::commands::amend_virtual_branch
  • virtual_branches::commands::move_commit_file
  • virtual_branches::commands::undo_commit
  • virtual_branches::commands::insert_blank_commit
  • virtual_branches::commands::reorder_stack
  • virtual_branches::commands::update_commit_message
  • virtual_branches::commands::find_git_branches
  • virtual_branches::commands::list_branches
  • virtual_branches::commands::get_branch_listing_details
  • virtual_branches::commands::squash_commits
  • virtual_branches::commands::fetch_from_remotes
  • virtual_branches::commands::move_commit
  • virtual_branches::commands::normalize_branch_name
  • virtual_branches::commands::upstream_integration_statuses
  • virtual_branches::commands::integrate_upstream
  • virtual_branches::commands::resolve_upstream_integration
  • virtual_branches::commands::find_commit
  • stack::create_branch
  • stack::remove_branch
  • stack::update_branch_name
  • stack::update_branch_description
  • stack::update_branch_pr_number
  • stack::push_stack
  • stack::push_stack_to_review
  • secret::secret_get_global
  • secret::secret_set_global
  • undo::list_snapshots
  • undo::restore_snapshot
  • undo::snapshot_diff
  • config::get_gb_config
  • config::set_gb_config
  • menu::menu_item_set_enabled (tauri-specific) - not ported
  • github::commands::init_device_oauth
  • github::commands::check_auth_status
  • askpass::commands::submit_prompt_response
  • remotes::list_remotes
  • remotes::add_remote
  • modes::operating_mode
  • modes::enter_edit_mode
  • modes::save_edit_and_return_to_workspace
  • modes::abort_edit_and_return_to_workspace
  • modes::edit_initial_index_state
  • modes::edit_changes_from_initial
  • open::open_url
  • open::show_in_finder
  • forge::commands::pr_templates
  • forge::commands::pr_template
  • settings::get_app_settings
  • settings::update_onboarding_complete
  • settings::update_telemetry
  • settings::update_feature_flags
  • settings::update_telemetry_distinct_id
  • action::list_actions (These need adaptation)
  • action::handle_changes
  • action::list_workflows
  • action::auto_commit
  • action::auto_branch_changes
  • action::absorb
  • action::freestyle
  • cli::install_cli
  • cli::cli_path
  • rules::create_workspace_rule
  • rules::delete_workspace_rule
  • rules::update_workspace_rule
  • rules::list_workspace_rules
  • workspace::stacks
  • workspace::stack_details
  • workspace::branch_details
  • workspace::create_commit_from_worktree_changes
  • workspace::amend_commit_from_worktree_changes
  • workspace::discard_worktree_changes
  • workspace::stash_into_branch
  • workspace::canned_branch_name
  • workspace::target_commits
  • workspace::move_changes_between_commits
  • workspace::uncommit_changes
  • workspace::split_branch
  • workspace::split_branch_into_dependent_branch
  • workspace::show_graph_svg
  • diff::changes_in_worktree
  • diff::commit_details
  • diff::changes_in_branch
  • diff::tree_change_diffs
  • diff::assign_hunk
  • env::env_vars

Copy link

vercel bot commented Jul 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 10:02am
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 1, 2025 10:02am

@github-actions github-actions bot added rust Pull requests that update Rust code @gitbutler/desktop labels Jul 19, 2025
Copy link

gitguardian bot commented Jul 31, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@ndom91
Copy link
Contributor

ndom91 commented Aug 1, 2025

Ooo interesting! Also don't forget FE E2E testing might be much easier here too: https://playwright.dev/docs/api/class-electron

@Caleb-T-Owens
Copy link
Contributor Author

Hey @ndom91! Playwright was my first choice, but half way through preparing the rust side, CrabNebula shared a new build of the tauri-driver with us which can run locally on macOS. Their tauri-driver works with WDIO so my plan was to get tests running both in tauri and in the web version. That way we can have even more confidence if we do end up switching to electron.

@Caleb-T-Owens
Copy link
Contributor Author

This has been shipped in several smaller PRs so I'm closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@gitbutler/desktop rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants