Skip to content
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

Refactor main process modules into multiple files #363

Merged
merged 15 commits into from
Jan 10, 2025

Conversation

micahflee
Copy link
Contributor

I was starting Bluesky integration #342, but as an early first step, I decided to refactor various parts of the main process that were starting to get unwieldy, so I could more easily separate X code from Bluesky code.

So this PR includes the beginnings of Bluesky integration:

  • New BlueskyAccount model and migrations, and update to the Account model to support a BlueskyAccount type
  • Ability to select Bluesky account types in the main process (but not yet in the renderer process, so it doesn't show it as an option)

I think this should be fine to merge and release before we're ready for Bluesky integration.

But most of this PR is:

  • Split shared_types.ts into multiple files in a shared_types folder
  • Split database.ts into multiple files in a database folder
  • Split account_x.ts into multiple types in an account_x folder

For database and account_x, the IPC functions (when the renderer process calls functions on the main process) should all work the same.

The tests all pass and it appears to work on my end, but I haven't thoroughly tested everything yet, so it's possible I've introduced new bugs with the refactoring. I'd love more thorough testing.

Copy link
Contributor

@redshiftzero redshiftzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the diff commit by commit and the refactoring looks reasonable to me. Did some exploratory testing in a local build of the application and all seemed to work as before!

@micahflee micahflee merged commit 48ec0ea into main Jan 10, 2025
1 check passed
@micahflee micahflee deleted the refactor-into-multiple-files branch January 10, 2025 17:12
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