diff --git a/src/development_hub/views/dashboard.py b/src/development_hub/views/dashboard.py index 1234eb9..bbcdf47 100644 --- a/src/development_hub/views/dashboard.py +++ b/src/development_hub/views/dashboard.py @@ -817,7 +817,18 @@ class ProjectDashboard(QWidget): # Update stats self.stats_row.update_stat("healthy", ecosystem.healthy_count) self.stats_row.update_stat("warning", ecosystem.warning_count + ecosystem.critical_count) - self.stats_row.update_stat("todos", ecosystem.total_active_todos) + + # Load global todos count from docs/todos.md (not ecosystem total) + global_todos_path = self._docs_root / "todos.md" + global_todos_count = 0 + if global_todos_path.exists(): + try: + global_parser = TodosParser(global_todos_path) + global_todo_list = global_parser.parse() + global_todos_count = len(global_todo_list.active_todos) + except Exception: + pass + self.stats_row.update_stat("todos", global_todos_count) # Hide alert banner in global mode self.alert_banner.hide() @@ -987,8 +998,10 @@ class ProjectDashboard(QWidget): self._goal_list = self._goals_parser.parse() # Active goals - completed_count = 0 + # Progress calculation: completed=1.0, partial=0.5, not achieved=0 + progress_score = 0.0 total_count = len(self._goal_list.active) + completed_count = 0 # For display ratio for goal in self._goal_list.active: widget = GoalItemWidget(goal) @@ -997,7 +1010,10 @@ class ProjectDashboard(QWidget): widget.edited.connect(self._on_goal_edited) self.goals_active_section.add_widget(widget) if goal.completed: + progress_score += 1.0 completed_count += 1 + elif goal.partial: + progress_score += 0.5 if not self._goal_list.active: no_goals = QLabel("No active goals") @@ -1043,7 +1059,8 @@ class ProjectDashboard(QWidget): self.goals_nongoals_section.set_count_ratio(nongoals_checked, len(self._goal_list.non_goals)) # Update progress bar (active goals only) - progress = int((completed_count / total_count) * 100) if total_count > 0 else 0 + # Uses progress_score where completed=1.0, partial=0.5 + progress = int((progress_score / total_count) * 100) if total_count > 0 else 0 self.goals_progress.setValue(progress) def _load_milestones(self):