Skip to content

docs(examples): default Pages to the openhop showcase flow#149

Merged
naorsabag merged 3 commits into
masterfrom
feat/pages-default-openhop
May 13, 2026
Merged

docs(examples): default Pages to the openhop showcase flow#149
naorsabag merged 3 commits into
masterfrom
feat/pages-default-openhop

Conversation

@naorsabag
Copy link
Copy Markdown
Owner

@naorsabag naorsabag commented May 13, 2026

Summary

Three small cleanups landing before the 0.3.1 bump (#148) so they ship with that release.

  1. Pages default flow. The self-referential examples/showcase/openhop.yaml is now EXAMPLE_FLOWS[0], which is the entry AppFragment.tsx auto-routes to when a visitor hits https://naorsabag.github.io/openhop/ with no hash.
  2. Rename. meta.title on that flow drops from "OpenHop, visualized in OpenHop" to just openhop. The sidebar entry title matches.
  3. Delete examples/ai-browsing-agent.yaml. The two new node types (ai_agent, browser) are already exercised by showcase/openhop.yaml and showcase/browser-use.yaml; the standalone narrative example was duplicative.

Test plan

  • openhop validate examples/showcase/openhop.yaml → valid
  • npm run build -w @openhop/web builds with the trimmed import list (17 YAMLs in, 1 out)
  • All web tests still pass (4 files / 47 tests)
  • Local docker container restart → GET /api/flows/example-openhop returns {meta: {title: "openhop"}} and example-ai-browsing-agent is gone after re-seed

Recommend merging this before #148 so the 0.3.1 publish picks up the renamed flow + default-landing change in the same release.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Removed the AI browsing agent example workflow
    • Reorganized example flows in the sidebar, making the OpenHop showcase the primary landing flow
  • Documentation

    • Replaced the embedded Mermaid flowchart in the README with a centered link/image to the live Pages playground visualization
  • Tests

    • Updated seeded examples test assertions to reflect the revised example set

- Move the self-referential openhop showcase to first in EXAMPLE_FLOWS
  so it becomes the Pages landing flow (AppFragment auto-routes to
  EXAMPLE_FLOWS[0] when the URL hash is empty).
- Rename the flow's meta.title from "OpenHop, visualized in OpenHop"
  to just "openhop". Sidebar entry title matches.
- Delete examples/ai-browsing-agent.yaml. The two new node types
  (ai_agent, browser) are already documented in showcase/openhop.yaml
  and showcase/browser-use.yaml; the standalone narrative example
  was duplicative.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

Walkthrough

Removes the ai-browsing-agent example workflow, updates the openhop showcase metadata title, reorders/prunes entries in the example flows configuration to make showcase-openhop the default landing flow, updates a server test to reflect the seeded examples, and replaces the README's embedded Mermaid diagram with a linked image to the live playground.

Changes

Example flows curation and docs

Layer / File(s) Summary
Workflow removal
examples/ai-browsing-agent.yaml
Deletes the ai-browsing-agent YAML workflow file.
Showcase metadata change
examples/showcase/openhop.yaml
Changes meta.title from OpenHop, visualized in OpenHop to openhop.
Example flows list and sidebar ordering
packages/web/src/lib/example-flows.ts
Removes the ai-browsing-agent YAML import, promotes showcase-openhop as the first EXAMPLE_FLOWS entry (documented as the Pages default landing flow), and removes the prior duplicate showcase-openhop and ai-browsing-agent showcase entries.
Seed test adjustments
packages/server/src/seed-examples.test.ts
Updates test assertions to expect example-openhop among created flows and removes the expectation for example-ai-browsing-agent; retains counts and checks for empty updated/failed.
Docs: visualization link swap
README.md
Replaces the embedded Mermaid flowchart in "How it works" with a centered image/link pointing to the live Pages playground self-flow.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • naorsabag/openhop#107: Modifies EXAMPLE_FLOWS contents in packages/web/src/lib/example-flows.ts to curate example flows shown in the sidebar.
  • naorsabag/openhop#147: Touches bundled-example seeding and wiring related to ai-browsing-agent and showcase entries (adds vs. this PR removes).
  • naorsabag/openhop#109: Changes EXAMPLE_FLOWS entries and ordering, affecting which flow auto-loads as the default landing page.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: setting the openhop showcase flow as the default Pages landing flow by moving it to the first position in EXAMPLE_FLOWS.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pages-default-openhop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

naorsabag added 2 commits May 13, 2026 17:45
The mermaid block in "How it works" only described the flow in
abstract boxes-and-arrows. Replace it with a PNG of the
self-referential openhop showcase flow rendered in the actual
canvas (sprites + edges, including the new ai_agent and browser
nodes), and link the image to the live Pages playground so readers
can click through and watch it animate.

Pages defaults to this flow now (see #149), so the click-through
URL is the bare https://naorsabag.github.io/openhop/.
The seed test's known-anchors assertion still required
`example-ai-browsing-agent` to be in the seeded set. That file got
deleted in 75bfa5a (now redundant — same node types are exercised
by showcase/openhop.yaml and showcase/browser-use.yaml), so the
test failed in CI.

Swap the anchor for `example-openhop` — that's the new Pages
landing flow, so it's at least as stable a reference.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/server/src/seed-examples.test.ts (1)

22-24: ⚡ Quick win

Add an explicit regression assertion for the removed example ID.

At Line 24 you validate the new anchor; add a negative assertion to lock in removal of the deleted flow and prevent accidental reintroduction.

Suggested diff
     expect(result.created).toContain('example-order-flow')
     expect(result.created).toContain('example-langgraph')
     expect(result.created).toContain('example-openhop')
+    expect(result.created).not.toContain('example-ai-browsing-agent')
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/server/src/seed-examples.test.ts` around lines 22 - 24, Add a
negative regression assertion to the existing assertions that use result.created
so the removed example cannot be reintroduced: after the positive contains
checks (expect(result.created).toContain('example-order-flow') etc.), add an
assertion using expect(result.created).not.toContain('<the-removed-example-id>')
replacing <the-removed-example-id> with the exact ID of the deleted flow;
reference the same result.created array used in the test to locate where to add
this check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/server/src/seed-examples.test.ts`:
- Around line 22-24: Add a negative regression assertion to the existing
assertions that use result.created so the removed example cannot be
reintroduced: after the positive contains checks
(expect(result.created).toContain('example-order-flow') etc.), add an assertion
using expect(result.created).not.toContain('<the-removed-example-id>') replacing
<the-removed-example-id> with the exact ID of the deleted flow; reference the
same result.created array used in the test to locate where to add this check.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e1f3211-6d79-4a39-acc6-5e2f99587f8c

📥 Commits

Reviewing files that changed from the base of the PR and between d67fa14 and 1b0797f.

📒 Files selected for processing (1)
  • packages/server/src/seed-examples.test.ts

@naorsabag naorsabag merged commit efdacc4 into master May 13, 2026
8 checks passed
@naorsabag naorsabag deleted the feat/pages-default-openhop branch May 15, 2026 16:00
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