Problem
Type / Priority
Bug / Medium
Summary
When a work-item is marked as done or a new one is created, the raw completed work-item counter updates properly, but the project's completion percentage metric (currently hardcoded to 0% in the project list UI) fails to calculate and update dynamically.
Current Behavior (Evidence)
-
The completed work-item count increments/decrements correctly.
-
In AnalyticsOverviewPage.tsx, the project completion percentage next to each item in the "Active Projects" list is hardcoded to 0% (0%).
-
The application fetches issues but does not link them to individual projects to compute their actual completion ratio.
Proposed solution
-
Update the analytics overview component to link issues with their respective project IDs.
-
Implement a dynamic calculation for project completion percentages based on completed vs. total work items per project.
-
Replace the hardcoded 0% badge with the dynamically calculated value so it updates in real time when work items change status or are created/deleted.
Alternatives considered
No response
Acceptance criteria
Given a user marks a work item as "Done" or reopens it, when the status update is saved, then the corresponding project's completion percentage updates instantly in the active projects list to accurately reflect the new ratio.
Given a project has a completion percentage, when a new work item is added or deleted, then the percentage recalculates automatically based on the updated pool of work items.
Given a project has zero work items, when the analytics page loads, then the completion percentage safely defaults to 0% without throwing calculation errors.
Additional context
in apps/web/src/pages/AnalyticsOverviewPage.tsx
line 265 should not be hardcoded:
{/* Active Projects */}
<section className="min-w-0">
<h3 className="mb-4 text-base font-semibold text-(--txt-primary)">
{t('analytics.activeProjects', 'Active Projects')}
</h3>
<ul className="space-y-2">
{projects.map((p) => (
<li
key={p.id}
className="flex items-center gap-3 rounded-md border border-(--border-subtle) bg-(--bg-surface-1) px-4 py-3"
>
<span className="flex size-8 shrink-0 items-center justify-center rounded-md bg-(--bg-layer-2) text-sm font-medium text-(--txt-icon-secondary)">
{p.name.charAt(0)}
</span>
<span className="min-w-0 flex-1 truncate font-medium text-(--txt-primary)">
{p.name}
</span>
<span className="shrink-0 rounded bg-(--bg-danger-subtle) px-2 py-0.5 text-xs font-medium text-(--txt-danger-primary)">
0%
</span>
</li>
))}
</ul>
</section>
</div>
</div>
);
}
Problem
Type / Priority
Bug / Medium
Summary
When a work-item is marked as done or a new one is created, the raw completed work-item counter updates properly, but the project's completion percentage metric (currently hardcoded to 0% in the project list UI) fails to calculate and update dynamically.
Current Behavior (Evidence)
The completed work-item count increments/decrements correctly.
In AnalyticsOverviewPage.tsx, the project completion percentage next to each item in the "Active Projects" list is hardcoded to 0% (0%).
The application fetches issues but does not link them to individual projects to compute their actual completion ratio.
Proposed solution
Update the analytics overview component to link issues with their respective project IDs.
Implement a dynamic calculation for project completion percentages based on completed vs. total work items per project.
Replace the hardcoded 0% badge with the dynamically calculated value so it updates in real time when work items change status or are created/deleted.
Alternatives considered
No response
Acceptance criteria
Given a user marks a work item as "Done" or reopens it, when the status update is saved, then the corresponding project's completion percentage updates instantly in the active projects list to accurately reflect the new ratio.
Given a project has a completion percentage, when a new work item is added or deleted, then the percentage recalculates automatically based on the updated pool of work items.
Given a project has zero work items, when the analytics page loads, then the completion percentage safely defaults to 0% without throwing calculation errors.
Additional context
in apps/web/src/pages/AnalyticsOverviewPage.tsx
line 265 should not be hardcoded: