Skip to content

[MM-67856] docs: add /mobile-logs slash command#8913

Open
Willyfrog wants to merge 5 commits intomasterfrom
attach_logs
Open

[MM-67856] docs: add /mobile-logs slash command#8913
Willyfrog wants to merge 5 commits intomasterfrom
attach_logs

Conversation

@Willyfrog
Copy link
Copy Markdown
Contributor

@Willyfrog Willyfrog commented Apr 20, 2026

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

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>
@Willyfrog Willyfrog self-assigned this Apr 20, 2026
Copilot AI review requested due to automatic review settings April 20, 2026 11:41
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

📝 Walkthrough

Walkthrough

Documentation-only updates: added a /mobile-logs troubleshooting subsection describing on/off/status, admin-targeting and audit-log behavior, prerequisites (mobile app v2.38+), and ephemeral responses; and added a /logout bullet to the built-in slash commands guide.

Changes

Attach mobile app logs via /mobile-logs

Layer / File(s) Summary
New Content
source/deployment-guide/mobile/mobile-troubleshooting.rst
Inserted subsection "How do I attach mobile app logs to a message?" describing /mobile-logs usage (on, off, status), effect on attach_app_logs preference, admin targeting (@username), ephemeral response behavior, prerequisites (mobile app v2.38+), and audit-logging notes.
Nearby no-op edit
source/deployment-guide/mobile/mobile-troubleshooting.rst
One patch-level sentence replacement with no semantic change (no-op).

Built-in slash commands — logout bullet

Layer / File(s) Summary
Minor doc addition
source/integrations-guide/built-in-slash-commands.rst
Added a single bullet to "More useful slash commands": “- Log out of Mattermost using /logout. ”

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: documenting the new /mobile-logs slash command.
Description check ✅ Passed The description is directly related to the changeset, explaining the /mobile-logs command documentation and its purpose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch attach_logs

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
source/integrations-guide/built-in-slash-commands.rst (3)

73-75: Consider elevating this note to important severity.

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 important admonition rather than note.

⚡ 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 important admonition 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5982575 and 9b0c077.

📒 Files selected for processing (1)
  • source/integrations-guide/built-in-slash-commands.rst

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-logs command purpose and behavior.
  • Added usage examples for on, off, and status (including admin targeting).
  • Noted minimum supported mobile app version and non-admin behavior.

Comment thread source/integrations-guide/built-in-slash-commands.rst Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 9b0c077

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

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>
@github-actions
Copy link
Copy Markdown
Contributor

Newest code from mattermost has been published to preview environment for Git SHA 1bb1663

@Willyfrog Willyfrog added the Do Not Merge Should not be merged until this label is removed label Apr 23, 2026
@Willyfrog Willyfrog added this to the v11.8.0 milestone Apr 23, 2026
@Willyfrog Willyfrog requested a review from BenCookie95 April 23, 2026 16:34
@amyblais amyblais added the 1: Dev Review Requires review by a core commiter label Apr 24, 2026
@Combs7th Combs7th requested a review from esethna April 28, 2026 16:38
- 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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:

Comment thread source/integrations-guide/built-in-slash-commands.rst Outdated

.. 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, ..."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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``.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"?

Copy link
Copy Markdown
Contributor Author

@Willyfrog Willyfrog May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb1663 and 10c0dd5.

📒 Files selected for processing (2)
  • source/deployment-guide/mobile/mobile-troubleshooting.rst
  • source/integrations-guide/built-in-slash-commands.rst

Comment thread source/deployment-guide/mobile/mobile-troubleshooting.rst Outdated
Comment thread source/deployment-guide/mobile/mobile-troubleshooting.rst Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Newest code from mattermost has been published to preview environment for Git SHA 10c0dd5

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Newest code from mattermost has been published to preview environment for Git SHA bca9dce

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
source/deployment-guide/mobile/mobile-troubleshooting.rst (1)

168-168: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix 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

📥 Commits

Reviewing files that changed from the base of the PR and between 10c0dd5 and bca9dce.

📒 Files selected for processing (1)
  • source/deployment-guide/mobile/mobile-troubleshooting.rst

@Willyfrog Willyfrog requested a review from esethna May 6, 2026 13:12
@Willyfrog
Copy link
Copy Markdown
Contributor Author

I tried to improve the wording as well as move it to the suggested place @esethna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1: Dev Review Requires review by a core commiter Do Not Merge Should not be merged until this label is removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants