Skip to content

fix(sdk): percent-encode non-ASCII directory in the v1 client header - #829

Merged
Ishaan Gangwani (ishaan1124) merged 3 commits into
synthetic-sciences:mainfrom
deadczarvc:fix/sdk-non-ascii-directory-header
Sep 29, 2026
Merged

Ishaan Gangwani (ishaan1124) merged 3 commits into
synthetic-sciences:mainfrom
deadczarvc:fix/sdk-non-ascii-directory-header

Conversation

@deadczarvc

Copy link
Copy Markdown

Fixes #828

The v1 createOpenScienceClient set x-openscience-directory to the raw path. A non-ASCII directory (e.g. a Cyrillic Windows user name) then threw in Headers.set, and plugin state never initialised for that directory. This applies the same encoding the v2 client already uses. The server already decodes it in project-selection.ts.

Verified

  • New cases in test/client-headers.test.ts fail on main with the exact TypeError from the issue and pass with this change: cd tooling/sdk/js && bun test ./test/client-headers.test.ts gives 4 pass.
  • Prettier is clean.
  • The two test/server.test.ts failures I see on Windows also fail on main without this change.

@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

Mikhail R. Nemerov (@deadczarvc) is attempting to deploy a commit to the InkVell Team on Vercel.

A member of the Team first needs to authorize it.

@ishaan1124
Ishaan Gangwani (ishaan1124) merged commit 01f5651 into synthetic-sciences:main Sep 29, 2026
1 check failed
@deadczarvc
Mikhail R. Nemerov (deadczarvc) deleted the fix/sdk-non-ascii-directory-header branch September 29, 2026 15:37
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.

Desktop fails to start when the user profile path contains non-ASCII characters (x-openscience-directory header)

2 participants