fix: KEEP-519/521 workflow editor UI polish + earnings pagination#1189
Merged
fix: KEEP-519/521 workflow editor UI polish + earnings pagination#1189
Conversation
…+SQL template autocomplete
The code-editor and SQL-editor template autocompletes call getActionFields
in lib/workflow/editor/template-helpers.ts, which had no branch for the
Collect or For Each system actions and fell through to the generic
[{ field: "data" }] default. As a result, typing {{@collectId.}} inside
those editors only suggested .data instead of the actual .results and
.count outputs the executor already produces.
Add explicit branches mirroring the ones already present in the main
{{@}} dropdown (components/ui/template-autocomplete.tsx) so all template
surfaces agree on the available fields. Runtime behavior is unchanged --
the executor already builds { results, count } at executor.workflow.ts.
Tests cover both new branches plus the unknown-action-type fallback.
The node Description field was a single-line Input, so any description longer than the panel width was unreadable -- it scrolled horizontally inside the field with no way to view the full text. Swap to Textarea in both editing surfaces (node-config-panel and configuration-overlay): - rows=3 gives a reasonable default height for short descriptions - field-sizing-content (already on the Textarea component) auto-grows with content - max-h-64 + resize-y caps the auto-grow and lets users drag to resize
DialogContent had no max-height, so a workflow with many code steps pushed the modal past the viewport and broke the UI -- header and close button could be off-screen entirely on shorter displays. Cap to 90vh and let the body scroll inside.
Three matching constants were updated together so the API default, the client fetch, and the UI fallback all agree on 20: - DEFAULT_PAGE_SIZE in app/api/earnings/route.ts (still bounded by MAX_PAGE_SIZE=50). - Hardcoded pageSize in the client fetch (components/earnings/use-earnings.ts). - pageSize fallback in the table when the API response is missing the field (components/earnings/workflow-earnings-table.tsx).
… API/client/UI The page size was duplicated as a literal "20" in three places, which was the same drift risk that existed previously with "10". Extract to lib/earnings/constants.ts and import from the API default, the client fetch, and the UI fallback so changing the page size only requires editing one line.
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
ℹ️ No PR Environment to Clean UpNo PR environment was found for this PR. This is expected if:
|
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.
Summary
Bundle of small UI polish fixes targeting KEEP-519 plus an unrelated quality-of-life fix on the Earnings page (KEEP-521).
KEEP-466 — Collect node
.count/.resultsmissing in code+SQL template autocompleteTwo
getCommonFieldsresolvers had drifted: components/ui/template-autocomplete.tsx (the main{{@}}dropdown) had explicit Collect / For Each branches, but the exported lib/workflow/editor/template-helpers.ts (used by the code-editor and SQL-editor template autocompletes) did not, falling through to[{ field: "data" }]. Result: typing{{@collectId.inside an HTTP body / SQL Query / etc. only suggested.data, even though the executor was already producing{ results, count }.Added explicit branches for both Collect (
results,count) and For Each (currentItem,index,totalItems). Runtime is unchanged. New test filetests/unit/template-helpers-action-fields.test.tscovers both branches plus the unknown-action-type fallback (8 cases, all passing).KEEP-380 — Node Description field unreadable for long text
The Description field was a single-line
<Input>, so long text scrolled horizontally inside a narrow box. Swapped to<Textarea>in both editing surfaces (node-config-panel and configuration-overlay) withrows={3},field-sizing-content(auto-grow with content, inherited from the Textarea component),max-h-64cap, andresize-yso users can drag to expand. Background overridden to transparent to match the other inputs in the panel.KEEP-518 — Import modal breaks UI for big workflows
DialogContenthad no max-height, so the import dialog could grow past the viewport (especially with many code-step warning rows), pushing the close button off-screen. Addedmax-h-[90vh] overflow-y-autoon components/overlays/workflow-io-overlay.tsx.KEEP-521 — Earnings: bump Workflow Earnings pagination 10 -> 20
Three matching constants were updated together so the API default, the client fetch, and the UI fallback all agree on 20:
DEFAULT_PAGE_SIZEin app/api/earnings/route.ts (still bounded byMAX_PAGE_SIZE=50).pageSizein the client fetch (components/earnings/use-earnings.ts).pageSizefallback in the table when the API response is missing the field (components/earnings/workflow-earnings-table.tsx).