1
0
mirror of https://github.com/Unleash/unleash.git synced 2026-01-05 20:06:22 +01:00
Commit Graph

14692 Commits

Author SHA1 Message Date
David Leek
8d5cc0a29d
chore: clean up a bit 2025-12-05 09:50:07 +01:00
David Leek
3e2501fba9
fix: use frontend/backend permissions to determine type, project permissions to determine filtering 2025-12-04 19:21:41 +01:00
David Leek
5c720b2b22
chore: fix some tests and move the implementation so it doesnt get in the way of ADMIN permissions 2025-12-04 15:00:52 +01:00
David Leek
bd846fe54b
chore: remove console.log 2025-12-02 13:47:20 +01:00
David Leek
78c6c67a2b
fix: filter project tokens based on permissions 2025-12-02 13:34:30 +01:00
Mateusz Kwasniewski
86c5c2ded5
fix: permissions checks start milestone (#11045) 2025-11-28 13:03:55 +01:00
Mateusz Kwasniewski
345b34970e
fix: permission button in forms (#11047) 2025-11-28 12:46:19 +01:00
Thomas Heartman
d35b43bd68
fix: don't unselect selected path in configure menu when clicking it again (#11046)
This fixes a bug where if you re-clicked the current path you were on in
the configure sub-menu, it would unselect the item, even though if
that's where you were still at.

The reason is that the onClick handler was pre-populated with the text
`configure`. (However, the children were calling onClick with their own
paths). I'm not really sure why this even worked in the first place.

Anyway, now the types have been changed and I've removed the application
of the "configure" string as the active item.

First click (same both before and after):
<img width="285" height="181" alt="image"
src="https://github.com/user-attachments/assets/c13142ef-8ef8-4a9d-8719-68dcb16db7f0"
/>


Before (second click):
<img width="303" height="220" alt="image"
src="https://github.com/user-attachments/assets/6b576a91-2f1e-48f5-b8fe-9b1364c8987e"
/>

After (second click):
<img width="286" height="190" alt="image"
src="https://github.com/user-attachments/assets/72434401-414c-43e4-b5bf-7c972bb99b7a"
/>
2025-11-28 10:39:34 +00:00
Mateusz Kwasniewski
7df2b770cc
feat: permissions checks on safeguards and automations (#11044) 2025-11-28 10:29:37 +01:00
Jaanus Sellin
34c45778fd
feat: start tracking readonly users (#11043)
We will start tracking readonly users count(experimental concept), which
is all users that have not done any action other than favorite feature.
2025-11-28 11:05:57 +02:00
Jaanus Sellin
d1180f111f
feat: skip safeguard cr confirmation dialogue (#11040)
This follows the same pattern we use for release plans in cr.


<img width="1519" height="618" alt="image"
src="https://github.com/user-attachments/assets/01ecbbd1-5991-4961-88ed-f3702f86dacf"
/>
2025-11-28 09:24:11 +02:00
Nuno Góis
9d7521672a
chore: add flag enterpriseEdgeUI (#11042)
https://linear.app/unleash/issue/2-4050/add-flag-for-new-enterprise-edge-ui-enterpriseedgeui

Adds a new flag for the new Enterprise Edge UI: `enterpriseEdgeUI`.
2025-11-27 15:44:45 +00:00
Thomas Heartman
1fa46c2621
fix: sidebar overflow when displaying badges (#11037)
Fixes a bug where the sidebar accordion would overflow if one of the
children had a badge. This was visible primarily in pro instances up
until now, but will also be an issue with the new "new" badge.

Instead of basing the width and min-width on the "mode", we now set it
to `auto` regardless.

This means that:
- When there's no badges, the sidebar will be slightly narrower than it
is today, because it doesn't need all that space.
- When there *are* badges, it will be slightly wider.

The previous change to these width values was in
https://github.com/Unleash/unleash/pull/8831 and was apparently to make
it "easier to use on medium screen sizes".

While this change makes it slightly wider when there are badges, I think
that's a worthwhile tradeoff to:
- not having the accordion body be wider than the rest of the menu
- not having badges have to be smooshed up against the text

There's no max width set, so technically you could force it super wide
by having very long menu items, but I think that's an acceptable
tradeoff that we can make. I also don't think it's very likely that
we'll run into that issue and not notice.

Further, on narrow screens, the sidebar is replaced by a modal anyway,
so it's not likely to be much of an issue, I think.

## Screenies

To show the changes, here are some screenies with widths:

### Before

The width is set to 256:

<img width="1270" height="1576" alt="image"
src="https://github.com/user-attachments/assets/5c8f1d72-9f23-4ec9-8278-b2fe529680d4"
/>

But notice how the configure menu pops out when we've badges:
<img width="580" height="1538" alt="image"
src="https://github.com/user-attachments/assets/9ebf4ff9-c11a-4716-a77f-0443d73dda90"
/>

This is the menu without badges. Still 256 px wide
<img width="554" height="1566" alt="image"
src="https://github.com/user-attachments/assets/0a8ad895-3409-494e-9f32-644938545707"
/>


### After

The width is slightly narrower when there's no badges:
<img width="1280" height="1654" alt="image"
src="https://github.com/user-attachments/assets/fdb792b6-c7be-408d-9e3b-a00c62794318"
/>

But slightly wider when there are badges to accommodate the extra
elements.
<img width="1292" height="1552" alt="image"
src="https://github.com/user-attachments/assets/e7437fa3-d747-44dc-9b0c-60e362c52833"
/>
2025-11-27 14:37:02 +00:00
Thomas Heartman
04df093e95
fix: remove unusable button from navigation sidebar accordion (#11036)
For some reason, there's two nested buttons here, where only the outer
one is interactable. It doesn't matter much for mouse interactions, but
for keyboard interactions, they're both focusable (which is strange) and
the inner one doesn't do anything.

As such, this PR:
- removes it from the navigation tree (tabindex -1)
- changes the component to be a span instead of a button.

It keeps the role=undefined to override the default role="button" that
MUI sets on it.

The double button was also visible when the inner one had focus (the
overflow in the image is a different issue, though):
<img width="542" height="182" alt="image"
src="https://github.com/user-attachments/assets/2942033d-09ee-4806-a2de-a5e6a6680a35"
/>
2025-11-27 15:33:00 +01:00
Thomas Heartman
83d2e0bce3
add newInUnleash operational boolean/variant flag (#11041)
Adds the `newInUnleash` flag to the interfaces and config as a boolean /
Variant flag (similar to the recent update to maintenance mode).
2025-11-27 15:31:51 +01:00
Mateusz Kwasniewski
2d6968661d
feat: conditional safeguard delete button (#11035) 2025-11-27 13:37:35 +01:00
Jaanus Sellin
58b7e9ee99
feat: omit some fields from safeguard cr (#11034) 2025-11-27 14:30:41 +02:00
Thomas Heartman
a740946e12
chore: improve release template empty state (#11022)
Update the empty state for release plans. This PR:
- updates wording
- adds CTA buttons/links

It uses a button for navigation purposes even though this is not _the
way_ ™ because that keeps it in lock step with the other link (which is
also a button) on this page and because updating the permission button
to remove the href if the link is empty wasn't trivial.

<img width="1528" height="469" alt="image"
src="https://github.com/user-attachments/assets/bd5869ab-f867-4644-95c6-9bcbd5100e19"
/>

This also makes it responsive down to ~200px (and below, you'll just get
scroll bars for the buttons)
<img width="200" height="626" alt="image"
src="https://github.com/user-attachments/assets/49992782-9b72-47e1-89c7-8e2d9904875b"
/>

Chrome minimum when smooshing with dev tools:
<img width="116" height="823" alt="image"
src="https://github.com/user-attachments/assets/5ed05702-e750-4551-a460-5ba39432c0f1"
/>

The permission button is set up to use the same permissions as the `new
template` in the header.
<img width="1532" height="483" alt="image"
src="https://github.com/user-attachments/assets/1a8bd82a-6122-4850-b783-f01f5250c6ed"
/>
2025-11-27 12:34:04 +01:00
Mateusz Kwasniewski
a2a4ba2784
feat: delete safeguard change requests (#11033) 2025-11-27 11:20:18 +01:00
Nuno Góis
527ec11532
chore: include current month in edgeInstanceUsage (#11029)
https://linear.app/unleash/issue/2-4011/show-enterprise-edge-instance-stats-in-auth-app

Includes the current month, so far, in the average Edge instance usage
data.

E.g. my local dev instance stats look like this, since I rarely connect
an Edge instance to it:

```
{
  "2025-11": 0.007,
  "2025-10": 0.002,
  "2025-09": 0,
  "2025-08": 0,
  "2025-07": 0,
  "2025-06": 0,
  "2025-05": 0,
  "2025-04": 0,
  "2025-03": 0,
  "2025-02": 0,
  "2025-01": 0,
  "2024-12": 0
}
```
2025-11-27 09:15:09 +00:00
Mateusz Kwasniewski
a187f6e0d2
feat: delete safeguard cr trigger (#11031) 2025-11-26 17:59:43 +01:00
Mateusz Kwasniewski
312591d826
feat: add error handling to release plan changes (#11030) 2025-11-26 17:29:38 +01:00
Mateusz Kwasniewski
3d2a4616c6
feat: Show cr in shopping card change safeguard (#11026) 2025-11-26 17:14:36 +01:00
Jaanus Sellin
4a3721446f
feat: safeguard change request schema update (#11028)
Orval update and fixing code where needed.
2025-11-26 14:17:10 +02:00
Mateusz Kwasniewski
c6cfe3f74f
fix: missing border in milestone items (#11027) 2025-11-26 12:34:27 +01:00
Jaanus Sellin
fcee7d5e61
chore: export create environment service (#11025) 2025-11-26 12:46:20 +02:00
Jaanus Sellin
ad0b84dedb
feat: add exists method for environment service (#11024) 2025-11-26 11:03:01 +02:00
Mateusz Kwasniewski
2782022056
feat: connect change safeguard api (#11023) 2025-11-25 15:47:31 +01:00
Mateusz Kwasniewski
3cdb84f226
feat: change safeguard change request dialog (#11021) 2025-11-25 15:05:03 +01:00
Thomas Heartman
b9b143a305
chore: export IInstanceInfo so that it can be used in enterprise (#11020)
Also, make it an interface to align with the other interfaces. I played
around with some type shenanigans and forgot to revert it.
2025-11-25 10:20:22 +01:00
Jaanus Sellin
91339a58e8
chore: update orval types (#11019) 2025-11-25 09:39:02 +02:00
Gastón Fournier
f6cc18a6e6
chore: handle unawaited promises and tests (#11014)
## About the changes
This adds handling of unhandled rejected promises at the process level,
so nodejs doesn't panic.

Also, adds tests around processing metrics and a refactor from previous
pr: #11010
2025-11-24 17:56:04 +01:00
Thomas Heartman
712cecf38d
feat: allow 'instanceInfo' to be added to the version checker hook (#11018)
Allows the `checkLatestVersion` function in the `VersionService` to
accept an optional `instanceInfo` parameter. If provided, and if the
promise returns a value that is truthy, then it will add `instanceInfo`
to the versionPayload.

The license key may not contain a plan or a customer name, and while it
definitely won't contain a client id, it has been requested that we
report `self-hosted` as the client ID (will be handled in enterprise).

Adding a second, optional parameter seemed to be the most backwards
compatible way of doing this rather than changing the established method
/ callback types.
2025-11-24 15:52:59 +01:00
Mateusz Kwasniewski
bbad97a9e4
fix: prevent duplicate lifecycle timing (#11017) 2025-11-24 12:43:14 +01:00
Nuno Góis
e455426b3c
chore: use license address instead of sales (#11016)
https://linear.app/unleash/issue/2-4042/use-licensegetunleashio-instead-of-salesgetunleashio

Prefer `license@getunleash.io` over `sales@getunleash.io` for reach
outs.
2025-11-24 11:39:06 +00:00
Jaanus Sellin
123ca034ee
feat: split milestone paused with progression paused (#11015) 2025-11-24 12:15:31 +02:00
Jaanus Sellin
d6af401dd2
feat: remove milestone progression adding when paused (#11012) 2025-11-24 11:01:38 +02:00
Mateusz Kwasniewski
97a20b0929
refactor: simplify safeguard form management (#11013) 2025-11-21 16:00:45 +01:00
Mateusz Kwasniewski
63e969821c
feat: safeguard border dynamic line (#11011) 2025-11-21 11:39:22 +01:00
Gastón Fournier
e977689571
fix: invalid metrics should not crash (#11010)
## About the changes
Properly awaits all submitted promises, preventing the node's main
process from seeing rejected & unawaited promises.

What's going on?
- The bulk metrics handler pushes `registerBackendClient` promises into
promises.
- The next step (`clientMetricsEnvBulkSchema.validateAsync`) throws for
invalid metrics (e.g., `appName: null`), so we jump to catch and return
400.
- Because the code never reaches `Promise.all(...)`, the previously
spawned promises are never awaited. Node later detects the rejected
`registerBackendClient` promise as an **unhandled rejection** and
crashes the process. If that promise hadn’t been rejected, there’d be no
crash, but with invalid input, it does reject.
- **Fix:** always await the spawned tasks (using `Promise.allSettled`)
so every rejection is observed, even when validation later throws.
2025-11-21 10:27:00 +01:00
Nuno Góis
3bca150cd8
chore: show connected edges for pro customers (#11009)
https://linear.app/unleash/issue/2-4040/show-connected-edges-for-pro-customers

Show connected Edges for Pro customers.

This was previously filtered to Enterprise only instances.
2025-11-20 17:38:08 +00:00
Mateusz Kwasniewski
87e901256b
feat: safeguard UI tweaks (#11008) 2025-11-20 16:47:51 +01:00
Melinda Fekete
302c6a3e54
docs: impact metrics (#11001) 2025-11-20 15:42:55 +01:00
Thomas Heartman
c29983d810
fix: handle invalid permissions in role creation (#11003)
The `create` and `update` role methods used to blindly accept any
incoming permissions, but if the permissions don't exist in the
database, then the database would throw, yielding a 500 error to the
user.

To fix this, we can validate that all the permissions exist before we
try to add the incoming permissions.

The http error only manifests in enterprise, but the fix requires
modifying the access service. Therefore, I've added the tests to the
access service too, such that if you break something, then you don't
need to wait for it to propagate to enterprise.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-11-20 12:32:49 +00:00
Mateusz Kwasniewski
636a964cca
feat: improve safeguard form styling (#11007) 2025-11-20 13:03:09 +01:00
Jaanus Sellin
9ac45511b7
feat: now safeguard impact metrics are not editable or deletable (#11006) 2025-11-20 13:22:57 +02:00
David Leek
93ea192f8c
feat: frontend for pkce (#11005) 2025-11-20 10:59:48 +01:00
Mateusz Kwasniewski
4890b16b49
feat: improve safeguard threshold field (#11004) 2025-11-19 17:13:03 +01:00
Jaanus Sellin
415978d965
feat: extend milestone status (#11000) 2025-11-19 16:19:53 +02:00
Mateusz Kwasniewski
00166f4875
refactor: milestone progression methods (#11002) 2025-11-19 14:57:53 +01:00