-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add new
label to app tiles in the app store
#1407
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe recent changes introduce a new Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant AppStoreTile
participant AppService
User->>AppStoreTile: View App Store
AppStoreTile->>AppService: Fetch Apps
AppService-->>AppStoreTile: Return Apps with `created` field
AppStoreTile->>AppStoreTile: Determine if App is New
AppStoreTile-->>User: Display Apps with "New" Badge if Applicable
sequenceDiagram
participant AuthService
participant FileSystem
AuthService->>FileSystem: Check if Password Change File Exists
FileSystem-->>AuthService: Return File Status
AuthService->>FileSystem: Read File Content
FileSystem-->>AuthService: Return File Content
AuthService->>AuthService: Validate Expiry Time from File Content
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
src/client/messages/en.json
is excluded by!**/*.json
Files selected for processing (3)
- packages/shared/src/schemas/app-schemas.ts (1 hunks)
- src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx (1 hunks)
- src/server/services/apps/apps.helpers.ts (1 hunks)
Additional comments not posted (2)
packages/shared/src/schemas/app-schemas.ts (1)
83-83
: The addition of thecreated
field to theappInfoSchema
looks good and follows best practices.src/server/services/apps/apps.helpers.ts (1)
72-79
: Including thecreated
property in the return structure of thegetAvailableApps
function looks good.
src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx
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.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
src/client/messages/en.json
is excluded by!**/*.json
Files selected for processing (1)
- src/server/services/auth/auth.service.ts (2 hunks)
Files not reviewed due to errors (1)
- src/server/services/auth/auth.service.ts (no review received)
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/shared/src/schemas/app-schemas.ts (1 hunks)
- src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx (1 hunks)
- src/server/services/apps/apps.helpers.ts (1 hunks)
Additional context used
Biome
src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx
[error] 29-29: The computed expression can be simplified without the use of a string literal.
[error] 4-5: All these imports are only used as types.
[error] 6-7: All these imports are only used as types.
src/server/services/apps/apps.helpers.ts
[error] 5-5: A Node.js builtin module should be imported with the node: protocol.
[error] 1-1: All these imports are only used as types.
GitHub Check: build
src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx
[failure] 22-22:
Property 'created' does not exist on type 'App'.
Additional comments not posted (3)
src/app/(dashboard)/app-store/components/AppStoreTile/AppStoreTile.tsx (1)
29-31
: Conditional rendering for "NEW" label is implemented correctly.Consider simplifying the expression for better readability as suggested by the static analysis tool.
packages/shared/src/schemas/app-schemas.ts (1)
83-83
: The addition of thecreated
field toappInfoSchema
is correctly implemented with appropriate constraints.src/server/services/apps/apps.helpers.ts (1)
72-79
: The inclusion of thecreated
property in the returned app data bygetAvailableApps
is correctly implemented.Consider importing Node.js built-in modules with the
node:
protocol for better compatibility and clarity.
@@ -19,13 +19,17 @@ | |||
|
|||
export const AppStoreTile: React.FC<{ app: App }> = ({ app }) => { | |||
const t = useTranslations(); | |||
const isNewApp = app.created + (14 * 24 * 60 * 60 * 1000) > Date.now(); |
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.
Property 'created' does not exist on type 'App'.
Please ensure that the created
property is added to the App
type definition to resolve the build error.
Tools
GitHub Check: build
[failure] 22-22:
Property 'created' does not exist on type 'App'.
Would be nice to have a category with the new added apps |
This PR addresses issue #899.
Changes
created
field forconfig.json
. It stores the time the app was added to the app store as a UNIX timestamp (with milliseconds). It should ideally be set by CI when a new app is merged.NEW
label next to the title if the app is less than 2 weeks old. Comparison happens on client using the timestamp provided by the API.