Refine onboarding feature wall layout (#3978)
* fix: refine onboarding feature wall layout * fix: tune onboarding agent layout * fix: prevent repo AI draft sync render loop
This commit is contained in:
@@ -55,7 +55,7 @@ function Page(props: { active: boolean; children: JSX.Element }): JSX.Element {
|
||||
<div
|
||||
aria-hidden={!props.active}
|
||||
className={cn(
|
||||
'absolute inset-0 transition-[opacity,transform] duration-[360ms] ease-out',
|
||||
'absolute inset-0 overflow-hidden transition-[opacity,transform] duration-[360ms] ease-out',
|
||||
props.active
|
||||
? 'pointer-events-auto translate-y-0 opacity-100'
|
||||
: 'pointer-events-none translate-y-1 opacity-0'
|
||||
|
||||
@@ -60,12 +60,14 @@ export function FeatureWallBody(props: {
|
||||
const isAgentsUsage = isAgents && agentsActiveStep?.id === 'usage'
|
||||
const isAgentsStatuses = isAgents && agentsActiveStep?.id === 'statuses'
|
||||
const isAgentsOrchestration = isAgents && agentsActiveStep?.id === 'orchestration'
|
||||
const isOnboardingAgentsStep = source === 'onboarding' && isAgents
|
||||
const isWorkbenchEditor = isWorkbench && workbenchActiveStep?.id === 'editor'
|
||||
const isWorkbenchBrowser = isWorkbench && workbenchActiveStep?.id === 'browser'
|
||||
const isReviewPrView = isReview && reviewActiveStep?.id === 'pr-view'
|
||||
const isReviewShip = isReview && reviewActiveStep?.id === 'ship'
|
||||
const hasAnimatedVisual = isWorkspaces || isTasks || isAgents || isWorkbench || isReview
|
||||
const isOnboardingUsage = isAgentsUsage && source === 'onboarding'
|
||||
const isOnboardingStatuses = isAgentsStatuses && source === 'onboarding'
|
||||
const isOnboardingWorkbenchBrowser = isWorkbenchBrowser && source === 'onboarding'
|
||||
const isReviewSettingBesideVisual = isReviewPrView || isReviewShip
|
||||
const isOnboardingOrchestrationBesideVisual = isAgentsOrchestration && source === 'onboarding'
|
||||
@@ -88,7 +90,7 @@ export function FeatureWallBody(props: {
|
||||
? 'w-[480px]'
|
||||
: isAgentsUsage
|
||||
? isOnboardingUsage
|
||||
? 'w-[340px]'
|
||||
? 'w-[360px]'
|
||||
: 'w-[400px]'
|
||||
: isAgentsStatuses
|
||||
? 'w-[420px]'
|
||||
@@ -97,29 +99,29 @@ export function FeatureWallBody(props: {
|
||||
? 'w-[440px]'
|
||||
: 'w-[520px]'
|
||||
: 'w-[520px]'
|
||||
const settingWidth = isTasks
|
||||
? 'max-w-[760px]'
|
||||
: isAgentsUsage
|
||||
? isOnboardingUsage
|
||||
? 'max-w-[400px]'
|
||||
: 'max-w-[440px]'
|
||||
: isAgentsStatuses
|
||||
? 'max-w-[520px]'
|
||||
: isAgentsOrchestration
|
||||
? isOnboardingOrchestrationBesideVisual
|
||||
? 'max-w-[360px]'
|
||||
: 'max-w-[400px]'
|
||||
: isReviewSettingBesideVisual
|
||||
? isCompactBesideVisual
|
||||
? 'max-w-[320px]'
|
||||
: 'max-w-[420px]'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? 'max-w-[340px]'
|
||||
: 'max-w-[400px]'
|
||||
: 'max-w-[480px]'
|
||||
const settingWidth = isAgentsUsage
|
||||
? isOnboardingUsage
|
||||
? 'max-w-[400px]'
|
||||
: 'max-w-[440px]'
|
||||
: isAgentsStatuses
|
||||
? isOnboardingStatuses
|
||||
? 'max-w-[360px]'
|
||||
: 'max-w-[520px]'
|
||||
: isAgentsOrchestration
|
||||
? isOnboardingOrchestrationBesideVisual
|
||||
? 'max-w-[360px]'
|
||||
: 'max-w-[400px]'
|
||||
: isReviewSettingBesideVisual
|
||||
? isCompactBesideVisual
|
||||
? 'max-w-[320px]'
|
||||
: 'max-w-[420px]'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? 'max-w-[340px]'
|
||||
: 'max-w-[400px]'
|
||||
: 'max-w-[480px]'
|
||||
const settingContent = isTasks ? (
|
||||
<div className="grid grid-cols-1 gap-3 md:grid-cols-2">
|
||||
<div className="grid grid-cols-1 gap-3">
|
||||
<LinearRow compact />
|
||||
<GitHubRow compact />
|
||||
</div>
|
||||
@@ -137,26 +139,28 @@ export function FeatureWallBody(props: {
|
||||
<AiCommitPrSettingsCard />
|
||||
) : null
|
||||
const settingBesideVisual =
|
||||
isAgentsUsage || isAgentsOrchestration || isWorkbenchBrowser || isReviewSettingBesideVisual
|
||||
(isOnboardingAgentsStep && Boolean(settingContent)) ||
|
||||
isAgentsUsage ||
|
||||
isAgentsOrchestration ||
|
||||
isReviewSettingBesideVisual
|
||||
const shouldLabelOnboardingTourZones = isOnboardingAgentsStep && settingBesideVisual
|
||||
// Why: several visuals expand/collapse internally; setup controls should sit
|
||||
// after a stable stage so they do not jump with the animation loop.
|
||||
const visualStageHeight = isTasks
|
||||
? 'h-[288px]'
|
||||
: isWorkbenchEditor
|
||||
? 'h-[390px]'
|
||||
: isWorkbenchBrowser
|
||||
? 'h-[270px]'
|
||||
: isWorkbench
|
||||
? 'h-[340px]'
|
||||
: isReview
|
||||
? 'h-[416px]'
|
||||
: isAgentsOrchestration
|
||||
? 'h-[392px]'
|
||||
: isAgentsStatuses
|
||||
? 'h-[250px]'
|
||||
: isAgentsUsage
|
||||
? 'h-[392px]'
|
||||
: 'h-[330px]'
|
||||
const visualStageHeight = isWorkbenchEditor
|
||||
? 'h-[390px]'
|
||||
: isWorkbenchBrowser
|
||||
? 'h-[270px]'
|
||||
: isWorkbench
|
||||
? 'h-[340px]'
|
||||
: isReview
|
||||
? 'h-[416px]'
|
||||
: isAgentsOrchestration
|
||||
? 'h-[392px]'
|
||||
: isAgentsStatuses
|
||||
? 'h-[250px]'
|
||||
: isAgentsUsage
|
||||
? 'h-[392px]'
|
||||
: 'h-[330px]'
|
||||
const animatedVisual = isWorkspaces ? (
|
||||
<WorkspacesAnimatedVisual reducedMotion={prefersReducedMotion} />
|
||||
) : isTasks ? (
|
||||
@@ -182,7 +186,7 @@ export function FeatureWallBody(props: {
|
||||
<AgentsOrchestrationVisual
|
||||
reducedMotion={prefersReducedMotion}
|
||||
activeStepId={agentsActiveStep.id}
|
||||
widthPx={isAgentsUsage ? (isOnboardingUsage ? 340 : 400) : isAgentsStatuses ? 420 : undefined}
|
||||
widthPx={isAgentsUsage ? (isOnboardingUsage ? 360 : 400) : isAgentsStatuses ? 420 : undefined}
|
||||
heightPx={isAgentsStatuses ? 250 : undefined}
|
||||
/>
|
||||
) : null
|
||||
@@ -198,16 +202,38 @@ export function FeatureWallBody(props: {
|
||||
className={cn(
|
||||
'max-w-full',
|
||||
animatedVisualWidth,
|
||||
isAgentsOrchestration ? 'translate-x-6' : null
|
||||
isAgentsOrchestration && !isOnboardingOrchestrationBesideVisual ? 'translate-x-6' : null
|
||||
)}
|
||||
>
|
||||
{animatedVisual}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
const previewVisualNode = shouldLabelOnboardingTourZones ? (
|
||||
<TourZone label="Preview" className="items-center">
|
||||
{animatedVisualNode}
|
||||
</TourZone>
|
||||
) : (
|
||||
animatedVisualNode
|
||||
)
|
||||
|
||||
if (isTasks) {
|
||||
return (
|
||||
<div className="flex h-full min-h-0 flex-col px-8 pb-6 pt-1">
|
||||
<div className="@container flex min-h-0 flex-1 items-start">
|
||||
<div className="grid w-full items-start gap-5 @[820px]:grid-cols-[minmax(420px,560px)_minmax(280px,320px)]">
|
||||
<div className="flex h-[260px] w-full items-start justify-center">
|
||||
<div className="w-[520px] max-w-full">{animatedVisual}</div>
|
||||
</div>
|
||||
<div className="grid w-full gap-3">{settingContent}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={cn('flex flex-col gap-5 px-9 pt-1', isTasks ? 'pb-3' : 'pb-9')}>
|
||||
<div className="flex flex-col gap-5 px-8 pb-9 pt-1">
|
||||
<div
|
||||
className={cn(
|
||||
'grid grid-cols-1 items-start gap-7',
|
||||
@@ -231,36 +257,40 @@ export function FeatureWallBody(props: {
|
||||
className={cn(
|
||||
'grid w-full items-start',
|
||||
isOnboardingOrchestrationBesideVisual ||
|
||||
isOnboardingStatuses ||
|
||||
isOnboardingWorkbenchBrowser ||
|
||||
(isCompactBesideVisual && isReviewSettingBesideVisual)
|
||||
? 'gap-4'
|
||||
: 'gap-5',
|
||||
settingBesideVisual ? 'justify-between' : 'justify-center',
|
||||
'justify-center',
|
||||
isAgentsUsage
|
||||
? isOnboardingUsage
|
||||
? '@[780px]:grid-cols-[minmax(360px,400px)_minmax(320px,340px)] @[780px]:items-center'
|
||||
? '@[780px]:grid-cols-[minmax(360px,400px)_minmax(340px,360px)] @[780px]:items-center'
|
||||
: '@[860px]:grid-cols-[minmax(400px,440px)_minmax(360px,400px)] @[860px]:items-center'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? '@[800px]:grid-cols-[minmax(320px,340px)_minmax(440px,460px)] @[800px]:items-center'
|
||||
: '@[880px]:grid-cols-[minmax(360px,400px)_minmax(440px,480px)] @[880px]:items-center'
|
||||
: isOnboardingOrchestrationBesideVisual
|
||||
? '@[800px]:grid-cols-[minmax(340px,360px)_minmax(420px,440px)] @[800px]:items-center'
|
||||
: isReviewSettingBesideVisual
|
||||
? isCompactBesideVisual
|
||||
? '@[800px]:grid-cols-[minmax(300px,320px)_minmax(460px,480px)] @[800px]:items-center'
|
||||
: cn(
|
||||
'@[840px]:grid-cols-[minmax(380px,420px)_minmax(440px,480px)]',
|
||||
isReviewShip ? '@[840px]:items-start' : '@[840px]:items-center'
|
||||
)
|
||||
: isCompactBesideVisual
|
||||
? '@[700px]:grid-cols-[minmax(300px,340px)_minmax(320px,340px)] @[700px]:items-center'
|
||||
: isAgentsOrchestration
|
||||
? '@[860px]:grid-cols-[minmax(340px,380px)_auto] @[860px]:items-center'
|
||||
: '@[760px]:grid-cols-[auto_minmax(320px,420px)] @[760px]:items-center'
|
||||
: isOnboardingStatuses
|
||||
? '@[760px]:grid-cols-[minmax(320px,360px)_minmax(400px,420px)] @[760px]:items-center'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? '@[800px]:grid-cols-[minmax(320px,340px)_minmax(440px,460px)] @[800px]:items-center'
|
||||
: '@[880px]:grid-cols-[minmax(360px,400px)_minmax(440px,480px)] @[880px]:items-center'
|
||||
: isOnboardingOrchestrationBesideVisual
|
||||
? '@[800px]:grid-cols-[minmax(340px,360px)_minmax(420px,440px)] @[800px]:items-center'
|
||||
: isReviewSettingBesideVisual
|
||||
? isCompactBesideVisual
|
||||
? '@[800px]:grid-cols-[minmax(300px,320px)_minmax(460px,480px)] @[800px]:items-center'
|
||||
: cn(
|
||||
'@[840px]:grid-cols-[minmax(380px,420px)_minmax(440px,480px)]',
|
||||
isReviewShip ? '@[840px]:items-start' : '@[840px]:items-center'
|
||||
)
|
||||
: isCompactBesideVisual
|
||||
? '@[700px]:grid-cols-[minmax(300px,340px)_minmax(320px,340px)] @[700px]:items-center'
|
||||
: isAgentsOrchestration
|
||||
? '@[860px]:grid-cols-[minmax(340px,380px)_auto] @[860px]:items-center'
|
||||
: '@[760px]:grid-cols-[auto_minmax(320px,420px)] @[760px]:items-center'
|
||||
)}
|
||||
>
|
||||
<div
|
||||
<TourZone
|
||||
label={shouldLabelOnboardingTourZones ? 'Setup' : null}
|
||||
className={cn(
|
||||
'w-full',
|
||||
isReviewShip ? 'translate-y-0.5 self-start' : 'self-center',
|
||||
@@ -268,26 +298,30 @@ export function FeatureWallBody(props: {
|
||||
? isOnboardingUsage
|
||||
? 'max-w-[400px]'
|
||||
: 'max-w-[440px]'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? 'max-w-[340px]'
|
||||
: 'max-w-[400px]'
|
||||
: isOnboardingOrchestrationBesideVisual
|
||||
: isAgentsStatuses
|
||||
? isOnboardingStatuses
|
||||
? 'max-w-[360px]'
|
||||
: isCompactBesideVisual
|
||||
? isReviewSettingBesideVisual
|
||||
? 'max-w-[320px]'
|
||||
: 'max-w-[340px]'
|
||||
: isAgentsOrchestration
|
||||
? 'max-w-[400px]'
|
||||
: isReviewSettingBesideVisual
|
||||
? 'max-w-[420px]'
|
||||
: 'max-w-[420px]'
|
||||
: 'max-w-[520px]'
|
||||
: isWorkbenchBrowser
|
||||
? isOnboardingWorkbenchBrowser
|
||||
? 'max-w-[340px]'
|
||||
: 'max-w-[400px]'
|
||||
: isOnboardingOrchestrationBesideVisual
|
||||
? 'max-w-[360px]'
|
||||
: isCompactBesideVisual
|
||||
? isReviewSettingBesideVisual
|
||||
? 'max-w-[320px]'
|
||||
: 'max-w-[340px]'
|
||||
: isAgentsOrchestration
|
||||
? 'max-w-[400px]'
|
||||
: isReviewSettingBesideVisual
|
||||
? 'max-w-[420px]'
|
||||
: 'max-w-[420px]'
|
||||
)}
|
||||
>
|
||||
{settingContent}
|
||||
</div>
|
||||
{animatedVisualNode}
|
||||
</TourZone>
|
||||
{previewVisualNode}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
@@ -307,3 +341,21 @@ export function FeatureWallBody(props: {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function TourZone(props: {
|
||||
label: string | null
|
||||
className?: string
|
||||
children: JSX.Element | null
|
||||
}): JSX.Element {
|
||||
const { label, className, children } = props
|
||||
return (
|
||||
<div className={cn('flex min-w-0 flex-col gap-2', className)}>
|
||||
{label ? (
|
||||
<div className="text-[11px] font-semibold uppercase tracking-[0.05em] text-muted-foreground">
|
||||
{label}
|
||||
</div>
|
||||
) : null}
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function FeatureWallRail(props: {
|
||||
className="scrollbar-sleek h-full max-h-72 overflow-y-auto border-b border-border bg-card p-2 md:max-h-none md:border-b-0"
|
||||
aria-label="Workflows"
|
||||
>
|
||||
<div role="tablist" aria-orientation="vertical" className="flex flex-col gap-0.5 pt-1.5">
|
||||
<div role="tablist" aria-orientation="vertical" className="flex flex-col gap-1.5 pt-1.5">
|
||||
{FEATURE_WALL_WORKFLOWS.map((workflow, index) => {
|
||||
const isSelected = workflow.id === selectedId
|
||||
const isDone = workflowDone[workflow.id] === true
|
||||
@@ -128,7 +128,7 @@ export function FeatureWallRail(props: {
|
||||
)}
|
||||
>
|
||||
<div className="min-h-0">
|
||||
<div className="mt-0.5 flex flex-col gap-0.5 pl-7">
|
||||
<div className="mt-1 flex flex-col gap-1 pl-7">
|
||||
{subSteps.steps.map((step, stepIdx) => {
|
||||
const isStepActive = step.id === subSteps.activeId
|
||||
const isStepDone = subSteps.done[step.id] === true
|
||||
|
||||
@@ -56,6 +56,10 @@ export function FeatureWallTourPanel(props: {
|
||||
continueButton: ReactNode
|
||||
leadingFooterContent?: ReactNode
|
||||
}): JSX.Element {
|
||||
// Why: the tour should not slide horizontally between pages; individual
|
||||
// visuals can adapt inside the stage, but the page anchor must stay fixed.
|
||||
const contentStageClassName = 'mx-auto w-full max-w-[940px]'
|
||||
const previewTitle = props.activeStepCopy?.title ?? props.selected.title
|
||||
const panel = (
|
||||
<div
|
||||
className={cn(
|
||||
@@ -101,57 +105,51 @@ export function FeatureWallTourPanel(props: {
|
||||
className="scrollbar-sleek grid min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-y-auto"
|
||||
aria-labelledby={props.previewTitleId}
|
||||
>
|
||||
<div className="px-9 pb-4 pt-7">
|
||||
<h3
|
||||
id={props.previewTitleId}
|
||||
className="text-3xl font-semibold leading-tight tracking-tight"
|
||||
>
|
||||
{props.selected.title}
|
||||
</h3>
|
||||
{props.activeStepCopy ? (
|
||||
<div className="mt-3 flex flex-wrap items-center gap-2">
|
||||
<div className="text-xl font-semibold leading-snug tracking-tight text-foreground">
|
||||
{props.activeStepCopy.title}
|
||||
</div>
|
||||
{props.activeStepCopy.optional ? (
|
||||
<span className="rounded-full border border-border bg-background px-2 py-0.5 text-[11px] font-medium text-muted-foreground">
|
||||
Optional
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
<p
|
||||
className={cn(
|
||||
props.activeStepCopy ? 'mt-1.5' : 'mt-3',
|
||||
'text-[15px] leading-snug text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
<div className={cn(contentStageClassName, 'px-8 pb-3 pt-6 text-center')}>
|
||||
<div className="flex flex-wrap items-center justify-center gap-2">
|
||||
<h3
|
||||
id={props.previewTitleId}
|
||||
className="text-2xl font-semibold leading-tight tracking-tight"
|
||||
>
|
||||
{previewTitle}
|
||||
</h3>
|
||||
{props.activeStepCopy?.optional ? (
|
||||
<span className="rounded-full border border-border bg-background px-2 py-0.5 text-[11px] font-medium text-muted-foreground">
|
||||
Optional
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
<p className="mx-auto mt-3 max-w-[56ch] text-sm leading-relaxed text-muted-foreground">
|
||||
{props.description}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<FeatureWallBody
|
||||
selected={props.selected}
|
||||
posterUrl={props.posterUrl}
|
||||
gifUrl={props.gifUrl}
|
||||
showGif={props.showGif}
|
||||
prefersReducedMotion={props.prefersReducedMotion}
|
||||
source={props.source}
|
||||
agentsActiveStep={props.agentsActiveStep}
|
||||
workbenchActiveStep={props.workbenchActiveStep}
|
||||
reviewActiveStep={props.reviewActiveStep}
|
||||
orchestrationSkill={props.orchestrationSkill}
|
||||
browserUseSkill={props.browserUseSkill}
|
||||
onUsageAccountStateChange={props.completion.refreshUsageAccountState}
|
||||
settings={props.settings}
|
||||
updateSettings={props.updateSettings}
|
||||
/>
|
||||
<div className={contentStageClassName}>
|
||||
<FeatureWallBody
|
||||
selected={props.selected}
|
||||
posterUrl={props.posterUrl}
|
||||
gifUrl={props.gifUrl}
|
||||
showGif={props.showGif}
|
||||
prefersReducedMotion={props.prefersReducedMotion}
|
||||
source={props.source}
|
||||
agentsActiveStep={props.agentsActiveStep}
|
||||
workbenchActiveStep={props.workbenchActiveStep}
|
||||
reviewActiveStep={props.reviewActiveStep}
|
||||
orchestrationSkill={props.orchestrationSkill}
|
||||
browserUseSkill={props.browserUseSkill}
|
||||
onUsageAccountStateChange={props.completion.refreshUsageAccountState}
|
||||
settings={props.settings}
|
||||
updateSettings={props.updateSettings}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{!props.detachedFooter ? (
|
||||
<footer className="flex items-center justify-between border-t border-border bg-card/50 px-4 py-3 sm:px-7">
|
||||
{props.footerText ? (
|
||||
{props.leadingFooterContent ? (
|
||||
props.leadingFooterContent
|
||||
) : props.footerText ? (
|
||||
<span className="text-xs text-muted-foreground">{props.footerText}</span>
|
||||
) : (
|
||||
<span />
|
||||
|
||||
@@ -358,9 +358,11 @@ export function WorkbenchAnimatedVisual(props: { reducedMotion: boolean }): JSX.
|
||||
<span className="size-2.5 rounded-full bg-emerald-400/70" />
|
||||
</div>
|
||||
|
||||
{/* Why: onboarding previews can flip theme without remounting this visual;
|
||||
token-backed terminal chrome follows explicit and system theme changes. */}
|
||||
<div
|
||||
className={cn(
|
||||
'grid bg-[#fafafa] font-mono text-[11px] transition-[grid-template-columns] duration-[600ms] ease-[cubic-bezier(.2,.8,.2,1)]',
|
||||
'grid bg-[var(--editor-surface)] font-mono text-[11px] transition-[grid-template-columns] duration-[600ms] ease-[cubic-bezier(.2,.8,.2,1)]',
|
||||
splitOpen ? 'grid-cols-[1fr_1fr]' : 'grid-cols-[1fr_0fr]'
|
||||
)}
|
||||
style={{ minHeight: 230 }}
|
||||
@@ -389,7 +391,7 @@ export function WorkbenchAnimatedVisual(props: { reducedMotion: boolean }): JSX.
|
||||
<PwName> {running.desc}</PwName>
|
||||
</TermLine>
|
||||
|
||||
{/* Right-click context menu — light card, skeleton bars for the
|
||||
{/* Right-click context menu — theme card, skeleton bars for the
|
||||
other items, real labels only for the two split actions. */}
|
||||
<ContextMenu
|
||||
shown={menuShown}
|
||||
@@ -592,8 +594,8 @@ function RightPaneScrollback(props: { lines: readonly RightLine[] }): JSX.Elemen
|
||||
<TermLine key={i}>
|
||||
{line.withGlyph ? <span className="mr-1.5 text-amber-600">●</span> : null}
|
||||
<span
|
||||
className="inline-block h-[7px] rounded-[3px] align-[1px]"
|
||||
style={{ width: `${line.widthPct}%`, background: 'rgba(24,24,27,0.18)' }}
|
||||
className="inline-block h-[7px] rounded-[3px] bg-foreground/[0.18] align-[1px]"
|
||||
style={{ width: `${line.widthPct}%` }}
|
||||
/>
|
||||
</TermLine>
|
||||
)
|
||||
|
||||
@@ -77,7 +77,6 @@ function Popover(props: {
|
||||
const { expanded, targeted, swapped, pulseKey } = props
|
||||
const sessionPctText = swapped ? '100% left' : '4% left'
|
||||
const sessionResetText = swapped ? 'Resets in 5h' : 'Resets in 47m'
|
||||
const activeEmail = swapped ? 'eng@acme.com' : 'me@personal.dev'
|
||||
const sessionFillWidth = swapped ? '100%' : '4%'
|
||||
const weeklyFillWidth = '62%'
|
||||
|
||||
@@ -129,7 +128,7 @@ function Popover(props: {
|
||||
<div className="h-px bg-border" />
|
||||
<div className="text-[11px] font-semibold">Codex Account</div>
|
||||
<div className="flex items-center justify-between text-[11px]">
|
||||
<span className="truncate">{activeEmail}</span>
|
||||
<AccountNameSkeleton widthClassName={swapped ? 'w-24' : 'w-28'} />
|
||||
<span
|
||||
className={cn(
|
||||
'inline-flex items-center justify-center text-muted-foreground transition-transform duration-[240ms] ease-[cubic-bezier(.2,.8,.2,1)]',
|
||||
@@ -160,14 +159,14 @@ function Popover(props: {
|
||||
</div>
|
||||
<div className="flex flex-col gap-0.5 rounded-lg border border-border bg-foreground/[0.025] p-[3px]">
|
||||
<SwitchAccount
|
||||
email="eng@acme.com"
|
||||
accountWidthClassName="w-24"
|
||||
tag="Team"
|
||||
fillPct={100}
|
||||
metaText="100%"
|
||||
highlighted={targeted}
|
||||
/>
|
||||
<SwitchAccount
|
||||
email="side-project@gmail.com"
|
||||
accountWidthClassName="w-32"
|
||||
tag={null}
|
||||
fillPct={78}
|
||||
metaText="78%"
|
||||
@@ -184,6 +183,12 @@ function Popover(props: {
|
||||
)
|
||||
}
|
||||
|
||||
function AccountNameSkeleton(props: { widthClassName: string }): JSX.Element {
|
||||
return (
|
||||
<span className={cn('block h-2.5 rounded-full bg-foreground/[0.14]', props.widthClassName)} />
|
||||
)
|
||||
}
|
||||
|
||||
function UsageBar(props: {
|
||||
title: string
|
||||
fillWidth: string
|
||||
@@ -212,7 +217,7 @@ function UsageBar(props: {
|
||||
}
|
||||
|
||||
function SwitchAccount(props: {
|
||||
email: string
|
||||
accountWidthClassName: string
|
||||
tag: string | null
|
||||
fillPct: number
|
||||
metaText: string
|
||||
@@ -226,7 +231,7 @@ function SwitchAccount(props: {
|
||||
)}
|
||||
>
|
||||
<div className="flex min-w-0 items-center gap-1.5">
|
||||
<span className="truncate">{props.email}</span>
|
||||
<AccountNameSkeleton widthClassName={props.accountWidthClassName} />
|
||||
{props.tag ? (
|
||||
<span className="shrink-0 rounded-full bg-foreground/[0.06] px-1.5 py-px text-[9.5px] font-semibold uppercase tracking-[0.06em] text-muted-foreground">
|
||||
{props.tag}
|
||||
|
||||
@@ -10,21 +10,26 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
.ravs-window {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
--ravs-soft-surface: color-mix(in srgb, var(--foreground) 2%, var(--card));
|
||||
--ravs-soft-fill: color-mix(in srgb, var(--foreground) 6%, transparent);
|
||||
--ravs-panel-border: color-mix(in srgb, var(--foreground) 18%, var(--border));
|
||||
--ravs-emphasis-border: color-mix(in srgb, var(--foreground) 44%, var(--border));
|
||||
--ravs-floating-shadow: 0 14px 30px rgb(0 0 0 / 0.22), 0 2px 6px rgb(0 0 0 / 0.12);
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 1px 2px rgba(24,24,27,0.04);
|
||||
box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
|
||||
}
|
||||
.ravs-difftoolbar {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
padding: 6px 10px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: rgba(24,24,27,0.015);
|
||||
background: var(--ravs-soft-surface);
|
||||
font-size: 11px;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.ravs-diff-path {
|
||||
min-width: 0;
|
||||
@@ -32,7 +37,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--foreground);
|
||||
}
|
||||
.ravs-ai-chip {
|
||||
margin-left: auto;
|
||||
@@ -41,7 +46,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
overflow: hidden;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(24,24,27,0.02);
|
||||
background: var(--ravs-soft-surface);
|
||||
opacity: 0;
|
||||
transform: translateY(-2px);
|
||||
transition: opacity 320ms ease, transform 320ms ease;
|
||||
@@ -52,7 +57,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
padding: 3px 8px;
|
||||
font-size: 11px;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
background: transparent;
|
||||
line-height: 1;
|
||||
}
|
||||
@@ -71,7 +76,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
.ravs-ai-chip .ravs-send-btn.is-flash .ravs-send-glow { opacity: 1; }
|
||||
.ravs-count-num {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--foreground);
|
||||
font-weight: 600;
|
||||
}
|
||||
.ravs-diffbody {
|
||||
@@ -85,16 +90,15 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||
font-size: 11.5px;
|
||||
line-height: 1.55;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--foreground);
|
||||
padding: 4px 0 8px;
|
||||
transition: opacity 240ms ease;
|
||||
}
|
||||
.ravs-diffscroll.is-hidden { opacity: 0; pointer-events: none; }
|
||||
|
||||
.ravs-term {
|
||||
position: absolute; inset: 0;
|
||||
background: #fafafa;
|
||||
color: var(--foreground, #18181b);
|
||||
background: var(--editor-surface, var(--card));
|
||||
color: var(--foreground);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
||||
font-size: 11px;
|
||||
line-height: 1.45;
|
||||
@@ -120,11 +124,8 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
word-break: break-word;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.ravs-term-muted { color: var(--muted-foreground, #71717a); }
|
||||
.ravs-term-glyph {
|
||||
color: rgb(217 119 6);
|
||||
margin-right: 6px;
|
||||
}
|
||||
.ravs-term-muted { color: var(--muted-foreground); }
|
||||
.ravs-term-glyph { color: rgb(217 119 6); margin-right: 6px; }
|
||||
.ravs-term-check {
|
||||
color: rgb(16 185 129);
|
||||
font-weight: 700;
|
||||
@@ -135,25 +136,22 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
width: 8px; height: 8px;
|
||||
margin-right: 6px;
|
||||
border-radius: 999px;
|
||||
border: 1.5px solid rgba(24,24,27,0.20);
|
||||
border-top-color: var(--foreground, #18181b);
|
||||
border: 1.5px solid color-mix(in srgb, var(--foreground) 20%, transparent);
|
||||
border-top-color: var(--foreground);
|
||||
vertical-align: -1px;
|
||||
animation: ravs-term-spin 0.9s linear infinite;
|
||||
}
|
||||
@keyframes ravs-term-spin {
|
||||
from { transform: rotate(0deg) }
|
||||
to { transform: rotate(360deg) }
|
||||
}
|
||||
@keyframes ravs-term-spin { to { transform: rotate(360deg) } }
|
||||
.ravs-hunk-header {
|
||||
display: grid;
|
||||
grid-template-columns: 36px 36px 16px minmax(0,1fr);
|
||||
align-items: center;
|
||||
padding: 1px 8px 1px 0;
|
||||
background: rgba(99, 102, 241, 0.06);
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
font-size: 10.5px;
|
||||
border-top: 1px solid rgba(24,24,27,0.06);
|
||||
border-bottom: 1px solid rgba(24,24,27,0.06);
|
||||
border-top: 1px solid var(--border);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.ravs-hunk-header .ravs-text {
|
||||
grid-column: 4 / -1;
|
||||
@@ -170,14 +168,14 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
.ravs-ln {
|
||||
text-align: right;
|
||||
padding: 0 6px 0 0;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
font-size: 10.5px;
|
||||
user-select: none;
|
||||
opacity: 0.85;
|
||||
}
|
||||
.ravs-marker {
|
||||
text-align: center;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
font-weight: 700;
|
||||
opacity: 0.7;
|
||||
}
|
||||
@@ -189,10 +187,20 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
.ravs-tok-kw { color: #a855f7; }
|
||||
.ravs-tok-id { color: #2563eb; }
|
||||
.ravs-tok-str { color: #16a34a; }
|
||||
.ravs-diff-line.is-add { background: rgba(22, 163, 74, 0.10); }
|
||||
.ravs-diff-line.is-add .ravs-marker { color: rgba(22, 163, 74, 0.55); opacity: 1; }
|
||||
.ravs-diff-line.is-rem { background: rgba(220, 38, 38, 0.10); }
|
||||
.ravs-diff-line.is-rem .ravs-marker { color: rgba(220, 38, 38, 0.55); opacity: 1; }
|
||||
.ravs-diff-line.is-add {
|
||||
background: color-mix(in srgb, var(--git-decoration-added) 14%, transparent);
|
||||
}
|
||||
.ravs-diff-line.is-add .ravs-marker {
|
||||
color: color-mix(in srgb, var(--git-decoration-added) 72%, transparent);
|
||||
opacity: 1;
|
||||
}
|
||||
.ravs-diff-line.is-rem {
|
||||
background: color-mix(in srgb, var(--git-decoration-deleted) 14%, transparent);
|
||||
}
|
||||
.ravs-diff-line.is-rem .ravs-marker {
|
||||
color: color-mix(in srgb, var(--git-decoration-deleted) 72%, transparent);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.ravs-add-note-btn {
|
||||
position: absolute;
|
||||
@@ -204,11 +212,11 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
padding: 0;
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, var(--border));
|
||||
border-radius: 4px;
|
||||
background: rgba(24,24,27,0.04);
|
||||
color: rgba(24,24,27,0.78);
|
||||
background: var(--ravs-soft-fill);
|
||||
color: var(--foreground);
|
||||
z-index: 5;
|
||||
opacity: 0;
|
||||
box-shadow: 0 1px 2px rgba(24,24,27,0.12);
|
||||
box-shadow: 0 1px 2px rgb(0 0 0 / 0.14);
|
||||
pointer-events: none;
|
||||
transition: opacity 160ms ease;
|
||||
}
|
||||
@@ -224,30 +232,27 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
opacity 280ms ease 60ms,
|
||||
padding 360ms cubic-bezier(.4,0,.2,1);
|
||||
}
|
||||
.ravs-note-row.is-visible {
|
||||
max-height: 90px;
|
||||
opacity: 1;
|
||||
}
|
||||
.ravs-note-row.is-visible { max-height: 90px; opacity: 1; }
|
||||
.ravs-note-card {
|
||||
margin: 0 12px;
|
||||
position: relative;
|
||||
border: 1px solid rgba(24,24,27,0.22);
|
||||
border-left: 3px solid rgba(24,24,27,0.55);
|
||||
border: 1px solid var(--ravs-panel-border);
|
||||
border-left: 3px solid var(--ravs-emphasis-border);
|
||||
border-radius: 6px;
|
||||
background-color: #ffffff;
|
||||
background-color: var(--card);
|
||||
padding: 5px 8px 5px 10px;
|
||||
box-shadow: 0 1px 2px rgba(24,24,27,0.15);
|
||||
box-shadow: 0 1px 2px rgb(0 0 0 / 0.16);
|
||||
}
|
||||
.ravs-note-meta {
|
||||
font-size: 9.5px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.ravs-note-body {
|
||||
font-size: 11.5px;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--foreground);
|
||||
line-height: 1.35;
|
||||
margin-top: 2px;
|
||||
}
|
||||
@@ -259,40 +264,36 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
max-width: none;
|
||||
z-index: 20;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid rgba(24,24,27,0.32);
|
||||
border-left: 3px solid rgba(24,24,27,0.7);
|
||||
border: 1px solid var(--ravs-panel-border);
|
||||
border-left: 3px solid var(--ravs-emphasis-border);
|
||||
border-radius: 6px;
|
||||
background-color: #ffffff;
|
||||
color: var(--foreground, #18181b);
|
||||
box-shadow:
|
||||
0 14px 30px rgba(0,0,0,0.22),
|
||||
0 2px 6px rgba(0,0,0,0.12);
|
||||
background-color: var(--card);
|
||||
color: var(--foreground);
|
||||
box-shadow: var(--ravs-floating-shadow);
|
||||
display: flex; flex-direction: column; gap: 6px;
|
||||
opacity: 0;
|
||||
transform: translateY(-4px) scale(0.985);
|
||||
pointer-events: none;
|
||||
transition: opacity 180ms ease, transform 180ms ease;
|
||||
}
|
||||
.ravs-popover.is-visible {
|
||||
opacity: 1; transform: none; pointer-events: auto;
|
||||
}
|
||||
.ravs-popover.is-visible { opacity: 1; transform: none; pointer-events: auto; }
|
||||
.ravs-pop-label {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.ravs-pop-input {
|
||||
min-height: 38px;
|
||||
max-height: 80px;
|
||||
padding: 6px 8px;
|
||||
border: 1px solid rgba(24,24,27,0.18);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
background: var(--editor-surface, var(--card));
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--foreground);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
overflow: hidden;
|
||||
@@ -310,12 +311,12 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
}
|
||||
.ravs-pop-btn.is-cancel {
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
background: transparent;
|
||||
}
|
||||
.ravs-pop-btn.is-add {
|
||||
color: var(--card, #fff);
|
||||
background: var(--foreground, #18181b);
|
||||
color: var(--primary-foreground);
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
.ravs-send-menu {
|
||||
@@ -324,26 +325,25 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
right: 8px;
|
||||
top: 6px;
|
||||
min-width: 200px;
|
||||
background: var(--card, #fff);
|
||||
background: var(--popover);
|
||||
color: var(--popover-foreground);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 4px;
|
||||
box-shadow: 0 16px 38px rgba(24,24,27,0.18), 0 2px 6px rgba(24,24,27,0.08);
|
||||
box-shadow: var(--ravs-floating-shadow);
|
||||
opacity: 0;
|
||||
transform: translateY(-4px) scale(0.985);
|
||||
pointer-events: none;
|
||||
transition: opacity 180ms ease, transform 180ms ease;
|
||||
}
|
||||
.ravs-send-menu.is-visible {
|
||||
opacity: 1; transform: none; pointer-events: auto;
|
||||
}
|
||||
.ravs-send-menu.is-visible { opacity: 1; transform: none; pointer-events: auto; }
|
||||
.ravs-menu-section {
|
||||
padding: 4px 8px 2px;
|
||||
font-size: 9.5px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--muted-foreground, #71717a);
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
.ravs-menu-row {
|
||||
display: grid;
|
||||
@@ -353,11 +353,11 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
padding: 6px 8px;
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
color: var(--foreground, #18181b);
|
||||
color: var(--popover-foreground);
|
||||
}
|
||||
.ravs-menu-row.is-hot {
|
||||
background: rgba(24,24,27,0.06);
|
||||
box-shadow: inset 0 0 0 1px rgba(24,24,27,0.06);
|
||||
background: var(--accent);
|
||||
box-shadow: inset 0 0 0 1px var(--border);
|
||||
}
|
||||
|
||||
.ravs-cursor {
|
||||
@@ -374,7 +374,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
left: -6px; top: -6px;
|
||||
width: 28px; height: 28px;
|
||||
border-radius: 999px;
|
||||
border: 2px solid rgba(24,24,27,0.5);
|
||||
border: 2px solid color-mix(in srgb, var(--foreground) 52%, transparent);
|
||||
opacity: 0;
|
||||
}
|
||||
.ravs-cursor.is-clicking .ravs-ripple {
|
||||
@@ -393,10 +393,7 @@ export function ReviewNotesVisualStyles(): JSX.Element {
|
||||
margin-left: 1px;
|
||||
animation: ravs-caret-blink 1.05s steps(1) infinite;
|
||||
}
|
||||
@keyframes ravs-caret-blink {
|
||||
0%, 50% { opacity: 1 }
|
||||
51%, 100% { opacity: 0 }
|
||||
}
|
||||
@keyframes ravs-caret-blink { 0%, 50% { opacity: 1 } 51%, 100% { opacity: 0 } }
|
||||
`}</style>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -205,52 +205,50 @@ export default function OnboardingFlow({
|
||||
<span>Orca</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center gap-2 transition-[margin-top] duration-[760ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none',
|
||||
isInlineTourRunning ? 'mt-7' : 'mt-10'
|
||||
)}
|
||||
>
|
||||
<TooltipProvider delayDuration={0} skipDelayDuration={0}>
|
||||
{STEPS.map((step, idx) => {
|
||||
const isActive = idx === stepIndex
|
||||
const isDone = idx < stepIndex
|
||||
return (
|
||||
<Tooltip key={step.id}>
|
||||
<TooltipTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
// Why: the visible bars stay 4px tall, but the invisible
|
||||
// hit area makes hover/click/tooltip targeting reliable.
|
||||
'relative h-1 rounded-full outline-none transition-all duration-300 before:absolute before:-inset-y-2 before:-inset-x-1 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card',
|
||||
isActive
|
||||
? 'w-10 bg-foreground'
|
||||
: isDone
|
||||
? 'w-6 bg-muted-foreground/70 hover:bg-foreground/80'
|
||||
: 'w-6 bg-muted-foreground/25 hover:bg-muted-foreground/45'
|
||||
)}
|
||||
aria-label={`Go to onboarding step ${step.stepNumber}: ${stepCopy[step.id].title}`}
|
||||
aria-current={isActive ? 'step' : undefined}
|
||||
onClick={() => flow.jumpToStep(idx)}
|
||||
/>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" sideOffset={8} style={{ zIndex: 110 }}>
|
||||
{stepTooltipLabels[step.id]}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)
|
||||
})}
|
||||
</TooltipProvider>
|
||||
<span className="ml-3 text-xs font-medium text-muted-foreground">
|
||||
{stepIndex + 1} of {STEPS.length}
|
||||
</span>
|
||||
{isInlineTourRunning ? (
|
||||
<h1 className="ml-5 text-[34px] font-semibold leading-[1.15] tracking-tight text-foreground">
|
||||
{isInlineTourRunning ? (
|
||||
<div className="mt-7 flex items-center transition-[margin-top] duration-[760ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none">
|
||||
<h1 className="text-[34px] font-semibold leading-[1.15] tracking-tight text-foreground">
|
||||
{stepTooltipLabels.tour}
|
||||
</h1>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="mt-10 flex items-center gap-2 transition-[margin-top] duration-[760ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none">
|
||||
<TooltipProvider delayDuration={0} skipDelayDuration={0}>
|
||||
{STEPS.map((step, idx) => {
|
||||
const isActive = idx === stepIndex
|
||||
const isDone = idx < stepIndex
|
||||
return (
|
||||
<Tooltip key={step.id}>
|
||||
<TooltipTrigger asChild>
|
||||
<button
|
||||
type="button"
|
||||
className={cn(
|
||||
// Why: the visible bars stay 4px tall, but the invisible
|
||||
// hit area makes hover/click/tooltip targeting reliable.
|
||||
'relative h-1 rounded-full outline-none transition-all duration-300 before:absolute before:-inset-y-2 before:-inset-x-1 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card',
|
||||
isActive
|
||||
? 'w-10 bg-foreground'
|
||||
: isDone
|
||||
? 'w-6 bg-muted-foreground/70 hover:bg-foreground/80'
|
||||
: 'w-6 bg-muted-foreground/25 hover:bg-muted-foreground/45'
|
||||
)}
|
||||
aria-label={`Go to onboarding step ${step.stepNumber}: ${stepCopy[step.id].title}`}
|
||||
aria-current={isActive ? 'step' : undefined}
|
||||
onClick={() => flow.jumpToStep(idx)}
|
||||
/>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" sideOffset={8} style={{ zIndex: 110 }}>
|
||||
{stepTooltipLabels[step.id]}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)
|
||||
})}
|
||||
</TooltipProvider>
|
||||
<span className="ml-3 text-xs font-medium text-muted-foreground">
|
||||
{stepIndex + 1} of {STEPS.length}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{shouldShowStepHeading ? (
|
||||
<div className="mt-8 shrink-0">
|
||||
|
||||
@@ -74,7 +74,6 @@ export function OnboardingTourStep({
|
||||
doneLabel="Continue to project setup"
|
||||
footerText={null}
|
||||
compactRail
|
||||
detachedFooter
|
||||
onTourDepthSummaryChange={onTourDepthSummaryChange}
|
||||
className="h-full min-h-0"
|
||||
panelClassName="rounded-xl border border-border bg-card"
|
||||
|
||||
@@ -118,6 +118,15 @@ export function resolveRepoAiDraftState(
|
||||
persistedSerialized = serializeRepoAiDraft(persistedRepoAi)
|
||||
): RepoAiDraftState {
|
||||
const currentSerialized = serializeRepoAiDraft(current.value)
|
||||
// Why: render-time draft sync relies on object identity to avoid repeating
|
||||
// the same state update during server-rendered settings tests.
|
||||
if (
|
||||
current.repoId === repoId &&
|
||||
currentSerialized === persistedSerialized &&
|
||||
current.baseSerialized === persistedSerialized
|
||||
) {
|
||||
return current
|
||||
}
|
||||
if (
|
||||
current.repoId !== repoId ||
|
||||
currentSerialized === current.baseSerialized ||
|
||||
|
||||
Reference in New Issue
Block a user