Skip to content

Use non production label instead of staging#27489

Merged
AlexGaillard merged 1 commit into
licensefrom
license-production-wording
May 18, 2026
Merged

Use non production label instead of staging#27489
AlexGaillard merged 1 commit into
licensefrom
license-production-wording

Conversation

@HZooly
Copy link
Copy Markdown
Member

@HZooly HZooly commented May 18, 2026

Replaces the missing $t('staging') key (which rendered as the literal string "staging") with a proper non_production translation.

@HZooly HZooly requested a review from AlexGaillard as a code owner May 18, 2026 19:52
@AlexGaillard AlexGaillard merged commit c76b48e into license May 18, 2026
3 checks passed
@AlexGaillard AlexGaillard deleted the license-production-wording branch May 18, 2026 19:53
AlexGaillard added a commit that referenced this pull request May 28, 2026
* tests(mls): improve util typing

* tests(mls): add new entry point

* tests(mls): return back added license

* improve license server

* fix(cli): do not initialize license in bootstrap

* refactor(manager): do not allow undefined entitlements

* tests(mls): fix initialize tests

* tests(mls): improve rest tests

* fix(license): error on attempt to active with active key

* fix cache refresh

* clean logs

* update test

* add final rest test

* add horrizontal tests

* fix(manager): update has keys swapped

* tests(mls): add initialization case B

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* fix transaction for creating first admin user in sqlite

* include knex everywhere

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* improve pendingResolution

* fix for ma best fiend juda

* Fix preview endpoint missing name

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* cleanup

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* add missing set source for db data

* enforce port for api

* refactor initialize test structure

* more port fixes

* more cleanup

* fix(get-license-*): incorrect source if not found

* refactor(sandbox): utilize promise resolver

fix(sandbox): early error on api close

* update rest tests

* fix(preview): pull non prod flag from entitlements

* fix(mls): bring up to spec on preview

* Update api/src/license/entitlements/lib/seats.ts

* fix(license): use constant for inactive license exceeded status

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* refactor(licensing): remove deprecated getLicense imports

* fix(license manager): entitlements out of sync with state change

* tests(mls): add shared functions

* add lifecycle tests

* Refactor sdk error to use class over object (#27135)

* fixed error handling in sdk

* Update thick-readers-cheer.md

* rework error and move to dedicated file

---------

Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>

* fix process killing in sandbox

* complete rest resolve tests

* License frontend parent branch (#27395)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* restore owner_complete

---------

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* rename user inactive exceeded state due to limits

* Add AI translation gating (#27444)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* restore owner_complete

* Hide translations button on translation interface

* Add readonly and notice to AI settings

* Add helper function for license store boolean values

* Update tests

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* fix exiting sandbox

* fix sandbox logging undefined for admin user&pw

* add addons to mock server

* Fix license settings (#27448)

* remove deprecated breadcrumb

* hide add-ons if not available

* hide manage license button when no source

* Hide danger zone for free tier

* do not render infinite date

* skip MaxCapacityAlert render when capacity not exceeded

* remove breadcrumb import

---------

Co-authored-by: Rob Luton <rob.luton@gmail.com>

* Basic collection unit and e2e (#27438)

* basi collection unit and e2e

* Add collection e2e tests

* basic flows e2e tests

* fix collection leak

* fix collection leak

* very basic seats testing

* fix user deactivation

* move initialize to constructor

* add downgrade/lock for invalid status

* add addon tests

* Handle unlimited case, refactor store, fixes due to recent merges (#27446)

* use v-chip for styling (#27459)

* License key modale (#27418)

* handle license key submit

* fix license drawer reset and isLicensed signal

* wire manage license

* fix model value

* refactor: route license activate/update through licenseStore

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Update license wording (#27422)

* update license wording

* remove license notices from setup onboarding

* Refresh license info on settings page mount (#27455)

* refresh license info on settings page mount

* do not fetch addons if not required

* refactor: clarify Core tier check in license settings mount

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add public/private license badge (#27452)

* Add new system interface to public view

* Display badge within private view nav

* Replace ::before line with hr

* Move from system interface to component

* Add test case for v-license-badge

* Simplify displayPoweredBy computed

* Move wrapper to private-view-nav-footer component

* Move translation strings

* Add non-production badge

* Fix alignments

* Replace icon and fix style adjustments

* Fix padding issue on public view

* Prevent stacked onboarding and project owner modals (#27460)

* prevent stacked onboarding and project owner modals

* License resolution modal (#27441)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* wip resolution modal

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* refactor: udpdate store

* restore owner_complete

* refactor: clean up code

* grace-period modal

* feat: handle locked license logic

* fix: rename collection deactivation and apply locked to app

* resolution modal ui

* modal footer

* refactor: handle no resolution case

* refactor: adapt according to severity

* refactor: route license activate/update through licenseStore

* add missing translation

* sync lock allowed list between router an app

* make grace warning dismiss work, clear on grace exit

---------

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* License upgrade buttons (#27457)

* handle license key submit

* fix license drawer reset and isLicensed signal

* wire manage license

* fix model value

* upgrade plan button link

* wire upgrade plan button

* refactor: simplify upgrade buttons block in license settings

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Surface entitlement limit modal on collection create errors (#27463)

* feat: surface entitlement limit modal on collection create errors

* refactor: use extractErrorCode for limit detection

* Update license header badge (#27458)

* update license header badge

* feat: map license status to badge label and color

* Revert "feat: map license status to badge label and color"

This reverts commit 7b6ebd3779b82bfae10eac637f11d8b11f472ce8.

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* blocked login should be resource restricted error

* Show project locked warning for non-admin logins (#27466)

* Fix flows max-capacity padding (#27467)

* fix license server connection

* Handle unlimited case and cleanup (#27468)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* fix(addons): add `unit_price` & `billing_interval` to response

* fix license store reactivity issues (#27483)

* hydrate license store during crud events

* hydrate on collections batch delete

* hydrate when seat count affected

* remove unnecessary awaits when hydrating license store

* handle collection-options case

* remove redundant hydration call

* show format-specific error for malformed license keys (#27480)

* update license link utm params (#27485)

* disable license management when key is set via env var (#27482)

* use non production label instead of staging (#27489)

* add password mistach warning (#27488)

* License entitlements cache (#27484)

* first run caching

* add spork function

* renamed clear cache func

* clean up some AI code

* Add missing entitlement check

* fix entitlement mistakes

* fix infinite loop and add assert removing logic

* extra users seat checks

* remove early exit

* Split admins from users in seats resolution (#27477)

* split admins from users in seats resolution

* up

* checkbox clickable

* up

* show password mismatch as inline field error (#27492)

* show flow names in resolution dialog and submit proper IDs (#27491)

* feat(licensing): support core license entitlement fork

CMS-2401

* feat(licensing): add `scheduled_quantity` to addon output

* Hide license badge on media width (#27494)

* Hide license badge on media width

* Use mixin

* license settings responsive (#27506)

* fix CMS-2410

* surface locked resources via resource restriction (#27495)

* License Entitlements (#27502)

* support invert value on entitlement display

* ai translation entitlement

* refactor entitlement into computed

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* hide SSO providers on signin when sso disabled (#27496)

* add caching to core grace period query (#27497)

* Amend SSO resolution message (#27510)

* feat(license): harden license boot sequence (#27499)

* feat(license): harden license boot sequence

* prefer fatal for hard exits

Co-Authored-By: Brainslug <br41nslug@users.noreply.github.com>

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* prevent license fields from being manually in settings (#27498)

* improve seats enforcement (#27512)

* improve seats enforcement

* make seats cache refresh instead of clear

* Adjust activity license notice margin and hide for unlimited (#27511)

* refactor(licensing): consolidate state transitions (#27513)

* refactor(licensing): replace getStatus with computeLicenseStatus

* refactor(licensing): narrow isLocked to stored status

* refactor(licensing): always re-compute status

* feat(licensing): add downgrade_reason to license output

* refactor(licensing): consolidate state transitions

* fix(licensing): source not reliable

* refactor(licensing): utilize promise all in license output

* Align resolution dialog with new downgrade_reason contract (#27517)

* refactor(license): align resolution dialog with new downgrade_reason contract

* refactor: remove old i18n

* refactor: use downgrade_reason of scope value

* feat: unify grace + downgrade resolution prompt

* refactor: remove unused needsResolution

* Update app/src/lang/translations/en-US.yaml

Co-authored-by: Alex Gaillard <alex@directus.io>

* fix: type resolution dialog title

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* resolve SSO section interactivity and deactivation flow (#27519)

* KYC Modal (#27521)

* show project owner modal after license modale dismiss

* guard nested property access in form

* show project owner modal regardless of license source

* Collection update incorrectly blocked by collection limit (#27522)

* fix collection issue

* nit

* fix custom_llm flag filtering

* fix(license): bypass any non-resolver type FF in checkAll

* Addon purchase modals on License settings (#27504)

* feat: add addons logic modal

* refactor: optimize addon scheduled update

* refactor: clean up code

* fix: fix i18n wording

* refactor: clean up date formater

* Amend messaging for upgrade case

* Amend no change case

* Handle downgrade case

* Cleanup

* Divide unit price by 100

---------

Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* fix(licensing): custom permission rules should check fields independently

* Make private view license reactive (#27527)

* Resolution dialog fixes and improvements (#27523)

* fix: show grace period modal on license expiry within limits

* refactor: revert logic

* fix: avoid loading null user

* fix: resolution dialog issues and clarity improvements

* Change badge from none to hidden (#27530)

* Amend non prod badge to use license store (#27531)

* Change badge from none to hidden

* Amend non prod badge to use license store

* Amend badge back to server store (#27533)

* fix: deactivated state from collection (#27535)

* fix collection update enforcement

* Add license expiring warning notices (#27518)

* create status-notice components and handle the grace period upgrade case

* handle remaining cases

* fix logic

* cleanup

* fix pinned grace text

* prevent powered by badge visibility from affecting pinned status visibility

* add locked status message

* change verbiage to match what will actually happen

* minor copy change

* fix minor spacing issue

* update copy

* feedback updates

* update get license link (#27537)

* fix permissions cache on license change

* fix(license): pass down knex for permission entitlements

* Fix/modal user status (#27543)

* fix: modal resolution card width

* fix: update new status value

* Resolution modale: LLM, custom rules, and user email (#27526)

* fall back to email in seat candidates and reduce the number of displayed fields in drawer

* show custom LLM and permission rules in resolution dialog
* fix: sso spacing block

* feat: refactor sso confirm

* fix: email validation + wording

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* fix: refresh addons after license key change (#27542)

* fix: refresh addons after license key change

* refactor: remove comment

* add flows entitlement (#27547)

* Add license key modal and pop after login (#27539)

* translation keys

* license-key-modal

* refactor

* tests

* update links and use utm tags

* update oig onboarding link (#27552)

* update plan limit message (#27550)

* refresh addons after license deactivate (#27551)

* restore open animation on user drawer (#27548)

* update addons purchase modale text (#27556)

* License seats fix (#27557)

* remove refreshCache logic

* fix stale seats cache counting issue

* fix seats e2e test to not rely on cacheBypass

* re-activate bus subscription

* clear cache centrally

* Amend enterprise addon button link (#27572)

* Amend enterprise addon button link

* Fix some things

* refresh license usage after schema mutations affecting collections (#27549)

* show only grace login modal when upgrading from v11 to v12 (#27579)

* Disable manage license when env managed (#27581)

* disable manage license when env managed

* refactor isEnvManaged in store

* Revert "Disable manage license when env managed (#27581)" (#27584)

This reverts commit 721b24e18dc414d2e136b8ebb606b37fe27f8430.

* close resolution dialog when managing license in no_resolution scope (#27586)

* Fix custom permission rules entitlement key (#27587)

* Do not clear sessions on admin credential change (#27588)

* fix(license): mirror SSO escape hatch in login middleware (#27582)

* fix(license): mirror SSO escape hatch in login middleware

* refactor(license): simplify SSO escape hatch to entitled || locked

* refactor: simplify

* core within grace and within limits should be active

* Replace hardcoded `https://directus.io` to `https://directus.com` with new constant (#27585)

* create constant for directus.com and replace all instances of https://directus.io with the new constant

* changeset

* updates

* update all package.json files to use the new home page url

* update license files

* update vue files

* update constant

* md and yml files

* revert changes made to email addresses

* Apply suggestion from @AlexGaillard

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* clear the caches explicitly on resolution (#27591)

* redirect to settings after submit on license-recovery route (#27592)

* disable Add License button when env managed (#27593)

* Improve test coverage (#27590)

* add custom llm coverage

* add activity entitlement e2e

* always select full activity for test

* remove redundant count from activity tests

* add revision entitlement e2e

* fmt

* add db helpers for date parsing

* type api client

* add custom permission rules e2e

* rename createCustomPermission to buildCustomPermission

* remove invalid permission assertion

* update collection tests

* add remaining tests to collections

* assert resolve in cpr

* update license flow entitlement e2e

* improve rest tests

* tests(licensing): get the green for rest

* Skip hydrateAddons when license source is null (#27600)

* skip hydrateAddons when license source is null

* clear addons after deactivation

* clear correct cache on collection remediation

* allow sso during core grace (#27601)

* register license check

* License design update 1 (#27599)

* refactor(app): use InterfacePresentationDivider for license section header

Replace the bespoke section header (custom VDivider + VIcon + styled title)
in license-section.vue with the shared InterfacePresentationDivider so
headings match the rest of the admin app and drop the duplicated layout
and typography CSS.

Rename the section's variant prop to kind (neutral | danger) to align with
the prop naming used elsewhere (VChip etc.) and update the caller in
license.vue accordingly.

* style(app): polish license module chips, buttons, and spacing

Design tweaks across the license module to standardize on built-in
component variants and drop ad-hoc CSS overrides.

- Switch entitlement and plan-status chips to VChip standard variants
  (:label="false" plus kind="success" / "primary" / "neutral") and remove
  the custom .v-chip CSS that hand-styled background, padding, and
  border radius
- Drop the small icon prop in entitlement labels and recolor via a
  scoped --v-icon-color token instead of a :deep selector
- Use the theme border-radius token for the entitlement item background
- Add small to addon-item action buttons so they sit better next to the
  entitlement rows
- Apply the type-label mixin to the entitlements section title
- Add a .status-chip class with font-weight 600 for the plan status chip
- Stretch the env-managed VNotice to full width inside the danger zone

* improve responsive design

* adjust badge-divider size and add flex-shrink to project name container

* add error handling (#27596)

* add error handling

* improvements

* install license package

* bump license package to 0.2.0

* only bypass sso if in grace and grace period

* back new helper with unit tests

* update missing setting fields in sdk

* add license info to server info sdk type

* update gql server info type

* fix(license): expose Core grace deadline via expires_at + grace_period (#27583)

* fix(license): expose Core grace deadline via expires_at + grace_period

* refactor: clean up lint

* refactor: clean up lint

* refactor(license): rename to getCoreGraceExpiresAt and consolidate

* refactor: return seconds from getCoreGraceExpiresAt and update tests

* refactor(license): split getCoreGraceExpiresAt into its own file

* Fix rpc sync (#27597)

* hide addon pricing_summary when unit_price is null (#27608)

* add license package to e2e

* attempt bb fix

* Fix e2e

* fix offline

* License design update 2 (#27610)

* style: adjust spacing in v-radio-cards and setup components for improved layout

* adjust non-production badge

* Remove unused center prop from VDivider (#27618)

* simplify activity e2e

* simplify revision e2e

* await registration in e2e

* simplify permission rule e2e

* simplify cllms e2e

* attempt to fix blackbox 1

* remove requirement for requested port to be same as requested

* attempt to fix blackbox 2

* show inline email format error on setup form (#27609)

* show inline email format error on setup form

* up

* attempt to fix blackbox 3

* attempt to fix blackbox 4: mess up version tests

* attempt to fix blackbox 5

* enable license for global

* log actual error

* update status messages for core tier expiry date (#27613)

* update

* update status notice message

* simplify

* remove hover style so it is consistent with other opened PRs

* update keys for mock server

* explicit set dev

* License design update 3 (#27620)

* remove todos

* Improve setAddonQuantity error handling

* fix(license): hide history timeframe notice when entitlement is -1 (#27623)

Co-authored-by: Alex Gaillard <alex@directus.io>

* Grace modal wording (#27615)

* fix(license): refine Core grace modal wording

* fix: use email from variable

* refactor: use DIRECTUS_DOMAIN const

* Update app/src/views/private/components/license/license-login-modal.vue

* Update app/src/lang/translations/en-US.yaml

* Update app/src/lang/translations/en-US.yaml

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* show AI translations resolution checkbox when losing the entitlement (#27594)

* fix: do not hydrate addons when offline (#27624)

* fix: update padding and background styles for public view and license badge (#27630)

* Change license to MSCL-1.0-GPL (#27627)

* Update translations to reflect MSCL 1.0 licensing across multiple languages

* Update copilot instructions to reflect MSCL-1.0-GPL

* Update license in openapi.yaml

* Update license in directus README

* Update licenses to MSCL-1.0-GPL across multiple package.json files

* Update licenses files

* add MIT license file to packages/ai

* Update copyright year

* Update license to reference the LICENSE file in multiple package.json files

* Update licenses to reflect Monospace Sustainable Core License, Version 1.0 across multiple files

* add changeset

* Remove license update note from readme

Removed note about upcoming Directus license update and feedback request.

* Revise license details and user categories in readme

Updated licensing information and usage terms for Directus.

* Update readme.md

* Fix pricing link in readme

Updated the link for pricing details in the commercial license section.

* add breaking change notice

* Fix license change notice from BUSL-1.1 to BSL-1.1

* Fix typo in license change notice

* Update license information in readme.md

Added information about the license change from BSL to MSCL for sustainability.

---------

Co-authored-by: David Stockton <7375241+dstockton@users.noreply.github.com>
Co-authored-by: James White <jamesw1013@googlemail.com>

* e2e fixes

* e2e fixes 5

* e2e fix 6, remove dead test

* e2e fixes 7: relax property match in initialize

* fix e2e 8: bring lifecycle checks inline

* fix(e2e): isolate env-gate sandbox resources in mcp-oauth-settings-gate

Second sandbox in the file shared DB_FILENAME and port-allocation baseline
with the beforeAll sandbox. The docker step would unlink the running DB
file, and getPort(8055) could hand back the same fallback twice, surfacing
as 'Api stopped with error code 1'.

Use a per-test UUID for prefix/DB_FILENAME/docker.suffix and pin an
explicit port.

* fix e2e 9: attempt horizontal fix

* fix e2e 10: horizontal attempt 2

* fix(system-owner): align with refactored SetupForm shape (#27631)

* fix(system-owner): align with refactored SetupForm shape

* fix: validate function with new contract

* fix: fallback to initialValue

* fix: handle feedbacks

* fix e2e 11: horizontal fix

* fix(sandbox): keep resolved port consistent across env and apis

Three desync sites caused the port the API actually binds to drift away
from what callers and the API itself observed:

- getEnv set PORT/PUBLIC_URL early, then process.env clobbered them with
  the vitest per-project PORT baseline. So opts.port was silently ignored.
  Move PORT/PUBLIC_URL to after the process.env spread, and let
  process.env.PORT feed getPort as a fallback baseline.

- startApi's getPort(preferredPort) can fall back to a free random port
  (TIME_WAIT after restart, collision with a sibling sandbox). The spawn
  env updated PORT but not PUBLIC_URL, so the API listened on one port
  and advertised iss/issuer on another. Override both.

- sandbox() returned apis by value. restartApi reassigned the local
  variable but consumers still saw the old array, so apis[0].port was
  stale after restart. Expose apis via a getter.

With these in place, drop the port:8056 workaround from the mcp-oauth
env-gate test (DB filename / docker suffix uniqueness still needed).

* fix e2e 12: remaining initialize

* remove custom llm patch check for rc1

* bring mock license error format up to spec

* fix(sandbox): keep resolved port consistent across env and apis

api.ts re-resolved the port via getPort(preferredPort) before each spawn.
With get-port@7.1.0's 15s lockedPorts cache, getPort(X) for a port X that
getOptions just locked throws Locked(X) and falls back to a random port Y.
Parent's env.PUBLIC_URL was constructed from X; the API child then bound Y
and advertised iss/public_url=Y. The mock /update endpoint validates by
matching the public_url stored from parent's activate call, so the lookup
failed with 400 -> initialize() threw -> API exited.

Stop re-resolving in api.ts: trust opts.port/env.PORT set by getOptions
(initial boot) and by restartApi (restart). restartApi now re-resolves
explicitly to handle TIME_WAIT on the just-killed port, and propagates
the resolved value to opts.port + env.PORT + env.PUBLIC_URL so consumers
of directus.apis/env stay in lockstep.

Fixes initialize.sb.test.ts Case B "migrates to new env LICENSE_KEY",
which was failing on any host where the vitest project's PORT baseline
was taken (i.e., where getOptions had to fall back to an ephemeral port).

* fix(e2e): use writeTimestamp for activity/revision INSERTs

date.parse() returns an ISO string (YYYY-MM-DDTHH:mm:ss.sssZ) which is
fine for WHERE comparisons (where core uses it -- retention.ts, operator.ts)
but MySQL/MariaDB reject it in strict mode on DATETIME column bindings.

Switch to date.writeTimestamp(iso), the INSERT-side helper. It returns a
Date that mysql2/sqlstring formats as 'YYYY-MM-DD HH:mm:ss', which all
dialects accept. Matches core's convention (payload.ts date-created /
date-updated, versions.ts).

Fixes activity-historical-timeframe.sb.test.ts and
revision-historical-timeframe.sb.test.ts on mysql / maria sandboxes.

* add writeTimestampString to helpers

* bump outside

* fix(licensing): improve license check lifecycle (#27622)

* improve license check

* simplify auto stop on re-schedule

* fix e2e 13: cpr inserts

* fix e2e 14: mssql cannot set id on insert

---------

Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Rob Luton <rob.luton@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: formfcw <dev@formfcw.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
Co-authored-by: David Stockton <7375241+dstockton@users.noreply.github.com>
Co-authored-by: James White <jamesw1013@googlemail.com>
nagyonmarci pushed a commit to nagyonmarci/directus that referenced this pull request Jun 3, 2026
* tests(mls): improve util typing

* tests(mls): add new entry point

* tests(mls): return back added license

* improve license server

* fix(cli): do not initialize license in bootstrap

* refactor(manager): do not allow undefined entitlements

* tests(mls): fix initialize tests

* tests(mls): improve rest tests

* fix(license): error on attempt to active with active key

* fix cache refresh

* clean logs

* update test

* add final rest test

* add horrizontal tests

* fix(manager): update has keys swapped

* tests(mls): add initialization case B

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* fix transaction for creating first admin user in sqlite

* include knex everywhere

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* improve pendingResolution

* fix for ma best fiend juda

* Fix preview endpoint missing name

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* cleanup

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* add missing set source for db data

* enforce port for api

* refactor initialize test structure

* more port fixes

* more cleanup

* fix(get-license-*): incorrect source if not found

* refactor(sandbox): utilize promise resolver

fix(sandbox): early error on api close

* update rest tests

* fix(preview): pull non prod flag from entitlements

* fix(mls): bring up to spec on preview

* Update api/src/license/entitlements/lib/seats.ts

* fix(license): use constant for inactive license exceeded status

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* refactor(licensing): remove deprecated getLicense imports

* fix(license manager): entitlements out of sync with state change

* tests(mls): add shared functions

* add lifecycle tests

* Refactor sdk error to use class over object (#27135)

* fixed error handling in sdk

* Update thick-readers-cheer.md

* rework error and move to dedicated file

---------

Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>

* fix process killing in sandbox

* complete rest resolve tests

* License frontend parent branch (#27395)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* restore owner_complete

---------

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* rename user inactive exceeded state due to limits

* Add AI translation gating (#27444)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* restore owner_complete

* Hide translations button on translation interface

* Add readonly and notice to AI settings

* Add helper function for license store boolean values

* Update tests

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* fix exiting sandbox

* fix sandbox logging undefined for admin user&pw

* add addons to mock server

* Fix license settings (#27448)

* remove deprecated breadcrumb

* hide add-ons if not available

* hide manage license button when no source

* Hide danger zone for free tier

* do not render infinite date

* skip MaxCapacityAlert render when capacity not exceeded

* remove breadcrumb import

---------

Co-authored-by: Rob Luton <rob.luton@gmail.com>

* Basic collection unit and e2e (#27438)

* basi collection unit and e2e

* Add collection e2e tests

* basic flows e2e tests

* fix collection leak

* fix collection leak

* very basic seats testing

* fix user deactivation

* move initialize to constructor

* add downgrade/lock for invalid status

* add addon tests

* Handle unlimited case, refactor store, fixes due to recent merges (#27446)

* use v-chip for styling (#27459)

* License key modale (#27418)

* handle license key submit

* fix license drawer reset and isLicensed signal

* wire manage license

* fix model value

* refactor: route license activate/update through licenseStore

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Update license wording (#27422)

* update license wording

* remove license notices from setup onboarding

* Refresh license info on settings page mount (#27455)

* refresh license info on settings page mount

* do not fetch addons if not required

* refactor: clarify Core tier check in license settings mount

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add public/private license badge (#27452)

* Add new system interface to public view

* Display badge within private view nav

* Replace ::before line with hr

* Move from system interface to component

* Add test case for v-license-badge

* Simplify displayPoweredBy computed

* Move wrapper to private-view-nav-footer component

* Move translation strings

* Add non-production badge

* Fix alignments

* Replace icon and fix style adjustments

* Fix padding issue on public view

* Prevent stacked onboarding and project owner modals (#27460)

* prevent stacked onboarding and project owner modals

* License resolution modal (#27441)

* feat: add licit jwt mock

* fix: concurrency lock

* refactor: add types and update usage

* feat: add lazy addons hydration to license store

* fix: re-apply concurrency lock fix on license manager

* License management settings page (#27368)

* feat: add license API types and route mocks

* fix: remove cache

* feat: add sdk part

* refactor: update types according to notion feebacks

* feat: add front-end foundation

* feat: add scenario / error mock param from sdk

* wip licensing settings

* deactivate modal confirm

* fix

* fix: align license page with new entitlements format and store API

* split license section

* extract format time frame in its own util

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* refactor: update settings and store

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Add license gating UI on Custom LLM settings (#27379)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* Apply suggestion from @gaetansenn

* fix: use override before default

* Add license gating on access policies custom rules (#27390)

* feat: implement customLLM screen

* Apply suggestion from @gaetansenn

* feat: add license gating on access policies custom rules

* Revert "feat: implement customLLM screen"

This reverts commit fa5c49fc8358bfae1e266895a7724df8cac01796.

* fix: conflict

* feat: skip license store hydration for non-admin users

* Add revision and activity history license notice (#27399)

* feat: add revision and activity history license notice

* refactor: simplify formatTimeframe to use days only

* fix: revision order license

* fix: activity feed licesne margin

* License mock (#27392)

* add basic license mock server

* start updating test suite

* start working on license activation test

* better error reporting

* continue testing

* continue on tests

* remove invalid files

* Fix license initialization

* first working test 🥳

* rename entitlement setLicense to setEntitlements

* cleanup endpoints

* add license assertions

* cleanup

* account for provided key entitlements in pending resolution

* add public_url change handling for refresh

* account for deactivate state in pendingResolution

* various fixes

* License entitlement 2 (#27386)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* License entitlement 2_final (#27396)

* use directus errors

* fix custom rule entitlement and enforce create/update

* basic flows enforcement

* add flows and update collections

* add collection status for excluding

* simple collection exclusion checks

* fix flows

* implement resolvers

* no mo try catch

* cleanup after entitlement improvements

* update license-mock

* complete mock server

* feat(e2e): add beforeApi hook

* test(e2e): surface db connection

* tests(e2e): correctly build knex connection

* tests(e2e): add g and d cases

* fix getschema on clean bootstrap

* fix sandbox and e2e tests

* update tests

* do not restrict preview behind admin

* no bypass for manage addons on init

* adjust setup completed and license payloads

* fix license token column type and unify the 2 migrations

* add license and key generation

* test(license-mock): rename to mock-license-server

* fix sb

* update test

* License entitlement 3 (#27408)

* fixing entitlement initialization

* move blocking modal that always triggers

* manager tweaks

* dont prevent user creation

* fix history filter calculations

* integrate seat enforcement with existing limit checks

* remove debug code

* mo verify

* fix activity history filter and added basic query cache

* fix circular import issue with services

* add checkAll feature and fix feature flags

* bring mock server up to spec

* cleanup mock server

* add grace period utility

* change mock server version to date based

* add overage billed to meta

* bring core up to spec

* bring tests up to spec

* move lib to utils

* utilize entitlement getActiveSeats for resolution

* add required claim to mock server

* refactor: use e2e logic

* refactor: clean up code

* refactor: clean up mocks

* License Onboarding flow (#27334)

* License onboarding (#27380)

* align frontend with API schema and fix setupCompleted derivation

---------

Co-authored-by: HZooly <torzuoli.hugo@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* refactor: merge conflicts

* Include LICENSE_TOKEN in licenseInEnv check (#27416)

* fix: include LICENSE_TOKEN in licenseInEnv check

* update project owner banner rule

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* feat: show deactivated collections in data model (#27421)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* improve pendingResolution

* fix folder counting

* update `display_powered_by` value to spec

* fix collection enforcement

* fix for ma best fiend juda

* cleanup

* add todo for error handling for setup license activate

* Support lock state and refactor state commit (#27419)

* support lock state and refactor state commit

* dont call getStatus on options.status

* License entitlement 4 (#27420)

* fix collections resolution

* basic collection entitlements test

* rename for consistency

* oops, invert check functions for entitlements

* make sure limits are set

* fix assertAll

* add excpetion back in

* skip not registerd keys

* update token on addon quantity change

* tests(mls): add license version requirement enforcement

* add knex for getSchema

* moar knex issues

* enforce port for api

* add missing set source for db data

* more port fixes

* refactor initialize test structure

* refactor: revert mock

* lint: clean up

* feat: add static license keys

* wip resolution modal

* Amend how seats are computed against entitlements (#27431)

* Amend computation again (#27432)

* Amend how seats are computed against entitlements

* Fix error

* Tighten license onboarding types and gate project owner info (#27433)

* Add license limit modal and use for seat and collection gating (#27372)

* collection limit modal

* tests

* share licens guard code via composable

* refactor

* rework user limit modal to appear on save

* rework again based on latest spec

* change status to deactivated

* simplify save to deactivated status

* revert more changes

* change back to error code that will be added later

* use named route instead of hard-coded path

* placeholder for settings page

* I lost the vote

* refactor: add todo

* Revert "refactor: add todo"

This reverts commit 4fd3b267165c7f0b6f6f1a7596848e0c790dc329.

* Collections remaining component and logic (#27383)

* collections remaining component and logic

* remove hard coded value used for testing

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* max capacity modal (#27393)

* minor fixes

* show collectionsRemaining when 10 or less left for team and enterprise

* avoid using specific plan types in conditions

* cleanup

* adapt to api changes plus feedback

* cleanup and minor fixes

* change alert text color to match figma

* Frontend gating for flows (#27430)

* frontend gating for flows

* change license-limit-modal name to entitlement-limit-modal

* Update app/src/views/private/components/license/entitlement-remaining.vue

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* Import inactive-license-expired string from constant

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Alex Gaillard <alex@directus.io>

* fix(license manager): pending resolution pushing no violation

* add remaining initialize tests

* move admin under its own route

* move getLicense under manager

* fix(license manager): explit check for license key

* fix(mls): JWT exp should be 7 days from issue

* Merge with license branch

* Move entitlement remaining to actions:prepend slot

* drop dead onboarding code and fix breadcrumb import

* refactor: udpdate store

* restore owner_complete

* refactor: clean up code

* grace-period modal

* feat: handle locked license logic

* fix: rename collection deactivation and apply locked to app

* resolution modal ui

* modal footer

* refactor: handle no resolution case

* refactor: adapt according to severity

* refactor: route license activate/update through licenseStore

* add missing translation

* sync lock allowed list between router an app

* make grace warning dismiss work, clear on grace exit

---------

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* License upgrade buttons (#27457)

* handle license key submit

* fix license drawer reset and isLicensed signal

* wire manage license

* fix model value

* upgrade plan button link

* wire upgrade plan button

* refactor: simplify upgrade buttons block in license settings

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* Surface entitlement limit modal on collection create errors (#27463)

* feat: surface entitlement limit modal on collection create errors

* refactor: use extractErrorCode for limit detection

* Update license header badge (#27458)

* update license header badge

* feat: map license status to badge label and color

* Revert "feat: map license status to badge label and color"

This reverts commit 7b6ebd3779b82bfae10eac637f11d8b11f472ce8.

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Rob Luton <rob.luton@gmail.com>

* blocked login should be resource restricted error

* Show project locked warning for non-admin logins (#27466)

* Fix flows max-capacity padding (#27467)

* fix license server connection

* Handle unlimited case and cleanup (#27468)

Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* fix(addons): add `unit_price` & `billing_interval` to response

* fix license store reactivity issues (#27483)

* hydrate license store during crud events

* hydrate on collections batch delete

* hydrate when seat count affected

* remove unnecessary awaits when hydrating license store

* handle collection-options case

* remove redundant hydration call

* show format-specific error for malformed license keys (#27480)

* update license link utm params (#27485)

* disable license management when key is set via env var (#27482)

* use non production label instead of staging (#27489)

* add password mistach warning (#27488)

* License entitlements cache (#27484)

* first run caching

* add spork function

* renamed clear cache func

* clean up some AI code

* Add missing entitlement check

* fix entitlement mistakes

* fix infinite loop and add assert removing logic

* extra users seat checks

* remove early exit

* Split admins from users in seats resolution (#27477)

* split admins from users in seats resolution

* up

* checkbox clickable

* up

* show password mismatch as inline field error (#27492)

* show flow names in resolution dialog and submit proper IDs (#27491)

* feat(licensing): support core license entitlement fork

CMS-2401

* feat(licensing): add `scheduled_quantity` to addon output

* Hide license badge on media width (#27494)

* Hide license badge on media width

* Use mixin

* license settings responsive (#27506)

* fix CMS-2410

* surface locked resources via resource restriction (#27495)

* License Entitlements (#27502)

* support invert value on entitlement display

* ai translation entitlement

* refactor entitlement into computed

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* hide SSO providers on signin when sso disabled (#27496)

* add caching to core grace period query (#27497)

* Amend SSO resolution message (#27510)

* feat(license): harden license boot sequence (#27499)

* feat(license): harden license boot sequence

* prefer fatal for hard exits

Co-Authored-By: Brainslug <br41nslug@users.noreply.github.com>

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* prevent license fields from being manually in settings (#27498)

* improve seats enforcement (#27512)

* improve seats enforcement

* make seats cache refresh instead of clear

* Adjust activity license notice margin and hide for unlimited (#27511)

* refactor(licensing): consolidate state transitions (#27513)

* refactor(licensing): replace getStatus with computeLicenseStatus

* refactor(licensing): narrow isLocked to stored status

* refactor(licensing): always re-compute status

* feat(licensing): add downgrade_reason to license output

* refactor(licensing): consolidate state transitions

* fix(licensing): source not reliable

* refactor(licensing): utilize promise all in license output

* Align resolution dialog with new downgrade_reason contract (#27517)

* refactor(license): align resolution dialog with new downgrade_reason contract

* refactor: remove old i18n

* refactor: use downgrade_reason of scope value

* feat: unify grace + downgrade resolution prompt

* refactor: remove unused needsResolution

* Update app/src/lang/translations/en-US.yaml

Co-authored-by: Alex Gaillard <alex@directus.io>

* fix: type resolution dialog title

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* resolve SSO section interactivity and deactivation flow (#27519)

* KYC Modal (#27521)

* show project owner modal after license modale dismiss

* guard nested property access in form

* show project owner modal regardless of license source

* Collection update incorrectly blocked by collection limit (#27522)

* fix collection issue

* nit

* fix custom_llm flag filtering

* fix(license): bypass any non-resolver type FF in checkAll

* Addon purchase modals on License settings (#27504)

* feat: add addons logic modal

* refactor: optimize addon scheduled update

* refactor: clean up code

* fix: fix i18n wording

* refactor: clean up date formater

* Amend messaging for upgrade case

* Amend no change case

* Handle downgrade case

* Cleanup

* Divide unit price by 100

---------

Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>

* fix(licensing): custom permission rules should check fields independently

* Make private view license reactive (#27527)

* Resolution dialog fixes and improvements (#27523)

* fix: show grace period modal on license expiry within limits

* refactor: revert logic

* fix: avoid loading null user

* fix: resolution dialog issues and clarity improvements

* Change badge from none to hidden (#27530)

* Amend non prod badge to use license store (#27531)

* Change badge from none to hidden

* Amend non prod badge to use license store

* Amend badge back to server store (#27533)

* fix: deactivated state from collection (#27535)

* fix collection update enforcement

* Add license expiring warning notices (#27518)

* create status-notice components and handle the grace period upgrade case

* handle remaining cases

* fix logic

* cleanup

* fix pinned grace text

* prevent powered by badge visibility from affecting pinned status visibility

* add locked status message

* change verbiage to match what will actually happen

* minor copy change

* fix minor spacing issue

* update copy

* feedback updates

* update get license link (#27537)

* fix permissions cache on license change

* fix(license): pass down knex for permission entitlements

* Fix/modal user status (#27543)

* fix: modal resolution card width

* fix: update new status value

* Resolution modale: LLM, custom rules, and user email (#27526)

* fall back to email in seat candidates and reduce the number of displayed fields in drawer

* show custom LLM and permission rules in resolution dialog
* fix: sso spacing block

* feat: refactor sso confirm

* fix: email validation + wording

---------

Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>

* fix: refresh addons after license key change (#27542)

* fix: refresh addons after license key change

* refactor: remove comment

* add flows entitlement (#27547)

* Add license key modal and pop after login (#27539)

* translation keys

* license-key-modal

* refactor

* tests

* update links and use utm tags

* update oig onboarding link (#27552)

* update plan limit message (#27550)

* refresh addons after license deactivate (#27551)

* restore open animation on user drawer (#27548)

* update addons purchase modale text (#27556)

* License seats fix (#27557)

* remove refreshCache logic

* fix stale seats cache counting issue

* fix seats e2e test to not rely on cacheBypass

* re-activate bus subscription

* clear cache centrally

* Amend enterprise addon button link (#27572)

* Amend enterprise addon button link

* Fix some things

* refresh license usage after schema mutations affecting collections (#27549)

* show only grace login modal when upgrading from v11 to v12 (#27579)

* Disable manage license when env managed (#27581)

* disable manage license when env managed

* refactor isEnvManaged in store

* Revert "Disable manage license when env managed (#27581)" (#27584)

This reverts commit 721b24e18dc414d2e136b8ebb606b37fe27f8430.

* close resolution dialog when managing license in no_resolution scope (#27586)

* Fix custom permission rules entitlement key (#27587)

* Do not clear sessions on admin credential change (#27588)

* fix(license): mirror SSO escape hatch in login middleware (#27582)

* fix(license): mirror SSO escape hatch in login middleware

* refactor(license): simplify SSO escape hatch to entitled || locked

* refactor: simplify

* core within grace and within limits should be active

* Replace hardcoded `https://directus.io` to `https://directus.com` with new constant (#27585)

* create constant for directus.com and replace all instances of https://directus.io with the new constant

* changeset

* updates

* update all package.json files to use the new home page url

* update license files

* update vue files

* update constant

* md and yml files

* revert changes made to email addresses

* Apply suggestion from @AlexGaillard

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* clear the caches explicitly on resolution (#27591)

* redirect to settings after submit on license-recovery route (#27592)

* disable Add License button when env managed (#27593)

* Improve test coverage (#27590)

* add custom llm coverage

* add activity entitlement e2e

* always select full activity for test

* remove redundant count from activity tests

* add revision entitlement e2e

* fmt

* add db helpers for date parsing

* type api client

* add custom permission rules e2e

* rename createCustomPermission to buildCustomPermission

* remove invalid permission assertion

* update collection tests

* add remaining tests to collections

* assert resolve in cpr

* update license flow entitlement e2e

* improve rest tests

* tests(licensing): get the green for rest

* Skip hydrateAddons when license source is null (#27600)

* skip hydrateAddons when license source is null

* clear addons after deactivation

* clear correct cache on collection remediation

* allow sso during core grace (#27601)

* register license check

* License design update 1 (#27599)

* refactor(app): use InterfacePresentationDivider for license section header

Replace the bespoke section header (custom VDivider + VIcon + styled title)
in license-section.vue with the shared InterfacePresentationDivider so
headings match the rest of the admin app and drop the duplicated layout
and typography CSS.

Rename the section's variant prop to kind (neutral | danger) to align with
the prop naming used elsewhere (VChip etc.) and update the caller in
license.vue accordingly.

* style(app): polish license module chips, buttons, and spacing

Design tweaks across the license module to standardize on built-in
component variants and drop ad-hoc CSS overrides.

- Switch entitlement and plan-status chips to VChip standard variants
  (:label="false" plus kind="success" / "primary" / "neutral") and remove
  the custom .v-chip CSS that hand-styled background, padding, and
  border radius
- Drop the small icon prop in entitlement labels and recolor via a
  scoped --v-icon-color token instead of a :deep selector
- Use the theme border-radius token for the entitlement item background
- Add small to addon-item action buttons so they sit better next to the
  entitlement rows
- Apply the type-label mixin to the entitlements section title
- Add a .status-chip class with font-weight 600 for the plan status chip
- Stretch the env-managed VNotice to full width inside the danger zone

* improve responsive design

* adjust badge-divider size and add flex-shrink to project name container

* add error handling (#27596)

* add error handling

* improvements

* install license package

* bump license package to 0.2.0

* only bypass sso if in grace and grace period

* back new helper with unit tests

* update missing setting fields in sdk

* add license info to server info sdk type

* update gql server info type

* fix(license): expose Core grace deadline via expires_at + grace_period (#27583)

* fix(license): expose Core grace deadline via expires_at + grace_period

* refactor: clean up lint

* refactor: clean up lint

* refactor(license): rename to getCoreGraceExpiresAt and consolidate

* refactor: return seconds from getCoreGraceExpiresAt and update tests

* refactor(license): split getCoreGraceExpiresAt into its own file

* Fix rpc sync (#27597)

* hide addon pricing_summary when unit_price is null (#27608)

* add license package to e2e

* attempt bb fix

* Fix e2e

* fix offline

* License design update 2 (#27610)

* style: adjust spacing in v-radio-cards and setup components for improved layout

* adjust non-production badge

* Remove unused center prop from VDivider (#27618)

* simplify activity e2e

* simplify revision e2e

* await registration in e2e

* simplify permission rule e2e

* simplify cllms e2e

* attempt to fix blackbox 1

* remove requirement for requested port to be same as requested

* attempt to fix blackbox 2

* show inline email format error on setup form (#27609)

* show inline email format error on setup form

* up

* attempt to fix blackbox 3

* attempt to fix blackbox 4: mess up version tests

* attempt to fix blackbox 5

* enable license for global

* log actual error

* update status messages for core tier expiry date (#27613)

* update

* update status notice message

* simplify

* remove hover style so it is consistent with other opened PRs

* update keys for mock server

* explicit set dev

* License design update 3 (#27620)

* remove todos

* Improve setAddonQuantity error handling

* fix(license): hide history timeframe notice when entitlement is -1 (#27623)

Co-authored-by: Alex Gaillard <alex@directus.io>

* Grace modal wording (#27615)

* fix(license): refine Core grace modal wording

* fix: use email from variable

* refactor: use DIRECTUS_DOMAIN const

* Update app/src/views/private/components/license/license-login-modal.vue

* Update app/src/lang/translations/en-US.yaml

* Update app/src/lang/translations/en-US.yaml

---------

Co-authored-by: Alex Gaillard <alex@directus.io>

* show AI translations resolution checkbox when losing the entitlement (#27594)

* fix: do not hydrate addons when offline (#27624)

* fix: update padding and background styles for public view and license badge (#27630)

* Change license to MSCL-1.0-GPL (#27627)

* Update translations to reflect MSCL 1.0 licensing across multiple languages

* Update copilot instructions to reflect MSCL-1.0-GPL

* Update license in openapi.yaml

* Update license in directus README

* Update licenses to MSCL-1.0-GPL across multiple package.json files

* Update licenses files

* add MIT license file to packages/ai

* Update copyright year

* Update license to reference the LICENSE file in multiple package.json files

* Update licenses to reflect Monospace Sustainable Core License, Version 1.0 across multiple files

* add changeset

* Remove license update note from readme

Removed note about upcoming Directus license update and feedback request.

* Revise license details and user categories in readme

Updated licensing information and usage terms for Directus.

* Update readme.md

* Fix pricing link in readme

Updated the link for pricing details in the commercial license section.

* add breaking change notice

* Fix license change notice from BUSL-1.1 to BSL-1.1

* Fix typo in license change notice

* Update license information in readme.md

Added information about the license change from BSL to MSCL for sustainability.

---------

Co-authored-by: David Stockton <7375241+dstockton@users.noreply.github.com>
Co-authored-by: James White <jamesw1013@googlemail.com>

* e2e fixes

* e2e fixes 5

* e2e fix 6, remove dead test

* e2e fixes 7: relax property match in initialize

* fix e2e 8: bring lifecycle checks inline

* fix(e2e): isolate env-gate sandbox resources in mcp-oauth-settings-gate

Second sandbox in the file shared DB_FILENAME and port-allocation baseline
with the beforeAll sandbox. The docker step would unlink the running DB
file, and getPort(8055) could hand back the same fallback twice, surfacing
as 'Api stopped with error code 1'.

Use a per-test UUID for prefix/DB_FILENAME/docker.suffix and pin an
explicit port.

* fix e2e 9: attempt horizontal fix

* fix e2e 10: horizontal attempt 2

* fix(system-owner): align with refactored SetupForm shape (#27631)

* fix(system-owner): align with refactored SetupForm shape

* fix: validate function with new contract

* fix: fallback to initialValue

* fix: handle feedbacks

* fix e2e 11: horizontal fix

* fix(sandbox): keep resolved port consistent across env and apis

Three desync sites caused the port the API actually binds to drift away
from what callers and the API itself observed:

- getEnv set PORT/PUBLIC_URL early, then process.env clobbered them with
  the vitest per-project PORT baseline. So opts.port was silently ignored.
  Move PORT/PUBLIC_URL to after the process.env spread, and let
  process.env.PORT feed getPort as a fallback baseline.

- startApi's getPort(preferredPort) can fall back to a free random port
  (TIME_WAIT after restart, collision with a sibling sandbox). The spawn
  env updated PORT but not PUBLIC_URL, so the API listened on one port
  and advertised iss/issuer on another. Override both.

- sandbox() returned apis by value. restartApi reassigned the local
  variable but consumers still saw the old array, so apis[0].port was
  stale after restart. Expose apis via a getter.

With these in place, drop the port:8056 workaround from the mcp-oauth
env-gate test (DB filename / docker suffix uniqueness still needed).

* fix e2e 12: remaining initialize

* remove custom llm patch check for rc1

* bring mock license error format up to spec

* fix(sandbox): keep resolved port consistent across env and apis

api.ts re-resolved the port via getPort(preferredPort) before each spawn.
With get-port@7.1.0's 15s lockedPorts cache, getPort(X) for a port X that
getOptions just locked throws Locked(X) and falls back to a random port Y.
Parent's env.PUBLIC_URL was constructed from X; the API child then bound Y
and advertised iss/public_url=Y. The mock /update endpoint validates by
matching the public_url stored from parent's activate call, so the lookup
failed with 400 -> initialize() threw -> API exited.

Stop re-resolving in api.ts: trust opts.port/env.PORT set by getOptions
(initial boot) and by restartApi (restart). restartApi now re-resolves
explicitly to handle TIME_WAIT on the just-killed port, and propagates
the resolved value to opts.port + env.PORT + env.PUBLIC_URL so consumers
of directus.apis/env stay in lockstep.

Fixes initialize.sb.test.ts Case B "migrates to new env LICENSE_KEY",
which was failing on any host where the vitest project's PORT baseline
was taken (i.e., where getOptions had to fall back to an ephemeral port).

* fix(e2e): use writeTimestamp for activity/revision INSERTs

date.parse() returns an ISO string (YYYY-MM-DDTHH:mm:ss.sssZ) which is
fine for WHERE comparisons (where core uses it -- retention.ts, operator.ts)
but MySQL/MariaDB reject it in strict mode on DATETIME column bindings.

Switch to date.writeTimestamp(iso), the INSERT-side helper. It returns a
Date that mysql2/sqlstring formats as 'YYYY-MM-DD HH:mm:ss', which all
dialects accept. Matches core's convention (payload.ts date-created /
date-updated, versions.ts).

Fixes activity-historical-timeframe.sb.test.ts and
revision-historical-timeframe.sb.test.ts on mysql / maria sandboxes.

* add writeTimestampString to helpers

* bump outside

* fix(licensing): improve license check lifecycle (#27622)

* improve license check

* simplify auto stop on re-schedule

* fix e2e 13: cpr inserts

* fix e2e 14: mssql cannot set id on insert

---------

Co-authored-by: Nitwel <mail@nitwel.de>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Alex Gaillard <alex@directus.io>
Co-authored-by: Gaetan SENN <gaetan.senn@gmail.com>
Co-authored-by: Hugo Torzuoli <torzuoli.hugo@gmail.com>
Co-authored-by: Rob Luton <rob.luton@gmail.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: formfcw <dev@formfcw.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Hannes Küttner <kuettner.hannes@gmail.com>
Co-authored-by: David Stockton <7375241+dstockton@users.noreply.github.com>
Co-authored-by: James White <jamesw1013@googlemail.com>
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.

2 participants