Add created at, last used, and total docs to app deployment view#7628
Conversation
Summary of ChangesHello @jdolle, 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! This pull request significantly improves the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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. Footnotes
|
📚 Storybook DeploymentThe latest changes are available as preview in: https://pr-7628.hive-storybook.pages.dev |
There was a problem hiding this comment.
Code Review
The pull request successfully adds createdAt, lastUsed, and totalDocumentCount to the app deployment view, providing valuable additional information. The changes involve updating the GraphQL query, refactoring the access to the appDeployment object for better readability, and integrating these new data points into the UI. The overall implementation is clear and functional. My feedback focuses on minor inconsistencies and redundant optional chaining in the newly added UI elements, which do not conflict with any existing rules.
| <div className="min-w-0"> | ||
| <div className="text-xs">Total Documents</div> | ||
| <div className={cn('text-neutral-12 truncate text-center text-sm font-semibold')}> | ||
| {appDeployment?.totalDocumentCount ?? '...'} |
There was a problem hiding this comment.
The totalDocumentCount field is defined as non-nullable (Int!) in the GraphQL schema. Therefore, the optional chaining (?) on appDeployment?.totalDocumentCount is redundant, as appDeployment is already confirmed to be present at this point in the code. Additionally, the fallback ?? '...' is unnecessary if the field is guaranteed to have a value.
| {appDeployment?.totalDocumentCount ?? '...'} | |
| {appDeployment.totalDocumentCount} |
| </div> | ||
| <div className="min-w-0 text-xs"> | ||
| Created{' '} | ||
| {appDeployment?.createdAt ? <TimeAgo date={appDeployment.createdAt} /> : '...'} |
There was a problem hiding this comment.
The createdAt field is defined as non-nullable (DateTime!) in the GraphQL schema. Similar to totalDocumentCount, the optional chaining (?) on appDeployment?.createdAt is redundant. Since createdAt is guaranteed to be present, the fallback ?? '...' is also unnecessary. It's also inconsistent with the lastUsed field's fallback of 'No Usage Data'.
| {appDeployment?.createdAt ? <TimeAgo date={appDeployment.createdAt} /> : '...'} | |
| Created <TimeAgo date={appDeployment.createdAt} /> |
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tag: |
💻 Website PreviewThe latest changes are available as preview in: https://pr-7628.hive-landing-page.pages.dev |
Background
https://linear.app/the-guild/issue/CONSOLE-1787/add-ui-to-check-age-of-app-deployments-for-approvals
App deployments dont have enough info shown to determine whether they are safe to ignore in the case of schema approvals or not.
Description
This adds the vital info to the app deployment page. I used the schema check page as a reference for how this should look.