Skip to content

feat: bundled Piskel web editor (serve) and English-first documentation#3

Merged
Ne9roni merged 4 commits into
masterfrom
feat/serve-bundled-editor-and-docs
Apr 19, 2026
Merged

feat: bundled Piskel web editor (serve) and English-first documentation#3
Ne9roni merged 4 commits into
masterfrom
feat/serve-bundled-editor-and-docs

Conversation

@Ne9roni
Copy link
Copy Markdown
Owner

@Ne9roni Ne9roni commented Apr 19, 2026

Summary

  • Add piskel-cli serve: local HTTP server for the bundled Piskel production build under vendor/piskel-prod, optional open in browser, session URL for loading a .piskel file.
  • Ship sync-piskel-vendor / assert-vendor so publishes include static assets; browser open fallbacks when xdg-open is missing (WSL/Linux).
  • Documentation: docs/commands.md as the primary English command reference; docs/commands.zh-CN.md; README.zh-CN.md; npm files includes docs/.
  • Skill SKILL.md: references package-local paths (node_modules/@ne9roni/piskel-cli/...) for offline use.

Test plan

  • npm run build && npm test
  • Manual: node dist/src/cli.js serve and open editor

Made with Cursor


Note

Medium Risk
Adds a new long-running local HTTP server path (serve) and ships large static vendor assets in the npm package, which could introduce packaging/runtime issues and platform-specific browser-launch edge cases.

Overview
Adds a new piskel-cli serve command that hosts the bundled Piskel production build over a local HTTP server, optionally opens a .piskel via a one-time tokenized __/__piskel/open/<token> URL, supports --host/--port/--no-open/--json, and returns VENDOR_MISSING when the editor assets are absent.

Updates publishing/packaging to include vendor/piskel-prod and adds sync-piskel-vendor + assert-vendor scripts (enforced in prepublishOnly) to ensure the npm package always ships a working serve.

Reworks documentation to be English-first (docs/commands.md) with new Chinese counterparts (README.zh-CN.md, docs/commands.zh-CN.md) and updates the AI skill docs to reference offline, package-local command references.

Reviewed by Cursor Bugbot for commit 0fdf571. Bugbot is set up for automated code reviews on this repo. Configure here.

Ne9roni added 2 commits April 19, 2026 23:52
Add piskel-cli serve to serve vendor/piskel-prod over HTTP and open a
browser, with optional project load via a session URL and ?load= bridge
injected into index.html.

Include sync-piskel-vendor and assert-vendor scripts so maintainers can
refresh upstream builds and npm publish fails if the static bundle is
missing. Document usage in README and ship vendor/piskel-prod in-repo
for clone and npm pack consumers.

Handle missing xdg-open on Linux/WSL by trying wslview, gio, and
sensible-browser before printing a manual-open hint.

Made-with: Cursor
…pm paths

- Make docs/commands.md the primary English reference; add docs/commands.zh-CN.md.
- Add README.zh-CN.md and cross-links from README.md; extend package files for docs.
- Rewrite reference-plan-format.md in English; keep skill workflow in SKILL.md.
- Point SKILL.md at offline paths under @ne9roni/piskel-cli (node_modules / npm root -g)
  for docs/commands.md and plan format, instead of relative repo or CDN URLs.

Made-with: Cursor
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0fdf571. Configure here.

Comment thread src/cli/serve-editor.ts Outdated
Ne9roni added 2 commits April 20, 2026 00:10
npm pkg fix: use dist/src/cli.js without leading ./ so publish does not strip the bin entry.

Made-with: Cursor
decodeURIComponent on url.pathname can throw URIError for invalid
sequences (e.g. /%ZZ). Return 400 instead of crashing the request
handler. Add tryDecodeUriPathname helper and unit tests.

Made-with: Cursor
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 19, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@Ne9roni Ne9roni merged commit f77fa57 into master Apr 19, 2026
1 check passed
@Ne9roni Ne9roni deleted the feat/serve-bundled-editor-and-docs branch April 19, 2026 16:25
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.

1 participant