Skip to content

Commit f8bafb5

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
improvement(ui): share public authentication headings
1 parent 7eb9cc4 commit f8bafb5

60 files changed

Lines changed: 196 additions & 158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/rules/sim-styling.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ setWidth: (width) => {
4747

4848
## Text Scale
4949

50-
Custom font sizes (the `@theme` block in `apps/sim/app/_styles/globals.css`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px).
50+
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
51+
52+
Preserve explicit line heights when replacing arbitrary sizes. Where the old size inherited its line height, use `leading-[inherit]` if the named utility would otherwise add a different default. Keep document-relative heading/code recipes and the thinking loader's proportional label sizing distinct from ordinary UI text.
53+
54+
Use `font-inter` within the existing scoped Inter loading boundary; the utility does not load the font globally. Keep monospace for code, JSON, and credentials.
5155

5256
Icons default `size-[14px]`. Equal h/w → `size-*` (`size-[14px]`, `size-4`), never `h-N w-N`.
5357

@@ -67,7 +71,7 @@ A scroll region that can hide rows past an edge uses `useScrollEdges` with `scro
6771

6872
## Font Weight
6973

70-
Three steps, Tailwind's stock scale, nothing else: **`font-normal` (400)**, **`font-medium` (500)**, **`font-semibold` (600)**. 400 is the document default, so body text, chip labels, sidebar items, and headings carry **no weight class at all** — they inherit. Reach for a class only to step *up* from body.
74+
Three steps, explicitly adopted from Tailwind's stock scale in globals.css, nothing else: **`font-normal` (400)**, **`font-medium` (500)**, **`font-semibold` (600)**. 400 is the document default, so body text, chip labels, sidebar items, and headings carry **no weight class at all** — they inherit. Reach for a class to step *up* from body or to reset meaningful inherited weight. Raw CSS references the same `--font-weight-normal`, `--font-weight-medium`, and `--font-weight-semibold` definitions; their values remain 400/500/600.
7175

7276
Never write an arbitrary weight (`font-[380]`, `font-[430]`, `font-[450]`, …), and never set `fontWeight` in an inline `style`. There was previously a CSS-variable weight scale (`--font-weight-base/medium/semibold`, remapping `font-medium` to 440/480) plus seven ad-hoc values clustered between 380 and 500; it was deleted because nothing read as hierarchical. Off-scale values are only acceptable where the design system genuinely cannot reach — react-email templates and the static `apps/sim/emails/broadcasts/*.html`, which email clients render without CSS variables.
7377

‎.cursor/rules/sim-styling.mdc‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ setWidth: (width) => {
4747

4848
## Text Scale
4949

50-
Custom font sizes (the `@theme` block in `apps/sim/app/_styles/globals.css`): `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px. `text-sm` is Tailwind default 14px. Field titles use `text-small` (13px); hints/errors use `text-caption` (12px).
50+
Use the named scale in `apps/sim/app/_styles/globals.css`: `text-micro`=10px, `text-xs`=11px, `text-caption`=12px, `text-small`=13px, `text-base`=15px, `text-md`=16px, `text-title`=28px, `text-title-lg`=32px, and `text-display`=40px. The explicitly adopted stock entries retain their rem units and default leading: `text-sm`=0.875rem, `text-xl`=1.25rem, and `text-2xl`=1.5rem (14/20/24px at the default root size). Field titles use `text-small`; hints/errors use `text-caption`; workflow titles use `text-md`.
51+
52+
Preserve explicit line heights when replacing arbitrary sizes. Where the old size inherited its line height, use `leading-[inherit]` if the named utility would otherwise add a different default. Keep document-relative heading/code recipes and the thinking loader's proportional label sizing distinct from ordinary UI text.
53+
54+
Use `font-inter` within the existing scoped Inter loading boundary; the utility does not load the font globally. Keep monospace for code, JSON, and credentials.
5155

5256
Icons default `size-[14px]`. Equal h/w → `size-*` (`size-[14px]`, `size-4`), never `h-N w-N`.
5357

@@ -67,7 +71,7 @@ A scroll region that can hide rows past an edge uses `useScrollEdges` with `scro
6771

6872
## Font Weight
6973

70-
Three steps, Tailwind's stock scale, nothing else: **`font-normal` (400)**, **`font-medium` (500)**, **`font-semibold` (600)**. 400 is the document default, so body text, chip labels, sidebar items, and headings carry **no weight class at all** — they inherit. Reach for a class only to step *up* from body.
74+
Three steps, explicitly adopted from Tailwind's stock scale in globals.css, nothing else: **`font-normal` (400)**, **`font-medium` (500)**, **`font-semibold` (600)**. 400 is the document default, so body text, chip labels, sidebar items, and headings carry **no weight class at all** — they inherit. Reach for a class to step *up* from body or to reset meaningful inherited weight. Raw CSS references the same `--font-weight-normal`, `--font-weight-medium`, and `--font-weight-semibold` definitions; their values remain 400/500/600.
7175

7276
Never write an arbitrary weight (`font-[380]`, `font-[430]`, `font-[450]`, …), and never set `fontWeight` in an inline `style`. There was previously a CSS-variable weight scale (`--font-weight-base/medium/semibold`, remapping `font-medium` to 440/480) plus seven ad-hoc values clustered between 380 and 500; it was deleted because nothing read as hierarchical. Off-scale values are only acceptable where the design system genuinely cannot reach — react-email templates and the static `apps/sim/emails/broadcasts/*.html`, which email clients render without CSS variables.
7377

‎apps/sim/app/(auth)/components/auth-header.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ interface AuthHeaderProps {
1414
export function AuthHeader({ title, description }: AuthHeaderProps) {
1515
return (
1616
<div className='space-y-1 text-center'>
17-
<h1 className='text-balance text-[32px] text-[var(--text-primary)] leading-[1.2]'>{title}</h1>
17+
<h1 className='text-balance text-[var(--text-primary)] text-title-lg leading-[1.2]'>
18+
{title}
19+
</h1>
1820
{description != null && (
1921
<p className='text-[var(--text-muted)] text-base leading-[1.5]'>{description}</p>
2022
)}

‎apps/sim/app/(interfaces)/chat/components/auth/email/email-auth.tsx‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useEffect, useState } from 'react'
44
import { ChipInput, cn, InputOTP, InputOTPGroup, InputOTPSlot, Label } from '@sim/emcn'
55
import { createLogger } from '@sim/logger'
66
import { toError } from '@sim/utils/errors'
7+
import { PublicAuthHeader } from '@/components/auth/public-auth-header'
78
import { quickValidateEmail } from '@/lib/messaging/email/validation'
89
import { AuthSubmitButton } from '@/app/(auth)/components'
910
import { AUTH_TEXT_LINK } from '@/app/(auth)/components/auth-button-classes'
@@ -110,16 +111,14 @@ export default function EmailAuth({ identifier }: EmailAuthProps) {
110111
<div className='flex flex-1 items-center justify-center px-4 py-16'>
111112
<div className='w-full max-w-[410px]'>
112113
<div className='flex flex-col items-center justify-center'>
113-
<div className='space-y-1 text-center'>
114-
<h1 className='text-balance text-[40px] text-[var(--text-primary)] leading-[110%] tracking-[-0.02em]'>
115-
{showOtpVerification ? 'Verify Your Email' : 'Email Verification'}
116-
</h1>
117-
<p className='text-[color-mix(in_srgb,var(--text-muted)_60%,transparent)] text-lg leading-[125%] tracking-[0.02em]'>
118-
{showOtpVerification
114+
<PublicAuthHeader
115+
title={showOtpVerification ? 'Verify Your Email' : 'Email Verification'}
116+
description={
117+
showOtpVerification
119118
? `A verification code has been sent to ${email}`
120-
: 'This chat requires email verification'}
121-
</p>
122-
</div>
119+
: 'This chat requires email verification'
120+
}
121+
/>
123122

124123
<div className='mt-8 w-full max-w-[410px]'>
125124
{!showOtpVerification ? (
@@ -230,7 +229,7 @@ export default function EmailAuth({ identifier }: EmailAuthProps) {
230229
</p>
231230
</div>
232231

233-
<div className='text-center font-light text-sm'>
232+
<div className='text-center font-normal text-sm'>
234233
<button
235234
onClick={() => {
236235
setShowOtpVerification(false)

‎apps/sim/app/(interfaces)/chat/components/auth/password/password-auth.tsx‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useState } from 'react'
44
import { cn, Label } from '@sim/emcn'
55
import { createLogger } from '@sim/logger'
66
import { toError } from '@sim/utils/errors'
7+
import { PublicAuthHeader } from '@/components/auth/public-auth-header'
78
import { AuthSubmitButton, PasswordInput } from '@/app/(auth)/components'
89
import { useChatPasswordAuth } from '@/hooks/queries/chats'
910

@@ -44,14 +45,10 @@ export default function PasswordAuth({ identifier }: PasswordAuthProps) {
4445
<div className='flex flex-1 items-center justify-center px-4 py-16'>
4546
<div className='w-full max-w-[410px]'>
4647
<div className='flex flex-col items-center justify-center'>
47-
<div className='space-y-1 text-center'>
48-
<h1 className='text-balance text-[40px] text-[var(--text-primary)] leading-[110%] tracking-[-0.02em]'>
49-
Password Required
50-
</h1>
51-
<p className='text-[color-mix(in_srgb,var(--text-muted)_60%,transparent)] text-lg leading-[125%] tracking-[0.02em]'>
52-
This chat is password-protected
53-
</p>
54-
</div>
48+
<PublicAuthHeader
49+
title='Password Required'
50+
description='This chat is password-protected'
51+
/>
5552

5653
<form
5754
onSubmit={(e) => {

‎apps/sim/app/(interfaces)/chat/components/input/input.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const ChatInput: React.FC<{
182182
) : (
183183
<div className='flex h-full w-full flex-col items-center justify-center gap-0.5 text-[var(--text-muted)]'>
184184
<Paperclip className='size-[18px]' />
185-
<span className='max-w-[48px] truncate px-[2px] text-[9px]'>
185+
<span className='max-w-[48px] truncate px-[2px] text-micro'>
186186
{file.name.split('.').pop()}
187187
</span>
188188
</div>
@@ -215,7 +215,7 @@ export const ChatInput: React.FC<{
215215
onKeyDown={handleKeyDown}
216216
placeholder={isDragOver ? 'Drop files here...' : 'Enter a message...'}
217217
rows={1}
218-
className='m-0 h-auto min-h-[24px] w-full resize-none overflow-y-auto overflow-x-hidden border-0 bg-transparent p-1 text-[15px] text-[var(--text-primary)] leading-[24px] caret-[var(--text-primary)] outline-hidden [-ms-overflow-style:none] [scrollbar-width:none] placeholder:text-[var(--text-muted)] focus-visible:ring-0 focus-visible:ring-offset-0 [&::-webkit-scrollbar]:hidden'
218+
className='m-0 h-auto min-h-[24px] w-full resize-none overflow-y-auto overflow-x-hidden border-0 bg-transparent p-1 text-[var(--text-primary)] text-base leading-[24px] caret-[var(--text-primary)] outline-hidden [-ms-overflow-style:none] [scrollbar-width:none] placeholder:text-[var(--text-muted)] focus-visible:ring-0 focus-visible:ring-offset-0 [&::-webkit-scrollbar]:hidden'
219219
/>
220220

221221
<div className='flex items-center justify-between'>

‎apps/sim/app/(interfaces)/resume/[workflowId]/[executionId]/resume-page-client.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function renderStructuredValuePreview(value: unknown) {
146146
className='max-h-[220px]'
147147
/>
148148
{truncated && (
149-
<p className='mt-1 text-[11px] text-[var(--text-muted)]'>
149+
<p className='mt-1 text-[var(--text-muted)] text-xs leading-[inherit]'>
150150
Value truncated for preview ({DISPLAY_VALUE_PREVIEW_MAX_CHARS.toLocaleString()} of{' '}
151151
{prettyPrinted.length.toLocaleString()} characters shown).
152152
</p>
@@ -162,7 +162,7 @@ function renderStructuredValuePreview(value: unknown) {
162162
{truncated ? `${stringValue}…` : stringValue}
163163
</div>
164164
{truncated && (
165-
<p className='mt-1 text-[11px] text-[var(--text-muted)]'>
165+
<p className='mt-1 text-[var(--text-muted)] text-xs leading-[inherit]'>
166166
Value truncated for preview ({DISPLAY_VALUE_PREVIEW_MAX_CHARS.toLocaleString()} of{' '}
167167
{String(value).length.toLocaleString()} characters shown).
168168
</p>
@@ -774,8 +774,10 @@ export default function ResumeExecutionPage({
774774
{/* Header */}
775775
<div className='mb-8 flex items-center justify-between'>
776776
<div>
777-
<h1 className='text-[20px] text-[var(--text-primary)]'>Paused Execution</h1>
778-
<p className='mt-1 text-[14px] text-[var(--text-secondary)]'>
777+
<h1 className='text-[var(--text-primary)] text-xl leading-[inherit]'>
778+
Paused Execution
779+
</h1>
780+
<p className='mt-1 text-[var(--text-secondary)] text-sm leading-[inherit]'>
779781
Select a pause point to review and resume
780782
</p>
781783
</div>

‎apps/sim/app/(landing)/components/hero/components/hero-platform-loop/stage-block-card.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export function StageBlockCard({
373373
hasContentBelowHeader ? 'h-[40px]' : 'h-[48px]'
374374
)}
375375
>
376-
<span className='min-w-0 flex-1 truncate text-[17px] text-[var(--text-primary)]'>
376+
<span className='min-w-0 flex-1 truncate text-[var(--text-primary)] text-md'>
377377
{block.name}
378378
</span>
379379
<WorkflowTypeTag

‎apps/sim/app/_styles/globals.css‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"Noto Color Emoji";
7272

7373
--font-season: var(--font-season);
74+
--font-inter: var(--font-inter);
7475
--font-body:
7576
ui-sans-serif, -apple-system, system-ui, Segoe UI, Helvetica, Apple Color Emoji, Arial,
7677
sans-serif, Segoe UI Emoji, Segoe UI Symbol;
@@ -90,19 +91,32 @@
9091
--breakpoint-xl: 1280px;
9192
--breakpoint-2xl: 1536px;
9293

94+
--font-weight-normal: 400;
95+
--font-weight-medium: 500;
96+
--font-weight-semibold: 600;
97+
9398
--text-micro: 10px;
9499
/**
95-
* `xs` is the one size here that also exists in Tailwind's own scale, so it
96-
* inherits `--text-xs--line-height` unless that is overridden too. v4's ratio
97-
* (4/3) against an 11px size yields 14.67px, where v3 resolved 16.5px; the
98-
* paired value keeps the leading where it was.
100+
* Tailwind pairs `xs` with a default line-height ratio. Its v4 ratio (4/3)
101+
* against our 11px size yields 14.67px; the explicit 1.5 preserves the
102+
* existing 16.5px leading.
99103
*/
100104
--text-xs: 11px;
101105
--text-xs--line-height: 1.5;
102106
--text-caption: 12px;
103107
--text-small: 13px;
108+
/** Adopt the imported scale without changing its rem units or default leading. */
109+
--text-sm: 0.875rem;
110+
--text-sm--line-height: calc(1.25 / 0.875);
104111
--text-base: 15px;
105112
--text-md: 16px;
113+
--text-xl: 1.25rem;
114+
--text-xl--line-height: calc(1.75 / 1.25);
115+
--text-2xl: 1.5rem;
116+
--text-2xl--line-height: calc(2 / 1.5);
117+
--text-title: 28px;
118+
--text-title-lg: 32px;
119+
--text-display: 40px;
106120

107121
/**
108122
* Hairline scale key. Overriding `spacing` rather than `width`/`height` keeps

‎apps/sim/app/cli/auth/cli-auth-view.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export function CliAuthView() {
9696
<div className='space-y-4'>
9797
<div className='flex items-center justify-center rounded-[10px] border border-[var(--border-1)] py-5'>
9898
{/* `pl` offsets the trailing letter-space `tracking` adds after the last glyph, which would otherwise pull the code left of optical center. */}
99-
<code className='pl-[0.2em] font-mono text-[28px] text-[var(--text-primary)] leading-none tracking-[0.2em]'>
99+
<code className='pl-[0.2em] font-mono text-[var(--text-primary)] text-title leading-none tracking-[0.2em]'>
100100
{request.pairing}
101101
</code>
102102
</div>

0 commit comments

Comments
 (0)