Merge branch 'jzh' into deploy/dev

This commit is contained in:
JzoNg 2026-04-29 16:08:53 +08:00
commit 432a18be60
3 changed files with 3 additions and 12 deletions

View File

@ -125,19 +125,9 @@ describe('@langgenius/dify-ui/toast', () => {
expect(onClose).toHaveBeenCalledTimes(1)
})
it('should respect custom timeout values including zero', async () => {
it('should keep zero-timeout toasts persistent', async () => {
const screen = await render(<ToastHost />)
toast('Custom timeout', {
timeout: 1000,
})
await expect.element(screen.getByText('Custom timeout')).toBeInTheDocument()
await vi.advanceTimersByTimeAsync(1000)
await vi.waitFor(() => {
expect(document.body).not.toHaveTextContent('Custom timeout')
})
toast('Persistent', {
timeout: 0,
})

View File

@ -41,6 +41,7 @@ COPY . .
WORKDIR /app/web
ENV NODE_OPTIONS="--max-old-space-size=4096"
ENV pnpm_config_verify_deps_before_run=false
RUN pnpm build && pnpm build:vinext

View File

@ -54,7 +54,7 @@ const BuiltinMetricCard = ({
<span aria-hidden="true" className={cn(metricVisual.icon, 'h-3.5 w-3.5')} />
</div>
<div className="flex min-w-0 items-center gap-0.5">
<div className="truncate system-md-medium text-text-secondary">{metric.label}</div>
<div className="truncate system-md-medium text-text-secondary uppercase">{metric.label}</div>
<span
aria-hidden="true"
className={cn('i-ri-arrow-down-s-line h-4 w-4 shrink-0 text-text-quaternary transition-transform', !isExpanded && '-rotate-90')}