Skip to content

Commit f23e82b

Browse files
fix: improve PR modal UX - show full title on hover and use explanation column
- Move title attribute to cell level for easier hover interaction - Use explanation column as primary PR title source (descriptive AI summaries) - Fall back to pr_title column, then URL-based title - Handle pandas NaN values to prevent "nan" string display - Remove duplicate stacked bar developer velocity charts from team tabs - Clear completed NOTES.md todo item Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 0ee4fe1 commit f23e82b

4 files changed

Lines changed: 29 additions & 23 deletions

File tree

NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Small todos and improvements to pick up when convenient.
44

55
## Dashboard
66

7-
- Remove duplicate individual developer velocity graph from team tabs — the per-developer multi-line chart already appears in its own section, making the older per-team "developer velocity" bar charts redundant.
7+
_(No pending items)_

output/index.html

Lines changed: 5 additions & 3 deletions
Large diffs are not rendered by default.

reports/chart_data.py

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,29 @@ def _build_team_dev_prs(df: pd.DataFrame) -> Dict[str, Any]:
8787
else:
8888
merged_at = ""
8989

90-
pr_title = str(row.get("pr_title", "") or "").strip()
90+
# Use explanation column as title, fall back to pr_title or URL-based title
91+
explanation = row.get("explanation", "")
92+
# Handle NaN/None values from pandas
93+
if pd.isna(explanation):
94+
explanation = ""
95+
else:
96+
explanation = str(explanation).strip()
97+
98+
pr_title = row.get("pr_title", "")
99+
if pd.isna(pr_title):
100+
pr_title = ""
101+
else:
102+
pr_title = str(pr_title).strip()
103+
104+
if explanation:
105+
title = explanation
106+
elif pr_title:
107+
title = pr_title
108+
else:
109+
title = _pr_title_from_url(pr_url)
110+
91111
pr_dict = {
92-
"title": pr_title if pr_title else _pr_title_from_url(pr_url),
112+
"title": title,
93113
"url": pr_url,
94114
"complexity": float(row.get("complexity", 0) or 0),
95115
"merged_at": merged_at,
@@ -427,22 +447,6 @@ def _extract_team(df: pd.DataFrame) -> List[Dict[str, Any]]:
427447
"series": series_30,
428448
})
429449

430-
# 05: Stacked bar
431-
pivot = tdf.pivot_table(index="week", columns="developer", values="complexity", aggfunc="sum", fill_value=0)
432-
pivot = pivot.reindex(pivot.sum().sort_values(ascending=False).index, axis=1)
433-
pivot = pivot.loc[(pivot != 0).any(axis=1)]
434-
if not pivot.empty and pivot.sum().sum() > 0:
435-
weeks = [d.strftime("%Y-%m-%d") for d in pivot.index]
436-
series = [{"name": c, "data": pivot[c].tolist()} for c in pivot.columns]
437-
charts.append({
438-
"id": f"05-{team}",
439-
"type": "stackedBar",
440-
"title": f"Developer Velocity — {team}",
441-
"subtitle": "Complexity per week",
442-
"_subtab": team,
443-
"x": weeks,
444-
"series": series,
445-
})
446450
# 06: Scatter
447451
agg = tdf.groupby("developer").agg(pr_count=("pr_url", "count"), total_complexity=("complexity", "sum"))
448452
if len(agg) >= 2:

reports/interactive_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ def build_interactive_report(
19221922
? `<a href="${{pr.url}}" target="_blank" rel="noopener" style="color:var(--accent);font-size:0.85rem">\u2192 Open PR</a>`
19231923
: '\u2014';
19241924
tableHtml += `<tr>
1925-
<td class="cell-name"><span class="name-text" title="${{title}}">${{displayTitle}}</span></td>
1925+
<td class="cell-name" title="${{title}}"><span class="name-text">${{displayTitle}}</span></td>
19261926
<td>${{badge}}</td>
19271927
<td style="white-space:nowrap;font-size:0.85rem">${{mergedDate}}</td>
19281928
<td>${{link}}</td>

0 commit comments

Comments
 (0)