[MM-67856] docs: add /mobile-logs slash command#8913
[MM-67856] docs: add /mobile-logs slash command#8913
Conversation
Document the new /mobile-logs command introduced in mattermost/mattermost#35658, which toggles the attach_app_logs preference to enable attaching mobile app logs as a file in the Mattermost mobile client (v2.38+) for debugging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughDocumentation-only updates: added a ChangesAttach mobile app logs via /mobile-logs
Built-in slash commands — logout bullet
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (3)
source/integrations-guide/built-in-slash-commands.rst (3)
73-75: Consider elevating this note toimportantseverity.This block documents permission constraints (non-admin limitations), security behaviour (username enumeration protection), and audit logging requirements. According to the coding guidelines, content describing "prerequisites, constraints, or high-impact information that materially affects correctness, supportability, compliance, or success" should use the
importantadmonition rather thannote.⚡ Suggested admonition change
-.. note:: +.. important:: Non-admin users can only manage their own preference. Attempts to target another account return a neutral *Unable to change mobile log settings for that user* message to avoid username enumeration. Preference changes made through this command are recorded in the audit log.As per coding guidelines, "Use
importantadmonition for prerequisites, constraints, or high-impact information that materially affects correctness, supportability, compliance, or success."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@source/integrations-guide/built-in-slash-commands.rst` around lines 73 - 75, The current admonition uses ".. note::" to describe permission constraints, security behavior, and audit logging; change this to an ".. important::" admonition so the content is elevated per guidelines. Locate the block that begins with ".. note::" and the paragraph "Non-admin users can only manage their own preference..." and replace the directive with ".. important::" leaving the body text unchanged so the elevated severity correctly signals prerequisites/constraints, username enumeration protection, and audit logging requirements.
75-75: Consider consistent formatting for the error message text.The error message uses italics (
*...*), which is valid but differs from typical documentation patterns for UI text or system messages. Consider using quotation marks alone or quotation marks with bold for consistency with how UI labels are typically formatted.✍️ Alternative formatting options
Option 1: Plain quoted text
-Attempts to target another account return a neutral *Unable to change mobile log settings for that user* message to avoid username enumeration. +Attempts to target another account return a neutral "Unable to change mobile log settings for that user" message to avoid username enumeration.Option 2: Bold text (if treating as UI element)
-Attempts to target another account return a neutral *Unable to change mobile log settings for that user* message to avoid username enumeration. +Attempts to target another account return a neutral **Unable to change mobile log settings for that user** message to avoid username enumeration.As per coding guidelines, "Use bold for UI labels and short lead-ins."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@source/integrations-guide/built-in-slash-commands.rst` at line 75, The sentence uses Markdown/RST italics markup for the error message (*Unable to change mobile log settings for that user*); update the formatting to follow the guideline (use bold for UI labels/short messages) by replacing the italics with bold markup (e.g., **Unable to change mobile log settings for that user**) or, if preferred, plain quoted text ("Unable to change mobile log settings for that user"); locate the exact message text and change the surrounding markup accordingly in the built-in slash command documentation entry.
62-62: Consider clarifying "to the message being sent" for precision.The phrase "attach their mobile app logs as a file to the message being sent" could be more precise. The definite article "the" suggests a specific message, but the feature applies to any message the user sends.
Consider rewording for clarity:
✍️ Suggested rewording
-Use ``/mobile-logs`` to enable an attachment option in the Mattermost mobile client that lets users attach their mobile app logs as a file to the message being sent. This helps administrators and support engineers debug mobile-specific issues by providing device-side context that isn't available from server logs alone. The command updates the ``attach_app_logs`` advanced preference and always responds with an ephemeral message visible only to the invoking user. +Use ``/mobile-logs`` to enable an attachment option in the Mattermost mobile client that lets users attach their mobile app logs as a file when sending messages. This helps administrators and support engineers debug mobile-specific issues by providing device-side context that isn't available from server logs alone. The command updates the ``attach_app_logs`` advanced preference and always responds with an ephemeral message visible only to the invoking user.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@source/integrations-guide/built-in-slash-commands.rst` at line 62, Reword the sentence describing the /mobile-logs command to remove the ambiguous "the message being sent" and clarify that it enables an attachment option for any message the user sends; update the text around the command name ``/mobile-logs`` and the preference ``attach_app_logs`` to read something like "lets users attach their mobile app logs as a file to any message they send" and keep the rest of the description (advanced preference update and ephemeral response) intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@source/integrations-guide/built-in-slash-commands.rst`:
- Around line 73-75: The current admonition uses ".. note::" to describe
permission constraints, security behavior, and audit logging; change this to an
".. important::" admonition so the content is elevated per guidelines. Locate
the block that begins with ".. note::" and the paragraph "Non-admin users can
only manage their own preference..." and replace the directive with "..
important::" leaving the body text unchanged so the elevated severity correctly
signals prerequisites/constraints, username enumeration protection, and audit
logging requirements.
- Line 75: The sentence uses Markdown/RST italics markup for the error message
(*Unable to change mobile log settings for that user*); update the formatting to
follow the guideline (use bold for UI labels/short messages) by replacing the
italics with bold markup (e.g., **Unable to change mobile log settings for that
user**) or, if preferred, plain quoted text ("Unable to change mobile log
settings for that user"); locate the exact message text and change the
surrounding markup accordingly in the built-in slash command documentation
entry.
- Line 62: Reword the sentence describing the /mobile-logs command to remove the
ambiguous "the message being sent" and clarify that it enables an attachment
option for any message the user sends; update the text around the command name
``/mobile-logs`` and the preference ``attach_app_logs`` to read something like
"lets users attach their mobile app logs as a file to any message they send" and
keep the rest of the description (advanced preference update and ephemeral
response) intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e686e2c6-9094-400a-a548-95524e760450
📒 Files selected for processing (1)
source/integrations-guide/built-in-slash-commands.rst
There was a problem hiding this comment.
Pull request overview
Adds end-user documentation for the new built-in /mobile-logs slash command, which toggles attaching mobile app logs to messages for debugging in the Mattermost mobile app.
Changes:
- Documented the
/mobile-logscommand purpose and behavior. - Added usage examples for
on,off, andstatus(including admin targeting). - Noted minimum supported mobile app version and non-admin behavior.
|
Newest code from mattermost has been published to preview environment for Git SHA 9b0c077 |
1 similar comment
|
Newest code from mattermost has been published to preview environment for Git SHA 9b0c077 |
- Elevate security/audit note to .. important:: - Use bold instead of italics for the error message - Clarify the attachment applies to any message the user sends Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Newest code from mattermost has been published to preview environment for Git SHA 1bb1663 |
| - Edit the channel header using ``/header {text}`` or the channel purpose using ``/purpose {text}``. | ||
| - Rename a channel using ``/rename {text}``. | ||
|
|
||
| Manage mobile app log attachments |
There was a problem hiding this comment.
@Combs7th have you reviewed this? If so are you clear on how it works?
As written I'm personally unclear on how it works. Let's think about this through the lens of Novice Nate. See below:
|
|
||
| .. note:: | ||
|
|
||
| This command requires Mattermost mobile app v2.38 or later. On earlier versions the preference can still be set, but the attachment option won't appear in the mobile client. |
There was a problem hiding this comment.
Why is this relevant to an end user? If it can't generate the logs then what's the purpose of changing the preference? Seems like we can just remove this and start the whole block with "On Mattermst mobile app v2.38 and later, ..."
There was a problem hiding this comment.
I can simplify into "requires v2.38"
|
|
||
| This command requires Mattermost mobile app v2.38 or later. On earlier versions the preference can still be set, but the attachment option won't appear in the mobile client. | ||
|
|
||
| - Enable log attachment for yourself using ``/mobile-logs on``. |
There was a problem hiding this comment.
Do you need to use the "/mobile-logs on" command before you can output logs as an attachment? What is the expected output? Why would/should a user run "/mobile-logs status"?
There was a problem hiding this comment.
either the slash command or the toggle in the report an error page needs to be turned on, otherwise the option doesn't show.
The slash command is a shortcut QoL kind of thing. the setting can be turned on and off from the report a problem screen in the mobile app. But navigating there takes a bit and moves you out of the thread. With the slash command we can afffect the setting without leaving the troubleshooting conversation. either by the user or the admin.
So a user can toggle it by either using the slash command or the toggle in that screen.
status was just a way to tell the state without having to navigate, again a simple shortcut to prevent leaving the conversation.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@source/deployment-guide/mobile/mobile-troubleshooting.rst`:
- Around line 28-31: Replace the low-severity admonition with an important one
by changing the directive from ".. note::" to ".. important::" for the block
containing the sentence "This command requires Mattermost mobile app v2.38 or
later.", preserving the existing indentation and paragraph text so the
prerequisite is elevated to the correct severity.
- Line 168: Update the troubleshooting sentence to use the exact UI label text
"Profile > Security > View and Log Out of Active Sessions" consistently and
format database/field literals using reST inline code (replace `DeviceId` and
`Sessions` with ``DeviceId`` and ``Sessions``); keep the UI navigation path as
the exact label shown and ensure any mention of the Native mobile app session
uses the same UI label wording already present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 87f13484-2bc7-4921-b06f-abadeaa276ff
📒 Files selected for processing (2)
source/deployment-guide/mobile/mobile-troubleshooting.rstsource/integrations-guide/built-in-slash-commands.rst
|
Newest code from mattermost has been published to preview environment for Git SHA 10c0dd5 |
|
Newest code from mattermost has been published to preview environment for Git SHA bca9dce |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
source/deployment-guide/mobile/mobile-troubleshooting.rst (1)
168-168:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix UI label inconsistency within the file.
Line 168 uses "View and Log Out of Active Sessions" but line 154 in the same file uses "View and Logout of Active Sessions" (without the space before "of"). These should match to ensure consistent UI label references throughout the documentation.
Suggested fix
-If push notifications are not being delivered on the mobile device, confirm that you're logged in to the **Native** mobile app session through **Profile > Security > View and Log Out of Active Sessions**. Otherwise, the ``DeviceId`` won't get registered in the ``Sessions`` table and notifications won't be delivered. +If push notifications are not being delivered on the mobile device, confirm that you're logged in to the **Native** mobile app session through **Profile > Security > View and Logout of Active Sessions**. Otherwise, the ``DeviceId`` won't get registered in the ``Sessions`` table and notifications won't be delivered.As per coding guidelines, "Ensure product names, UI labels, config names, and feature terms match Mattermost's standard language."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@source/deployment-guide/mobile/mobile-troubleshooting.rst` at line 168, Replace the inconsistent UI label so both occurrences match the product standard: change the string "View and Logout of Active Sessions" to "View and Log Out of Active Sessions" (or vice versa if your style guide dictates the other form); update every instance in this file where the label appears (specifically the occurrences currently shown as "View and Log Out of Active Sessions" and "View and Logout of Active Sessions") to use the same exact wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@source/deployment-guide/mobile/mobile-troubleshooting.rst`:
- Line 168: Replace the inconsistent UI label so both occurrences match the
product standard: change the string "View and Logout of Active Sessions" to
"View and Log Out of Active Sessions" (or vice versa if your style guide
dictates the other form); update every instance in this file where the label
appears (specifically the occurrences currently shown as "View and Log Out of
Active Sessions" and "View and Logout of Active Sessions") to use the same exact
wording.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: dc3d12a8-1944-40ef-adb4-96395c04be45
📒 Files selected for processing (1)
source/deployment-guide/mobile/mobile-troubleshooting.rst
|
I tried to improve the wording as well as move it to the suggested place @esethna |
Summary
Document the new /mobile-logs command introduced in mattermost/mattermost#35658, which toggles the attach_app_logs preference to enable attaching mobile app logs as a file in the Mattermost mobile client (v2.38+) for debugging.
Ticket Link
MM-67856