Skip to content

fix: FAQ, llms.txt, JSON-LD and README list every format — pinned to registry - #143

Merged
MrChengLen merged 1 commit into
mainfrom
pr-format-lists
Sep 25, 2026
Merged

MrChengLen merged 1 commit into
mainfrom
pr-format-lists

Conversation

@MrChengLen

Copy link
Copy Markdown
Owner

What

Four places still listed the formats from before HEIF, AVIF, ICO, HTML, EML, FLV, WMV, AAC, WMA and Opus were added. #140 fixed the homepage drop-zone caption, so the FAQ further down the same page contradicted it.

Surface Change
Homepage FAQ "Which file formats can I convert?" (EN + DE) all 34 source formats; DE translated in the same commit
/llms.txt "FileMorph converts …" sentence same list
JSON-LD featureList ("Convert images (…)" etc.) same list
README drop-zone mockup same list, re-wrapped to 6 lines (box width unchanged)
README "Supported Formats" table new "Web & email" row (HTML, EML → PDF); Images output + PDF (image → PDF is registered)

Why static text + a test, not derived from the registry

This follows the pattern #140 set for the drop-zone caption. Deriving the lists at runtime would need: the /formats category map moved out of pages.py (the JSON-LD is built in app/core at import time), a display-casing map (format_label() prints WEBM/MD), alias de-duplication, and a five-placeholder msgid. That's more moving parts than four text edits for a list that changes a few times a year, and the README can't be derived at all.

Guards

tests/test_format_lists_match_registry.py (7 tests) compares each surface with get_public_conversions():

  • FAQ answer on /en/ and /de/, plus a check that /de/ really shows the German answer (a fuzzy catalog entry falls back to English with the right formats)
  • /llms.txt sentence
  • JSON-LD "Convert …" entries
  • README mockup, README table inputs, and each table row's outputs against the union of what that row's inputs convert to

Run before the text edits, all 7 failed and named exactly the missing formats.

test_jsonld_webapplication_has_featurelist used to reject the substring avif anywhere in the feature list. It was written 2026-06-05, before AVIF conversion shipped (7caa75e, 2026-07-15). It now ignores bracketed format lists and still rejects AVIF everywhere else, since AVIF/WebP auto-routing still doesn't ship.

Verification

  • Full suite: 1216 passed, 63 skipped (Windows, isolated TEMP)
  • ruff check + format clean
  • i18n drift-check clean; DE 776/776 translated, no fuzzy
  • pip-audit clean (same ignores as CI)
  • Tailwind bundle unchanged
  • DE/EN leakage check: /de/ shows only the German FAQ answer, /en/ only the English one
  • Reviewed by security-auditor (PASS) and code-reviewer (findings applied; docs/formats.md ICO drift left for a follow-up)

🤖 Generated with Claude Code

…registry

The homepage FAQ answer "Which file formats can I convert?", the /llms.txt
format sentence, the JSON-LD featureList and the README drop-zone mockup
still listed the formats from before HEIF, AVIF, ICO, HTML, EML, FLV, WMV,
AAC, WMA and Opus were added. #140 fixed the drop-zone caption, so the
homepage FAQ contradicted the caption above it. All four now name every
source format of get_public_conversions(), the data /api/v1/formats
serves. The README "Supported Formats" table lacked HTML and EML (now a
"Web & email" row: they only convert to PDF, and in the Documents row they
would have implied EML -> TXT/HTML) and PDF as an image output.

Kept as hand-written text plus a parity test, the pattern #140 set for the
drop-zone caption on the same page. Rejected: deriving the lists from the
registry at runtime. The JSON-LD is built in app/core at import time and
can't import the /formats category map from a route module, so that map
would have to move; format_label() prints WEBM and MD, so a casing map and
alias de-duplication would be needed; the FAQ would become a
five-placeholder msgid. More moving parts than four text edits, for a list
that changes a few times a year — and the README can't be derived at all.

tests/test_format_lists_match_registry.py (7 tests) compares each surface
with the registry: the FAQ in EN and DE, including a check that /de/ shows
the German answer (a fuzzy catalog entry would fall back to the English
text, which lists the right formats); llms.txt; the JSON-LD "Convert ..."
entries; the README mockup; the README table inputs, and each table row's
outputs against the union of what that row's inputs convert to. Run before
the text edits, all 7 failed and named exactly the missing formats.

test_jsonld_webapplication_has_featurelist rejected "avif" anywhere in the
feature list. It was written on 2026-06-05, before AVIF conversion shipped
(7caa75e, 2026-07-15), to block an AVIF auto-routing claim. It now ignores
bracketed format lists and still rejects AVIF everywhere else;
Accept-header auto-routing still doesn't ship. A keyword list was tried
first and dropped in review: it missed rewordings and flagged the real
DOCX two-engine routing. The jsonld.py comment now points at that test
instead of docs/claims-audit.md, which isn't in the public repo.

i18n: extract + update left the DE entry fuzzy with the old list and the
old EN msgid as #~; translated, flag and obsolete entry dropped, compiled.
DE 776/776 translated, no fuzzy.

Reviewed: security-auditor PASS; code-reviewer findings applied.
Full suite 1216 green (63 skipped); ruff + i18n-drift + pip-audit clean;
Tailwind bundle unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MrChengLen
MrChengLen merged commit c6a024f into main Sep 25, 2026
5 checks passed
@MrChengLen
MrChengLen deleted the pr-format-lists branch September 25, 2026 17:49
MrChengLen added a commit that referenced this pull request Sep 25, 2026
…fore upload

Before a file was chosen, the homepage's tool card offered no concrete
operation — just the Convert/Compress toggle and an empty target-format
dropdown — and the PDF tools sat as small text links in a "More tools" box
below the fold. First visible step of surfacing operations earlier:

- The tool card now shows, under the drop zone, an "Or choose directly" label
  with seven chip links — Compress PDF, JPG to PDF, Word to PDF, Split PDF,
  Extract PDF pages, HEIC to JPG, Compress image (KB/MB) — and "All tools →".
  Every chip targets a page that already exists; "(KB/MB)" says file size,
  since pixel resizing isn't built.
- Homepage-only: partials/convert_tool.html also renders /compress and the 12
  /convert/<pair> pages, so a show_quick_actions flag set only by index()
  keeps self-links and a diluted row off them.
- Server-rendered <nav> + list of <a>, no inline JS (CSP), links always in
  the initial HTML (IA invariant G6). The chips are an idle-state shortcut:
  app.js setQuickActionsVisible() hides them once files are chosen and shows
  them again when the selection is cleared — otherwise they pushed the
  Convert button ~345 px down on a phone (found in review).
- Secondary chip styling so Convert stays the card's only brand-filled
  control; 44 px touch targets; label text-gray-400 (6.9:1) and
  brand-light link (5.9:1) for AA contrast; focus ring on every link.
- The "More tools" box is removed (its links live in the chips); the subline
  gains "PDF". Redact is no longer teased on the homepage — footer and /tools
  still link it when enabled, and it never belongs among idle chips (free
  path before paid).
- scripts/i18n.py update passes --ignore-obsolete, so removed msgids are
  dropped instead of piling up as "#~" blocks (none since c8fc734).

Deferred on purpose: category links (PDF · Images · …) until /tools has
matching sections; the toggle, dropdown and Convert button until the
Smart-Drop step replaces them.

Tests: test_homepage_quick_actions.py replaces test_homepage_more_tools.py —
exact link list on /en and /de, localized labels without leakage, absent on
/compress and a pair page, every target answers 200, <main> never links
/redact, app.js hides/shows the row; the heading-outline guards moved to
test_homepage_outline.py (h2 pins 4/5/4). Rebased onto #143 (catalogs
regenerated, 0 fuzzy, 0 obsolete). Browser-checked at 1280 px and 375 px,
including the file-selected state.

Full suite 1230 green (63 skipped); ruff + format + template-class gate +
i18n-drift clean; Tailwind bundle tailwind.86732528.css reproducible.
Reviewed by security-auditor (pass) and code-reviewer (nits applied).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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