Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const EmailChangeModal = ({ onClose, email, show }: Props) => {
return
}
await sendEmail(
mail,
email,
false,
stepToken,
)
Comment on lines 163 to 167

Choose a reason for hiding this comment

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

Action Required

2. Email code sent wrong 🐞 Bug

• New-email verification validates the user-entered mail but sends the verification code to the
  old email prop instead.
• Because the backend request is tagged as phase: 'new_email', this can prevent users from
  receiving a code at the intended new address and block email changes.
Agent Prompt
### Issue description
On the "send code to new email" step, the code validates `mail` (new email input) but calls `sendEmail(email, false, stepToken)` using the old email prop. Since `sendEmail` uses `phase: 'new_email'` for `isOrigin=false`, the verification code can be sent to the wrong address and block the email-change flow.

### Issue Context
`sendEmail()` forwards the provided address directly to `sendVerifyCode()`, and selects the backend phase based on `isOrigin`.

### Fix Focus Areas
- web/app/account/(commonLayout)/account-page/email-change-modal.tsx[155-169]
- web/app/account/(commonLayout)/account-page/email-change-modal.tsx[61-70]

### Suggested change
- Replace the `sendEmail(email, false, stepToken)` call with `sendEmail(mail, false, stepToken)`.
- (Optional hardening) Have `sendEmail` return success/failure (or rethrow on failure) and only call `setStep(STEP.verifyNew)` when the send succeeds.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Expand Down Expand Up @@ -214,7 +214,8 @@ const EmailChangeModal = ({ onClose, email, show }: Props) => {
<div className="body-md-medium text-text-warning">{t('account.changeEmail.authTip', { ns: 'common' })}</div>
<div className="body-md-regular text-text-secondary">
<Trans
i18nKey="common.account.changeEmail.content1"
i18nKey="account.changeEmail.content1"
ns="common"
components={{ email: <span className="body-md-medium text-text-primary"></span> }}
values={{ email }}
/>
Expand Down Expand Up @@ -244,7 +245,8 @@ const EmailChangeModal = ({ onClose, email, show }: Props) => {
<div className="space-y-0.5 pb-2 pt-1">
<div className="body-md-regular text-text-secondary">
<Trans
i18nKey="common.account.changeEmail.content2"
i18nKey="account.changeEmail.content2"
ns="common"
components={{ email: <span className="body-md-medium text-text-primary"></span> }}
values={{ email }}
/>
Expand Down Expand Up @@ -333,7 +335,8 @@ const EmailChangeModal = ({ onClose, email, show }: Props) => {
<div className="space-y-0.5 pb-2 pt-1">
<div className="body-md-regular text-text-secondary">
<Trans
i18nKey="common.account.changeEmail.content4"
i18nKey="account.changeEmail.content4"
ns="common"
components={{ email: <span className="body-md-medium text-text-primary"></span> }}
values={{ email: mail }}
/>
Expand Down
5 changes: 3 additions & 2 deletions web/app/components/app/log/empty-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ const EmptyElement: FC<{ appDetail: App }> = ({ appDetail }) => {
</span>
<div className="system-sm-regular mt-2 text-text-tertiary">
<Trans
i18nKey="appLog.table.empty.element.content"
i18nKey="table.empty.element.content"
ns="appLog"
components={{
shareLink: <Link href={`${appDetail.site.app_base_url}${basePath}/${getWebAppType(appDetail.mode)}/${appDetail.site.access_token}`} className="text-util-colors-blue-blue-600" target="_blank" rel="noopener noreferrer" />,
testLink: <Link href={getRedirectionPath(true, appDetail)} className="text-util-colors-blue-blue-600" />,
testLink: <Link href={getRedirectionPath(false, appDetail)} className="text-util-colors-blue-blue-600" />,
}}
Comment on lines +37 to 42

Choose a reason for hiding this comment

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

Action Required

3. Logs empty link misroutes 🐞 Bug

• The empty logs screen now hardcodes getRedirectionPath(false, appDetail) which always routes to
  /overview.
• The logs route is already guarded to editors; routing editors to overview instead of
  configuration/workflow breaks the expected "test the app" navigation from logs.
Agent Prompt
### Issue description
The empty logs CTA now calls `getRedirectionPath(false, ...)`, which always routes to `/overview`. But the logs route is guarded to editors, so the CTA should route to editor pages (`/workflow` or `/configuration`) when testing the app.

### Issue Context
`getRedirectionPath` uses its boolean parameter to decide whether to route to editor pages vs overview.

### Fix Focus Areas
- web/app/components/app/log/empty-element.tsx[35-43]
- web/utils/app-redirection.ts[3-15]

### Suggested change
- Prefer: import `useAppContext()` and pass `isCurrentWorkspaceEditor` into `getRedirectionPath(isCurrentWorkspaceEditor, appDetail)`.
- If logs are truly editor-only everywhere, revert the hardcoded argument back to `true`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

/>
</div>
Expand Down
1 change: 1 addition & 0 deletions web/app/components/app/overview/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
<p className={cn('body-xs-regular pb-0.5 text-text-tertiary')}>
<Trans
i18nKey={`${prefixSettings}.more.privacyPolicyTip`}
ns="appOverview"
components={{ privacyPolicyLink: <Link href="https://dify.ai/privacy" target="_blank" rel="noopener noreferrer" className="text-text-accent" /> }}
/>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
}

const sendCodeToOriginEmail = async () => {
await sendEmail()
setStep(STEP.verify)
await sendEmail()
}
Comment on lines 94 to 97

Choose a reason for hiding this comment

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

Action Required

4. Ownership token race 🐞 Bug

• The modal transitions to the verify step before the async send finishes, so the verify UI can
  render while stepToken is still empty.
• This makes it possible to submit a code with an empty/stale token (e.g., fast paste / repeated
  attempts), causing avoidable verification failures.
Agent Prompt
### Issue description
`setStep(STEP.verify)` now happens before the async email-send finishes. This can render the verify screen before `stepToken` is available, allowing verification requests with an empty/stale token.

### Issue Context
`stepToken` is set only after `sendOwnerEmail()` resolves; verification passes `stepToken` as `token`.

### Fix Focus Areas
- web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx[94-101]
- web/app/components/header/account-setting/members-page/transfer-ownership-modal/index.tsx[54-67]

### Suggested change
- Revert ordering: `await sendEmail(); setStep(STEP.verify);`.
- Add `isSending` state: show loading/disable Continue/Resend until `stepToken` is set.
- Consider having `sendEmail()` return the token (or throw on failure) so the caller can gate the step transition on success.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


const handleVerifyOriginEmail = async () => {
Expand Down Expand Up @@ -140,7 +140,8 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
<div className="body-md-regular text-text-secondary">{t('members.transferModal.warningTip', { ns: 'common' })}</div>
<div className="body-md-regular text-text-secondary">
<Trans
i18nKey="common.members.transferModal.sendTip"
i18nKey="members.transferModal.sendTip"
ns="common"
components={{ email: <span className="body-md-medium text-text-primary"></span> }}
values={{ email: userProfile.email }}
/>
Expand Down Expand Up @@ -170,7 +171,8 @@ const TransferOwnershipModal = ({ onClose, show }: Props) => {
<div className="pb-2 pt-1">
<div className="body-md-regular text-text-secondary">
<Trans
i18nKey="common.members.transferModal.verifyContent"
i18nKey="members.transferModal.verifyContent"
ns="common"
components={{ email: <span className="body-md-medium text-text-primary"></span> }}
values={{ email: userProfile.email }}
/>
Expand Down
1 change: 1 addition & 0 deletions web/app/components/plugins/base/deprecation-notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const DeprecationNotice: FC<DeprecationNoticeProps> = ({
<Trans
t={t}
i18nKey={`${i18nPrefix}.fullMessage`}
ns="plugin"
components={{
CustomLink: (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ const Installed: FC<Props> = ({
<p>
<Trans
i18nKey={`${i18nPrefix}.fromTrustSource`}
ns="plugin"
components={{ trustSource: <span className="system-md-semibold" /> }}
/>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const AutoUpdateSetting: FC<Props> = ({
<div className="body-xs-regular mt-1 text-right text-text-tertiary">
<Trans
i18nKey={`${i18nPrefix}.changeTimezone`}
ns="plugin"
components={{
setTimezone: <SettingTimeZone />,
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ const Popup = () => {
children: (
<div className="system-xs-regular text-text-secondary">
<Trans
i18nKey="datasetPipeline.publishPipeline.success.tip"
i18nKey="publishPipeline.success.tip"
ns="datasetPipeline"
components={{
CustomLink: (
<Link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ const RAGToolRecommendations = ({
{!isFetchingRAGRecommendedPlugins && recommendedPlugins.length === 0 && unInstalledPlugins.length === 0 && (
<p className="system-xs-regular px-3 py-1 text-text-tertiary">
<Trans
i18nKey="pipeline.ragToolSuggestions.noRecommendationPlugins"
i18nKey="ragToolSuggestions.noRecommendationPlugins"
ns="pipeline"
components={{
CustomLink: (
<Link
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"fast-deep-equal": "^3.1.3",
"html-entities": "^2.6.0",
"html-to-image": "1.11.13",
"i18next": "^23.16.8",
"i18next": "^25.7.3",
"i18next-resources-to-backend": "^1.2.1",
"immer": "^11.1.0",
"js-audio-recorder": "^1.0.7",
Expand Down Expand Up @@ -118,7 +118,7 @@
"react-easy-crop": "^5.5.3",
"react-hook-form": "^7.65.0",
"react-hotkeys-hook": "^4.6.2",
"react-i18next": "^15.7.4",
"react-i18next": "^16.5.0",
"react-markdown": "^9.1.0",
"react-multi-email": "^1.0.25",
"react-papaparse": "^4.4.0",
Expand Down
32 changes: 20 additions & 12 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"resolveJsonModule": true,
"types": ["vitest/globals", "node"],
"allowJs": true,
"strict": true,
"strict": false,

Choose a reason for hiding this comment

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

Action Required

1. tsconfig sets strict false 📘 Rule Violation

• The PR changes TypeScript configuration to disable strict mode, reducing type safety across the
  frontend codebase.
• This directly conflicts with the requirement to use strict typing and avoid weakening the type
  system, increasing risk of runtime errors and inadvertent any/unsafe typing.
• Re-enabling strict mode preserves the project’s intended strict type-checking guarantees.
Agent Prompt
## Issue description
The frontend TypeScript configuration disables `strict` mode (`"strict": false`), which violates the requirement to use strict typing and avoid weakening type safety.

## Issue Context
The compliance checklist requires strict TypeScript typing; disabling `strict` can allow unsafe typing patterns to slip in and hide type errors.

## Fix Focus Areas
- web/tsconfig.json[24-24]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
Expand Down