-
Notifications
You must be signed in to change notification settings - Fork 44.9k
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
fix(frontend): add typechecks and fix existing type errors in frontend #9336
base: dev
Are you sure you want to change the base?
Conversation
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This PR targets the Automatically setting the base branch to |
✅ Deploy Preview for auto-gpt-docs canceled.
|
Is this desired?
…s to fix type errors
@aarushik93 is this okay?
we probbaly shouldn't be doing this?
// import { getReviewableAgents } from "@/components/admin/marketplace/actions"; | ||
// import AdminMarketplaceAgentList from "@/components/admin/marketplace/AdminMarketplaceAgentList"; | ||
// import AdminFeaturedAgentsControl from "@/components/admin/marketplace/AdminFeaturedAgentsControl"; | ||
import { Separator } from "@/components/ui/separator"; | ||
async function AdminMarketplace() { | ||
const reviewableAgents = await getReviewableAgents(); | ||
// const reviewableAgents = await getReviewableAgents(); | ||
|
||
return ( | ||
<> | ||
<AdminMarketplaceAgentList agents={reviewableAgents.items} /> | ||
<Separator className="my-4" /> | ||
<AdminFeaturedAgentsControl className="mt-4" /> | ||
{/* <AdminMarketplaceAgentList agents={reviewableAgents.items} /> | ||
<Separator className="my-4" /> | ||
<AdminFeaturedAgentsControl className="mt-4" /> */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Swiftyos is this chill?
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
name: "AI Video Generator", | ||
storeListingVersionId: "123", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing attribute + extra attribute
menuItemGroups: defaultMenuItemGroups, | ||
}, | ||
}; | ||
|
||
export const WithActiveLink: Story = { | ||
args: { | ||
...Default.args, | ||
activeLink: "/library", | ||
// activeLink: "/library", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old inputs -- I think?
} | ||
|
||
export const NavbarLink = ({ name, href }: NavbarLinkProps) => { | ||
export const NavbarLink = ({ name, href, className }: NavbarLinkProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we reallly accept classNames here? its to fix us passing them in externally but like why would you do that to a navbar link? it should be styled internally imo
description: "URL of the user's profile image", | ||
}, | ||
links: { | ||
profile: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data shape changes fixed
], | ||
profile: { | ||
name: "Olivia Grace", | ||
username: "@ograce1421", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably swap this example lol but this just fixes the data shape
description: string; | ||
additionalImages?: string[]; | ||
}; | ||
initialData?: PublishAgentInfoInitialData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used in the story so exported here
console.log("Rating card closed"); | ||
}, | ||
// onSubmit: (rating) => { | ||
// console.log("Rating submitted:", rating); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Swiftyos is there a better way to handle these
@@ -44,6 +44,9 @@ export const Rejected: Story = { | |||
}; | |||
|
|||
export const AllStatuses: Story = { | |||
args: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a funny requirement because how the story is defined. We could do this better but its fine for now
@@ -25,12 +26,14 @@ interface AgentsSectionProps { | |||
sectionTitle: string; | |||
agents: Agent[]; | |||
hideAvatars?: boolean; | |||
className?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another input that seems weird and should be not here. Why would an agent section need external styling?
@@ -3,14 +3,14 @@ import { ReactNode } from "react"; | |||
|
|||
export function LaunchDarklyProvider({ children }: { children: ReactNode }) { | |||
if ( | |||
process.env.NEXT_PUBLIC_LAUNCHDARKLY_ENABLED === true && | |||
process.env.NEXT_PUBLIC_LAUNCHDARKLY_ENABLED === "true" && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aarushik93 is this okay or will this break the world?
@@ -661,20 +660,6 @@ export const NodeGenericInputField: FC<{ | |||
handleInputClick={handleInputClick} | |||
/> | |||
); | |||
case "object": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an impossible case
@@ -72,10 +80,300 @@ const FormExample = () => { | |||
}; | |||
|
|||
export const Default: Story = { | |||
args: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there has to be a better way to do this
@@ -7,7 +7,13 @@ import { cn } from "@/lib/utils"; | |||
|
|||
const TooltipProvider = TooltipPrimitive.Provider; | |||
|
|||
const Tooltip = ({ children, delayDuration = 10 }) => ( | |||
const Tooltip = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing type info -- added
@@ -65,18 +65,21 @@ export type BlockIOObjectSubSchema = BlockIOSubSchemaMeta & { | |||
properties: { [key: string]: BlockIOSubSchema }; | |||
default?: { [key: keyof BlockIOObjectSubSchema["properties"]]: any }; | |||
required?: (keyof BlockIOObjectSubSchema["properties"])[]; | |||
secret?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these changes need mirrored to the backend anywhere?
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
We want to be able to use typechecking and see errors before they occur. This is a PR to help enable us to do so by fixing the existing errors and hopefully not causing new ones.
Changes 🏗️
Checklist 📋
For code changes: