Skip to content

FEAT(Client): Add Documentation dialog with official resource links#7144

Open
FNXDOOM wants to merge 1 commit intomumble-voip:masterfrom
FNXDOOM:feature/documentation-dialog
Open

FEAT(Client): Add Documentation dialog with official resource links#7144
FNXDOOM wants to merge 1 commit intomumble-voip:masterfrom
FNXDOOM:feature/documentation-dialog

Conversation

@FNXDOOM
Copy link
Copy Markdown

@FNXDOOM FNXDOOM commented Mar 30, 2026

Summary

This pull request adds a new "Documentation" dialog to the Help menu in the Mumble client. The dialog provides users with direct links to official Mumble resources, including:

  • User Guide
  • Global Shortcuts
  • Audio Settings
  • Main Documentation
  • Downloads
  • GitHub Issues
  • Blog
  • Contact

Implementation Details

  • The dialog is implemented as a new QDialog subclass, following the pattern of the existing About dialog.
  • All links are displayed in a QTextBrowser and open in the user's default browser.
  • The new action is added to the Help menu and is fully integrated with the existing UI and slot system.

Notes

  • No changes to existing features or settings.
  • No new dependencies introduced.

Checks

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 30, 2026

Walkthrough

A documentation dialog feature has been added to the Mumble client. The change introduces a new DocumentationDialog class that displays a modal window containing links to Mumble documentation and support resources. The dialog is integrated into the application by adding a "Documentation" action to the Help menu, with corresponding signal handlers in MainWindow. Build configuration is updated to compile the new source files.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding a Documentation dialog to the Help menu with links to official resources.
Description check ✅ Passed The PR description provides comprehensive details about the feature, implementation approach, and includes a completed commit guidelines checkbox.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/mumble/Documentation.cpp`:
- Around line 20-34: The documentationView currently calls
documentationView->setOpenExternalLinks(true) which allows any URL scheme to be
opened; change this to documentationView->setOpenExternalLinks(false) and
connect documentationView's anchorClicked signal to a handler (e.g.,
onDocumentationAnchorClicked) that inspects the QUrl scheme and only calls
QDesktopServices::openUrl for "http" or "https" schemes (otherwise reject/log
the URL); apply the same pattern to the analogous code in About.cpp.
🪄 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: d2dc723f-897b-4c87-bc43-94318f534acc

📥 Commits

Reviewing files that changed from the base of the PR and between f2a0d8e and 964c2af.

⛔ Files ignored due to path filters (1)
  • mumble_env.x64-windows-static-md.b1fe4a4257.7z is excluded by !**/*.7z
📒 Files selected for processing (6)
  • src/mumble/CMakeLists.txt
  • src/mumble/Documentation.cpp
  • src/mumble/Documentation.h
  • src/mumble/MainWindow.cpp
  • src/mumble/MainWindow.h
  • src/mumble/MainWindow.ui

Comment on lines +20 to +34
documentationView->setOpenExternalLinks(true);
documentationView->setAccessibleName(tr("Documentation links"));
documentationView->setHtml(
tr("<h2>Welcome to Mumble Documentation</h2>"
"<h3>Documentation</h3>"
"<p>You can find official Mumble documentation and support resources below.</p>"
"<p>For new users, start with the <a href=\"https://www.mumble.info/documentation/user/\">User Guide</a>.</p>"
"<p>Configure key bindings with <a href=\"https://www.mumble.info/documentation/user/global-shortcuts/\">Global Shortcuts</a>.</p>"
"<p>Tune your setup with the <a href=\"https://www.mumble.info/documentation/user/audio-settings/\">Audio Settings guide</a>.</p>"
"<p>Browse all topics in <a href=\"https://www.mumble.info/documentation/\">Main Documentation</a>.</p>"
"<h3>Help and Resources</h3>"
"<p>Download the latest release from <a href=\"https://www.mumble.info/downloads/\">Downloads</a>.</p>"
"<p>Report issues or get technical help via <a href=\"https://github.com/mumble-voip/mumble/issues\">GitHub Issues</a>.</p>"
"<p>Read project updates on the <a href=\"https://www.mumble.info/blog/\">Blog</a>.</p>"
"<p>Reach the team through the <a href=\"https://www.mumble.info/contact/\">Contact page</a>.</p>"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify URL-opening patterns and whether scheme validation is applied consistently.
# Expected: this new dialog currently appears with setOpenExternalLinks(true), while
# other call sites show explicit scheme checks.

rg -n -C2 'setOpenExternalLinks\s*\(\s*true\s*\)' --type=cpp
rg -n -C3 'QDesktopServices::openUrl\s*\(' --type=cpp
rg -n -C3 'allowedSchemes|url\.scheme\(\)\s*(!=|==)|contains\s*\(\s*url\.scheme\(\)\s*\)' --type=cpp

Repository: mumble-voip/mumble

Length of output: 12666


Harden external-link handling with a scheme allowlist.

setOpenExternalLinks(true) on line 20 opens any URL scheme without validation, bypassing the stricter scheme checks applied elsewhere in the codebase (e.g., ConnectDialog, MainWindow, Log). Replace with setOpenExternalLinks(false) and connect to anchorClicked to validate only http/https schemes before opening.

Note: About.cpp has the same vulnerability in multiple locations and should be addressed similarly.

Proposed fix
 `#include` "Documentation.h"
 
+#include <QtCore/QSet>
+#include <QtGui/QDesktopServices>
 `#include` <QtWidgets/QPushButton>
 `#include` <QtWidgets/QTextBrowser>
 `#include` <QtWidgets/QVBoxLayout>
 
 DocumentationDialog::DocumentationDialog(QWidget *parent) : QDialog(parent) {
@@
 	QTextBrowser *documentationView = new QTextBrowser(this);
 	documentationView->setReadOnly(true);
-	documentationView->setOpenExternalLinks(true);
+	documentationView->setOpenExternalLinks(false);
+	connect(documentationView, &QTextBrowser::anchorClicked, this, [](const QUrl &url) {
+		static const QSet< QString > allowedSchemes = {
+			QStringLiteral("http"),
+			QStringLiteral("https"),
+		};
+
+		if (!url.isRelative() && allowedSchemes.contains(url.scheme())) {
+			QDesktopServices::openUrl(url);
+		}
+	});
 	documentationView->setAccessibleName(tr("Documentation links"));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/mumble/Documentation.cpp` around lines 20 - 34, The documentationView
currently calls documentationView->setOpenExternalLinks(true) which allows any
URL scheme to be opened; change this to
documentationView->setOpenExternalLinks(false) and connect documentationView's
anchorClicked signal to a handler (e.g., onDocumentationAnchorClicked) that
inspects the QUrl scheme and only calls QDesktopServices::openUrl for "http" or
"https" schemes (otherwise reject/log the URL); apply the same pattern to the
analogous code in About.cpp.


DocumentationDialog::DocumentationDialog(QWidget *parent) : QDialog(parent) {
setWindowTitle(tr("Mumble Documentation"));
resize(640, 520);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hard-coded sizes are (almost) never a good idea. They will almost certainly break with certain system configurations.

Comment thread src/mumble/CMakeLists.txt
Comment on lines +148 to +149
"Documentation.cpp"
"Documentation.h"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The file names should have Dialog in their name and they should probably be located under widgets.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the benefit of creating a dedicated dialog class for this rather than using a plain QDialog and setting the text accordingly?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

You're right, dedicated class isn't really necessary. I can replace it with a plain QDialog set up inline at the call site.

"<p>Reach the team through the <a href=\"https://www.mumble.info/contact/\">Contact page</a>.</p>"));

QPushButton *okButton = new QPushButton(tr("OK"), this);
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should use the type-safe overload that takes function pointers and doesn't require the SIGNAL and SLOT macro.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This shouldn't be part of any commit

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry about that, I'll remove it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants