Skip to content

fix(pdf): colour the Mostly true and Inaccurate verdict icons - #16

Merged
maxbolgarin merged 1 commit into
mainfrom
fix/pdf-verdict-icon-colours
Oct 10, 2026
Merged

maxbolgarin merged 1 commit into
mainfrom
fix/pdf-verdict-icon-colours

Conversation

@maxbolgarin

Copy link
Copy Markdown
Owner

Summary

The fact-check preset now has two more verdicts, ☑️ Mostly true and 🔸 Inaccurate, but the PDF renderer's tone map (_EMOJI_TONE in unread/bot/_pdf_worker.py) still listed only the original five. Both new icons were wrapped in the emoji span with no colour class, so in PDF reports Symbola drew them as grey outlines (☑, ◇) next to the coloured ✅ ⚠ ❓.

  • Added emoji-mostly (lighter green) for ☑ and emoji-minor (amber, between True and Misleading) for 🔸, with matching rules in _PDF_CSS.
  • Added a test that reads the verdict icons straight from presets/{en,ru}/factcheck.md, so a new verdict can't be left out of the map again.

Related issue

n/a

Test plan

  • uv run pytest -q tests/test_pdf_fonts.py tests/test_factcheck_preset.py (49 passed)
  • The new tests fail with the old _pdf_worker.py (3 failures) and pass with the fix
  • uv run ruff check / ruff format --check on the changed files

Checklist

  • PR title uses a Conventional Commits prefix
  • Added or updated tests for the change
  • No new network calls inside tests

🤖 Generated with Claude Code

https://claude.ai/code/session_015RDD6r1JBR7wJRSEwWDpH2


Generated by Claude Code

The fact-check preset grew two verdicts, ☑️ Mostly true and 🔸 Inaccurate,
but the PDF tone map still knew only the original five. Both icons were
wrapped in the emoji span without a colour class, so Symbola drew them
as grey hairline outlines next to the coloured ✅ ⚠ ❓.

Give them their own colours (a lighter green, an amber between True and
Misleading), and add a test that reads the verdict icons straight from
presets/{en,ru}/factcheck.md so a new verdict can't miss the map again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015RDD6r1JBR7wJRSEwWDpH2
@maxbolgarin
maxbolgarin merged commit c555e98 into main Oct 10, 2026
8 checks passed
@maxbolgarin
maxbolgarin deleted the fix/pdf-verdict-icon-colours branch October 10, 2026 17:24
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants