FlowFuse / FlowFuse/flowfuse

Remote Instance limit banner shown too early

Open
#6,345 0 comments 0 reactions 0 assignees View on GitHub
needs-triage type:bug
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 21h
Merged PRs (30d)
146

Description

### Current Behavior

Using the following team type configuration:

Image

- instances + devices limit: 3
- remote instances limit: 3

When creating remote instances the `You have reached the limit for Remote Instances in this team. Please [upgrade](http://localhost:3000/team/qwe-4-pro-2/devices#) your Team to continue.` and `You have reached the limit for Instances in this team. Please [upgrade](http://localhost:3000/team/qwe-4-pro-2/devices#) your Team to continue.` banners appear and the `add remote instance` button gets disabled too early, after creating the 2nd remote instance.

Refreshing the page clears the banner and allows the user to create a new Remote Instance, after which the banners re-appear and the button gets disabled again (correctly this time). A subsequent page refresh keeps the banners and `add remote instance` button disabled correctly.

Also, from a ux perspective, having two banners shown at the same time is not a good practice. Users have no distinction between global team restrictions/limits (that include both remote and hosted instances) and or more specific team restrictions that apply to either hosted or remote instance, and nor should they.

At the bare minimum, we should update the `You have reached the limit for Instances in this team. Please [upgrade](http://localhost:3000/team/qwe-4-pro-2/devices#) your Team to continue.` banner when the global restrictions are reached to include the term `global/overall`

https://github.com/user-attachments/assets/54157632-00f5-47a3-aec8-d66b5eafd421

### Expected Behavior

The banners should appear and the button should become disabled only when the actual limit is reached.

### Steps To Reproduce

setup a team type in a similar manner and create remote instances.

NB.
the team I preformed the tests in did not contain any hosted instances

### Environment

- FlowFuse version: 2.24.2
- Node.js version:
- npm version:
- Platform/OS:
- Browser:

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.