The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(human): simplify HumanPage layout by removing chat rail
Steven Enamakel7a569af3dd01
diff --git a/app/src/features/human/HumanPage.tsx b/app/src/features/human/HumanPage.tsxindex e780b0d472..e9e694cd7c 100644--- a/app/src/features/human/HumanPage.tsx+++ b/app/src/features/human/HumanPage.tsx@@ -83,47 +83,35 @@ const HumanPage = () => {showBoth: HUMAN_VOICE_SHOW_BOTH,});- // The mascot drives a ~60fps lipsync re-render while the agent is speaking- // (useHumanMascot forces a frame each rAF tick). Conversations is a heavy- // subtree, so co-rendering it here would reconcile the whole chat tree every- // frame and starve the main thread — which is what made tab switching feel- // locked during TTS playback (#5357). Its props are constant, so hold a stable- // element: React short-circuits reconciliation of an unchanged child, keeping- // the per-frame mascot re-render off the chat tree and the UI responsive.- // `voiceEntry` is build-time constant, so it cannot invalidate this memo at- // runtime — it is in the deps only to keep the dependency honest.- const chatPanel = useMemo(- () => (- <Conversations- variant="sidebar"- composer="mic-cloud"- voiceChatControl={- voiceEntry === 'realtime' ? (- <RealtimeVoiceControls- audioRef={realtimeAudioRef}- onSpeakingChange={setRealtimeSpeaking}- />- ) : null- }- showMicComposer={voiceEntry !== 'realtime'}- projectThreadList- />- ),- [voiceEntry]- );-return (- <div className="absolute inset-0 bg-surface-subtle dark:bg-surface-canvas overflow-hidden">+ <div className="absolute inset-0 overflow-hidden bg-surface-subtle dark:bg-surface-canvas"><divclassName="pointer-events-none absolute inset-0"style={{- background: 'radial-gradient(ellipse at 35% 40%, rgba(74,131,221,0.10), transparent 60%)',+ background: 'radial-gradient(ellipse at 50% 40%, rgba(74,131,221,0.10), transparent 60%)',}}/>- {/* Mascot stage — fills the area to the left of the reserved chat column. */}- <div className="absolute inset-y-0 left-0 right-[436px] flex items-center justify-center">- <div className="relative w-[min(80vh,90%)] aspect-square">+ {/* Close — back to the chat surface this page was opened from. Mirrors+ the composer's idle button, which is how you get here. */}+ <Button+ iconOnly+ variant="tertiary"+ size="sm"+ analyticsId="human-close"+ data-testid="human-close"+ aria-label={t('common.close')}+ title={t('common.close')}+ className="absolute right-4 top-4 z-20 size-9 rounded-full text-content-muted hover:text-content-secondary"+ onClick={() => navigate('/chat')}>+ <LuX className="size-5" />+ </Button>++ {/* Mascot stage — the whole page. The chat rail that used to reserve+ 436px on the right is gone: this surface is the mascot and the voice+ session, and the transcript lives on /chat. */}+ <div className="absolute inset-0 flex items-center justify-center">+ <div className="relative aspect-square w-[min(70vh,80%)]">{customMascotGifUrl ? (<CustomGifMascot src={customMascotGifUrl} face={mascotFace} />) : mascotEntry ? (@@ -148,39 +136,23 @@ const HumanPage = () => {</div></div>- {/* Comparison mode only: the realtime control keeps its own place over the- mascot stage, so it reads as a separate path from the card's- tap-and-speak rather than a second button stacked on it. */}- {voiceEntry === 'both' && (- <div className="absolute bottom-8 left-0 right-[436px] z-10 flex justify-center">+ {/* The page's single control: start/stop the voice session. Centered at+ the bottom, below the mascot rather than beside it.++ Only the realtime path has a start/stop session to bind to. The+ classic push-to-talk mic was part of the chat rail's composer and+ submitted its transcript through that surface's send path, so a+ `VITE_HUMAN_VOICE_REALTIME=false` build has no control to show here+ and falls back to a mascot-only stage. */}+ {voiceEntry !== 'push-to-talk' && (+ <div className="absolute inset-x-0 bottom-10 z-10 flex justify-center"><RealtimeVoiceControls+ appearance="icon"audioRef={realtimeAudioRef}onSpeakingChange={setRealtimeSpeaking}/></div>)}-- <label className="absolute top-4 left-4 z-10 inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-surface/80 backdrop-blur-sm border border-line-strong text-xs text-content-secondary shadow-soft cursor-pointer select-none">- <input- type="checkbox"- checked={speakReplies}- onChange={e => dispatch(setSpeakReplies(e.target.checked))}- className="cursor-pointer"- />- {t('voice.pushToTalk')}- </label>-- {/* Chat panel — kept on the right (the Human page is intentionally the- one surface that leaves the root sidebar's dynamic region empty). */}- <div className="absolute right-4 top-4 bottom-4 z-10 flex items-center">- <aside className="w-[420px] h-[min(760px,100%)] rounded-2xl border border-line-strong bg-surface shadow-soft flex flex-col overflow-hidden">- {/* Right-rail chat, but its thread list is surfaced in the (otherwise- empty) root sidebar so the Human page shows the user's threads.- Held as a stable element (chatPanel) so mascot lipsync re-renders- don't reconcile it — see #5357. */}- {chatPanel}- </aside>- </div></div>);};