aws-amplify / aws-amplify/amplify-studio

surface warning on CLI studio pull on a non react env

Open
#766 0 comments 0 reactions 0 assignees View on GitHub
cli feature-request studio-ui
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-adminui/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-adminui/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

d2h9g0zfn58ims

### Region

us-east-1

### Environment name

staging

### Figma File Version (if applicable)

_No response_

### Amplify CLI Version

10.5.2

### If applicable, what version of Node.js are you using?

_No response_

### What operating system are you using?

Mac

### Browser type?

_No response_

### Describe the bug

When pulling a studio enabled app containing UI components in a empty/non react app folder the pull work but does not generate the UI components. This is expected as studio only support react framework but the Amplify CLI pull does not throw any warnings or errors about this.

Example on a headless pull

```
a pull

Pre-pull status:

Current Environment: dev

┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ test │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘

⠧ Fetching updates to backend environment: dev from the cloud.✅ GraphQL schema compiled successfully.

Edit your schema at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema.graphql or place .graphql files in a directory at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema
✔ Successfully pulled backend environment dev from the cloud.

✅ GraphQL schema compiled successfully.

Edit your schema at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema.graphql or place .graphql files in a directory at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema
Successfully generated models. Generated models can be found in /Users/ykethan/Documents/ampapps/test/src
Post-pull status:

Current Environment: dev

┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ test │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘
```

headless pull with debug

```
a pull --debug

Pre-pull status:

Current Environment: dev

┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ test │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘

⠸ Fetching updates to backend environment: dev from the cloud.Overrides functionality is not implemented for this category
⠸ Building resource api/test✅ GraphQL schema compiled successfully.

Edit your schema at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema.graphql or place .graphql files in a directory at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema
✔ Successfully pulled backend environment dev from the cloud.

Not pulling components because this project is not configured with the "react" framework.
✅ GraphQL schema compiled successfully.

Edit your schema at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema.graphql or place .graphql files in a directory at /Users/ykethan/Documents/ampapps/test/amplify/backend/api/test/schema
Successfully generated models. Generated models can be found in /Users/ykethan/Documents/ampapps/test/src
Post-pull status:

Current Environment: dev

┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ test │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘

```

as observed the warning is currently being hidden and would be helpful to surface.

other warning to surface
https://github.com/aws-amplify/amplify-cli/blob/4ef1f5561ee020b4241c0bf0e076942ffb2f5af4/packages/amplify-util-uibuilder/src/commands/utils/shouldRenderComponents.ts

### Expected behavior

display relevant warning

### Reproduction steps

1. Create a studio app
2. sync figma with default amplify figma file
3. make a empty directory
4. copy pull command and run
5. to see warning run pull with --debug

### Project Identifier

9f1045e064f9aeae6ede4304be8de4ca

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with packages/amplify-util-uibuilder/src/commands/utils/shouldRenderComponents.ts, which is linked in the issue, and trace how its warning is handled during the Amplify CLI pull flow. Reproduce the empty non-React project with a normal pull and verify that the relevant warning is visible without --debug, including the other warning referenced by the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.