mattermost-mobile/app/components
Nick Misasi 12c8d80f4a
[MM-66591] Channel Summaries with Agents (#9405)
* Add support for Channel Summarization, inline citations

* Add support for Channel Summarization, inline citations

* Revert package-lock to master

* i18n fixes

* e2e fixes

* Remove a few tests as they're already covered by unit

* Ensure channel summary is offline compatible

- Add channel persistence check before switching to summary channel
- Fetch and persist channel/membership if not in database
- Fix TypeScript error handling for unknown error types
- Update tests to properly mock DatabaseManager

* Fixes

* Fix expo-image patch file - remove accidental build artifacts

The patch file was accidentally corrupted with build artifacts from
node_modules/expo-image/android/build/ including .dex files, results.bin,
and Oops.rej. This was causing the 16KB page size compatibility patch
to fail during CI.

* Fix iOS date picker spacing and placeholder text

- Increase snap points on iOS to accommodate inline date picker spinner
- Update AI prompt placeholder to "Ask AI about this channel"

* Fix padding

* Address PR review feedback from larkox

- Fix i18n: use defineMessages pattern instead of separate labelId/defaultLabel
- Replace custom SummaryOptionItem with existing OptionItem component
- Add ScrollView for scrollability on smaller phones
- Extract AgentItem to separate file, use FlatList for virtualization
- Extract DateInputField component, unify DateTimePicker, add useCallback
- Consolidate types into app/products/agents/types/api.ts
- Remove unnecessary fetchPostById (WebSocket handles post delivery)
- Use jest.mocked() instead of 'as jest.Mock' for type safety
- Improve transform.ts: use urlParse, add post ID length constraint,
  validate internal links with serverUrl parameter, add subpath support
- Add transform.test.ts cases for external links, subpaths, URL encoding
- Remove unnecessary Platform.select in inline_entity_link
- Revert video_file.tsx and prefetch.ts to use cachePath (patches include types)

* Update en.json with new channel summary option translations

Added missing translation keys for the defineMessages pattern used
in channel summary sheet options.

* Fix regex patterns and add negative assertions per PR review

- Use exact 26-character constraint in post ID regex instead of
  permissive pattern followed by validation
- Use specific identifier pattern in channel regex instead of [^/]+
- Remove unused ID_PATH_PATTERN and IDENTIFIER_PATH_PATTERN imports
- Add negative assertions to processInlineEntities tests to verify
  mutual exclusivity of link vs inline_entity_link nodes

* Add test cases for non-internal URLs and escaped slashes

Per PR review feedback, added tests for:
- Non-internal URLs with similar shape to internal links
- URLs with escaped slashes (%2F) in various positions

* Improve UI consistency for channel summary date picker and AI input

- Add focus state (border highlight) to AI prompt input on Ask Agents sheet
- Add active state highlight to Start/End date fields in date range picker
- Increase back button tap area on date range picker using hitSlop
- Fix date picker theme mismatch by setting themeVariant based on app theme
- Apply initial date when opening picker so value matches displayed date

Co-authored-by: Cursor <cursoragent@cursor.com>

* Gate AskAgentsOption behind agents plugin availability check

Add a plugin availability check for the "Ask Agents" feature that
mirrors the webapp's useGetAgentsBridgeEnabled hook. Calls
GET /api/v4/agents/status on WebSocket connect and plugin status
change events, stores the result in an RxJS BehaviorSubject
ephemeral store, and conditionally renders the AskAgentsOption
component based on the plugin being available.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix quick actions tests and default date range to last 7 days

Mock useAgentsConfig in quick actions tests so the Ask Agents button
renders when agents plugin availability is gated. Default the date
range picker to the last 7 days instead of empty.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address enahum's review feedback on channel summaries PR

- Remove pluginEnabled=false on network error in agents_status
- Use enableDynamicSizing for channel summary bottom sheet
- Extract channel navigation logic to switchToChannelByName action
- Move icon color to stylesheet, null guard to parent in InlineEntityLink
- Replace custom URL parsing with parseDeepLink in transform.ts
- Reorder channel membership check before API request in channel_summary
- Use FormattedText, FormattedDate, FloatingTextInput consistently
- Use getErrorMessage for proper intl error handling in alerts
- Simplify agent_item to always use expo-image, memoize styles
- Gate Ask Agents item count on agentsEnabled in header.tsx
- Clean up CLAUDE-IOS-SIMULATOR.md per review suggestions
- Update tests to match new behavior

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix i18n extraction for date_range_picker translated strings

Add defineMessages declarations so the i18n extraction tool can find
the translated string IDs passed through custom props to DateInputField.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix agent profile image not rendering on agent selector

* Reduce channel summary bottom sheet max height from 80% to 50%

The 80% snap point created too much whitespace below the options.
50% fits the main content well while still leaving room for the
iOS date picker spinner when the custom date range view is shown.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Adjust channel summary bottom sheet max height to 65%

50% was too short, cutting off the iOS date picker spinner.
65% provides enough room for the date range view with spinner
while keeping the main options view compact.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Use platform-specific max height for channel summary bottom sheet

iOS uses 65% to accommodate the inline date picker spinner.
Android uses 50% since its modal date picker doesn't need extra space.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Reduce height on android slightly

* Final tweaks for spacing

* Address PR review feedback from larkox and pvev

- Use MessageDescriptor props instead of separate id/defaultMessage strings in DateInputField
- Extract hitSlop constant outside component for render stability
- Normalize date range to UTC start/end of day to avoid timezone data loss
- Replace hardcoded '#FFFFFF' with theme.buttonColor

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 07:00:43 -05:00
..
animated_number test: more meaningful AnimatedNumber component test (#8309) 2024-11-21 10:30:30 -07:00
announcement_banner Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
app_version Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
autocomplete New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
autocomplete_selector Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
badge feat:proper badge theme use for server list (#8313) 2024-11-05 07:11:17 -07:00
burn_on_read_label Bor create post (#9393) 2026-02-09 17:00:54 +05:30
button [MM-66420] Add missing tests for playbooks (#9258) 2025-11-06 12:01:25 +01:00
channel_actions [MM-66591] Channel Summaries with Agents (#9405) 2026-02-13 07:00:43 -05:00
channel_bookmarks feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
channel_icon Update dependencies and upgrade to RN 0.76.5 (#8421) 2025-01-16 07:11:32 -07:00
channel_item MM-62915 and MM-62919 (#8568) 2025-02-08 07:17:15 +08:00
channel_list_row Channel banner display (#8735) 2025-04-08 11:15:18 +05:30
chips Add onPress on full chip (#9134) 2025-09-22 12:07:49 +02:00
common_post_options Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
compass_icon [Gekidou] compass icons (#5940) 2022-02-08 16:16:30 -03:00
connection_banner feat(MM-65145): low connectivity manager (#9283) 2025-12-04 10:44:33 -07:00
copy_text_option Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
custom_status Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
data_time_selector Add set due date functionality to playbooks (#9091) 2025-09-12 16:37:56 +02:00
document use alertOnlyPDFSupported for document files (#9023) 2025-07-27 18:05:49 +08:00
draft_scheduled_post Added BoR indicator in scheduled posts (#9355) 2026-01-12 20:09:24 +05:30
draft_scheduled_post_header feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
drafts_buttton Remaining test for draft and Scheduled post (#8887) 2025-07-01 13:47:02 +05:30
edited_indicator Fix the Edited post incorrect line spacing on Android (#9170) 2025-10-01 21:26:57 +08:00
emoji feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
emoji_category_bar Fix: Keyboard opens on android when clicked on switch to keyboard btn in emoji picker (#9464) 2026-01-26 18:20:55 +05:30
error_text Update dependencies and upgrade to RN 0.76.5 (#8421) 2025-01-16 07:11:32 -07:00
expo_image feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
files feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
files_search Refactor and cleanup of option item (#9067) 2025-08-19 14:01:56 +02:00
floating_input feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
formatted_date Fix timezone crash (#8485) 2025-01-16 17:29:57 -05:00
formatted_markdown_text Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
formatted_relative_time Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
formatted_text Standardize tabs across different components (#8691) 2025-05-28 16:23:37 +02:00
formatted_time Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
freeze_screen [Gekidou] optimizations, fix & moved files (#6177) 2022-04-18 08:49:17 -04:00
friendly_date Make relatives times coherent with web (#9062) 2025-08-12 14:28:25 +02:00
illustrations Update additional images branding (#8672) 2025-06-20 11:41:26 -04:00
input_accessory_view New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
jumbo_emoji Typescript support and view component for permalink with user and message (#9052) 2025-09-10 17:12:16 +05:30
loading Unify buttons (#8865) 2025-05-30 15:59:15 +02:00
loading_error Update additional images branding (#8672) 2025-06-20 11:41:26 -04:00
markdown [MM-66591] Channel Summaries with Agents (#9405) 2026-02-13 07:00:43 -05:00
math_view Fix MM57562 (#7920) 2024-05-06 12:02:12 +02:00
menu_divider Add Report a Problem functionality (#8605) 2025-04-24 11:12:55 +02:00
navigation_header Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
no_results_with_term Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
option_box Update dependencies and upgrade to RN 0.76.5 (#8421) 2025-01-16 07:11:32 -07:00
option_item Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
other_mentions_badge Add badge to thread screen (#7404) 2023-06-20 09:37:24 +02:00
post_draft Bor create post (#9393) 2026-02-09 17:00:54 +05:30
post_list Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
post_priority Standardize tags and chips through the app (#8856) 2025-06-11 10:11:05 +02:00
post_with_channel_info Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
pressable_opacity Bor create post (#9393) 2026-02-09 17:00:54 +05:30
profile_picture feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
progress_bar Refactor gallery gestures (#8752) 2025-07-22 14:00:57 +08:00
progressive_image feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
remove_markdown Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
rounded_header_context [Gekidou] Navigation bar refactored (#6319) 2022-06-01 17:07:54 -04:00
scheduled_post_indicator feat(MM-65147): upgrade to react-native 0.77.3 (#9253) 2025-12-22 07:35:38 -07:00
search Upgrade RN as well as update or replace other dependencies (#8011) 2024-06-19 09:33:45 +08:00
section_notice Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
selected_users feat: edit server pre-authentication secret (#9128) 2025-11-12 16:07:19 +01:00
server_icon Update dependencies (#8721) 2025-04-07 09:30:06 +08:00
server_user_list [MM-66375] Allow managing own membership on a channel (#9301) 2025-12-03 17:20:20 +01:00
server_version Update libraries and dependencies (#7678) 2023-11-25 07:46:13 +08:00
settings Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
slide_up_panel_item feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
status_label Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
syntax_highlight Fix MM55258 (#7729) 2024-01-15 10:19:33 +01:00
system_avatar [Gekidou] post list (#5893) 2022-01-17 07:06:26 -03:00
system_header feat: Add visible to you text on ephemeral posts (#8245) 2024-10-30 10:01:49 +01:00
tablet_title Detox/E2E: Account e2e tests in Gekidou (#6584) 2022-08-18 03:18:46 -07:00
tag Added BoR indicator in scheduled posts (#9355) 2026-01-12 20:09:24 +05:30
team_list Fix list scrolling inside bottom sheet (#8648) 2025-03-12 17:29:50 +08:00
team_sidebar feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
threads_button Fix GM/DM unread threads highlighting all teams as unreads (#8905) 2025-06-10 15:30:58 +02:00
toast Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
touchable_emoji New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
touchable_with_feedback Upgrade Dependencies (#7299) 2023-04-21 12:16:54 -04:00
tutorial_highlight Upgrade RN as well as update or replace other dependencies (#8011) 2024-06-19 09:33:45 +08:00
upload_item_shared feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
user_avatars_stack Add Playbooks read-only support for mobile devices (#8978) 2025-07-14 09:21:37 +02:00
user_item Standardize tags and chips through the app (#8856) 2025-06-11 10:11:05 +02:00
user_list Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
user_list_row [MM-66375] Allow managing own membership on a channel (#9301) 2025-12-03 17:20:20 +01:00
user_status [Gekidou] update deps (#6667) 2022-10-13 08:41:18 -03:00
keyboard_aware_post_draft_container.tsx Fix Emoji insert at end of post instead of caret position (#9473) 2026-02-02 19:32:11 +05:30