Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create module via command #1513

Merged
merged 17 commits into from
Sep 3, 2024
Merged

Conversation

burieberry
Copy link
Contributor

@burieberry burieberry commented Aug 26, 2024

1- Open a Product Requirements document and click on "Generate App Now" button. A new chat will appear with generated code. Confirm module creation.
module-creation-1
2- Generated module is linked on the document. Click on it to open module in code mode.
module-creation-2
3- Viewing in code mode. Fix errors if any.
module-creation-3
4- (Not within scope) Clicking on "Create New Instance" will create a new app instance.
module-creation-4
module-creation-5

Open Questions:

  • What should be module code for the app look like, especially for the tabs? What do the 'tabs' point to? Currently, each exported card in the module will create a tab.
  • The user workflow for creating a new app instance. Currently using the requirements document to save links and for action buttons.

Copy link

github-actions bot commented Aug 26, 2024

Host Test Results

       1 files  ±    0         1 suites  ±0   38m 53s ⏱️ + 25m 54s
   654 tests +112     650 ✔️ +110  1 💤 ±0  0  - 1  3 🔥 +3 
1 318 runs  +772  1 306 ✔️ +762  2 💤 +1  5 +4  5 🔥 +5 

For more details on these errors, see this check.

Results for commit ed7c982. ± Comparison against base commit 5828ed8.

This pull request removes 1 and adds 113 tests. Note that renamed tests count towards both.
Chrome 128.0 ‑ Global error: Uncaught Error: Failed to fetch realm info for https://cardstack.com/base/: 500 at http://localhost:7357/assets/chunk.f7e09aa3bc63492df720.js, line 569238  While executing test: Acceptance | code submode | editor tests: invalid JSON card instance change made in monaco editor is NOT auto-saved 
Chrome 128.0 ‑ Acceptance | code submode | editor tests > when the user lacks write permissions: the editor is read-only
Chrome 128.0 ‑ Acceptance | code submode | editor tests: card definition change made in monaco editor is auto-saved
Chrome 128.0 ‑ Acceptance | code submode | editor tests: invalid JSON card instance change made in monaco editor is NOT auto-saved
Chrome 128.0 ‑ Acceptance | interact submode tests > 0 stacks: Can add a card by URL using the add button
Chrome 128.0 ‑ Acceptance | interact submode tests > 0 stacks: Can add an index card by URL (without "index" in path) using the add button
Chrome 128.0 ‑ Acceptance | interact submode tests > 0 stacks: Can open a recent card in empty stack
Chrome 128.0 ‑ Acceptance | interact submode tests > 0 stacks: Clicking card in search panel opens card on a new stack
Chrome 128.0 ‑ Acceptance | interact submode tests > 0 stacks: Handles a URL with no results
Chrome 128.0 ‑ Acceptance | interact submode tests > 1 stack, when the user lacks write permissions: embedded card from read-only realm does not show pencil icon in edit mode
Chrome 128.0 ‑ Acceptance | interact submode tests > 1 stack, when the user lacks write permissions: the "..."" menu does not exist for card overlay in index view (since delete is the only item in this menu)
…

♻️ This comment has been updated with latest results.

@burieberry burieberry force-pushed the cs-6993-create-module-via-command branch 2 times, most recently from eae7d18 to afbba2d Compare August 27, 2024 21:39
@burieberry burieberry marked this pull request as ready for review August 27, 2024 21:39
@burieberry burieberry requested review from a team and IanCal August 27, 2024 21:39
Copy link
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

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

I tried this locally and I couldn’t get it to generate the application, maybe I didn’t set something up properly?

It does create the new chat, though I had to switch to it. Then it describes what it would create:

Boxel 2024-08-27 17-25-43

It asks for permission to go ahead and I give it (should it be mentioning generateAppModule?)

Boxel 2024-08-27 17-26-16

It asks again and I say to proceed:

Boxel 2024-08-27 17-26-55

It asks again and finally says it lacks permissions:

Boxel 2024-08-27 17-27-21

On another attempt:

Boxel 2024-08-27 17-28-12

That time it didn’t say it lacked permissions though, it just said it would finish eventually:

Boxel 2024-08-27 17-28-35

I wouldn’t be surprised if I have something incorrectly set up though.

The code and configuration looks good though!

display: inline-block;
width: var(--icon-size);
height: var(--icon-size);
background: url('./ai-assist-icon@2x.webp') no-repeat center;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this was already in the styles but when I ran this locally the image was missing 😯

Copy link
Contributor

Choose a reason for hiding this comment

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

Boxel 2024-08-27 17-30-00

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@backspace currently it only appears when using localhost 4201. Probably a good idea to move this icon to boxel-ui and use it from there. Do you know a way to import/reference icon urls from boxel-ui for use in css background-image property? I generally end up changing it to not be a css property and use the icon directly in the template instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm yes this is confusing, since this PR I would expect glimmer-scoped-css to be able to handle a reference in the CSS to an asset but when I tried that just now it broke the build 🧐

bm2 (Git) 2024-08-28 15-34-49 pnpm start 2024-08-28 15-35-17

will examine this further

@burieberry
Copy link
Contributor Author

@backspace Was this populating the "Module" section in the PRD card with the module url or not doing that either? I realize it's not clear from the current chat workflow that that's where the module link would appear.

@backspace
Copy link
Contributor

@backspace Was this populating the "Module" section in the PRD card with the module url or not doing that either? I realize it's not clear from the current chat workflow that that's where the module link would appear.

ya I noticed that in the screenshots but it didn’t change locally

but just now I tried erasing the Synapse data and databases and starting over and it worked 🎉

Boxel 2024-08-28 15-54-59 Boxel 2024-08-28 15-55-32

apologies for the false negative!

@burieberry burieberry force-pushed the cs-6993-create-module-via-command branch from afbba2d to e535df8 Compare August 30, 2024 22:06
Copy link
Contributor

@lukemelia lukemelia left a comment

Choose a reason for hiding this comment

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

I expect the "command-y" stuff in this PR to be reworked as Ian's updated command work lands.

@burieberry burieberry force-pushed the cs-6993-create-module-via-command branch from 123fa5a to 71e7278 Compare September 3, 2024 15:43
@burieberry burieberry force-pushed the cs-6993-create-module-via-command branch from 71e7278 to 51cff5c Compare September 3, 2024 15:43
@burieberry burieberry merged commit 687d3a9 into main Sep 3, 2024
26 of 30 checks passed
@burieberry burieberry deleted the cs-6993-create-module-via-command branch September 20, 2024 15:43
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