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

feat: new file with prompt #2121

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

feat: new file with prompt #2121

wants to merge 20 commits into from

Conversation

jimniels
Copy link
Collaborator

@jimniels jimniels commented Dec 11, 2024

Summary

Allows people to land on the app and have a file created with a prompt run automatically.

  • Any request to /files/create from outside of the app will create a new file for a user.
  • If an included prompt search param is included, it will start a file with an AI prompt, e.g. files/create?prompt=generate+some+python+code

Under the hood, this works by this logic:

  • See if the user belongs to a team
    • If yes, create a private file in that team
    • If no, create a team first, then create a private file in that team

Also: this PR includes a piece of data on the /acknowledge endpoint which will tell you when a new user was created on that call.

To Test

There are three cases we should test:

  1. You're logged in to the app already. It should go from marketing site to app and run prompt in a new private file
  2. You're not logged in to the app, but have an account. It should go from marketing site, to login screen, to app and run prompt in a new private file
  3. You don't have an account yet. It should go from marketing site, to login page, to sign up page, to app and run prompt in a new private file

@cla-bot cla-bot bot added the cla-signed label Dec 11, 2024
Copy link

vercel bot commented Dec 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quadratic ❌ Failed (Inspect) Dec 20, 2024 10:50pm

Copy link

qa-wolf bot commented Dec 11, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@jimniels jimniels temporarily deployed to quadratic-api-dev-pr-2121 December 13, 2024 00:02 Inactive
@jimniels jimniels changed the base branch from qa to main December 13, 2024 23:07
@jimniels jimniels temporarily deployed to quadratic-api-dev-pr-2121 December 13, 2024 23:07 Inactive
@jimniels jimniels temporarily deployed to quadratic-api-dev-pr-2121 December 13, 2024 23:12 Inactive
@jimniels jimniels temporarily deployed to quadratic-api-dev-pr-2121 December 13, 2024 23:12 Inactive
Copy link

codecov bot commented Dec 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.82%. Comparing base (a26883a) to head (31344b7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2121   +/-   ##
=======================================
  Coverage   90.82%   90.82%           
=======================================
  Files         260      260           
  Lines       57583    57583           
=======================================
  Hits        52297    52297           
  Misses       5286     5286           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants