Skip to content

fix(frontend): normalize Windows path separators in generate.py - #4580

Closed
Chelizzzzz wants to merge 1 commit into
hatchet-dev:mainfrom
Chelizzzzz:fix/generate-py-windows-paths
Closed

fix(frontend): normalize Windows path separators in generate.py#4580
Chelizzzzz wants to merge 1 commit into
hatchet-dev:mainfrom
Chelizzzzz:fix/generate-py-windows-paths

Conversation

@Chelizzzzz

Copy link
Copy Markdown

Summary

generate.py builds the docs/snippet trees consumed by the Hatchet dashboard. It strips pages_dir and splits glob results on /, but on Windows glob/os.path.join return backslash paths, so the prefix is never stripped. docsPages then nests under garbage keys like {"..":{"..":{"frontend\docs\pages\":{...}}}}, and the dashboard reads docsPages.v1.quickstart -> undefined -> TypeError, making every sidebar link throw "Something went wrong".

Normalizing path separators to / before computing the keys fixes Windows while staying a no-op on Linux/macOS.

Test plan

  • Windows: python frontend/snippets/generate.py -> docsPages top-level contains v1, cookbooks, self-hosting, ...
  • Linux/macOS: generated docs/index.ts is unchanged (no-op)

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

@Chelizzzzz is attempting to deploy a commit to the Hatchet Team on Vercel.

A member of the Team first needs to authorize it.

@mrkaye97

Copy link
Copy Markdown
Contributor

Hi @Chelizzzzz, I'm going to close this. I'd recommend using WSL instead, as we also don't officially support running workers on Windows (at least Python workers)

@mrkaye97 mrkaye97 closed this Jul 31, 2026
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.

2 participants