fix(web): example flows in sidebar + carrot-click highlight for string data#108
Conversation
Two related fixes for the Pages deploy.
1. Sidebar instead of empty-state cards
The local app shows flows in a left sidebar. Pages had no sidebar at
all and the previous attempt put example cards on the empty-state
pane. Reuse the existing Sidebar component with EXAMPLE_FLOWS
adapted to FlowListItem[]; selected example is computed from the
current hash. FLOWS bookmark tab toggles the sidebar exactly like
the local app does.
2. Carrot click no longer highlights string-data steps
emitPixelClick was synthesizing `{ label: step.data }` when data
was a string, but the inspector matches by reference equality
(`d === focus.data`). The synthesized wrapper never matched the
wrapper normalizeData() builds on the inspector side. Pass
undefined for string-data steps so the highlight falls back to
from/to-only matching, which is exactly right when there's only
one block per section.
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 (3)
WalkthroughFragment mode now includes a user-toggleable sidebar displaying curated example flows organized by folder path. Selecting an example updates the URL hash, triggering the existing decode pipeline. The empty-state UI removes inline examples, directing users to the sidebar. DataPixel click behavior is refined to pass undefined for string data, allowing inspector highlight to use from/to-only matching. ChangesExample Sidebar & Inspector Feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…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>
…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>
What changed
1. FLOWS sidebar on Pages
Pages had no sidebar — the previous PR (#107) put example cards on the empty state. You asked for the same sidebar UX the local app has. Reuses the existing `Sidebar` component, fed with `EXAMPLE_FLOWS` adapted to `FlowListItem[]` (with the YAML's `meta.path` so the directory tree groups examples the same way the local app would group server-side flows). FLOWS bookmark tab toggles the sidebar exactly like the local app.
Clicking a sidebar entry swaps `location.hash` to that example's encoded YAML, and the existing decode pipeline takes over — so reload, back/forward, and share-URL paste all keep working.
2. Carrot click highlight for string-data steps
`emitPixelClick` was synthesizing `{ label: step.data }` as `focus.data` whenever `step.data` was a string. The inspector matches by reference equality (`d === focus.data`), and the synthesized wrapper never matched the wrapper `normalizeData()` builds on the inspector side — so the highlight silently failed.
Pass `undefined` for string-data steps. The highlight then falls back to from/to-only matching, which is exactly right when there's only one block per section.
This was a latent bug on the local app too — just less visible because most curated flows mix object data. The simple-crud example I shipped in #107 is all-string, which is what surfaced it.
Note on the previous PR
`2c14b09` was accidentally pushed to the already-merged `feat/pages-example-flows` branch. This PR cherry-picks it onto a fresh branch off current master.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes