docs: document server-side rendering pipeline, response timing middleware, and Telegram pairing API

- Add comprehensive documentation for backend content rendering in AGENTS.md, detailing the new `render_content` and `render_title` Jinja globals built on mistune with media processing, emoji shortcodes, and XSS protection
- Document the `X-Response-Time` header and bottom-left render time indicator in README.md
- Update bot token pricing documentation to clarify fallback vs gateway cost headers
- Add `email_accounts` to soft-delete tables and `idx_users_role` composite index in database schema
- Implement `telegram_pairings` and `telegram_links` table creation with column migration and indexes
- Add `/profile/{username}/telegram` endpoint to docs API with request/unpair actions
- Register `TelegramService` in main.py lifespan and add `response_timing` middleware emitting `X-Response-Time` header
- Introduce `TelegramPairForm` model and `guard_public_host_sync` synchronous host validation function
This commit is contained in:
2026-06-18 22:09:34 +00:00
parent 95dca73291
commit 6ceca3d0d4
146 changed files with 6079 additions and 392 deletions
+3 -3
View File
@@ -10,7 +10,7 @@
<article class="project-detail">
<div class="project-detail-header">
<h1 class="project-detail-title">{{ project['title'] }}</h1>
<h1 class="project-detail-title">{{ render_title(project['title']) }}</h1>
<div class="project-status {% if project.get('status') == 'Released' %}released{% else %}dev{% endif %}">
&#x25CF; {{ project.get('status', 'In Development') }}
</div>
@@ -35,7 +35,7 @@
{% if forked_from %}
<div class="project-detail-meta">
<span>&#x2442; Forked from <a href="/projects/{{ forked_from['slug'] }}">{{ forked_from['title'] }}</a></span>
<span>&#x2442; Forked from <a href="/projects/{{ forked_from['slug'] }}">{{ render_title(forked_from['title']) }}</a></span>
</div>
{% endif %}
@@ -47,7 +47,7 @@
</div>
</div>
<div class="project-detail-desc rendered-content" data-render>{{ project.get('description', '') }}</div>
<div class="project-detail-desc rendered-content">{{ render_content(project.get('description', '')) }}</div>
{% if attachments %}
{% include "_attachment_display.html" %}