Synthetic file rendering fixtures for Fjord clients
  • Python 84.6%
  • Rich Text Format 1.9%
  • C++ 1.1%
  • Ruby 0.9%
  • HTML 0.7%
  • Other 9.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Stephen Way 7545032a95
Add Markdown image and invalid PDF fixtures (#3)
The existing `sample.pdf` renders in PDFKit, so it cannot exercise a failed-PDF fallback. Add an explicitly malformed PDF with a missing page tree and a Markdown page that embeds AVIF, ICO, SVG, two-frame GIF, TIFF, and a missing image with descriptive alt text. Both fixtures are generated and indexed with the rest of the corpus.

Validation: `python3 scripts/generate.py` produced 228 fixtures and `python3 scripts/verify.py` passed. macOS PDFKit returned no document for `malformed.pdf`.
2026-10-05 18:20:53 +00:00
fixtures Add Markdown image and invalid PDF fixtures (#3) 2026-10-05 18:20:53 +00:00
scripts Add Markdown image and invalid PDF fixtures (#3) 2026-10-05 18:20:53 +00:00
.gitattributes Add comprehensive file rendering fixtures 2026-10-04 23:18:50 -07:00
.gitignore Add comprehensive file rendering fixtures 2026-10-04 23:18:50 -07:00
FILE-VIEWER-AUDIT-2026-10-04.md Audit Fjord file viewers with boundary fixtures 2026-10-04 23:34:47 -07:00
FORMAT-INDEX.md Add Markdown image and invalid PDF fixtures (#3) 2026-10-05 18:20:53 +00:00
LICENSE Add comprehensive file rendering fixtures 2026-10-04 23:18:50 -07:00
manifest.json Add Markdown image and invalid PDF fixtures (#3) 2026-10-05 18:20:53 +00:00
README.md Add Markdown image and invalid PDF fixtures (#3) 2026-10-05 18:20:53 +00:00

Kitchen sink

A small, synthetic repository for checking how Fjord clients browse and render repository files. It covers source code, web files, configuration, data, documents, images, audio, video, archives, 3D models, and difficult text and binary cases. The files are fixtures, not a buildable application.

Start with the format index. It links to every fixture. The machine-readable manifest records each path, format, case, size, and SHA-256 digest.

The file viewer audit records the first iOS and Android source, payload, and device decoder results against pinned client commits.

Suggested client pass

  1. Open code/Hello.swift, code/Hello.kt, code/hello.rs, web/Hello.tsx, and config/sample.sql. Check line numbers, syntax color, wrapping, and scrolling.
  2. Open documents/sample.md and switch between rendered and source views where the client offers that control. Check the table, code fence, relative link, and relative image. Open documents/image-embeds.md for AVIF, ICO, SVG, animated GIF, TIFF, and missing-image descriptions in Markdown.
  3. Open images/sample.png, images/sample.heic, images/sample.webp, and images/sample.svg. Use images/animated.gif to check two-frame playback and images/monogram.tiff to check big-endian TIFF decoding.
  4. Open documents/sample.pdf and documents/multipage.pdf to check one-page and 14-page document views. Open documents/malformed.pdf to check inspection after PDF parsing fails. Open documents/sample.xlsx, audio/sample.mp3, video/sample.mp4, and archives/sample.zip to check the fallback. It must not display decoded garbage as source.
  5. Open edge/empty.txt, edge/crlf.txt, edge/invalid-utf8-no-nul.txt, edge/nul-in-text.txt, edge/long-10000-lines.txt, edge/over-512k.txt, and the Unicode filename. Check loading, text handling, size limits, and error states.

Presence in this repository is not a claim that a client supports a specialized preview. Record observed behavior against the exact client build and repository commit. The ordinary source viewer may show plain text where no language-specific highlighting exists.

The fixture names cover all 114 explicit extensions and 11 special filenames in the inspected iOS syntax map and Android syntax map. The maps identify syntax coloring, not end-to-end format support. Recheck them after client changes with:

python3 scripts/check_client_extensions.py \
  --ios-repo ../fjord-ios --ios-ref origin/main \
  --android-repo ../fjord-android --android-ref origin/main

Layout

Directory What it tests
code/ Native, systems, scripting, and shader source; an 8-byte WebAssembly module
web/ JavaScript, TypeScript, components, markup, and styles
config/ Structured configuration, metadata, feeds, and extensionless build files
data/ SQLite, Parquet, Arrow, Avro, CBOR, MessagePack, Protobuf, and other data containers
documents/ Markdown, notebooks, text, PDF, Office, OpenDocument, EPUB, and subtitles
images/ Raster and vector images, including HEIC, AVIF, WebP, and SVG
audio/ and video/ Short, silent media samples in common containers
archives/ ZIP, TAR, and common compression formats
models/ OBJ, STL, glTF, and GLB
edge/ Encoding, line ending, filename, empty, and size boundaries

The code snippets are intentionally short and may need a surrounding project to compile. All data is synthetic. The animated GIF and big-endian TIFF come from Fjord Android device tests, with their source commits listed in scripts/assets/README.md. There are no credentials, customer records, or executable payloads.

Validate and regenerate

The committed files are the fixture corpus. Validation uses only Python 3.12 or newer:

python3 scripts/verify.py

The generator rebuilds fixtures/, manifest.json, and FORMAT-INDEX.md from its source definitions:

python3 scripts/generate.py
python3 scripts/verify.py

Regeneration uses ffmpeg, mkvpropedit, cwebp, avifenc, pandoc, brotli, zstd, and uv. uv downloads pinned Python packages for HEIC, Arrow, Parquet, and Avro generation. The checked-in media and documents do not require those tools to browse or validate. Converter output can differ across tool versions, so review regenerated binary diffs before committing.

Scope

This is broad coverage of modern developer-facing formats and the current Fjord file-viewer paths. There is no finite set of “every” file format. The index makes present formats explicit, and additions should carry a real file plus a manifest entry and validation. The corpus stays small enough to browse on a phone and clone without Git LFS.

All fixtures and generator code in this repository are released under the MIT license.