Add Report Issue to About and the tray

Refs #1
This commit is contained in:
2026-11-26 22:45:49 -06:00
parent 9301c13e6a
commit 7f8c604acf
7 changed files with 72 additions and 13 deletions

View File

@@ -1,5 +1,10 @@
# Changelog # 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 ## 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. - Bundle DC-ANCSA v1.0 in the Windows installer and portable ZIP. Interactive Setup shows the agreement, and About opens the complete license offline.

View File

@@ -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). 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 ## 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. 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.

View File

@@ -1 +1 @@
v0.8.4.4_beta v0.8.5.4_beta

View File

@@ -15,16 +15,16 @@ import winreg
from html import escape from html import escape
from pathlib import Path from pathlib import Path
from PySide6.QtCore import QRectF, Qt, QUrl from PySide6.QtCore import QRectF, QSysInfo, Qt, QUrl, qVersion
from PySide6.QtGui import QDesktopServices, QFont, QPainter, QPixmap from PySide6.QtGui import QDesktopServices, QFont, QGuiApplication, QPainter, QPixmap
from PySide6.QtWidgets import ( from PySide6.QtWidgets import (
QDialog, QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout, QLabel, QDialog, QDialogButtonBox, QFormLayout, QGroupBox, QHBoxLayout, QLabel,
QPushButton, QTextBrowser, QVBoxLayout, QWidget, QPushButton, QStyle, QTextBrowser, QVBoxLayout, QWidget,
) )
from .branding import ( from .branding import (
APPLICATION_IMAGE, COMPANY_LOGO, COPYRIGHT, DEVELOPER, DESCRIPTION, INSTALL_ID, 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 .software_license import LICENSE_LABEL, LicenseDialog
from .update_release import LICENSE_FILE from .update_release import LICENSE_FILE
@@ -33,6 +33,7 @@ from .update_ui import UpdatePanel
from .window_geometry import WindowGeometry from .window_geometry import WindowGeometry
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
ISSUE_ICON = QStyle.StandardPixmap.SP_MessageBoxWarning
DOCS = { DOCS = {
"README.md": "README", "README.md": "README",
"CHANGELOG.md": "Change Log", "CHANGELOG.md": "Change Log",
@@ -148,6 +149,9 @@ class AboutPage(QWidget):
view.clicked.connect(self.show_details) view.clicked.connect(self.show_details)
buttons = QHBoxLayout() buttons = QHBoxLayout()
buttons.addWidget(view) 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() buttons.addStretch()
details.addRow(buttons) details.addRow(buttons)
layout.addWidget(information) layout.addWidget(information)
@@ -198,7 +202,6 @@ class AboutPage(QWidget):
self.website.setText(link(WEBSITE, "www.designcreations.us", colors.accent)) 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) items = [link(name, name if name in ("README.md", "CHANGELOG.md") else label, colors.accent)
for name, label in self.documents.items()] for name, label in self.documents.items()]
items.append(link(SUPPORT_URL, "Contact & Support", colors.accent))
self.links.setText(" | ".join(items)) self.links.setText(" | ".join(items))
def show_document(self, name): def show_document(self, name):
@@ -238,6 +241,19 @@ class AboutPage(QWidget):
elif QUrl(target).scheme() == "https": elif QUrl(target).scheme() == "https":
QDesktopServices.openUrl(QUrl(target)) 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): def show_details(self):
kind, directory = installation() kind, directory = installation()
build = build_data() build = build_data()
@@ -264,6 +280,8 @@ class AboutPage(QWidget):
layout.addLayout(form) layout.addLayout(form)
buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Close) buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Close)
buttons.rejected.connect(dialog.reject) buttons.rejected.connect(dialog.reject)
copy = buttons.addButton("Copy Application Information", QDialogButtonBox.ButtonRole.ActionRole)
copy.clicked.connect(self.copy_application_information)
layout.addWidget(buttons) layout.addWidget(buttons)
dialog.resize(620, dialog.sizeHint().height()) dialog.resize(620, dialog.sizeHint().height())
dialog.window_geometry = WindowGeometry(dialog, self.data_root / "application-details-window.bin") dialog.window_geometry = WindowGeometry(dialog, self.data_root / "application-details-window.bin")

View File

@@ -14,7 +14,7 @@ DEVELOPER = "Sonja M Thomas"
PUBLISHER = "SLT Design Creations, LLC" PUBLISHER = "SLT Design Creations, LLC"
COPYRIGHT = f"Copyright 2010-2026 {PUBLISHER}" COPYRIGHT = f"Copyright 2010-2026 {PUBLISHER}"
WEBSITE = "https://www.designcreations.us/" 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" APP_MODEL_ID = "SLTDesignCreations.AdaptiveResourceMonitor"
INSTALL_ID = "{FB4FA82E-8715-4AC8-BD23-48E33E998D1B}" INSTALL_ID = "{FB4FA82E-8715-4AC8-BD23-48E33E998D1B}"
DESCRIPTION = ( DESCRIPTION = (
@@ -48,6 +48,13 @@ def document(name):
return SOURCE_ROOT / 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(): def application_icon():
from PySide6.QtGui import QIcon from PySide6.QtGui import QIcon

View File

@@ -10,7 +10,8 @@ from PySide6.QtCore import QSize, Qt
from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap
from PySide6.QtWidgets import QHBoxLayout, QLabel, QMenu, QStyle, QVBoxLayout, QWidget, QWidgetAction 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 .config import TRAY_MODES
from .machine_controls import MachineMenu from .machine_controls import MachineMenu
from .version import NAME, VERSION from .version import NAME, VERSION
@@ -63,6 +64,7 @@ class TrayMenu(QMenu):
self.addSeparator() self.addSeparator()
self.action(self, f"About {NAME}", SP.SP_MessageBoxInformation, app.about) 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, "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.action(self, "Design Creations Website", SP.SP_DriveNetIcon, app.open_website)
self.addSeparator() self.addSeparator()
self.action(self, f"Exit {NAME}", None, app.qt.quit) self.action(self, f"Exit {NAME}", None, app.qt.quit)

View File

@@ -340,7 +340,7 @@ def verify_branding(session, results, captures=None):
from PySide6.QtWidgets import QLabel, QPushButton from PySide6.QtWidgets import QLabel, QPushButton
from arm.branding import ( from arm.branding import (
APPLICATION_ICON, APPLICATION_IMAGE, APPLICATION_LOGO, COMPANY_LOGO, ICON_SIZES, 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.model import ALL, LOCAL
from arm.version import NAME, VERSION 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 menu.version.text() == VERSION and menu.machines.entries[LOCAL].isChecked()
assert tuple(menu.machines.entries) == (LOCAL,) assert tuple(menu.machines.entries) == (LOCAL,)
actions = {action.text(): action for action in menu.actions()} 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() actions[f"About {NAME}"].trigger()
assert session.expanded.tabs.currentWidget() is session.about_page assert session.expanded.tabs.currentWidget() is session.about_page
assert session.about_page.version.text() == VERSION 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 session.about_page.document_group.title() == "Third-party Notices"
assert "CPython" in session.about_page.browser.toPlainText() assert "CPython" in session.about_page.browser.toPlainText()
session.about_page.open_link("README.md") 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") session.about_page.open_link("CHANGELOG.md")
from unittest.mock import Mock, patch
details = [] details = []
clipboard = Mock()
copied = []
def inspect_details(): def inspect_details():
dialog = session.qt.activeModalWidget() dialog = session.qt.activeModalWidget()
if dialog: if dialog:
details.extend(label.text() for label in dialog.findChildren(QLabel)) 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() dialog.reject()
QTimer.singleShot(0, inspect_details) QTimer.singleShot(0, inspect_details)
view = next(button for button in session.about_page.findChildren(QPushButton) if button.text() == "Application Details") view = next(button for button in session.about_page.findChildren(QPushButton) if button.text() == "Application Details")
view.click() view.click()
assert "Installation type" in details and "Source checkout" in details and VERSION in details 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): class BrowserTarget(QObject):
@Slot(QUrl) @Slot(QUrl)
@@ -433,8 +453,13 @@ def verify_branding(session, results, captures=None):
try: try:
actions["Design Creations Website"].trigger() actions["Design Creations Website"].trigger()
assert sink.destination == WEBSITE assert sink.destination == WEBSITE
session.about_page.open_link(SUPPORT_URL) assert not session.about_page.report_issue.icon().isNull()
assert sink.destination == SUPPORT_URL 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: finally:
QDesktopServices.unsetUrlHandler("https") QDesktopServices.unsetUrlHandler("https")
if captures: if captures: