Skip to content

Conversation

@lilstiffy
Copy link
Contributor

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

  • The authentication flow now requires a license key for both user creation and login. The 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]
  • Improved error handling for license key issues: login and user creation now display specific error messages when the license key is invalid, and exceptions are surfaced to the UI. [1] [2] [3] [4]

User Interface Improvements

  • The login screen layout is updated to accommodate license key input, and the message label font style is standardized. [1] [2] [3]
  • Tooltips have been added to the home screen for recent scans, monitored directories, and directory lists, improving user guidance. [1] [2] [3] [4] [5] [6]

Configuration Changes

  • The application configuration file (options/app.config) now properly initializes the license key as blank and updates splash screen and theme defaults.

@lilstiffy lilstiffy self-assigned this Oct 18, 2025
Copy link
Contributor

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

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;
Copy link

Copilot AI Oct 18, 2025

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

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.

@lilstiffy lilstiffy linked an issue Oct 18, 2025 that may be closed by this pull request
pwgit-create and others added 4 commits October 18, 2025 19:16
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>
Copy link
Contributor

@pwgit-create pwgit-create left a 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 :) 💯

@lilstiffy lilstiffy merged commit 23432df into develop Oct 18, 2025
2 checks passed
@lilstiffy lilstiffy deleted the 41-frontend-license-key branch October 18, 2025 18:06
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.

Frontend License Key

3 participants