feat(workflow): browse database steps by model (catalog drill-down)#2616
Open
simlarsen wants to merge 1 commit into
Open
feat(workflow): browse database steps by model (catalog drill-down)#2616simlarsen wants to merge 1 commit into
simlarsen wants to merge 1 commit into
Conversation
…ge list Every database model that enables workflows adds ~11 near-identical components (Find/Create/Update/Delete + On-Create/Update/Delete). With hundreds of models the component picker becomes an enormous flat list. This adds a "Work with database records" mode: pick a model, then pick the operation. - Pure groupComponentsByModel(components, type) groups the REAL catalog components by their tableName (sorted by model name), and filterModelGroups searches them. No id is reconstructed or morphed — the picker hands back the exact component object the engine already knows, so there's zero fidelity risk (unlike a block-morph collapse). - DatabaseStepPicker is the model → operation drill-down (searchable model grid, back navigation, operation cards). - ComponentsModal gets a "Work with database records" toggle (shown only when model-backed components exist for the current type); selecting an operation flows into the existing "Add to Workflow" selection, so nothing else in the picker changes. Tests: groupComponentsByModel / filterModelGroups (grouping, sort, static exclusion, trigger vs component, search) + DatabaseStepPicker RTL (lists models, drills in, selects an operation, goes back). 114 workflow tests pass; tsc + eslint clean. Note worth a quick manual smoke-test: the toggle lives inside the existing ComponentsModal (a SideOver), which isn't exercised end-to-end in jsdom; the drill-down component and grouping are unit/RTL-tested in isolation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Tames the catalog for good — a model → operation drill-down for database steps. The verifiable, zero-morph version of the "block collapse". Stacked on #2615.
What
Every database model that enables workflows adds ~11 near-identical components (Find/Create/Update/Delete + On-Create/Update/Delete). With hundreds of models the picker is an enormous flat list. This adds a "Work with database records" mode: pick a model, then pick the operation.
groupComponentsByModel(components, type)groups the real catalog components by theirtableName(sorted by model name);filterModelGroupssearches them.DatabaseStepPickeris the model → operation drill-down (searchable model grid, back nav, operation cards).ComponentsModalgets a "Work with database records" toggle (shown only when model-backed components exist for the current type); selecting an operation flows into the existing "Add to Workflow" selection — nothing else in the picker changes.Why this is safe (vs the block-morph collapse)
No id is reconstructed or morphed. The picker hands back the exact component object the engine already knows (grouped by the real
tableNamethose components carry). So there's zero fidelity risk — the failure mode the full block-collapse carried (a morphed id that doesn't resolve → a broken step) simply can't happen here.Verification
DatabaseStepUtils.test.ts: grouping by model, sort by name, static-component exclusion, trigger-vs-component separation, case-insensitive search.DatabaseStepPicker.test.tsx(RTL): lists models, drills into a model, selects an operation (returns the real component), back navigation.tsc✓,eslint✓.ComponentsModal(aSideOver), which isn't exercised end-to-end in jsdom; the drill-down + grouping are unit/RTL-tested in isolation.🤖 Generated with Claude Code