Skip to content

Conversation

@ryaplots
Copy link
Contributor

@ryaplots ryaplots commented Dec 2, 2025

Summary

References https://github.com/TheThingsIndustries/lorawan-stack/issues/4760

Changes

  • Add owner token type (fleet/gateway) switch
  • Add fleet owner token to qr code scanner
  • Update error messages

Testing

Steps
  1. log in to the console
  2. Try to scan a QR code of a managed gateway and see the modal with add to fleet button
    a. Click the button and fill in a fleet owner token -> After approving the modal, the fleet token should be filled and "fleet" selected in the toggle.
    b. Do not click the button -> After approving the modal, the gateway owner token should be filled and "gateway" selected in the toggle.
  3. Without scanning. Simply fill in a eui of a managed gateway. The fields for owner token should be empty and a switch between gateway and fleet should be possible.
Results
Screeshots Screenshot 2025-12-02 at 14 36 46 Screenshot 2025-12-02 at 14 36 57 Screenshot 2025-12-02 at 14 37 13 Screenshot 2025-12-02 at 14 37 36 Screenshot 2025-12-02 at 14 37 51

Checklist

  • Scope: The referenced issue is addressed, there are no unrelated changes.
  • Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • Documentation: Relevant documentation is added or updated.
  • Testing: The steps/process to test this feature are clearly explained including testing for regressions.
  • Infrastructure: If infrastructural changes (e.g., new RPC, configuration) are needed, a separate issue is created in the infrastructural repositories.
  • Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

@ryaplots ryaplots self-assigned this Dec 2, 2025
@ryaplots ryaplots added the ui/web This is related to a web interface label Dec 2, 2025
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 adds support for Gateway Fleet management in the Console OS by introducing the ability to choose between gateway owner tokens and fleet owner tokens when claiming managed gateways. The implementation includes UI enhancements for token type selection and improved error messaging to guide users toward using Fleet Owner Tokens when appropriate.

Key Changes

  • Added a toggle switch UI for selecting between gateway and fleet owner token types when claiming managed gateways
  • Enhanced QR code scanning flow to support optional fleet owner token input via a new "Add to Fleet" button in the scan modal
  • Updated error messages to inform users about Fleet Owner Token usage when subscription issues occur

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/webui/styles/utilities/general.styl Added utility CSS classes for height, flex-basis, white-space, and hover effects
pkg/webui/locales/ja.json Added empty translation placeholders for new fleet-related messages
pkg/webui/locales/en.json Added English translations for fleet token UI elements and updated error messages
pkg/webui/lib/shared-messages.js Added shared messages for fleet information and token descriptions
pkg/webui/lib/errors/utils.js Updated subscription error message to mention Fleet Owner Token option, removed activation code expired message
pkg/webui/console/containers/gateway-onboarding-form/qr-scan-section/index.js Enhanced QR scan handler to fetch gateway managed status and populate fleet token fields
pkg/webui/console/containers/gateway-onboarding-form/qr-scan-section/fleets-scan.js New component providing fleet owner token input UI within the QR scan modal
pkg/webui/console/containers/gateway-onboarding-form/gateway-provisioning-form/validation-schema.js Added _isFleet field to validation schema
pkg/webui/console/containers/gateway-onboarding-form/gateway-provisioning-form/gateway-claim-form-section/index.js Implemented tabs for switching between gateway and fleet token types with conditional UI rendering
pkg/webui/components/tabs/tab/tab.styl Added styling for small tab variant
pkg/webui/components/tabs/tab/index.js Added small prop support to Tab component
pkg/webui/components/tabs/index.js Passed small prop to Tab children
pkg/webui/components/qr-modal-button/index.js Added modalDataChildren prop to allow custom content in QR modal
pkg/webui/components/form/field/index.js Added descriptionValues and showTitle props for dynamic field descriptions and conditional title rendering
cypress/e2e/console/gateways/create.spec.js Updated test selectors from label-based to name-based for owner token input field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ryaplots ryaplots marked this pull request as ready for review December 2, 2025 16:35
@ryaplots ryaplots requested a review from a team as a code owner December 2, 2025 16:35

This comment was marked as duplicate.

@KrishnaIyer
Copy link
Member

Add link to Slot docs.

@ryaplots
Copy link
Contributor Author

ryaplots commented Dec 8, 2025

Add hash or param to SM dashboard url

@ryaplots ryaplots merged commit c0357c0 into v3.35 Dec 8, 2025
12 of 13 checks passed
@ryaplots ryaplots deleted the feature/gateway-fleets-os branch December 8, 2025 16:10
@RishiRamMeesala
Copy link

@ryaplots I am not able to view the screenshots in the result section.

@ryaplots
Copy link
Contributor Author

ryaplots commented Jan 8, 2026

@RishiRamMeesala what about like this:
Screenshot 2025-12-02 at 14 36 46

Screenshot 2025-12-02 at 14 36 57 Screenshot 2025-12-02 at 14 37 13 Screenshot 2025-12-02 at 14 37 36 Screenshot 2025-12-02 at 14 37 51

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

Labels

ui/web This is related to a web interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants