fix(canvas): normalize legacy attachment content URLs #1845

Merged
hongming merged 1 commits from fix/legacy-content-attachment-uri into main 2026-05-25 13:19:22 +00:00
Owner

What

  • Rewrite legacy /workspaces/<ws>/content/<file>/content attachment URIs to the current /pending-uploads/<file>/content endpoint.
  • Treat those legacy URIs as platform attachments so preview/download fetches include auth headers instead of the browser loading a raw 404 image URL.

Why

External/poll-mode attachment messages can still contain the older content URL shape. The live canvas currently treats that as a non-platform image URL, causing the browser to request a route that no longer exists.

Verification

  • npm test -- --run src/components/tabs/chat/__tests__/uploads.test.ts
  • git diff --check
## What - Rewrite legacy `/workspaces/<ws>/content/<file>/content` attachment URIs to the current `/pending-uploads/<file>/content` endpoint. - Treat those legacy URIs as platform attachments so preview/download fetches include auth headers instead of the browser loading a raw 404 image URL. ## Why External/poll-mode attachment messages can still contain the older content URL shape. The live canvas currently treats that as a non-platform image URL, causing the browser to request a route that no longer exists. ## Verification - `npm test -- --run src/components/tabs/chat/__tests__/uploads.test.ts` - `git diff --check`
hongming added 1 commit 2026-05-25 13:10:18 +00:00
fix(canvas): normalize legacy attachment content URLs
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 8s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 11s
CI / Python Lint & Test (pull_request) Successful in 11s
CI / Detect changes (pull_request) Successful in 15s
E2E Chat / detect-changes (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 13s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 7s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 10s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Harness Replays / detect-changes (pull_request) Successful in 7s
Lint no tenant GITEA or GITHUB token write / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
gate-check-v3 / gate-check (pull_request) Successful in 7s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 7s
sop-checklist / review-refire (pull_request) Has been skipped
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request) Successful in 10s
sop-tier-check / tier-check (pull_request) Successful in 5s
CI / Platform (Go) (pull_request) Successful in 3s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 8s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 9s
E2E Chat / E2E Chat (pull_request) Successful in 9s
Harness Replays / Harness Replays (pull_request) Successful in 16s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 16s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m5s
security-review / approved (pull_request) Refired via /security-recheck by claude-ceo-assistant
qa-review / approved (pull_request) Refired via /qa-recheck by claude-ceo-assistant
CI / Canvas (Next.js) (pull_request) Successful in 4m48s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 8m0s
audit-force-merge / audit (pull_request) Successful in 6s
850a3c58d4
core-qa approved these changes 2026-05-25 13:16:24 +00:00
core-qa left a comment
Member

[core-qa-agent] APPROVED

Reviewed regression coverage and local verification. Canvas now treats the legacy /workspaces//content//content shape as a platform attachment and rewrites it to the current pending-upload endpoint; malformed legacy paths remain raw. No QA findings.

[core-qa-agent] APPROVED Reviewed regression coverage and local verification. Canvas now treats the legacy /workspaces/<ws>/content/<file>/content shape as a platform attachment and rewrites it to the current pending-upload endpoint; malformed legacy paths remain raw. No QA findings.
core-security approved these changes 2026-05-25 13:16:54 +00:00
core-security left a comment
Member

[core-security-agent] APPROVED

Reviewed auth boundary: the new resolver only recognizes relative legacy platform content URLs and keeps third-party HTTP(S) URLs on the unauthenticated external path. Platform bytes still fetch through the existing auth-header flow. No security findings.

[core-security-agent] APPROVED Reviewed auth boundary: the new resolver only recognizes relative legacy platform content URLs and keeps third-party HTTP(S) URLs on the unauthenticated external path. Platform bytes still fetch through the existing auth-header flow. No security findings.
Author
Owner

/qa-recheck

/qa-recheck
Author
Owner

/security-recheck

/security-recheck
hongming merged commit 02368d8278 into main 2026-05-25 13:19:22 +00:00
hongming deleted branch fix/legacy-content-attachment-uri 2026-05-25 13:19:23 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#1845