feat(web): example flows on Pages empty state#107
Merged
Conversation
Sprite paths in node-sprites.ts and DataPixel.tsx were root-absolute (`/sprites/foo.svg`). At dev (`localhost:8788/`) they resolved fine, but on the Pages deploy under `/openhop/` they 404'd because the browser resolved `/sprites/...` against the site root, not the project base. Prepend `import.meta.env.BASE_URL` (which is `/` in dev and `/openhop/` on Pages) so the path concatenates correctly in both environments. Vite already auto-rewrites asset paths in HTML/CSS; this only affects TS string literals which Vite doesn't introspect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously the elif checked WEB_PUBLISHED before SERVER_PUBLISHED: cli → v$CLI_VERSION web (±) → web/v$WEB_VERSION server → server/v$SERVER_VERSION A combined server+web run (no CLI bump) would tag `web/v$WEB` even though server also shipped — the tag misrepresented the release. Swap the order so server takes precedence over web: cli → v$CLI_VERSION server → server/v$SERVER_VERSION (covers server-only + server+web) web only → web/v$WEB_VERSION Server is the lowest-level package (CLI depends on it), so when more than one bumped together server is the natural anchor. The release body still lists every package that shipped, so users see the full picture regardless of the tag name. (Caught by CodeRabbit on #106.) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Visiting https://naorsabag.github.io/openhop/ without a flow fragment showed only "No flow shared" with a hint to use the share URL or "+ New flow". First-time visitors had no in-page way to see what a real flow looks like. Add a curated list of three example flows — Simple CRUD, OAuth2 Login, and Order Processing — sourced via Vite `?raw` imports of the existing `examples/*.yaml` files (single source of truth, no duplication). Clicking a card sets `location.hash` to the encoded YAML, which feeds the existing decode pipeline so the flow loads exactly the way a share URL would. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
WalkthroughThis PR fixes asset loading on GitHub Pages deployments by making sprite URLs base-path aware, adds pre-built example flows to the empty-state UI, updates TypeScript types for YAML imports, and adjusts release tag selection logic to prioritize server publishes over web-only publishes. ChangesWeb Frontend — GitHub Pages Deployment
Release Tagging Logic
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
4 tasks
This was referenced May 10, 2026
naorsabag
added a commit
that referenced
this pull request
May 10, 2026
…test - @openhop/server: 0.1.0-beta.2 → 0.1.0 - @openhop/web: 0.1.0-beta.4 → 0.1.0 - openhop CLI: 0.1.0-beta.6 → 0.1.0 + bump pinned @openhop/server, @openhop/web deps + hardcoded --version publish.yml: drop `--tag beta` from all three publish steps. With no --tag, `npm publish` sets the `latest` dist-tag — so npmjs.com pages and `npm install <pkg>` (no @beta suffix) automatically reflect the new version on every successful publish. No more manual `npm dist-tag add latest` step. Bundles 13 PRs since v0.1.0-beta.6: Web (heavy): - #106 sprite URLs use Vite BASE_URL (Pages 404 fix) - #107 example flow cards on empty state - #108 sidebar + carrot-click highlight for string-data steps - #109 all 5 examples grouped under examples/ + first-visit autoload - #112 per-step auto-zoom + playback speed button - #113 collapse FLOWS / INSPECT by default on mobile - #114 lazy editor + vendor-split chunks + meta description - #115 filter codemirror from <modulepreload> - #117 memo FlowNode + GPU-layer sprites for smoother pan/zoom CLI: - #116 OpenSkills fallback hint when no Tier-1 client gets the skill - #118 suppress the hint when Tier-1 already has the skill Server: untouched code; bumped to keep the 0.1.0 set consistent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
naorsabag
added a commit
that referenced
this pull request
May 11, 2026
…test (#119) - @openhop/server: 0.1.0-beta.2 → 0.1.0 - @openhop/web: 0.1.0-beta.4 → 0.1.0 - openhop CLI: 0.1.0-beta.6 → 0.1.0 + bump pinned @openhop/server, @openhop/web deps + hardcoded --version publish.yml: drop `--tag beta` from all three publish steps. With no --tag, `npm publish` sets the `latest` dist-tag — so npmjs.com pages and `npm install <pkg>` (no @beta suffix) automatically reflect the new version on every successful publish. No more manual `npm dist-tag add latest` step. Bundles 13 PRs since v0.1.0-beta.6: Web (heavy): - #106 sprite URLs use Vite BASE_URL (Pages 404 fix) - #107 example flow cards on empty state - #108 sidebar + carrot-click highlight for string-data steps - #109 all 5 examples grouped under examples/ + first-visit autoload - #112 per-step auto-zoom + playback speed button - #113 collapse FLOWS / INSPECT by default on mobile - #114 lazy editor + vendor-split chunks + meta description - #115 filter codemirror from <modulepreload> - #117 memo FlowNode + GPU-layer sprites for smoother pan/zoom CLI: - #116 OpenSkills fallback hint when no Tier-1 client gets the skill - #118 suppress the hint when Tier-1 already has the skill Server: untouched code; bumped to keep the 0.1.0 set consistent. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default flows
Visiting https://naorsabag.github.io/openhop/ without a flow fragment showed only "No flow shared" plus a hint to use the share URL or "+ New flow". First-time visitors had no in-page way to see what a real flow looks like.
Adds a curated list of three example flows on the empty state:
Each card sets `location.hash` to the encoded YAML, which feeds the existing decode pipeline so the flow loads exactly like a share URL would.
The YAML strings come from the existing `examples/*.yaml` files via Vite `?raw` imports — single source of truth, no duplication, ~6 KB total in the bundle.
Carrot click
The other thing you mentioned ("click on carrot doesn't work on the site") — I think this was downstream of the missing-sprite bug fixed in #106. Before that fix, the carrot SVG was 404'ing on Pages so there was nothing visible to click. The hitbox should still have been there, but browsers can be flaky about pointer events on broken images. After the #106 deploy, please retry — if clicks still don't fire, I'll dig in with concrete repro steps.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes