Skip to content

PLU-708 (chore): design improvements#1554

Open
kevinkim-ogp wants to merge 1 commit intofeat/max-files-multi-row-descriptionsfrom
pair-action/design-improvements
Open

PLU-708 (chore): design improvements#1554
kevinkim-ogp wants to merge 1 commit intofeat/max-files-multi-row-descriptionsfrom
pair-action/design-improvements

Conversation

@kevinkim-ogp
Copy link
Copy Markdown
Contributor

@kevinkim-ogp kevinkim-ogp commented Apr 17, 2026

TL;DR

Improved the process-image action with better field name handling and enhanced UI labels.

What changed?

  • Added automatic conversion of spaces to underscores in field names (e.g., "Signature present" becomes "Signature_present")
  • Updated schema to allow spaces in field names during input
  • Update getDataOutMetadatato convert it back to the original field name the user set
  • Updated action name to "Process an image", added descriptions, and reordered form fields for better UX

How to test?

Field names

  • Create a process-image action with field names containing spaces (e.g., "Document type", "Signature present")
    Verify the fields are accepted and transformed correctly (spaces become underscores internally)
  • Check that duplicate field names are properly detected (case-insensitive)
  • Confirm that the output metadata displays labels with spaces instead of underscores

Max files

  • Verify that only 1 file can be selected

Sanity check

  • Verify that action can process images dynamically based on the input

Copy link
Copy Markdown
Contributor Author

kevinkim-ogp commented Apr 17, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kevinkim-ogp kevinkim-ogp changed the title chore: design improvements PLU-708 (chore): design improvements Apr 17, 2026
@linear
Copy link
Copy Markdown

linear bot commented Apr 17, 2026

@kevinkim-ogp kevinkim-ogp marked this pull request as ready for review April 17, 2026 05:47
@kevinkim-ogp kevinkim-ogp requested a review from a team as a code owner April 17, 2026 05:48
Comment on lines +21 to +24
.regex(/^[a-zA-Z0-9\s]+$/, {
message:
'Output name can only contain letters, numbers, and spaces',
}),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The regex /^[a-zA-Z0-9\s]+$/ uses \s which matches ANY whitespace character (spaces, tabs, newlines, carriage returns, etc.), not just spaces. Users could potentially input tabs or newlines in field names.

This will cause inconsistent behavior when converting back via key.replace(/_/g, ' ') in get-data-out-metadata.ts because:

  • Tab gets transformed to _ during schema validation
  • But converts back to a space (not tab) in the metadata

Fix:

.regex(/^[a-zA-Z0-9 ]+$/, {
  message:
    'Output name can only contain letters, numbers, and spaces',
})

Use a literal space character instead of \s.

Suggested change
.regex(/^[a-zA-Z0-9\s]+$/, {
message:
'Output name can only contain letters, numbers, and spaces',
}),
.regex(/^[a-zA-Z0-9 ]+$/, {
message:
'Output name can only contain letters, numbers, and spaces',
}),

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

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