Skip to content

Re create document(s)#88

Merged
UmairJibran merged 8 commits intomasterfrom
re-create-document(s)
Mar 29, 2025
Merged

Re create document(s)#88
UmairJibran merged 8 commits intomasterfrom
re-create-document(s)

Conversation

@UmairJibran
Copy link
Copy Markdown
Owner

No description provided.

@UmairJibran UmairJibran self-assigned this Mar 28, 2025
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2025

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

Name Status Preview Comments Updated (UTC)
waltzes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 3:55pm
waltzes-di8o ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 29, 2025 3:55pm

Copy link
Copy Markdown

@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.

Hello @UmairJibran, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request introduces a new feature to the ApplicationDialog component that allows users to recreate their resume and cover letter. It adds a RecreateButton component that handles the regeneration logic, including calling the useReGenerateApplication hook and displaying a toast notification upon success. The button is displayed next to the resume and cover letter previews in the ApplicationDialog.

Highlights

  • New Feature: Recreate Documents: Adds functionality to recreate resume and cover letter documents within the ApplicationDialog.
  • RecreateButton Component: Introduces a new component, RecreateButton, to handle the UI and logic for document regeneration.
  • useReGenerateApplication Hook: Implements a new hook, useReGenerateApplication, to manage the API call for document regeneration.
  • API Endpoint Integration: Integrates with a new API endpoint /applications/recreate to trigger the document regeneration process.

Changelog

Click here to see the changelog
  • web/app/components/applications/ApplicationDialog.tsx
    • Imported necessary modules for Tooltip and RefreshCcw icon.
    • Added RecreateButton component to handle resume/cover letter regeneration.
    • Implemented logic to display the RecreateButton next to resume and cover letter previews.
    • Modified the layout to accommodate the new button and document previews.
    • Wrapped the button with a TooltipProvider to give the user more information about the action.
  • web/hooks/use-applications.ts
    • Imported ReGenerateApplicationDocumentRequest type.
    • Added useReGenerateApplication hook to handle the API call for document regeneration.
    • Invalidates the 'applications' query on successful regeneration to refresh the data.
  • web/lib/api-client.ts
    • Imported ReGenerateApplicationDocumentRequest type.
    • Added reGenerateApplication function to call the /applications/recreate API endpoint.
  • web/lib/types/application.ts
    • Added ReGenerateApplicationDocumentRequest interface to define the structure of the regeneration request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Did you know?

The first documented use of the word 'resume' in the context of a professional summary dates back to the late 19th century.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@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

The pull request introduces a new feature to recreate documents (resume, cover letter) for an application. The implementation involves adding a RecreateButton component and integrating it into the ApplicationDialog. The changes also include necessary API and type definitions. Overall, the code seems well-structured and addresses the intended functionality.

Summary of Findings

  • Success Toast Message: The success toast message in RecreateButton uses plese instead of please. This should be corrected for better user experience.
  • Recreate API Response: The reGenerateApplication API function returns the request type instead of the response type. This should be corrected to return the appropriate response type.

Merge Readiness

The pull request introduces a useful feature and the code appears to be well-structured. However, there are a couple of issues that should be addressed before merging, specifically the typo in the toast message and the incorrect return type in the API function. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging. I recommend that the pull request not be merged until those are addressed (at a minimum).

Comment thread web/lib/api-client.ts Outdated
},
reGenerateApplication: async (
data: ReGenerateApplicationDocumentRequest
): Promise<ReGenerateApplicationDocumentRequest> => {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The return type should be the actual response type, not the request type. Consider defining a specific response type if needed.

Suggested change
): Promise<ReGenerateApplicationDocumentRequest> => {
): Promise<any> => {

Comment thread web/app/components/applications/ApplicationDialog.tsx Outdated
… update API client to return empty object on missing data
@UmairJibran UmairJibran merged commit e83828a into master Mar 29, 2025
4 checks passed
@UmairJibran UmairJibran deleted the re-create-document(s) branch March 29, 2025 16:08
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