feat: project overview + timeline + docs center

- services/task_project_linker.py: task<->project mapping (title keywords + workspace_path)
- routes/pages.py: /timeline, /docs, /docs/<path>, enhanced /projects/<name> and /tasks/<id>
- templates: timeline.html, docs.html, doc_view.html (new), project_detail.html + task_detail.html (overhauled)
- config.py: DOCS_DIRS + ProjectConfig color
- base.html: Timeline + Docs nav links
This commit is contained in:
hermes-dashboard
2026-08-17 20:00:37 +08:00
parent 1e5e30ffcb
commit c0cbd683f4
11 changed files with 813 additions and 16 deletions

View File

@@ -12,6 +12,12 @@
{% set task = data.task %}
<h2>📋 Task #{{ task.id }}: {{ task.title }}</h2>
{% if project_name %}
<div class="card mb-20">
<p><strong>📦 Project:</strong> <a href="/projects/{{ project_name }}">{{ project_name }}</a></p>
</div>
{% endif %}
<div class="grid-2">
<div>
<div class="card">
@@ -44,6 +50,41 @@
<pre>{{ task.result }}</pre>
</div>
{% endif %}
{% if commits %}
<div class="card">
<h3>🔀 Commits During Task ({{ commits|length }})</h3>
<table>
<thead>
<tr><th>Hash</th><th>Time</th><th>Subject</th></tr>
</thead>
<tbody>
{% for c in commits %}
<tr>
<td class="text-small"><a href="{{ c.gitea_url }}" target="_blank">{{ c.short }}</a></td>
<td class="text-small">{{ c.ts|int|dt }}</td>
<td>{{ c.subject }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% if files_changed %}
<div class="card">
<h3>📁 Files Changed</h3>
{% for chash, files in files_changed.items() %}
<div class="text-small" style="margin-bottom:10px;">
<strong>{{ chash }}</strong>:
<ul style="margin-left:20px;">
{% for f in files[:15] %}<li>{{ f }}</li>{% endfor %}
{% if files|length > 15 %}<li class="text-muted">... {{ files|length - 15 }} more</li>{% endif %}
</ul>
</div>
{% endfor %}
</div>
{% endif %}
</div>
<div>