Skip to content

Conversation

@lukemelia
Copy link
Contributor

@lukemelia lukemelia commented Jan 30, 2026

Summary

  • Add a POST route for application/octet-stream that accepts binary uploads (images, etc.) and writes them through the existing Realm.write() pipeline
  • Widen write signatures across RealmAdapter, NodeAdapter, TestRealmAdapter, and Realm to accept string | Uint8Array
  • Widen validateWriteSize() to handle Uint8Array directly
  • Add typeof content === 'string' guards in _batchWrite() so JSON parsing and card document detection are skipped for binary content
  • Same size limit (512KB default) and response shape (204, last-modified, x-created) as upsertCardSource

Closes CS-10076

Test plan

  • New binary upload tests: basic upload, file metadata, overwrite, realm events, size limit (413), permissions (401/403/204)
  • Existing card-source endpoint tests pass without regressions

🤖 Generated with Claude Code

@github-actions
Copy link

Preview deployments

@lukemelia lukemelia force-pushed the cs-10076-realm-endpoint-for-writing-a-binary-file branch from 6cc9a9c to c1b01d1 Compare January 30, 2026 05:05
Add a POST route for `application/octet-stream` that accepts binary
uploads (images, etc.) and writes them through the existing
`Realm.write()` pipeline. Widens write signatures across the adapter
interface, node adapter, test adapter, and realm methods to accept
`string | Uint8Array`. Applies the same size limit and response shape
as `upsertCardSource`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia force-pushed the cs-10076-realm-endpoint-for-writing-a-binary-file branch from c1b01d1 to 7961c65 Compare January 30, 2026 05:05
@github-actions
Copy link

github-actions bot commented Jan 30, 2026

Host Test Results

    1 files  ±    0      1 suites  ±0   3h 37m 49s ⏱️ + 1h 54m 19s
1 931 tests +    6  1 908 ✅ ±    0  17 💤 ± 0  0 ❌ ±0  6 🔥 +6 
3 892 runs  +1 952  3 846 ✅ +1 923  34 💤 +17  6 ❌ +6  6 🔥 +6 

For more details on these errors, see this check.

Results for commit 1ca156d. ± Comparison against base commit bc47720.

♻️ This comment has been updated with latest results.

backspace and others added 9 commits February 2, 2026 15:12
* Host mode stack layering and scroll fixes

* test update

* remove unneeded transitions
Cards should not break out of their bounding box, so warn the AI bot
against using `position: fixed` in card styles via the _lint endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use GlimmerElementNode (not GlimmerElement) to match the AST type
  produced by ember-eslint-parser
- Fix prettier formatting in integration test
- Add unit tests for the rule in eslint-plugin-boxel covering valid
  cases (relative, absolute, sticky, no style) and invalid cases
  (with/without space, extra whitespace, multiple occurrences)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The eslint-plugin-boxel package has unit tests that were not being
run in CI. Add a dedicated path filter and test job so regressions
in custom ESLint rule logic are caught.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The fetchRequestFromContext middleware was converting all POST request
bodies to UTF-8 text, corrupting binary data. Now checks Content-Type
for application/octet-stream and preserves raw bytes using a Buffer.
Also relaxes the test helper's file path validation to accept any
file extension, not just .json and .gts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lukemelia lukemelia merged commit 2922fd0 into main Feb 3, 2026
145 of 158 checks passed
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.

6 participants