created_at is used where it should be last_used_at #5168

Closed
opened 2026-02-21 18:09:43 -05:00 by yindo · 3 comments
Owner

Originally created by @monstaruos on GitHub (Aug 22, 2024).

Originally assigned to: @JzoNgKVO on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.7.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Just show API Key modal for API Access on the web browser.

✔️ Expected Behavior

last_used_at is shown on LAST USED.

Actual Behavior

created_at value is shown on LAST USED.
https://github.com/langgenius/dify/blob/0.7.1/web/app/components/develop/secret-key/secret-key-modal.tsx#L118

This was degraded by #4070 .
The initial implementation was correct.

Originally created by @monstaruos on GitHub (Aug 22, 2024). Originally assigned to: @JzoNgKVO on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Just show API Key modal for API Access on the web browser. ### ✔️ Expected Behavior last_used_at is shown on LAST USED. ### ❌ Actual Behavior created_at value is shown on LAST USED. https://github.com/langgenius/dify/blob/0.7.1/web/app/components/develop/secret-key/secret-key-modal.tsx#L118 This was degraded by #4070 . The initial implementation was correct.
yindo added the 🐞 bug label 2026-02-21 18:09:43 -05:00
yindo closed this issue 2026-02-21 18:09:43 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 22, 2024):

Hello @monstaruos! I'm here to assist you with any issues, bugs, or questions you may have while waiting for a human maintainer. I can help you solve bugs, answer questions, and become a contributor.

The issue arises because the code in the secret-key-modal.tsx file incorrectly uses created_at instead of last_used_at for the "LAST USED" label. Specifically, the line:

<div className='flex-shrink-0 px-3 truncate w-[200px]'>{api.last_used_at ? formatTime(Number(api.created_at), t('appLog.dateTimeFormat') as string) : t('appApi.never')}</div>

should be:

<div className='flex-shrink-0 px-3 truncate w-[200px]'>{api.last_used_at ? formatTime(Number(api.last_used_at), t('appLog.dateTimeFormat') as string) : t('appApi.never')}</div>

This change ensures that the last_used_at value is displayed correctly [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Aug 22, 2024): <!-- Greeting --> Hello @monstaruos! I'm here to assist you with any issues, bugs, or questions you may have while waiting for a human maintainer. I can help you solve bugs, answer questions, and become a contributor. <!-- Answer --> The issue arises because the code in the `secret-key-modal.tsx` file incorrectly uses `created_at` instead of `last_used_at` for the "LAST USED" label. Specifically, the line: ```tsx <div className='flex-shrink-0 px-3 truncate w-[200px]'>{api.last_used_at ? formatTime(Number(api.created_at), t('appLog.dateTimeFormat') as string) : t('appApi.never')}</div> ``` should be: ```tsx <div className='flex-shrink-0 px-3 truncate w-[200px]'>{api.last_used_at ? formatTime(Number(api.last_used_at), t('appLog.dateTimeFormat') as string) : t('appApi.never')}</div> ``` This change ensures that the `last_used_at` value is displayed correctly <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/develop/secret-key/secret-key-modal.tsx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Aug 22, 2024):

Feel free to make a PR for this.

@crazywoola commented on GitHub (Aug 22, 2024): Feel free to make a PR for this.
Author
Owner

@monstaruos commented on GitHub (Aug 22, 2024):

I created #7548 .

@monstaruos commented on GitHub (Aug 22, 2024): I created #7548 .
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5168