Skip to content

fix(results): encode download filenames - #587

Open
bm1016bm-svg wants to merge 1 commit into
C4illin:mainfrom
bm1016bm-svg:codex/fix-578-hash-filenames
Open

fix(results): encode download filenames#587
bm1016bm-svg wants to merge 1 commit into
C4illin:mainfrom
bm1016bm-svg:codex/fix-578-hash-filenames

Conversation

@bm1016bm-svg

@bm1016bm-svg bm1016bm-svg commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Encode the output filename as a single URL path segment before rendering preview and download links. This prevents # from starting a fragment and also handles other reserved characters without changing the trusted user/job path segments.

Validation

  • bun test: 100 passed, 8 skipped
  • Added 2 regression tests for reserved characters and Unicode filenames
  • bun run lint:tsc
  • bun run lint:knip
  • bun run build
  • Changed files pass Prettier

Closes #578


Summary by cubic

Encode download filenames as a single URL path segment so preview and download links work with #, spaces, and Unicode. Path segments (e.g., user/job) remain unchanged.

  • Bug Fixes
    • Added buildDownloadUrl helper to encode only the filename.
    • Updated results page to use the helper for preview and download links.
    • Added tests for reserved characters and Unicode filenames.

Written for commit b9495de. Summary will update on new commits.

Review in cubic

@github-actions github-actions Bot added Fix and removed Fix labels Jul 28, 2026

@C4illin C4illin left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix!

@bm1016bm-svg
bm1016bm-svg marked this pull request as ready for review July 29, 2026 05:10

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Hashtag in filename breaks things

2 participants