Add author detail, idea detail, and gap-draft reverse link pages

- Author detail page (/authors/<person_id>): shows author info, all drafts
  with ratings, and co-authors with shared draft counts. Public route.
- Idea detail page (/ideas/<idea_id>): shows idea metadata, source draft,
  and top-5 most similar ideas via embedding cosine similarity. Admin route.
- Gap detail page: added "Related Drafts" section that finds drafts by
  extracting draft names from evidence text and searching by topic keywords.
- Updated author links across templates to use /authors/<person_id> URLs.
- Added DB methods: get_author_by_id, get_author_drafts, get_coauthors.
- Extended top_authors to include person_id (5th tuple element).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 03:45:00 +01:00
parent 4a368bde62
commit c755b2bbf3
16 changed files with 548 additions and 18 deletions

View File

@@ -331,7 +331,7 @@
<span class="text-xs font-semibold text-slate-400">{{ a.name[0]|upper if a.name else '?' }}</span>
</div>
<div>
<a href="/drafts?q={{ a.name | urlencode }}" class="text-sm text-blue-400 hover:text-blue-300 transition">{{ a.name }}</a>
<a href="/authors/{{ a.person_id }}" class="text-sm text-blue-400 hover:text-blue-300 transition">{{ a.name }}</a>
{% if a.affiliation %}
<div class="text-xs text-slate-500">{{ a.affiliation }}</div>
{% endif %}