Skip to content

分享页有卡片时输出 X 大图 Open Graph 标签 - #257

Merged
zj1123581321 merged 2 commits into
mainfrom
card/vta-261016-og-meta2
Oct 16, 2026
Merged

zj1123581321 merged 2 commits into
mainfrom
card/vta-261016-og-meta2

Conversation

@zj1123581321

Copy link
Copy Markdown
Collaborator

Summary

  • 转录结果页 /view/{view_token} 在任务缓存有合规 llm_share_card.json 时输出 twitter:card=summary_large_image、og:image(带 ?v=<mtime_ns>)、宽高与 twitter:image:alt,并把 og:description 换成第一条要点。
  • 无卡 / json 不合契约 / 缓存目录缺失时不输出任何新标签,og:description 保持原文案;base.html 新 block 默认为空,processing / error / cleaned / ?page= 导出页不受影响。
  • 新增 tests/og_card/test_view_meta.py(TestClient + BeautifulSoup)覆盖有卡、无卡、转义、mtime 与导出页。

Test plan

  • uv run --frozen pytest -q tests/og_card(58 passed)
  • TMPDIR=/tmp/vta-og-meta-suite make test(全量绿)
  • 最小注入红验:无卡仍输出标签、headline |safe 拆属性,均为 AssertionError 后已还原

Made with Cursor

zj1123581321 and others added 2 commits October 16, 2026 13:11
无卡时 head 与现状一致,不输出 twitter:card / og:image。

Co-authored-by: Cursor <cursoragent@cursor.com>
Agent-Executor: cursor
Agent-Model: cursor-grok-4.6-high
Agent-Effort: unknown
Dispatch-Id: dlg-20261016-050109-9e5512
Task-Id: VideoTranscriptAPI-20261016-06
Co-authored-by: Cursor <cursoragent@cursor.com>
Agent-Executor: cursor
Agent-Model: cursor-grok-4.6-high
Agent-Effort: unknown
Dispatch-Id: dlg-20261016-050109-9e5512
Task-Id: VideoTranscriptAPI-20261016-06
@zj1123581321
zj1123581321 marked this pull request as ready for review October 16, 2026 05:27
@github-actions

Copy link
Copy Markdown

Required Gate v2 — 状态面板

当前状态:pass · 可合并

当前裁决:code_pass / primary_pass

PR 累计主审轮(影子):1/5 · collecting

历史可能不完整:1 个制品处理失败:URLError;1 个历史重建预算耗尽

Gate 历史(v1;来源为持久化 gate_terminal 制品)

Run Attempt Head 状态 PR 累计主审轮(影子) 收件人动作
38855066327 1 210d6ba skipped — 无需动作(主审未跑,绿≠过审)
38855883963 1 210d6ba pass 1/5 · collecting 可合并

历史行按 run_id + run_attempt 去重并只增不删;删除本评论后可由 gate_terminal 制品重建。

@zj1123581321
zj1123581321 merged commit 838c8b6 into main Oct 16, 2026
26 of 27 checks passed
@zj1123581321
zj1123581321 deleted the card/vta-261016-og-meta2 branch October 16, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant