-
Notifications
You must be signed in to change notification settings - Fork 0
License in frontend #49
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds license key support to the authentication flow and improves UI guidance with tooltips. Key changes:
- Require and validate a license key for user creation and login; surface license-related errors to the UI.
- Update login UI to include a license key field (conditionally hidden when a key is configured) and standardize message label styling.
- Add tooltips to home screen tables and lists; initialize app config with blank license key and updated defaults.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/org/pwss/view/screen/LoginScreen.java | Adds license key field and label; updates layout row count; standardizes message label font. |
| src/main/java/org/pwss/view/screen/LoginScreen.form | Mirrors UI changes: new row, license key field/label, message label font. |
| src/main/java/org/pwss/view/screen/HomeScreen.java | Adds tooltips to recent scans and monitored directories. |
| src/main/java/org/pwss/view/screen/HomeScreen.form | Mirrors tooltip additions for UI designer. |
| src/main/java/org/pwss/service/AuthService.java | Extends login/createUser APIs to include licenseKey; handles HTTP 402 with specific exceptions. |
| src/main/java/org/pwss/model/request/user/LoginUserRequest.java | Adds licenseKey field to request record. |
| src/main/java/org/pwss/model/request/user/CreateUserRequest.java | Adds licenseKey field to request record. |
| src/main/java/org/pwss/controller/LoginController.java | Integrates license key into validation, persistence, and visibility; improves error surfacing; adds debug logs. |
| options/app.config | Initializes license key as blank; updates splash screen and theme defaults. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| // DO NOT EDIT OR ADD ANY CODE HERE! | ||
| $$$setupUI$$$(); | ||
| } | ||
| private JTextField licenseKeyField; |
Copilot
AI
Oct 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License keys should not be displayed in clear text. Use JPasswordField for the license input (and adjust the getter to read getPassword()), or provide a masked input with a show/hide toggle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Displaying the license key in clear text is necessary because it's not a secret password.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pwgit-create
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great pull request! The functionality requested in the related ticket has been verified and it works flawlessly! Nice :) 💯
This pull request introduces license key management into the authentication flow and improves usability by adding helpful tooltips to the home and login screens. The most significant changes involve requiring a license key for user creation and login, updating the configuration and UI to reflect license key status, and enhancing error handling for license-related issues.
Authentication and License Key Management
LoginController,AuthService, and related request models (CreateUserRequest,LoginUserRequest) have been updated to handle license key input, validation, and persistence. License key fields are conditionally shown based on whether a key is already set in the app configuration. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]User Interface Improvements
Configuration Changes
options/app.config) now properly initializes the license key as blank and updates splash screen and theme defaults.