From 0f4d1271f8b7e14f115d5faa75772dc46e6f4477 Mon Sep 17 00:00:00 2001 From: LemonNexus Date: Sun, 8 Feb 2026 22:34:00 +0000 Subject: [PATCH] fix(gui): ProjectStatsDialog uses correct ProjectData fields - Remove references to non-existent description, session_count, last_session - Use project.type, project.status, project.metadata for description - Fixes AttributeError when viewing project stats --- ui/main_window.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/main_window.py b/ui/main_window.py index 63f67c9..3966f35 100644 --- a/ui/main_window.py +++ b/ui/main_window.py @@ -152,16 +152,16 @@ class ProjectStatsDialog(QDialog): stats_layout.addRow("ID:", QLabel(str(self.project.id))) stats_layout.addRow("Name:", QLabel(self.project.name)) - stats_layout.addRow("Description:", QLabel(self.project.description or "N/A")) + stats_layout.addRow("Type:", QLabel(self.project.type)) + stats_layout.addRow("Status:", QLabel(self.project.status)) + + # Description from metadata + description = self.project.metadata.get('description', 'N/A') if self.project.metadata else 'N/A' + stats_layout.addRow("Description:", QLabel(description)) created = self.project.created_at.strftime("%Y-%m-%d %H:%M") if self.project.created_at else "N/A" stats_layout.addRow("Created:", QLabel(created)) - stats_layout.addRow("Total Sessions:", QLabel(str(self.project.session_count))) - - last = self.project.last_session.strftime("%Y-%m-%d %H:%M") if self.project.last_session else "Never" - stats_layout.addRow("Last Session:", QLabel(last)) - layout.addWidget(stats_group) # Close button