Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def format_name(key):
projects_by_initiative = dict(
sorted(projects_by_initiative.items(), key=lambda x: x[0])
)

# filter to only the cycle initiative (from config.yml)
current_init = config.get("cycle_initiative")
if current_init:
Expand All @@ -307,6 +308,20 @@ def format_name(key):
if name == current_init
}

# Separate completed projects from the cycle initiatives
completed_projects = []
for name, projects in list(projects_by_initiative.items()):
remaining = []
for project in projects:
if project.get("status", {}).get("name") == "Completed":
completed_projects.append(project)
else:
remaining.append(project)
if remaining:
projects_by_initiative[name] = remaining
else:
del projects_by_initiative[name]

# Determine which team members are participating in cycle projects
cycle_projects_filtered = [p for projs in projects_by_initiative.values() for p in projs]

Expand Down Expand Up @@ -389,6 +404,7 @@ def normalize(name: str) -> str:
developers=developers,
developer_projects=member_projects,
cycle_projects_by_initiative=projects_by_initiative,
completed_cycle_projects=completed_projects,
on_call_support=on_call_support,
support_issues=support_issues,
)
Expand Down
3 changes: 3 additions & 0 deletions linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ def get_projects():
name
url
health
status {
name
}
startDate
targetDate
lead {
Expand Down
38 changes: 29 additions & 9 deletions templates/team.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
{% block extra_head %}
<style>
.health-icon { font-size: 0.9em; margin-right: 0.3em; }
.completed-project {
text-decoration: line-through;
text-decoration-thickness: 2px;
color: #555;
}
</style>
{% endblock %}

Expand Down Expand Up @@ -41,8 +46,9 @@ <h3>Cycle Projects</h3>
<ul>
{% for initiative, projects in cycle_projects_by_initiative.items() %}
{% for project in projects %}
{% set is_completed = project.status and project.status.name == 'Completed' %}
<li>
{% if project.health %}
{% if project.health and not is_completed %}
{% if project.health == 'onTrack' %}
{% set icon = '🟢' %}
{% elif project.health == 'atRisk' %}
Expand All @@ -52,17 +58,19 @@ <h3>Cycle Projects</h3>
{% endif %}
<span class="health-icon" title="{{ project.health }}">{{ icon }}</span>
{% endif %}
<a href="{{ project.url }}">{{ project.name }}</a>
<a href="{{ project.url }}" class="{% if is_completed %}completed-project{% endif %}">{{ project.name }}</a>
{% if project.startDate or project.targetDate %}
<small>
{% if project.startDate %}{{ project.startDate|mmdd }}{% endif %}{% if project.targetDate %} → {{ project.targetDate|mmdd }}{% endif %}
{% if project.starts_in is not none and project.starts_in > 0 %}
(starts in {{ project.starts_in }}d)
{% elif project.days_left is not none %}
{% if project.days_left < 0 %}
({{ project.days_left | abs }}d overdue)
{% else %}
({{ project.days_left }}d left)
{% if not is_completed %}
{% if project.starts_in is not none and project.starts_in > 0 %}
(starts in {{ project.starts_in }}d)
{% elif project.days_left is not none %}
{% if project.days_left < 0 %}
({{ project.days_left | abs }}d overdue)
{% else %}
({{ project.days_left }}d left)
{% endif %}
{% endif %}
{% endif %}
</small>
Expand All @@ -81,6 +89,18 @@ <h3>Cycle Projects</h3>
{% endfor %}
{% endfor %}
</ul>
{% if completed_cycle_projects %}
<details open>
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The completed projects section defaults to being open with open attribute. Consider if this should be collapsed by default to reduce visual clutter, especially when there are many completed projects.

Suggested change
<details open>
<details>

Copilot uses AI. Check for mistakes.
<summary>Completed Projects</summary>
<ul>
{% for project in completed_cycle_projects %}
<li>
<a href="{{ project.url }}" class="completed-project">{{ project.name }}</a>
</li>
{% endfor %}
</ul>
</details>
{% endif %}
<h3>Platforms</h3>
<ul>
{% for platform, members in platform_teams|dictsort %}
Expand Down