diff --git a/CHANGELOG.md b/CHANGELOG.md index 60b011e..9f29ca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v0.8.5.4_beta — 2026-11-26 + +- Add a Report Issue button in About and a matching tray action below Check for Updates. Both open the public issue index in the default browser. [#1](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/issues/1) +- Add Copy Application Information to Application Details for an optional, sanitized clipboard summary. + ## v0.8.4.4_beta — 2026-11-26 - Bundle DC-ANCSA v1.0 in the Windows installer and portable ZIP. Interactive Setup shows the agreement, and About opens the complete license offline. diff --git a/SUPPORT.md b/SUPPORT.md index df61d55..67c98c1 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -13,6 +13,8 @@ Anyone can browse the public [issue tracker](https://phantom.zapto.org/gitea/son Include the ARM version, Windows version and architecture, installation type, what you did, what you expected and what happened. When relevant, include approximate frequency, the affected resource and a workaround. See [Troubleshooting](README.md#troubleshooting) and [Remote Monitoring](REMOTE_MONITORING.md) for self-service help. If sign-in or account access prevents you from filing, use the [Design Creations contact form](https://www.designcreations.us/contact/index.php). +When available in ARM, **Report Issue** in About or the tray opens the same public tracker in your browser. **About → Application Details → Copy Application Information** copies only the app name and version, classification, OS and architecture, distribution, and Qt version. Review and paste it yourself if useful. + ## Share diagnostics safely Work from copies of logs or screenshots. Replace system names, account names, paths and addresses with generic values. Remove passwords, tokens, private keys, fingerprints, sensitive file paths, unrelated desktop content and other identifying details. Review the entire image or text before publishing. Keep original logs, settings, credential exports, trust files and full update receipts private. diff --git a/VERSION.md b/VERSION.md index 4f5e82f..9e5a6c6 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -v0.8.4.4_beta +v0.8.5.4_beta diff --git a/arm/about.py b/arm/about.py index d966131..2cc581f 100644 --- a/arm/about.py +++ b/arm/about.py @@ -15,16 +15,16 @@ import winreg from html import escape from pathlib import Path -from PySide6.QtCore import QRectF, Qt, QUrl -from PySide6.QtGui import QDesktopServices, QFont, QPainter, QPixmap +from PySide6.QtCore import QRectF, QSysInfo, Qt, QUrl, qVersion +from PySide6.QtGui import QDesktopServices, QFont, QGuiApplication, QPainter, QPixmap from PySide6.QtWidgets import ( QDialog, QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout, QLabel, - QPushButton, QTextBrowser, QVBoxLayout, QWidget, + QPushButton, QStyle, QTextBrowser, QVBoxLayout, QWidget, ) from .branding import ( APPLICATION_IMAGE, COMPANY_LOGO, COPYRIGHT, DEVELOPER, DESCRIPTION, INSTALL_ID, - SUPPORT_URL, WEBSITE, asset, document, + WEBSITE, asset, document, open_issue_tracker, ) from .software_license import LICENSE_LABEL, LicenseDialog from .update_release import LICENSE_FILE @@ -33,6 +33,7 @@ from .update_ui import UpdatePanel from .window_geometry import WindowGeometry LOG = logging.getLogger(__name__) +ISSUE_ICON = QStyle.StandardPixmap.SP_MessageBoxWarning DOCS = { "README.md": "README", "CHANGELOG.md": "Change Log", @@ -148,6 +149,9 @@ class AboutPage(QWidget): view.clicked.connect(self.show_details) buttons = QHBoxLayout() buttons.addWidget(view) + self.report_issue = QPushButton(self.style().standardIcon(ISSUE_ICON), "Report Issue") + self.report_issue.clicked.connect(open_issue_tracker) + buttons.addWidget(self.report_issue) buttons.addStretch() details.addRow(buttons) layout.addWidget(information) @@ -198,7 +202,6 @@ class AboutPage(QWidget): self.website.setText(link(WEBSITE, "www.designcreations.us", colors.accent)) items = [link(name, name if name in ("README.md", "CHANGELOG.md") else label, colors.accent) for name, label in self.documents.items()] - items.append(link(SUPPORT_URL, "Contact & Support", colors.accent)) self.links.setText(" | ".join(items)) def show_document(self, name): @@ -238,6 +241,19 @@ class AboutPage(QWidget): elif QUrl(target).scheme() == "https": QDesktopServices.openUrl(QUrl(target)) + def copy_application_information(self): + kind, _ = installation() + information = ( + ("Application", NAME), + ("Version", VERSION), + ("Release classification", release_classification()), + ("Operating system", f"{QSysInfo.prettyProductName()} ({QSysInfo.kernelVersion()})"), + ("Processor architecture", QSysInfo.currentCpuArchitecture()), + ("Distribution", kind), + ("Framework", f"Qt {qVersion()}"), + ) + QGuiApplication.clipboard().setText("\n".join(f"{label}: {value}" for label, value in information)) + def show_details(self): kind, directory = installation() build = build_data() @@ -264,6 +280,8 @@ class AboutPage(QWidget): layout.addLayout(form) buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Close) buttons.rejected.connect(dialog.reject) + copy = buttons.addButton("Copy Application Information", QDialogButtonBox.ButtonRole.ActionRole) + copy.clicked.connect(self.copy_application_information) layout.addWidget(buttons) dialog.resize(620, dialog.sizeHint().height()) dialog.window_geometry = WindowGeometry(dialog, self.data_root / "application-details-window.bin") diff --git a/arm/branding.py b/arm/branding.py index 03ce846..31a13c6 100644 --- a/arm/branding.py +++ b/arm/branding.py @@ -14,7 +14,7 @@ DEVELOPER = "Sonja M Thomas" PUBLISHER = "SLT Design Creations, LLC" COPYRIGHT = f"Copyright 2010-2026 {PUBLISHER}" WEBSITE = "https://www.designcreations.us/" -SUPPORT_URL = "https://www.designcreations.us/contact/index.php" +ISSUE_TRACKER_URL = "https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/issues" APP_MODEL_ID = "SLTDesignCreations.AdaptiveResourceMonitor" INSTALL_ID = "{FB4FA82E-8715-4AC8-BD23-48E33E998D1B}" DESCRIPTION = ( @@ -48,6 +48,13 @@ def document(name): return SOURCE_ROOT / name +def open_issue_tracker(): + from PySide6.QtCore import QUrl + from PySide6.QtGui import QDesktopServices + + return QDesktopServices.openUrl(QUrl(ISSUE_TRACKER_URL)) + + def application_icon(): from PySide6.QtGui import QIcon diff --git a/arm/tray_menu.py b/arm/tray_menu.py index 2ceabac..ead5f9e 100644 --- a/arm/tray_menu.py +++ b/arm/tray_menu.py @@ -10,7 +10,8 @@ from PySide6.QtCore import QSize, Qt from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap from PySide6.QtWidgets import QHBoxLayout, QLabel, QMenu, QStyle, QVBoxLayout, QWidget, QWidgetAction -from .about import BrandImage +from .about import ISSUE_ICON, BrandImage +from .branding import open_issue_tracker from .config import TRAY_MODES from .machine_controls import MachineMenu from .version import NAME, VERSION @@ -63,6 +64,7 @@ class TrayMenu(QMenu): self.addSeparator() self.action(self, f"About {NAME}", SP.SP_MessageBoxInformation, app.about) self.action(self, "Check for Updates", SP.SP_BrowserReload, app.check_for_updates) + self.action(self, "Report Issue", ISSUE_ICON, open_issue_tracker) self.action(self, "Design Creations Website", SP.SP_DriveNetIcon, app.open_website) self.addSeparator() self.action(self, f"Exit {NAME}", None, app.qt.quit) diff --git a/tests/windows_gui.py b/tests/windows_gui.py index 30d8628..aa623e3 100644 --- a/tests/windows_gui.py +++ b/tests/windows_gui.py @@ -340,7 +340,7 @@ def verify_branding(session, results, captures=None): from PySide6.QtWidgets import QLabel, QPushButton from arm.branding import ( APPLICATION_ICON, APPLICATION_IMAGE, APPLICATION_LOGO, COMPANY_LOGO, ICON_SIZES, - SUPPORT_URL, WEBSITE, asset, + ISSUE_TRACKER_URL, WEBSITE, asset, ) from arm.model import ALL, LOCAL from arm.version import NAME, VERSION @@ -372,7 +372,9 @@ def verify_branding(session, results, captures=None): assert menu.version.text() == VERSION and menu.machines.entries[LOCAL].isChecked() assert tuple(menu.machines.entries) == (LOCAL,) actions = {action.text(): action for action in menu.actions()} - assert "Check for Updates" in actions + action_order = list(actions) + assert action_order[action_order.index("Check for Updates") + 1] == "Report Issue" + assert not actions["Report Issue"].icon().isNull() actions[f"About {NAME}"].trigger() assert session.expanded.tabs.currentWidget() is session.about_page assert session.about_page.version.text() == VERSION @@ -408,20 +410,38 @@ def verify_branding(session, results, captures=None): assert session.about_page.document_group.title() == "Third-party Notices" assert "CPython" in session.about_page.browser.toPlainText() session.about_page.open_link("README.md") - assert "dynamic icon" in session.about_page.browser.toPlainText() + assert "Quick Start" in session.about_page.browser.toPlainText() + assert "Contact & Support" not in session.about_page.links.text() + assert "Third-party Notices" in session.about_page.links.text() session.about_page.open_link("CHANGELOG.md") + from unittest.mock import Mock, patch + details = [] + clipboard = Mock() + copied = [] def inspect_details(): dialog = session.qt.activeModalWidget() if dialog: details.extend(label.text() for label in dialog.findChildren(QLabel)) + button = next(btn for btn in dialog.findChildren(QPushButton) + if btn.text() == "Copy Application Information") + with patch("arm.about.QGuiApplication") as gui_application: + gui_application.clipboard.return_value = clipboard + button.click() + copied.extend(clipboard.setText.call_args.args) dialog.reject() QTimer.singleShot(0, inspect_details) view = next(button for button in session.about_page.findChildren(QPushButton) if button.text() == "Application Details") view.click() assert "Installation type" in details and "Source checkout" in details and VERSION in details + info = dict(line.split(": ", 1) for line in copied[0].splitlines()) + assert set(info) == {"Application", "Version", "Release classification", "Operating system", + "Processor architecture", "Distribution", "Framework"} + assert info["Application"] == NAME and info["Version"] == VERSION + assert info["Distribution"] == "Source checkout" and info["Framework"].startswith("Qt ") + assert str(session.about_page.data_root) not in copied[0] class BrowserTarget(QObject): @Slot(QUrl) @@ -433,8 +453,13 @@ def verify_branding(session, results, captures=None): try: actions["Design Creations Website"].trigger() assert sink.destination == WEBSITE - session.about_page.open_link(SUPPORT_URL) - assert sink.destination == SUPPORT_URL + assert not session.about_page.report_issue.icon().isNull() + session.about_page.report_issue.click() + assert sink.destination == ISSUE_TRACKER_URL + sink.destination = "" + actions["Report Issue"].trigger() + assert sink.destination == ISSUE_TRACKER_URL + results["issue_reporting"] = True finally: QDesktopServices.unsetUrlHandler("https") if captures: