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
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "Implement Phase 1 Enhanced GitHub Pages Interface and Matrix Bot Commands"
date: 2025-01-15
author: "GitHub Copilot Agent"
tags: ["issue-management", "github-pages", "matrix-bot", "task-dashboard", "search"]
---

## High-Level Request

Implement the first task from Phase 1 of the Issue Management System design outlined in ISSUE_MANAGEMENT.md: Enhanced GitHub Pages Interface with task statistics dashboard and Matrix bot integration.

## Actions Taken

- **Enhanced GitHub Pages Interface**: Updated `docs/status/tasks.md` with interactive task dashboard featuring:
- Task statistics cards showing open/completed/active phases counts
- Search input and filter dropdowns for status and phase
- Card-based task layout with metadata badges
- Responsive design with academic theme styling

- **Created JSON API**: Added `docs/api/tasks.json` endpoint providing programmatic access to task data with statistics

- **JavaScript Search Functionality**: Implemented `docs/assets/js/task-search.js` with:
- Client-side filtering for performance
- Real-time search across task titles and content
- Graceful degradation when JavaScript disabled
- Results count and no-results messaging

- **Matrix Bot Enhancement**: Extended bot.ts with new task commands:
- `!tasks summary` - Shows project statistics and phase breakdown
- `!tasks search <query>` - Searches tasks by keyword
- Enhanced `task-utils.ts` with summary and search functions
- Comprehensive test coverage in `bot.test.ts`

- **Created Task File**: Added `task-152-implement-phase-1-enhanced-github-pages-interface.md` documenting this implementation

## Friction/Success Points

- **Success**: Seamless integration with existing Jekyll collections and directory-based task structure
- **Success**: Maintained backward compatibility with existing `!tasks` command while adding new functionality
- **Success**: Academic theme styling integrates perfectly with existing site design
- **Success**: All tests pass including new comprehensive test coverage for Matrix bot commands
- **Learning**: Pre-commit hooks require both devlog and task entries for proper documentation workflow
- **Success**: JavaScript gracefully degrades to show all tasks when API or JS fails

## Technical Learnings

- **Jekyll Collections**: Leveraged existing `site.tasks` collection for statistics and filtering in Liquid templates
- **Client-Side Performance**: DOM-based filtering provides better performance than re-fetching API data
- **Test Mocking**: Enhanced bot test mocks to support new markdown formatting patterns for task summary/search results
- **CSS Integration**: Academic theme variables (--accent-primary, --background-subtle) provide consistent styling
- **Matrix Bot Architecture**: Command sub-routing pattern allows easy extension of existing commands

This implementation provides the foundation for Phase 1 of the Issue Management System, demonstrating enhanced visibility and searchability while maintaining the collaborative workflow between humans and AI agents.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Implement Phase 1: Enhanced GitHub Pages Interface"
order: 152
status: completed
phase: "Issue Management System"
category: "GitHub Pages Enhancement"
---

- [x] **Enhanced GitHub Pages Interface Implementation**
- [x] Update `docs/status/tasks.md` with task statistics dashboard
- [x] Add filtering and search UI elements (search input, status filter, phase filter)
- [x] Implement basic CSS styling for task interface
- [x] Create `docs/api/tasks.json` API endpoint for programmatic access
- [x] Add JavaScript-based client-side filtering functionality
- [x] Test the enhanced interface works correctly on GitHub Pages
- [x] Add Matrix bot `!tasks summary` and `!tasks search` commands
- [x] Create comprehensive test coverage for new bot functionality

This task implements the first phase of the Issue Management System as outlined in ISSUE_MANAGEMENT.md. It focuses on enhancing the GitHub Pages task interface to provide better visibility and searchability of tasks while maintaining backward compatibility with the existing system.

**Acceptance Criteria:** ✅ COMPLETED
- Task dashboard shows statistics (open tasks, completed tasks, active phases)
- Users can search tasks by title and content
- Users can filter tasks by status and phase
- All existing task URLs continue to work
- The page gracefully degrades if JavaScript is disabled
- Matrix bot provides task summary and search functionality
- Full test coverage ensures reliability

**Implementation Summary:**
- Enhanced GitHub Pages interface with interactive dashboard
- JSON API endpoint for programmatic access
- Client-side JavaScript search with graceful degradation
- Academic-themed CSS styling
- Matrix bot integration with `!tasks summary` and `!tasks search` commands
- Comprehensive test coverage including bot command tests
26 changes: 26 additions & 0 deletions docs/api/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: null
permalink: /api/tasks.json
---
{
"tasks": [
{% for task in site.tasks %}
{
"title": {{ task.title | jsonify }},
"status": {{ task.status | jsonify }},
"phase": {{ task.phase | jsonify }},
"category": {{ task.category | jsonify }},
"order": {{ task.order | jsonify }},
"url": "{{ site.url }}{{ task.url }}",
"content_preview": {{ task.content | strip_html | truncatewords: 20 | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
],
"statistics": {
"total": {{ site.tasks | size }},
"open": {{ site.tasks | where: "status", "open" | size }},
"completed": {{ site.tasks | where: "status", "completed" | size }},
"phases": {{ site.tasks | group_by: "phase" | size }}
},
"last_updated": "{{ site.time | date_to_xmlschema }}"
}
180 changes: 180 additions & 0 deletions docs/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,184 @@ table th {
h1, h2 {
color: black;
}
}

/* Task Dashboard Styles - Academic Theme */
.task-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}

.stat-card {
background: var(--background-subtle);
padding: 1.5rem;
border-radius: 4px;
text-align: center;
border: 1px solid var(--border-light);
transition: border-color 0.2s ease;
}

.stat-card:hover {
border-color: var(--border-medium);
}

.stat-card h3 {
font-size: 2.5rem;
margin: 0;
color: var(--accent-primary);
font-weight: 600;
font-family: 'Inter', sans-serif;
}

.stat-card p {
margin: 0.5rem 0 0 0;
color: var(--text-secondary);
font-weight: 500;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.025rem;
}

.task-controls {
display: flex;
gap: 1rem;
margin: 2rem 0;
flex-wrap: wrap;
align-items: center;
}

.task-controls input,
.task-controls select {
padding: 0.5rem 0.75rem;
border: 1px solid var(--border-medium);
border-radius: 4px;
background: var(--background);
color: var(--text-primary);
font-family: 'Inter', sans-serif;
font-size: 0.9rem;
}

.task-controls input:focus,
.task-controls select:focus {
outline: none;
border-color: var(--accent-primary);
box-shadow: 0 0 0 2px rgba(46, 93, 62, 0.1);
}

.task-card {
background: var(--background-subtle);
padding: 1.5rem;
margin-bottom: 1.5rem;
border-radius: 4px;
border: 1px solid var(--border-light);
transition: border-color 0.2s ease;
}

.task-card:hover {
border-color: var(--border-medium);
}

.task-card h3 {
color: var(--accent-secondary);
margin-top: 0;
margin-bottom: 1rem;
font-size: 1.2rem;
font-weight: 600;
}

.task-meta {
display: flex;
gap: 0.5rem;
margin: 1rem 0;
flex-wrap: wrap;
}

.task-card .status-badge {
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.025rem;
}

.status-open {
background-color: rgba(27, 74, 115, 0.1);
color: var(--accent-secondary);
border: 1px solid var(--accent-secondary);
}

.status-completed {
background-color: rgba(46, 93, 62, 0.1);
color: var(--accent-primary);
border: 1px solid var(--accent-primary);
}

.phase-badge,
.category-badge {
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
background-color: rgba(119, 119, 119, 0.1);
color: var(--text-muted);
border: 1px solid var(--border-medium);
}

.task-content {
color: var(--text-secondary);
line-height: 1.6;
margin: 1rem 0;
}

.task-link {
color: var(--accent-primary);
text-decoration: none;
font-weight: 500;
font-size: 0.9rem;
}

.task-link:hover {
color: var(--accent-secondary);
border-bottom-color: var(--accent-secondary);
}

.results-count {
color: var(--text-muted);
font-size: 0.9rem;
margin-bottom: 1rem;
font-style: italic;
}

.no-results {
text-align: center;
padding: 2rem;
color: var(--text-muted);
font-style: italic;
background: var(--background-subtle);
border: 1px solid var(--border-light);
border-radius: 4px;
margin: 1rem 0;
}

/* Responsive task dashboard */
@media screen and (max-width: 600px) {
.task-stats {
grid-template-columns: 1fr;
}

.task-controls {
flex-direction: column;
align-items: stretch;
}

.task-controls input,
.task-controls select {
width: 100%;
}

.stat-card h3 {
font-size: 2rem;
}
}
62 changes: 53 additions & 9 deletions docs/status/tasks.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,65 @@
---
layout: page
title: Tasks
title: Task Dashboard
permalink: /status/tasks/
---

# Tasks
# Task Dashboard

This page tracks all current and completed tasks for the Morpheum project. Tasks are organized chronologically with the most recent additions at the bottom.
This page tracks all current and completed tasks for the Morpheum project with enhanced search and filtering capabilities.

{% assign sorted_tasks = site.tasks | sort: 'order' %}
{% for task in sorted_tasks %}
## {{ task.title }}
<!-- Task Statistics -->
<div class="task-stats">
<div class="stat-card">
<h3>{{ site.tasks | where: "status", "open" | size }}</h3>
<p>Open Tasks</p>
</div>
<div class="stat-card">
<h3>{{ site.tasks | where: "status", "completed" | size }}</h3>
<p>Completed Tasks</p>
</div>
<div class="stat-card">
<h3>{{ site.tasks | group_by: "phase" | size }}</h3>
<p>Active Phases</p>
</div>
</div>

{{ task.content }}
<!-- Search and Filter Interface -->
<div class="task-controls">
<input type="text" id="task-search" placeholder="Search tasks..." />
<select id="status-filter">
<option value="">All Statuses</option>
<option value="open">Open</option>
<option value="completed">Completed</option>
</select>
<select id="phase-filter">
<option value="">All Phases</option>
{% assign phases = site.tasks | group_by: "phase" %}
{% for phase in phases %}
<option value="{{ phase.name }}">{{ phase.name }}</option>
{% endfor %}
</select>
</div>

---
{% endfor %}
<!-- Task Listing with JavaScript-enabled filtering -->
<div id="task-container">
{% assign sorted_tasks = site.tasks | sort: 'order' %}
{% for task in sorted_tasks %}
<div class="task-card" data-status="{{ task.status }}" data-phase="{{ task.phase }}" data-category="{{ task.category }}">
<h3>{{ task.title }}</h3>
<div class="task-meta">
<span class="status-badge status-{{ task.status }}">{{ task.status }}</span>
{% if task.phase %}<span class="phase-badge">{{ task.phase }}</span>{% endif %}
{% if task.category %}<span class="category-badge">{{ task.category }}</span>{% endif %}
</div>
<div class="task-content">{{ task.content | strip_html | truncatewords: 30 }}</div>
<a href="{{ task.url }}" class="task-link">View Details</a>
</div>
{% endfor %}
</div>

<!-- Include JavaScript for search functionality -->
<script src="{{ '/assets/js/task-search.js' | relative_url }}"></script>

## Contributing Tasks

Expand Down
Loading
Loading