Skip to content

Add Flow Catalog system with registration, runs, and favorites#285

Merged
Edwardvaneechoud merged 18 commits intomainfrom
claude/flow-tracking-favorites-6QFMW
Feb 2, 2026
Merged

Add Flow Catalog system with registration, runs, and favorites#285
Edwardvaneechoud merged 18 commits intomainfrom
claude/flow-tracking-favorites-6QFMW

Conversation

@Edwardvaneechoud
Copy link
Copy Markdown
Owner

Summary

Implements a complete Flow Catalog system enabling users to register, organize, and track flow executions. Introduces a Unity Catalog-style hierarchical namespace structure (catalog → schema) for organizing flows, persistent run history with versioned snapshots, and social features (favorites/follows).

Key Changes

Backend

  • Database Models (models.py):

    • CatalogNamespace: Two-level hierarchy (catalog/schema) with unique constraint on name+parent
    • FlowRegistration: Persistent flow metadata linked to namespaces
    • FlowRun: Complete execution history with YAML snapshots and node results
    • FlowFavorite & FlowFollow: User engagement tracking with unique constraints
  • API Routes (routes/catalog.py):

    • Namespace CRUD with hierarchy validation (prevents nesting deeper than 2 levels)
    • Flow registration management with namespace association
    • Run history with pagination and detailed snapshots
    • Favorite/follow endpoints with user-specific filtering
    • Dashboard stats endpoint aggregating catalog metrics
  • Run Tracking (routes/routes.py):

    • New _run_and_track() wrapper persists flow executions to database
    • Captures flow snapshots, node results, timing, and success status
    • Links runs to registrations via flow path matching
    • Graceful error handling to prevent run failures from blocking execution

Frontend

  • API Service (catalog.api.ts): Type-safe HTTP client for all catalog endpoints
  • Pinia Store (catalog-store.ts): Centralized state management for tree, flows, runs, favorites, stats
  • TypeScript Types (catalog.types.ts): Complete type definitions matching backend schemas
  • Navigation: Added "Flow Catalog" menu item with folder-tree icon
  • Routing: New /catalog route with lazy-loaded CatalogView component
  • i18n: Added "Flow Catalog" translation key

Notable Implementation Details

  • Unique Constraints: Namespace names must be unique per parent; users can only favorite/follow each flow once
  • Enrichment Pattern: _enrich_flow() helper attaches computed fields (is_favorite, is_following, run_count, last_run_at) to flow objects
  • Snapshot Versioning: Flow YAML and node results stored as JSON/text for historical analysis
  • Backward Compatibility: Run tracking is non-blocking; failures log warnings but don't interrupt flow execution
  • User Context: Current user ID captured during flow runs for audit trail and personalized stats

…d Unity Catalog-style namespaces

Introduces a comprehensive flow management system:

Backend:
- New DB models: CatalogNamespace (catalog/schema hierarchy), FlowRegistration,
  FlowRun (with YAML version snapshots), FlowFavorite, FlowFollow
- New Pydantic schemas in catalog_schema.py for all CRUD operations
- New /catalog router with endpoints for namespaces, flow registration,
  run history, favorites, follows, and stats dashboard
- Run tracking hooked into existing flow/run endpoint - every execution
  now persists a FlowRun record with the flow version snapshot and
  node-level results

Frontend:
- CatalogView with 4 tabs: Catalog tree, Favorites, Following, Run History
- Tree navigation with catalog -> schema -> flow hierarchy
- Flow detail panel showing metadata, run history table, and version links
- Run detail panel with node-level results and flow snapshot viewer
- Stats overview panel with counts and recent activity
- Full Pinia store, typed API client, and TypeScript interfaces
- Sidebar navigation entry and i18n support

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 1, 2026

Deploy Preview for flowfile-wasm canceled.

Name Link
🔨 Latest commit 48952cc
🔍 Latest deploy log https://app.netlify.com/projects/flowfile-wasm/deploys/6980d526fbc69f0007bc6477

The backend now checks os.path.exists() for each registered flow's
file path and returns a file_exists boolean. When a flow file has been
deleted from storage:

- Tree view: flow row is dimmed with an amber warning icon
- List view (favorites/following): shows "File missing" instead of run count
- Detail panel: prominent amber banner explains the file is gone and that
  run history is still accessible

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 1, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.09524% with 55 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
flowfile_core/flowfile_core/routes/catalog.py 82.37% 43 Missing ⚠️
flowfile_core/flowfile_core/routes/routes.py 82.81% 11 Missing ⚠️
flowfile_core/flowfile_core/database/init_db.py 93.75% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

claude and others added 16 commits February 1, 2026 08:28
…and refresh fixes

- Seed default 'General' > 'user_flows' namespace on DB init
- Replace text input with FileBrowser component in flow registration modal
- Auto-assign flows to default namespace when no explicit namespace given
- Add 'Open this version' button in run detail to load snapshot into designer
- Add GET /catalog/default-namespace-id and POST /catalog/runs/{run_id}/open endpoints
- Fix stats/tree not refreshing after namespace create, flow register, and favorite/follow toggle

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
The stats endpoint was counting all CatalogNamespace rows (both catalogs
and schemas), causing double-counting. Now filters by level=0 to count
only catalogs.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
flow_file_handler is exported from flowfile_core, not flowfile_core.flowfile.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
When a flow is created (POST /editor/create_flow/) or imported
(GET /import_flow/), it is now automatically registered in the
General > user_flows namespace if that namespace exists. Duplicate
paths are skipped. Also moved inline imports to module level.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
- FlowDetailPanel: add "Open in Designer" button that imports the flow
  and navigates to the designer view (hidden when file is missing)
- RunDetailPanel: make the flow name a clickable link that navigates
  back to the flow detail in the catalog tab
- CatalogView: wire up openFlowInDesigner and navigateToFlow handlers
- Add test_catalog.py with tests for namespace CRUD, flow registration,
  favorites, follows, runs, stats counting, and default namespace seeding

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
Recent runs in the overview now navigate to the run detail view,
and favorite flows navigate to the flow detail in the catalog tab.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
When selecting a flow via stats panel, run detail, or other navigation,
the tree node containing that flow now auto-expands so the selection
is visible in the sidebar.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
…r tests

- Fix "Follow flows to get notified" text (no notification system exists)
- Remove unused flowId variable in openRunSnapshot
- Add 6 tests for _auto_register_flow covering: happy path, duplicate
  path dedup, None user_id, None flow_path, missing default namespace,
  and filename stem fallback

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
Console logs at key points to trace selection flow:
- navigateToFlow: logs the registrationId
- selectFlow: logs flowId and whether it resolved in allFlows
- setActiveTab: logs tab switch
- CatalogTreeNode watch: logs whether the node contains the selected flow

All prefixed with [Catalog] for easy filtering.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
- CatalogView: log on mount and after initialization with allFlows/tree counts
- CatalogTreeNode: log on flow item click with flow id and name

This ensures [Catalog] logs appear as soon as the catalog page loads,
confirming the logging code is active.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
MenuAccordion's activeIndex was set once on mount via ref(route.name),
so it never updated when navigating programmatically with router.push().
Changed to computed(() => route.name) so the sidebar reactively tracks
the current route.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
Both openFlowInDesigner and openRunSnapshot were ignoring the flow ID
returned by the import API and navigating to the designer without
setting the active flow. The designer then loaded whichever flow was
previously active instead of the newly imported one.

Now both functions call flowStore.setFlowId(flowId) before navigating
so the designer loads the correct flow.

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
- Remove all console.log [Catalog] debug statements from catalog-store,
  CatalogView, and CatalogTreeNode
- Move inline imports (init_db, User, _auto_register_flow) to top of
  test_catalog.py

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
db.query(Model).get(id) is deprecated in SQLAlchemy 2.0. Replaced all
occurrences in catalog.py and test_catalog.py with db.get(Model, id).

https://claude.ai/code/session_01THQ6XyXSppra3my7wt9WQE
@Edwardvaneechoud Edwardvaneechoud merged commit 5f623bc into main Feb 2, 2026
24 checks passed
@Edwardvaneechoud Edwardvaneechoud deleted the claude/flow-tracking-favorites-6QFMW branch February 2, 2026 17:12
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.

3 participants