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

feat: manage account buttons #1402

Merged
merged 18 commits into from
Jan 16, 2025
Merged

feat: manage account buttons #1402

merged 18 commits into from
Jan 16, 2025

Conversation

zamitto
Copy link
Collaborator

@zamitto zamitto commented Jan 15, 2025

image

@zamitto zamitto marked this pull request as ready for review January 15, 2025 20:01
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added account management functionality allowing users to update email and password through external browser integration, with proper token handling and UI components.

  • Added src/main/events/misc/open-manage-account.ts to handle secure external browser redirects with refreshed auth tokens
  • Added new SettingsAccount component in settings-account.tsx replacing SettingsPrivacy with consolidated account/privacy management
  • Added English and Portuguese translations for account management features in translation files
  • Added ManageAccountPage type and IPC bridge method for managing account pages
  • Improved token refresh logic in hydra-api.ts with better modularity and error handling

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

13 file(s) reviewed, 9 comment(s)
Edit PR Review Bot Settings | Greptile

src/main/events/misc/open-manage-account.ts Outdated Show resolved Hide resolved
src/locales/en/translation.json Outdated Show resolved Hide resolved
src/main/services/hydra-api.ts Show resolved Hide resolved
src/renderer/src/pages/settings/settings-account.tsx Outdated Show resolved Hide resolved
src/renderer/src/pages/settings/settings-account.tsx Outdated Show resolved Hide resolved
src/renderer/src/pages/settings/settings-account.tsx Outdated Show resolved Hide resolved
src/renderer/src/pages/settings/settings.tsx Show resolved Hide resolved
@zamitto
Copy link
Collaborator Author

zamitto commented Jan 16, 2025

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

This PR refactors the account management functionality to use a more centralized authentication window approach. Here's a concise summary of the key changes:

  • Removed standalone open-manage-account.ts in favor of consolidated authentication handling through AuthPage enum and openAuthWindow
  • Added new AuthPage enum in constants.ts to standardize authentication page routing (SignIn, UpdateEmail, UpdatePassword)
  • Updated WindowManager to handle account updates through custom protocol (hydralauncher://update-account)
  • Added subscription management UI with dynamic content based on subscription status in settings page
  • Added proper token refresh and language support for authentication windows

The changes improve code organization and provide a more consistent approach to account management across the application.

14 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

src/main/events/auth/open-auth-window.ts Outdated Show resolved Hide resolved
src/main/events/auth/open-auth-window.ts Show resolved Hide resolved
src/locales/pt-BR/translation.json Outdated Show resolved Hide resolved
src/main/events/auth/open-auth-window.ts Outdated Show resolved Hide resolved
src/renderer/src/pages/settings/settings-account.tsx Outdated Show resolved Hide resolved
src/shared/constants.ts Outdated Show resolved Hide resolved
src/shared/constants.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@thegrannychaseroperation thegrannychaseroperation left a comment

Choose a reason for hiding this comment

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

LGTM

@zamitto
Copy link
Collaborator Author

zamitto commented Jan 16, 2025

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

Updated subscription management UI and translations with improved status messaging and billing information.

  • Added new subscription status messages in both language files for renewal dates and billing information
  • Improved subscription status display logic in settings-account.tsx with clearer conditional rendering
  • Removed subscription_not_active key from translation files in favor of more specific status messages
  • Fixed URL construction in window-manager.ts by removing extra forward slash for auth window paths

6 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

src/locales/pt-BR/translation.json Show resolved Hide resolved
src/locales/pt-BR/translation.json Show resolved Hide resolved
src/locales/en/translation.json Outdated Show resolved Hide resolved
@zamitto zamitto merged commit 69787ee into main Jan 16, 2025
4 checks passed
@zamitto zamitto deleted the feat/manage-account-buttons branch January 17, 2025 17:37
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