Skip to content

feat(gateway): serve HTTP byte ranges on media routes - #115667

Merged
steipete merged 4 commits into
mainfrom
steipete/media-http-range
Jul 29, 2026
Merged

steipete merged 4 commits into
mainfrom
steipete/media-http-range

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Media routes only served complete files, so clients could not request byte ranges for seeking, resuming, or bounded partial reads. Full-file responses also lacked a shared limit for media attachment streams.

Part of #115590

Why This Change Was Made

The gateway now parses and serves single HTTP byte ranges consistently across managed image attachments and Control UI assistant media, while rejecting malformed or unsupported ranges and bounding complete responses. Range handling lives in one gateway helper shared by both routes.

User Impact

Clients can seek and resume gateway-hosted media with standard partial-content responses, and full media downloads remain bounded instead of streaming arbitrarily large files.

Evidence

  • node scripts/run-vitest.mjs src/gateway/http-byte-range.test.ts src/gateway/managed-image-attachments.test.ts src/gateway/control-ui-assistant-media.e2e.test.ts
  • Result: 3 test files passed, 63 tests passed across the gateway and E2E Vitest shards.
  • Refs: src/gateway/http-byte-range.ts, src/gateway/managed-image-attachments.ts, src/gateway/control-ui.ts.
  • Includes unrelated main-red repair (lint/format + forbidden import from feat(agents): add code mode model acceptance matrix #115305) per landing policy.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: M maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete steipete self-assigned this Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 06:16
@steipete
steipete force-pushed the steipete/media-http-range branch from 99be0cf to 607d440 Compare July 29, 2026 06:55
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 29, 2026
@steipete
steipete force-pushed the steipete/media-http-range branch from 607d440 to 58b3dfe Compare July 29, 2026 07:38
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling and removed scripts Repository scripts labels Jul 29, 2026
@steipete
steipete force-pushed the steipete/media-http-range branch from eaddce6 to a4a7435 Compare July 29, 2026 07:53
@openclaw-barnacle openclaw-barnacle Bot removed the agents Agent runtime and tooling label Jul 29, 2026
@steipete
steipete merged commit bdebdd0 into main Jul 29, 2026
121 of 123 checks passed
@steipete
steipete deleted the steipete/media-http-range branch July 29, 2026 08:12
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main: (100 commits)
  fix(hooks): kill gog process tree on gmail-watcher shutdown (#112452)
  fix(memory): avoid phantom continuation pages (#115722)
  fix(agents): reject cancelled foreground commands (#115694)
  fix(telegram): prevent false empty replies after message-tool delivery (#115588)
  refactor: unify session cost rollup scans (#115749)
  fix(agents): honor completed semantic command exits (#115737)
  feat(agents): persist last-used session model as the agent default (#115717)
  feat(openai): support GPT-Live over backend WebSocket (#115622)
  fix(ui): unify sidebar thread density (#115646)
  feat(ui): path-based agent and panel URLs on Settings > Agents (#115673)
  feat(gateway): serve HTTP byte ranges on media routes (#115667)
  refactor: consolidate Teams and Zoom meeting plugin shells (#115707)
  fix(browser): release unread CDP response streams (#115675)
  feat(ui): move settings save feedback into the sidebar footer (#115679)
  fix(plugins): enforce hook security invariants (#115701)
  refactor: deduplicate extension normalization primitives (#115650)
  feat(gateway): add least-privilege voice-node pairing (#115712)
  fix(ui): restore in-flight assistant replies after reconnect (#115691)
  fix(whatsapp): infer native media from filenames (#115725)
  fix(system-agent): avoid TUI startup catalog preparation (#113136)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
* feat(gateway): support HTTP media ranges

* fix(gateway): bound full media streams

* fix(gateway): normalize byte range captures

* fix(gateway): keep byte range helpers internal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant