1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-27 01:19:00 +02:00
Commit Graph

13706 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
36c8efceae
feat: add link ui (#9918) 2025-05-07 13:24:59 +02:00
Nuno Góis
eb238f502a
chore: unknown flags (#9837)
https://linear.app/unleash/issue/2-3406/hold-unknown-flags-in-memory-and-show-them-in-the-ui-somehow

This PR introduces a suggestion for a “unknown flags” feature.

When clients report metrics for flags that don’t exist in Unleash (e.g.
due to typos), we now track a limited set of these unknown flag names
along with the appnames that reported them. The goal is to help users
identify and clean up incorrect flag usage across their apps.

We store up to 10 unknown flag + appName combinations, keeping only the
most recent reports. Data is collected in-memory and flushed
periodically to the DB, with deduplication and merging to ensure we
don’t exceed the cap even across pods.

We were especially careful to make this implementation defensive, as
unknown flags could be reported in very high volumes. Writes are
batched, deduplicated, and hard-capped to avoid DB pressure.

No UI has been added yet — this is backend-only for now and intended as
a step toward better visibility into client misconfigurations.

I would suggest starting with a simple banner that opens a dialog
showing the list of unknown flags and which apps reported them.

<img width="497" alt="image"
src="https://github.com/user-attachments/assets/b7348e0d-0163-4be4-a7f8-c072e8464331"
/>
2025-05-07 11:48:36 +01:00
Mateusz Kwasniewski
2b73b17579
feat: feature links section (#9915) 2025-05-07 11:35:41 +02:00
Github Actions Bot
b322afb097 6.10.0 2025-05-07 07:51:51 +00:00
Github Actions Bot
0784ce4f1f docs: Update CHANGELOG.md 2025-05-07 07:51:39 +00:00
Jaanus Sellin
d3cb8759c9
fix: make setConstraints work in editable constraints list (#9913)
Was missing implementation for addConstraint through ref.

Added it together with test.
2025-05-07 09:49:22 +03:00
Mateusz Kwasniewski
20a80142d3
feat: normalize urls in feature links (#9911) 2025-05-06 19:08:04 +02:00
Ivar Conradi Østhus
28373f5e37
fix: namespace flag-repo for unleash sdk (#9910)
Did two things:

1. Use basePath to prefix the Unleash repo used with the Unleash
Frontend SDK.
2. Use JSON.stringify as key for useEffect to avoid potential render
loop
2025-05-06 19:05:06 +02:00
Thomas Heartman
a7118e0c18
chore(1-3639): constraint validation (#9909)
Implements client-side validation of constraint values before you can
add them to a constraint.

I've removed the extra server-side validation that used to happen for
each specific constraint, because the surrounding form itself uses
server side validation to check every constraint every time there's a
change. This is what controls disabling the submit button etc.

I wanna make the next PR a bit of a followup cleanup now that it's
clearer what properties we do and don't need.
<img width="371" alt="image"
src="https://github.com/user-attachments/assets/7c98708f-fcbe-40ca-8590-bb0f5b2ad167"
/>
<img width="361" alt="image"
src="https://github.com/user-attachments/assets/503d4841-d910-4e8e-b0ef-a3d725739534"
/>
2025-05-06 15:21:33 +02:00
David Leek
681079bd08
chore: clean up adminNavUI flag (#9907) 2025-05-06 14:59:07 +02:00
Mateusz Kwasniewski
b9f1d8414c
feat: add links to feature read model (#9905) 2025-05-06 14:57:52 +02:00
Jaanus Sellin
8e05c92440
chore: align recently used constraints to designs (#9904)
Now both of the recents have aligned styling.
Now ConstraintAccordionView accepts dashed and solid borders.


![image](https://github.com/user-attachments/assets/89fefaf5-4acc-41b0-aa7b-efb1d5e1eb63)
2025-05-06 15:42:38 +03:00
Jaanus Sellin
8d377f76b7
chore: remove dead code (#9906) 2025-05-06 15:42:27 +03:00
Jaanus Sellin
dcb58de728
chore: clean dead code (#9903)
When looking at the big removal PR, I knew we missed something.

https://github.com/Unleash/unleash/pull/9888
2025-05-06 14:29:53 +03:00
Fredrik Strand Oseberg
db90ad9c6c
feat: enterprise consumption billing (#9862)
Initial PR that adds logic for displaying a link to stripe to view
consumption based pricing in the billing overview

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2025-05-06 13:15:31 +02:00
Mateusz Kwasniewski
c6ab2a1cf7
feat: sql feature link persistence (#9901) 2025-05-06 11:46:15 +02:00
Mateusz Kwasniewski
bb82b6920b
feat: feature link migration (#9900) 2025-05-06 11:21:20 +02:00
Jaanus Sellin
79abbc832f
feat: recently used segment chip (#9895) 2025-05-06 11:56:46 +03:00
Tymoteusz Czech
af93f93836
refactor: remove flagOverviewRedesign flag (#9888)
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2025-05-06 10:25:57 +02:00
renovate[bot]
6a2953f768
chore(deps): update dependency vite to v5.4.19 [security] (#9899)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vite.dev)
([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite))
| [`5.4.18` ->
`5.4.19`](https://renovatebot.com/diffs/npm/vite/5.4.18/5.4.19) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.4.18/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.4.18/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-46565](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3)

### Summary
The contents of files in [the project
`root`](https://vite.dev/config/shared-options.html#root) that are
denied by a file matching pattern can be returned to the browser.

### Impact

Only apps explicitly exposing the Vite dev server to the network (using
--host or [server.host config
option](https://vitejs.dev/config/server-options.html#server-host)) are
affected.
Only files that are under [project
`root`](https://vite.dev/config/shared-options.html#root) and are denied
by a file matching pattern can be bypassed.

- Examples of file matching patterns: `.env`, `.env.*`, `*.{crt,pem}`,
`**/.env`
- Examples of other patterns: `**/.git/**`, `.git/**`, `.git/**/*`

### Details

[`server.fs.deny`](https://vite.dev/config/server-options.html#server-fs-deny)
can contain patterns matching against files (by default it includes
`.env`, `.env.*`, `*.{crt,pem}` as such patterns).
These patterns were able to bypass for files under `root` by using a
combination of slash and dot (`/.`).

### PoC
```
npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env/. http://localhost:5173
```


![image](https://redirect.github.com/user-attachments/assets/822f4416-aa42-461f-8c95-a88d155e674b)

![image](https://redirect.github.com/user-attachments/assets/42902144-863a-4afb-ac5b-fc16effa37cc)

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v5.4.19`](https://redirect.github.com/vitejs/vite/releases/tag/v5.4.19)

[Compare
Source](https://redirect.github.com/vitejs/vite/compare/v5.4.18...v5.4.19)

Please refer to
[CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md)
for details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" in timezone Europe/Madrid,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 08:15:37 +00:00
hypermod-io[bot]
9d6c18b94a
Welcome to Hypermod (#9897)
Welcome to Hypermod! 🚀

This PR introduces the Hypermod Workflow File which connects the
repository to Hypermod.
The workflow will be triggered by Hypermod when a deployment is
requested, which then uses Hypermod CLI to apply automated code
transformations to your source files.
After the transformations is complete, diffs are collected and a pull
request is created.

Please review the changes and merge this PR to connect.

For more information, visit
[Hypermod](https://hypermod.io/docs/installation).

Co-authored-by: Christopher Kolstad <chriswk@fastmail.com>
2025-05-06 08:09:07 +00:00
Mateusz Kwasniewski
4860d73bf7
chore: feature links flag (#9896) 2025-05-06 09:46:18 +02:00
Mateusz Kwasniewski
002233e7f6
feat: feature link backend stub (#9893) 2025-05-06 09:31:45 +02:00
David Leek
1166d00e6d
chore: flag cleanup simplifyDisableFeature (#9892) 2025-05-06 08:41:03 +02:00
Melinda Fekete
7ca79c1b84
docs: update self-hosting guide (#9855) 2025-05-05 15:57:17 +02:00
Melinda Fekete
c0e30deafb
docs: remove roadmap from footer (#9890)
Remove Product Roadmap from footer and add Product Vision
2025-05-05 15:02:05 +02:00
Thomas Heartman
bc342c5b13
chore(1-3679): use numeric input mode for numbers. (#9875)
Adds inputmode='decimal' to input fields with number input. As discussed
on the [GOV.UK
blog](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/),
this finds a balance between giving numeric input options to mobile
devices and improving validation / user experience.

They mention this bit in their [design system
guideline](https://design-system.service.gov.uk/components/text-input/#numbers)

> Do not use `<input type="number">` unless your user research shows
that there’s a need for it. With `<input type="number">` there’s a risk
of users accidentally incrementing a number when they’re trying to do
something else - for example, scroll up or down the page. And if the
user tries to enter something that’s not a number, there’s no explicit
feedback about what they’re doing wrong.

I've purposefully not included the `pattern="[0-9]*"` attribute here,
because the browser error messages conflict with our own and have
several drawbacks in terms of accessibility according to Adrian
Roselli's ["Avoid default field
validation"](https://adrianroselli.com/2019/02/avoid-default-field-validation.html).

Instead, the validation here will be part of the validation handling
later.

Also, I've opted for using `decimal` instead of `numeric`, because we
allow you to store decimal values and that inputmode also adds the
decimal separator to the keyboard. As always, however, there's
complications: several languages (including Norwegian) use a comma as a
decimal separator instead of a period, so the keyboard will likely
contain numbers and a comma instead of a period. This is a problem
because JS doesn't recognize "45,6" as a valid number. I've added a
follow-up task to look into this. I thought at first it would just be
expanding the validation, but because it's stored as a string on the
back end and the SDKs presumably parse it, we can't just suddenly allow
commas as decimal separators.
2025-05-05 11:30:52 +02:00
Jaanus Sellin
33f23cc0c1
feat: recently used segments (#9881) 2025-05-05 10:15:43 +03:00
Thomas Heartman
832e3f2e79
Add input help text (#9883)
Adds help text to the popover input for free text values, single numeric
and semver values. The help text is in addition to the error text (so
you can get both).

Also makes the add button a little narrower to better match sketches.

## Rendered

Multiple values (free text):
<img width="953" alt="image"
src="https://github.com/user-attachments/assets/1d9bf7da-af8c-46b6-8eae-ae4f8a687363"
/>

With error
<img width="936" alt="image"
src="https://github.com/user-attachments/assets/aa9dc2da-ad9f-43da-9e44-c36fd8344df1"
/>

Numeric operators:
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/f1e8afd8-7051-4691-bdd2-810929ccd4fa"
/>



SemVer operators:

<img width="944" alt="image"
src="https://github.com/user-attachments/assets/655a7a7b-a4a4-468c-8a5d-23e5d38375b8"
/>
2025-05-02 15:47:29 +02:00
Thomas Heartman
3d84001273
1-3687/input mode separation (#9882) 2025-05-02 12:30:38 +02:00
Mateusz Kwasniewski
1b9c0e5000
feat: bulk apps should respect multi projects and multi envs (#9879) 2025-05-02 10:12:41 +02:00
Mateusz Kwasniewski
b0223e38ef
refactor: stabilize frontend apps reporting (#9880) 2025-05-01 15:43:03 +02:00
Thomas Heartman
44b4ba7f60
feat: add date type input field for constraints. (#9864)
Adds a date input method for editable constraints.

Uses a modified version of
`frontend/src/component/common/NewConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditBody/DateSingleValue/DateSingleValue.tsx`,
which has been marked as deprecated.

<img width="971" alt="image"
src="https://github.com/user-attachments/assets/3c6f6e1f-6156-444c-9a73-e0c9c1c52ad6"
/>

Wraps when necessary
<img width="471" alt="image"
src="https://github.com/user-attachments/assets/786be9d0-e62e-4bc2-884d-ef6f4aaf6b51"
/>


Additionally, because I noticed how the old date input sets the error,
I've switched to using the standard way of setting input errors in
Unleash (and presumably for MUI)
<img width="359" alt="image"
src="https://github.com/user-attachments/assets/31e6ce7c-ad5d-4432-a89f-b4d9d491bd99"
/>
2025-04-30 14:42:54 +02:00
Thomas Heartman
0e1ab236c9
Fix/constraint value wrapping (#9873)
Changes how constraint values are treated and wrapped.

Previously, they would have their own column and fill it up:

![image](https://github.com/user-attachments/assets/3d13fa75-2b53-4393-8bb2-8677741016e3)

Then we changed it to always being on the next line below certain
widths:

![image](https://github.com/user-attachments/assets/e2fea1e2-3ab8-4000-a727-831802c583c4)

But that would also cause it to break even if there was no need for it.
This iteration instead uses display `contents` on the value lists to let
them be handled by the flex flow of the containing element. This allows
them to only wrap when necessary.

<img width="995" alt="image"
src="https://github.com/user-attachments/assets/d61f6f49-b1ef-49ec-91a4-df868cedc678"
/>

Of course, if they don't need to wrap, they don't:
<img width="1030" alt="image"
src="https://github.com/user-attachments/assets/84c27997-7cb2-4e1b-8977-d43a46f7de6e"
/>


This loom video shows how it folds in the most complex scenario, with
all elements being visible and within bounds down to about 300px:
https://www.loom.com/share/4f29cdb105d54edeb70edd54dfaca9f9
2025-04-30 13:57:57 +02:00
Jaanus Sellin
3c6d797234
feat: recently used constraints have use this button now (#9871)
Also splitted actions, so we have edit view actions, and view actions.


![image](https://github.com/user-attachments/assets/27220835-36d2-4782-86c4-25511f6f778f)
2025-04-30 14:12:49 +03:00
Mateusz Kwasniewski
3ef32dca93
feat: handle nullable sdk type (#9872) 2025-04-30 12:36:18 +02:00
Thomas Heartman
691a9e6e57
fix: appropriately size case icon for non-editing constraints (#9869)
This fixes an issue where the "case sensitive" chip for existing
constraints was way too big. The underlying reason is that I switched
the icon for one with more padding to give it a consistent size with the
"not case sensitive" icon (PR:
https://github.com/Unleash/unleash/pull/9851).

The fix here is:
1. Add a viewBox to the SVG to let it scale properly.
2. Make the containing box stretch to fill the height of it's flex
container.
3. Use a size for height that doesn't grow too large.

Before:
<img width="137" alt="image"
src="https://github.com/user-attachments/assets/f23043f7-76a9-48c4-9f5c-c50371c24f72"
/>

After:
<img width="178" alt="image"
src="https://github.com/user-attachments/assets/cc2f8109-21ed-4070-b4bc-7c94be5b8e8d"
/>
2025-04-30 08:37:16 +00:00
Jaanus Sellin
3ec1daad2b
feat: now recent constraints work e2e (#9868)
Small intermediate cleanup.
Next step is to add usage buttons.
2025-04-30 11:34:03 +03:00
Mateusz Kwasniewski
9e4c3a388f
feat: allow nullable client ip for frontend apps (#9867) 2025-04-30 10:03:16 +02:00
Tymoteusz Czech
6c5fa4c8a7
feat: update search placement on flags overview screen (#9854)
- search has a new place, closer to filters
- filters are adjusted to wrap properly on small screens
2025-04-30 09:25:45 +02:00
Mateusz Kwasniewski
58a01d0c47
feat: separate frontend and backend applications from edge (#9863) 2025-04-29 15:42:47 +02:00
Thomas Heartman
d44b7ac6c2
1-3651/single value inputs (#9859)
Adds an "add value" with popover input for single-value fields
(numerical and semver operators).

The implementation re-uses the popover from the multi-value constraint
operators, so I've extracted it for re-use.

All current input types:
<img width="779" alt="image"
src="https://github.com/user-attachments/assets/ad522e4d-72ba-402c-ad7c-8609ef2fb3a8"
/>

For the new one, opening the popover when there's a value will
pre-select the value, so you can override it by typing immediately:
<img width="297" alt="image"
src="https://github.com/user-attachments/assets/31d18f9e-6ef9-4450-9d63-ca5034b59f19"
/>

Buttons look pretty identical:
<img width="784" alt="image"
src="https://github.com/user-attachments/assets/d96b0b0d-0cbb-4262-9ca8-4ec919cbfafb"
/>

## Discussion points

### Input type

I haven't set an input type anywhere on the popover yet. In theory, we
could use input type "number" for numerical inputs and I think it's
worth looking at that, but we don't do in the old implementation either.

I've added a task for it.

### Weird esc handling

This implementation uses a chip for the button/value display for the
single. In almost all cases it works exactly as I'd expect, but closing
the popover with esc moves your focus to the top of `body`.
Unfortunately, this isn't something we can address directly (trust me,
I've tried), but the good news is that this was fixed in mui v6. The
current major is v7, so we probably want to update before too long,
which will also fix this. More info in the MUI docs:
https://mui.com/material-ui/migration/upgrade-to-v6/#chip

I think that for the single value entry, losing focus on esc is a fair
tradeoff because it handles swapping states etc so gracefully. For the
multi-value operators, however, esc is the only way to close the
popover, so losing focus when you do that is not acceptable to me. As
such, I'll leave the multi-value input as a button for now instead.
(It's also totally fine because the button never updates or needs to
change).
2025-04-29 15:06:42 +02:00
Jaanus Sellin
cb987ac78b
feat: now updating/editing strategy will store constraints in recents (#9861) 2025-04-29 15:33:06 +03:00
Jaanus Sellin
7356453c0c
feat: view for recently used constraints (#9860) 2025-04-29 13:36:17 +03:00
Github Actions Bot
c548f93d5e 6.9.2 2025-04-29 09:25:07 +00:00
Github Actions Bot
da994047c5 docs: Update CHANGELOG.md 2025-04-29 09:24:55 +00:00
Mateusz Kwasniewski
3980cfa2a8
feat: show backend and frontend sdks separately (#9857) 2025-04-29 10:36:02 +02:00
Gastón Fournier
bf05ee1201
fix: lint (#9858) 2025-04-29 10:26:10 +02:00
David Leek
e450d1e35e
chore: replace inherit color on menu item hover to common.white (#9856) 2025-04-29 09:27:09 +02:00
Melinda Fekete
c393a869a7
docs: update docs preview image (#9852) 2025-04-29 09:16:54 +02:00