Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spx-gui/src/apis/sb2xbp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { client } from './common'
import { humanizeFileSize } from '@/utils/utils'

const maxFileSize = 32 * 1024 * 1024 // 32MB
const convertTimeout = 60 * 1000 // 60s
Comment thread
go-wyvern marked this conversation as resolved.
Comment thread
nighca marked this conversation as resolved.

/**
* Convert Scratch project (.sb2/.sb3) to XBuilder project (.xbp) via backend `/scratch-convert` endpoint.
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.

The JSDoc (line 9 in the new file) says the endpoint is /scratch-convert but the actual call uses /util/sb2xbp — these don't match. Pre-existing, but worth fixing while touching this file.

Also, the comment "timeout behavior are consistent with other APIs" is no longer accurate after this change: this call now uses a custom 60-second timeout vs. the shared 10-second default. Suggested update:

 * Uses shared `client` so token and Sentry headers are consistent with other APIs.
 * A custom 60-second timeout is applied because Scratch conversion is significantly slower than typical API calls.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@xgopilot Draft a pull request to go-wyvern:convert-timeout to fix comment here.

Copy link
Copy Markdown
Contributor

@fennoai fennoai Bot Apr 28, 2026

Choose a reason for hiding this comment

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

Summary

Fixed the JSDoc comment in spx-gui/src/apis/sb2xbp.ts:

  1. Corrected endpoint path: /scratch-convert/util/sb2xbp
  2. Updated timeout description to accurately reflect the custom 60-second timeout

Permission Required

Hi @nighca! I've prepared the changes but need permission to push to the fork.

View Details & Solution

Target: go-wyvern/builder (fork)

Push blocked:

remote: Permission to go-wyvern/builder.git denied to fennoai[bot].
fatal: unable to access 'https://github.com/go-wyvern/builder.git/': The requested URL returned error: 403

Recommended Solution: Install GitHub App

  1. Install xgopilot
  2. Select repository: go-wyvern/builder
  3. Click "Install"
  4. Return here and comment

View job run

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The fix is prepared but I couldn't push to go-wyvern/builder — the GitHub App (fennoai[bot]) doesn't have write access to that fork.

@xgopilot Push it to a temporary branch for goplus/builder instead of branch for go-wyvern/builder.

Copy link
Copy Markdown
Contributor

@fennoai fennoai Bot Apr 28, 2026

Choose a reason for hiding this comment

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

Created PR #3092 with the JSDoc fixes for sb2xbp.ts:

  • Corrected endpoint path: /scratch-convert/util/sb2xbp
  • Updated timeout description to reflect the custom 60-second timeout (no longer claims timeout behavior is consistent with other APIs)

@go-wyvern can cherry-pick or copy the change from that PR into the convert-timeout branch.

View job run

Expand All @@ -21,6 +22,6 @@ export async function convertScratchToXbp(file: File, signal?: AbortSignal) {
const form = new FormData()
form.append('file', file, file.name)

const blob = await client.postBinary('/util/sb2xbp', form, { signal })
const blob = await client.postBinary('/util/sb2xbp', form, { signal, timeout: convertTimeout })
return blob as Blob
}