Skip to content

Conversation

@zerebos
Copy link
Member

@zerebos zerebos commented Sep 16, 2024

This is part of the effort to convert from an Electron-based application to a Wails-based application. It would reduce the number of issues on Windows with the weird electron-forge zip-wrapping, and massively reduce both the filesize and runtime overhead. This can lay the groundwork to share common code between this and our CLI. As a bonus, if we ever decide to go forward with the "bd manager" app idea, this would pave the way there as well.

Important things to do before merging:

  • Add update check
  • Adjust GitHub workflow to properly build this
  • Include the linux love and care changes by working with @samfundev
    • Expose flatpak to global BetterDiscord folder and make BD use HOST_XDG_CONFIG_HOME
    • Install locally for snap installs
  • General code cleanup
    • Separate the non-common action code into postfixed files like actions_windows.go
  • Bug testing with beta users
    • Testing general cases
    • Testing edge cases
  • Unit tests
  • Update dependencies like svelte to v5 (it has been a long time since I worked on this)
  • Add build script to build for all of our intended os/arch combos
  • Make Enter submit the page

Moved out to a later date (likely when this becomes a manager):

This PR affect the following issues:

zerebos and others added 12 commits June 8, 2025 21:52
Update the frontend on the wails branch to use proper Sveltekit with Svelte5 and TypeScript
Refactor and add support for snap and flatpak on linux
This refactor makes the golang side of the wails app more like idiomatic go and adheres to a lot more of their conventions. It also reduces overall complexity by reducing unnecessary nesting of packages. It also breaks apart longer files into more consumable chunks that keep functionality grouped. Lastly, it better controls the public/private separation in the packages by using intentional wrappers.

Backend Changes:
- Remove backend/ directory in favor of flat package structure
- Move discord and betterdiscord packages to root level
- Create new types package for shared types
- Consolidate frontend bindings into api package
- Move app-level functionality to root app.go
- Improve separation of concerns in discord package
- Add proper error handling and type safety

Frontend Changes:
- Extract CSS variables to theme.css
- Move global styles to separate files

This refactoring improves:
- Code organization
- Type safety
- Package boundaries
- Maintainability
- IDE support
- Testing capabilities
@zerebos zerebos requested a review from Copilot June 13, 2025 21:31

This comment was marked as outdated.

@zerebos zerebos requested a review from Copilot June 17, 2025 05:50
Copy link

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 converts the installer from Electron to Wails while refactoring the BetterDiscord installation and repair workflows. Key changes include adding new Go packages and methods for the Wails-based implementation, updating platform‐specific build files (NSIS, manifest, plist), and rewriting the task build configuration.

Reviewed Changes

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

Show a summary per file
File Description
discord/* Refactored Discord installation and injection logic for Wails
build/* Updated build scripts and configuration files for Windows, macOS, and Linux
betterdiscord/* Redesigned BetterDiscord installation, download, and repair functions
app.go, api/controller.go Reworked update and runtime interactions for the new installer design
Taskfile.yml, other config files Updated task and lint configurations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment