Skip to content

added lint and build checks#10

Merged
mayur-driod merged 5 commits into
mainfrom
workflows
Apr 16, 2026
Merged

added lint and build checks#10
mayur-driod merged 5 commits into
mainfrom
workflows

Conversation

@mayur-driod
Copy link
Copy Markdown
Owner

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trade-x Ready Ready Preview, Comment Apr 16, 2026 9:32am

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the stock search logic in finnhub.actions.ts to improve type safety and data handling, updates SearchCommand and NavItems to handle optional initial stocks, and refactors the authentication initialization. Key feedback includes addressing a regression where the user's bio is hardcoded to an empty string and resolving a duplicate definition of SearchCommandProps in the global types file.

Comment thread types/global.d.ts
renderAs?: 'button' | 'text';
label?: string;
initialStocks: StockWithWatchlistStatus[];
initialStocks?: StockWithWatchlistStatus[];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The SearchCommandProps type is defined twice in this file (here at line 58 and again at line 171) with conflicting properties. This causes ambiguity in the global scope and can lead to type-checking issues in components using this type. You should consolidate these into a single definition that includes all necessary properties.

email: session.user.email,
image: session.user.image || "",
bio: session.user.bio || "",
bio: "",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding bio to an empty string appears to be a workaround for a TypeScript error (likely because bio is missing from the User type definition). This is a regression in functionality if the user's bio was previously being correctly retrieved from the session. A better approach is to extend the User type in types/global.d.ts to include the bio field and ensure it is correctly handled in the authentication schema.

Suggested change
bio: "",
bio: session.user.bio || "",

@mayur-driod mayur-driod merged commit a73fa31 into main Apr 16, 2026
4 checks passed
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