mattermost-mobile/app/screens
Jesse Hallam 15f59b7eee
[MM-63728] Add license load metric to About screen (#8769)
* Add license load metric to About screen

- Add REST endpoint to fetch license load percentage
- Display load metric in About screen next to server version

Fixes: https://mattermost.atlassian.net/browse/MM-63728

* MM-63728: Address PR feedback from enahum

- Move license load metric fetch to a remote action
- Use isMinimumServerVersion to check for server 10.8.0 or higher

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Simplify getLicenseLoadMetric to directly return number

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Move getLicenseLoadMetric to dedicated license.ts file

- Create new remote action file specifically for license-related functions
- Add test file for the license actions
- Update imports in about.tsx

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove redundant license check in about.tsx

- Rely on getLicenseLoadMetric to handle the license check

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Update E2E tests for license load metric

- Add license load metric test IDs to about screen
- Update E2E test to check for load metric when license is enabled
- Handle cases where server might not support the feature

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* recover app/actions/remote/general.ts

* MM-63728: Return error from getLicenseLoadMetric instead of silent failure

- Remove silent failure and debug logging
- Return the error object when API call fails
- Update the About component to handle possible error responses
- Update tests to verify error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove groupLabel parameter from getLicenseLoadMetric

- Remove groupLabel parameter from client getLicenseLoadMetric method in interface and implementation
- Update client tests to reflect the parameter removal
- Update license action test to verify no parameter is passed

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* simplify about screen checks

* MM-63728: Use jest.mocked and real version checks in license tests

- Removed isMinimumServerVersion mock, letting tests use real version checking
- Used proper type casting for mock Client
- Added comprehensive version compatibility test cases
- Simplified test setup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove redundant server version test

- Removed redundant test for different server versions
- Existing tests already cover the necessary version compatibility cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Refactor license test to use better mocking pattern

- Refactored the test file to use a better mocking pattern similar to custom_emoji.test.ts
- Simplified mock declarations using jest.mock()
- Added type import for Client for better readability
- Improved type casting for mock objects

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* npm run fix

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-17 17:29:47 -03:00
..
apps_form Make attachments and app bindings more robust yet secure (#8570) 2025-03-14 12:02:32 +01:00
bottom_sheet Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
browse_channels Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
channel Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
channel_add_members Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
channel_bookmark Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
channel_files Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
channel_info Unify Is Read Only logic to avoid code repetition and improve redability (#8720) 2025-04-06 17:50:19 +02:00
channel_notification_preferences Update libraries and dependencies (#7678) 2023-11-25 07:46:13 +08:00
code Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
component_library Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
convert_gm_to_channel Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
create_direct_message Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
create_or_edit_channel Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
custom_status Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
custom_status_clear_after Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
draft_scheduled_post_options Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
edit_post Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
edit_profile Add model mocks to TestHelper (#8715) 2025-03-28 09:40:08 +01:00
edit_server Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
emoji_picker Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
find_channels Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
forgot_password Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
gallery Fix build on Xcode 16.3 (#8760) 2025-04-10 09:09:03 +08:00
global_drafts Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
global_threads Updated empty state images (#8659) 2025-03-13 17:03:30 -04:00
home Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
in_app_notification Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
integration_selector Make attachments and app bindings more robust yet secure (#8570) 2025-03-14 12:02:32 +01:00
interactive_dialog Make attachments and app bindings more robust yet secure (#8570) 2025-03-14 12:02:32 +01:00
invite Refactor chips (#8740) 2025-04-08 10:14:01 +02:00
join_team Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
latex Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
login feat: enabling autofill on inputs on the Login page (#8729) 2025-04-02 16:40:10 +02:00
manage_channel_members Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
mfa Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
onboarding Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
overlay Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
permalink Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
pinned_messages Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
post_options Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
post_priority_picker E2E: Mobile Drafts tests cases (#8469) 2025-01-22 04:02:14 +05:30
reactions Fix list scrolling inside bottom sheet (#8648) 2025-03-12 17:29:50 +08:00
reschedule_draft Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
review_app Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
scheduled_post_options Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
select_team Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
server Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
settings [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
share_feedback Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
snack_bar Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
sso Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
table Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
terms_of_service Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
thread Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
thread_options Fix bottomSheet bottom insets (#8331) 2024-11-29 12:50:09 +08:00
user_profile Unify Is Read Only logic to avoid code repetition and improve redability (#8720) 2025-04-06 17:50:19 +02:00
background.tsx [Gekidou] MM-39736 Login Flow (#5799) 2021-11-18 22:07:41 +01:00
index.tsx Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
navigation.ts MM-63571 Android Sentry Error Checks (#8773) 2025-04-16 17:31:02 +05:30