Skip to content

Commit 000e109

Browse files
committed
fix(platform): restore settings redirects, forgot-password Enter submit, and tag tooltip visibility
- Re-add SETTINGS_REDIRECTS so /settings/integrations and /settings/skills deep links redirect to their top-level routes instead of rendering an empty settings panel (accidentally removed in 86da193 one minute after cca5054 added it) - Add opt-in onSubmit to ChipModalField input/email variants and wire it in the forgot-password modal so Enter submits again (lost in the ChipModal conversion) - Knowledge tag tooltip: drop the max-h/overflow-y-auto clamp that the pointer-events-none floating tooltip made unreachable; truncate each tag row instead so all tags stay visible with bounded height
1 parent a68a061 commit 000e109

5 files changed

Lines changed: 42 additions & 6 deletions

File tree

apps/sim/app/(auth)/login/login-form.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,9 @@ export default function LoginPage({
547547
title='Email'
548548
value={forgotPasswordEmail}
549549
onChange={(value) => setForgotPasswordEmail(value)}
550+
onSubmit={() => {
551+
if (!isSubmittingReset) void handleForgotPassword()
552+
}}
550553
required
551554
placeholder='you@example.com'
552555
/>

apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,13 +1047,10 @@ export function KnowledgeBase({
10471047
{tagsDisplayText}
10481048
</span>
10491049
</Tooltip.Trigger>
1050-
<Tooltip.Content
1051-
side='top'
1052-
className='max-h-[104px] max-w-[240px] overflow-y-auto'
1053-
>
1050+
<Tooltip.Content side='top' className='max-w-[240px]'>
10541051
<div className='flex flex-col gap-0.5'>
10551052
{tags.map((tag) => (
1056-
<div key={tag.slot} className='text-xs'>
1053+
<div key={tag.slot} className='truncate text-xs'>
10571054
<span className='text-[var(--text-muted)]'>{tag.displayName}:</span>{' '}
10581055
{tag.value}
10591056
</div>

apps/sim/app/workspace/[workspaceId]/settings/[section]/page.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
import { Suspense } from 'react'
22
import { dehydrate, HydrationBoundary } from '@tanstack/react-query'
33
import type { Metadata } from 'next'
4+
import { redirect } from 'next/navigation'
45
import { isBillingEnabled } from '@/lib/core/config/feature-flags'
56
import { getQueryClient } from '@/app/_shell/providers/get-query-client'
67
import type { SettingsSection } from '@/app/workspace/[workspaceId]/settings/navigation'
78
import { prefetchGeneralSettings, prefetchSubscriptionData, prefetchUserProfile } from './prefetch'
89
import { SettingsPage } from './settings'
910

11+
/**
12+
* Legacy settings sections that moved to top-level workspace routes.
13+
* Old bookmarks and emails deep-link here; without the redirect the
14+
* section renderer has no matching branch and shows an empty panel.
15+
*/
16+
const SETTINGS_REDIRECTS: Record<string, (workspaceId: string) => string> = {
17+
integrations: (id) => `/workspace/${id}/integrations`,
18+
skills: (id) => `/workspace/${id}/skills`,
19+
}
20+
1021
const SECTION_TITLES: Record<string, string> = {
1122
general: 'General',
1223
secrets: 'Secrets',
@@ -44,7 +55,11 @@ export default async function SettingsSectionPage({
4455
}: {
4556
params: Promise<{ workspaceId: string; section: string }>
4657
}) {
47-
const { section } = await params
58+
const { workspaceId, section } = await params
59+
60+
const redirectTo = SETTINGS_REDIRECTS[section]
61+
if (redirectTo) redirect(redirectTo(workspaceId))
62+
4863
const queryClient = getQueryClient()
4964

5065
void prefetchGeneralSettings(queryClient)

apps/sim/components/emcn/components/chip-modal/chip-modal.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ interface ChipModalInputFieldProps extends ChipModalFieldBaseProps {
308308
autoComplete?: string
309309
/** Native input type override. Defaults to `'text'`. */
310310
inputType?: 'text' | 'password' | 'url' | 'tel' | 'search' | 'number'
311+
/**
312+
* Called when the user presses Enter in the field. Wire this to the
313+
* modal's primary action so the field behaves like a form submit.
314+
*/
315+
onSubmit?: () => void
311316
}
312317

313318
interface ChipModalEmailFieldProps extends ChipModalFieldBaseProps {
@@ -316,6 +321,11 @@ interface ChipModalEmailFieldProps extends ChipModalFieldBaseProps {
316321
onChange: (value: string) => void
317322
placeholder?: string
318323
autoComplete?: string
324+
/**
325+
* Called when the user presses Enter in the field. Wire this to the
326+
* modal's primary action so the field behaves like a form submit.
327+
*/
328+
onSubmit?: () => void
319329
}
320330

321331
interface ChipModalTextareaFieldProps extends ChipModalFieldBaseProps {
@@ -456,6 +466,16 @@ function renderChipModalControl(
456466
type={props.type === 'email' ? 'email' : (props.inputType ?? 'text')}
457467
value={props.value}
458468
onChange={(event) => props.onChange(event.target.value)}
469+
onKeyDown={
470+
props.onSubmit
471+
? (event) => {
472+
if (event.key === 'Enter' && !event.nativeEvent.isComposing) {
473+
event.preventDefault()
474+
props.onSubmit?.()
475+
}
476+
}
477+
: undefined
478+
}
459479
placeholder={props.placeholder}
460480
maxLength={props.type === 'input' ? props.maxLength : undefined}
461481
autoComplete={props.autoComplete}

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)