[Hackathon] feat: Workflow Hub — Community Gallery for Sharing and Forking Workflows#5113
Open
EmilySun621 wants to merge 4 commits into
Open
[Hackathon] feat: Workflow Hub — Community Gallery for Sharing and Forking Workflows#5113EmilySun621 wants to merge 4 commits into
EmilySun621 wants to merge 4 commits into
Conversation
This bundles the feature work that built up on this branch:
- Custom agents: dashboard CRUD page and editor dialog (48px icon tile,
chip-style guardrails, model selector). Each custom agent now carries a
LiteLLM model_name (Opus 4.7 / Haiku 4.5) that is passed through to the
agent-service so different agents can use different models.
- Conversation history is scoped per (workflowId, agentId): switching
agent or workflow yields a different conversation list. localStorage
key: texera.workflowConversations.v1.{workflowId}.{agentId}.
- Time machine: workflow snapshot list, revert, and agent-tagged
checkpoints. New workflow-history-tool in agent-service backs the
"undo my last change" flow; amber gains a WorkflowSnapshotResource;
sql/updates/23.sql adds the snapshot table.
- Operator-aware custom-agent prompts: the system prompt now injects the
full operator catalog with a "prefer built-in operators over Python
UDFs" rule, sourced from WorkflowSystemMetadata at request time.
- LiteLLM: added the claude-opus-4.7 entry alongside claude-haiku-4.5
and gpt-5-mini in bin/litellm-config.yaml.
- Agent panel rewritten around the (conversation list / chat) two-view
model with subscription-managed list reloads and per-step persistence.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a community gallery under /dashboard/hub/workflow-hub where users browse, star, fork, and publish data science workflows. Backed by 15 seed entries and localStorage for stars/forks/views/publishes so the page is never empty. - List page: search, sort (trending/stars/forks/recent), category chips, featured grid, DAG-chain preview cards, agent badges. - Detail page: SVG DAG preview, stats panel, fork-to-my-workflows (uses WorkflowPersistService.duplicateWorkflow when a backend wid is attached, otherwise falls back to a local stub), star toggle, and an optional 'Agent Included' card. - Publish dialog: pulls the user's workflows via the persist service, derives operator chain from workflow content, writes a hub entry to localStorage. - Sidebar: 'Workflow Hub' link added to the Hub submenu.
Seed entries don't have a workflowId, so the previous code only incremented a localStorage counter and navigated to /dashboard/user/workflow without actually writing to the backend — the forked workflow never showed up in the Workflows page. Now the seed path calls WorkflowPersistService.createWorkflow with empty content named "[Fork] <title>", waits for the backend to return the new wid, and routes straight into the new workflow's workspace. The duplicate-workflow path for real-wid entries is unchanged.
The previous fix used createWorkflow with empty content, so forking a seed entry produced a workflow with the right name but zero operators — the "Executions doesn't exist" 403 the user saw was just the workspace trying to load nonexistent executions for an empty workflow. Now seed entries carry a sampleOperators field listing REAL Texera operator types from the running backend's metadata (verified against the 163 operators the deployed build exposes). When the user forks: 1. Wait for OperatorMetadataService to publish the schema list. 2. For each known sampleOperators type, build a proper OperatorPredicate via WorkflowUtilService.getNewOperatorPredicate (which fills in ports, default properties, and the correct operatorVersion). 3. Connect consecutive operators by their first output→input ports. 4. Lay them out in a horizontal chain (200px apart). 5. POST to /workflow/create with the populated WorkflowContent and navigate to the new wid. Any sampleOperators not present in the running build land in a single comment box at the top of the canvas so the user can see what was intended. For real (published) hub entries with a workflowId, the path is still WorkflowPersistService.duplicateWorkflow — unchanged.
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.
Discover, fork, and share data science workflows. A community-powered gallery where researchers publish their workflows and others can learn from, star, and fork them — like GitHub for data science pipelines.
The Problem
A new student joins Dr. Sarah's lab. She needs to build a diabetes prediction pipeline but has no idea where to start. There's no way to discover and reuse other people's workflows in Texera today.
The Solution
Workflow Hub — a browsable, searchable gallery of community workflows. Star your favorites, fork them into your workspace, publish your own.
What's New
Hub List Page (Sidebar → Hub → Workflow Hub)
Workflow Detail Page
Fork — One-Click Reuse
Click Fork → new workflow created as "[Fork] Original Title" → opens in workspace with all operators pre-configured → user adds their own data and runs. Fork creates a real workflow in Texera's backend, not a localStorage copy.
Star — Save Favorites
Toggle star on any workflow. Star count updates instantly. Persists across sessions.
Publish — Share Your Work
Click "Publish Workflow" on the Hub page → select one of your saved workflows → add title, description, category, tags → operators auto-extracted from workflow content → published workflow appears in the Hub for everyone.
15 Seed Workflows — Never Empty
The Hub ships with curated community workflows:
Biomedical: Diabetes Prediction (CRISP-DM), Heart Disease, Breast Cancer, COVID-19 Clinical Trials
NLP: Sentiment Analysis, News Topic Classification
Finance: Credit Card Fraud, Stock Price Regression
CV: MNIST Digits
EDA: Movie Recommendation EDA, Air Quality
Education: UCI Iris Beginner, Titanic Survival, Wine Quality
Tabular: Census Income Prediction
Each seed includes title, author, description, category, tags, operator list, and star/fork/view counts.
Demo Flow
Files Changed
New files:
Modified files (additive only):
Testing