Skip to content

[frontend] Hide Register/Unregister XTM Hub buttons in demo mode (#14758)#14762

Merged
jbanety merged 1 commit intomasterfrom
issue/14758
Mar 5, 2026
Merged

[frontend] Hide Register/Unregister XTM Hub buttons in demo mode (#14758)#14762
jbanety merged 1 commit intomasterfrom
issue/14758

Conversation

@jbanety
Copy link
Contributor

@jbanety jbanety commented Mar 4, 2026

Proposed changes

  • Hide "Register in XTM Hub" and "Unregister from XTM Hub" buttons when the platform is running in demo mode
  • Early return null from XtmHubTab component when platform_demo is true

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

Follows the same pattern already used for trial mode (where the "Unregister" button is hidden when license_type === LICENSE_OPTION_TRIAL). The check is placed right after all hooks and before any JSX rendering to respect React's rules of hooks.

@jbanety jbanety added this to the Bugs backlog milestone Mar 4, 2026
@jbanety jbanety self-assigned this Mar 4, 2026
@jbanety jbanety added the filigran team use to identify PR from the Filigran team label Mar 4, 2026
@jbanety jbanety changed the title [frontend] Hide Register/Unregister XTM Hub buttons in demo mode [frontend] Hide Register/Unregister XTM Hub buttons in demo mode (#14758) Mar 4, 2026
@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.37%. Comparing base (4a42577) to head (47c1eeb).
⚠️ Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
.../private/components/settings/xtm-hub/XtmHubTab.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #14762   +/-   ##
=======================================
  Coverage   32.37%   32.37%           
=======================================
  Files        3098     3098           
  Lines      211033   211036    +3     
  Branches    38245    38247    +2     
=======================================
+ Hits        68312    68315    +3     
  Misses     142721   142721           
Flag Coverage Δ
opencti-client-python 45.48% <ø> (ø)
opencti-front 2.83% <0.00%> (-0.01%) ⬇️
opencti-graphql 67.74% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jbanety jbanety merged commit 0c9518c into master Mar 5, 2026
38 of 39 checks passed
@jbanety jbanety deleted the issue/14758 branch March 5, 2026 06:37
@romain-filigran
Copy link
Member

@jbanety : Can the associated issues be closed?

@labo-flg labo-flg removed this from the Bugs backlog milestone Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

filigran team use to identify PR from the Filigran team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants