mattermost-mobile/app/screens
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
..
apps_form Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
attachment_options New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
bottom_sheet Fix playbooks bottom sheet not scrolling on ipad (#9137) 2025-09-25 18:20:26 +02:00
browse_channels Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
channel [MM-66591] Channel Summaries with Agents (#9405) 2026-02-13 07:00:43 -05:00
channel_add_members [MM-66375] Allow managing own membership on a channel (#9301) 2025-12-03 17:20:20 +01:00
channel_bookmark Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
channel_files Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
channel_info Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
channel_notification_preferences Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
channel_settings Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
code Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
component_library Add onPress on full chip (#9134) 2025-09-22 12:07:49 +02:00
convert_gm_to_channel Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
create_direct_message [MM-66375] Allow managing own membership on a channel (#9301) 2025-12-03 17:20:20 +01:00
create_or_edit_channel Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
custom_status Add set due date functionality to playbooks (#9091) 2025-09-12 16:37:56 +02:00
custom_status_clear_after Add set due date functionality to playbooks (#9091) 2025-09-12 16:37:56 +02:00
dialog_router Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
draft_scheduled_post_options Feature schedule posts (#8509) 2025-04-14 22:08:59 +05:30
edit_post New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
edit_profile Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
edit_server fix: do not ping the server on edit if the preauth secret didn't change (#9368) 2026-01-12 17:45:12 +01:00
emoji_picker Fix emoji picker section goes blank when User chooses Skin tone (#9436) 2026-01-23 10:40:43 +05:30
find_channels Add Floating Label Autocomplete Selector (#9119) 2025-10-01 13:31:16 +02:00
forgot_password MM-62240 illustration updates (#9308) 2025-12-05 08:31:59 -05:00
gallery [MM-67056] Show actions on image gallery for android (#9386) 2026-01-12 14:52:41 +01:00
global_drafts feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
global_threads Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
home [MM-67265] Fix permissions to invite people to team (#9467) 2026-02-06 10:10:25 +01:00
in_app_notification feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
integration_selector Add DialogRouter for Interactive Dialog to Apps Form migration (#9114) 2026-01-26 08:57:56 -07:00
interactive_dialog Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
invite [MM-66923] Fix scroll and private channel icon on invite user (#9363) 2026-01-07 08:13:59 +02:00
join_team Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
latex Add error boundary to latex code (#8822) 2025-05-06 09:48:36 +02:00
login Update the value for login type (#9329) 2025-12-12 16:26:22 +01:00
manage_channel_members [MM-66375] Allow managing own membership on a channel (#9301) 2025-12-03 17:20:20 +01:00
mfa MM-62240 illustration updates (#9308) 2025-12-05 08:31:59 -05:00
onboarding MM-62240 illustration updates (#9308) 2025-12-05 08:31:59 -05:00
overlay Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
pdf_viewer Secure Files and preview PDF inline (#8844) 2025-06-19 15:30:56 +08:00
permalink Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
pinned_messages Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
post_options Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
post_priority_picker Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
reactions Refactor Open Profile (#8746) 2025-05-13 17:07:13 +02:00
report_a_problem feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
reschedule_draft Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
review_app Update additional images branding (#8672) 2025-06-20 11:41:26 -04:00
scheduled_post_options Remaining test for draft and Scheduled post (#8887) 2025-07-01 13:47:02 +05:30
select_team Unify buttons (#8865) 2025-05-30 15:59:15 +02:00
server [MM-66711] Verify push notifications on magic link login (#9322) 2025-12-18 13:31:18 +01:00
settings [MM-66858] Fix email notification screen not updating (#9364) 2026-01-12 15:55:55 +01:00
share_feedback Biometric prompt, Jailbreak / Root detection and screenshot prevention (#8645) 2025-03-13 14:07:41 -04:00
show_translation Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
snack_bar Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
sso feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
table [MM-66839] (#9365) 2026-01-19 17:40:45 +01:00
terms_of_service Improve markdown code (#9164) 2025-11-04 10:05:56 +01:00
thread New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
thread_options Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
user_profile Show profile message actions for non-DM user profiles (#9496) 2026-02-13 12:49:07 +01:00
background.tsx MM-62240 illustration updates (#9308) 2025-12-05 08:31:59 -05:00
index.test.tsx Add playbooks edit command functionality (#9084) 2025-09-08 14:29:15 +02:00
index.tsx Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
navigation.test.ts New keyboard library Setup (#9278) 2026-01-13 22:38:35 +05:30
navigation.ts [MM-66591] Channel Summaries with Agents (#9405) 2026-02-13 07:00:43 -05:00