Skip to content

Add ImageDef with PngDef, JpgDef, SvgDef, GifDef, and WebpDef#3939

Open
lukemelia wants to merge 19 commits intomainfrom
cs-9912-implement-pngimagedef
Open

Add ImageDef with PngDef, JpgDef, SvgDef, GifDef, and WebpDef#3939
lukemelia wants to merge 19 commits intomainfrom
cs-9912-implement-pngimagedef

Conversation

@lukemelia
Copy link
Contributor

@lukemelia lukemelia commented Feb 2, 2026

Summary

  • Introduce ImageDef (extends FileDef) with four format components: isolated, embedded, atom, and fitted
  • Add PngDef — PNG dimension extraction via png-meta-extractor
  • Add JpgDef — JPEG dimension extraction via jpg-meta-extractor (scans SOF markers)
  • Add SvgDef — SVG dimension extraction via svg-meta-extractor (explicit attrs + viewBox fallback)
  • Add GifDef — GIF dimension extraction via gif-meta-extractor (GIF87a/GIF89a)
  • Add WebpDef — WebP dimension extraction via webp-meta-extractor (VP8, VP8L, VP8X)
  • Register .png, .jpg, .jpeg, .svg, .gif, and .webp extensions in FILEDEF_CODE_REF_BY_EXTENSION
  • Includes acceptance tests for all formats covering extraction, rendering, indexing, and fallback handling

Test plan

  • Run png-image-def acceptance tests
  • Run jpg-image-def acceptance tests
  • Run svg-image-def acceptance tests (including viewBox-only)
  • Run gif-image-def acceptance tests
  • Run webp-image-def acceptance tests

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Preview deployments

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

Host Test Results

    1 files  ± 0      1 suites  ±0   1h 44m 53s ⏱️ -45s
1 970 tests +33  1 948 ✅ +28  17 💤 ±0  0 ❌ ±0  5 🔥 +5 
1 985 runs  +33  1 958 ✅ +23  17 💤 ±0  5 ❌ +5  5 🔥 +5 

For more details on these errors, see this check.

Results for commit 6a5cf8a. ± Comparison against base commit 00abc16.

♻️ This comment has been updated with latest results.

lukemelia and others added 3 commits February 3, 2026 11:07
Introduce ImageDef (extends FileDef) with isolated, embedded, atom, and
fitted format components, and PngDef (extends ImageDef) with PNG dimension
extraction. The atom format shows a small thumbnail with the file name,
embedded renders the image at container width with natural height, and
fitted uses a CSS background-image to cover available space. Includes
a PNG metadata extractor and acceptance tests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The check at line 277 was unreachable since Uint8Array is already
handled at line 258 in the if-else chain.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia force-pushed the cs-9912-implement-pngimagedef branch from e93d5eb to 24cf925 Compare February 3, 2026 16:08
lukemelia and others added 13 commits February 3, 2026 11:42
Tests were using string content for .png files which caused the PNG
extractor to fail and fall back to ImageDef. Updated tests to use
actual PNG binary data so PngDef extraction succeeds.

- Add makeMinimalPng helper to test helpers
- Update card-basics-test to use valid PNG bytes
- Update card-endpoints-test to use valid PNG bytes and expect PngDef

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…s errors

When the server fails a cross-realm query (e.g. remote realm unreachable),
it returns error metadata in the relationship. Previously the client treated
the empty seed data as authoritative and showed no results. Now the client
detects queryErrors in the seed, skips caching the previousQueryString, and
triggers a live client-side search as a fallback.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The FileDef render tests were using .png files, but with the new PngDef
implementation, PNG files are indexed as PngDef/ImageDef which renders
a background image instead of showing the filename as text. Changed to
.txt files so the tests properly verify FileDef's text-based rendering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add invite user to room command

* add missing inviteUserToRoom method in matrixService

* add missing input to command

* fix lint
Adds .mcp.json with MCP server entries for Linear and Chrome DevTools.

To authenticate to Linear, run "/mcp" in Claude Code. This will open a
browser-based OAuth flow to connect your Linear account. Once
authenticated, Claude Code can interact with Linear issues, projects,
and other resources via the MCP protocol.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia changed the title Add ImageDef/PngDef with format components and PNG metadata extraction Add ImageDef/PngDef/JpgDef with format components and image metadata extraction Feb 4, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia changed the title Add ImageDef/PngDef/JpgDef with format components and image metadata extraction Add ImageDef/PngDef/JpgDef/SvgDef with format components and image metadata extraction Feb 4, 2026
lukemelia and others added 2 commits February 4, 2026 15:40
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia changed the title Add ImageDef/PngDef/JpgDef/SvgDef with format components and image metadata extraction Add ImageDef with PngDef, JpgDef, SvgDef, GifDef, and WebpDef Feb 4, 2026
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.

4 participants