fix: remaining LOTUS_BUGS.md items — hardcoded hex and a11y

- GifPicker: replace #FF6B00 and #060c14 with var(--lt-accent-orange) and
  var(--lt-bg-secondary); rgba opacity values use color-mix()
- VoiceMessageRecorder: replace #FF6B00 and #00FF88 waveform/dot colors
  with var(--lt-accent-orange) / var(--lt-accent-green)
- Presence: replace aria-labelledby referencing a lazy tooltip ID with a
  direct aria-label so screen readers always have the text in the DOM

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 00:01:12 -04:00
parent bafd9cbe75
commit c8ff7b0718
3 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -36,12 +36,12 @@ function GifPickerInner({ onSelect, requestClose, lotusTerminal }: GifPickerInne
<div <div
style={{ style={{
padding: '5px 10px 4px', padding: '5px 10px 4px',
borderBottom: '1px solid rgba(255,107,0,0.2)', borderBottom: '1px solid color-mix(in srgb, var(--lt-accent-orange) 20%, transparent)',
fontFamily: "'JetBrains Mono', 'Cascadia Code', monospace", fontFamily: "'JetBrains Mono', 'Cascadia Code', monospace",
fontSize: '10px', fontSize: '10px',
fontWeight: 700, fontWeight: 700,
letterSpacing: '0.1em', letterSpacing: '0.1em',
color: '#FF6B00', color: 'var(--lt-accent-orange)',
userSelect: 'none', userSelect: 'none',
}} }}
> >
@@ -82,11 +82,11 @@ export function GifPicker({ apiKey, onSelect, requestClose }: GifPickerProps) {
const containerStyle = lotusTerminal const containerStyle = lotusTerminal
? { ? {
background: '#060c14', background: 'var(--lt-bg-secondary)',
border: '1px solid rgba(255,107,0,0.35)', border: '1px solid color-mix(in srgb, var(--lt-accent-orange) 35%, transparent)',
borderRadius: '4px', borderRadius: '4px',
overflow: 'hidden', overflow: 'hidden',
boxShadow: '0 4px 24px rgba(255,107,0,0.10), 0 0 0 1px rgba(255,107,0,0.08)', boxShadow: '0 4px 24px color-mix(in srgb, var(--lt-accent-orange) 10%, transparent), 0 0 0 1px color-mix(in srgb, var(--lt-accent-orange) 8%, transparent)',
width: `${PICKER_WIDTH}px`, width: `${PICKER_WIDTH}px`,
} }
: { : {
+3 -3
View File
@@ -203,7 +203,7 @@ export function VoiceMessageRecorder({ onSend, onError }: VoiceRecorderProps) {
width: toRem(8), width: toRem(8),
height: toRem(8), height: toRem(8),
borderRadius: '50%', borderRadius: '50%',
background: lotusTerminal ? '#FF6B00' : 'var(--tc-danger-normal)', background: lotusTerminal ? 'var(--lt-accent-orange)' : 'var(--tc-danger-normal)',
flexShrink: 0, flexShrink: 0,
animation: 'pttLivePulse 900ms ease-in-out infinite', animation: 'pttLivePulse 900ms ease-in-out infinite',
}} }}
@@ -214,7 +214,7 @@ export function VoiceMessageRecorder({ onSend, onError }: VoiceRecorderProps) {
minWidth: toRem(32), minWidth: toRem(32),
fontVariantNumeric: 'tabular-nums', fontVariantNumeric: 'tabular-nums',
...(lotusTerminal ...(lotusTerminal
? { fontFamily: 'JetBrains Mono, monospace', color: '#00FF88', fontWeight: 700 } ? { fontFamily: 'JetBrains Mono, monospace', color: 'var(--lt-accent-green)', fontWeight: 700 }
: {}), : {}),
}} }}
> >
@@ -233,7 +233,7 @@ export function VoiceMessageRecorder({ onSend, onError }: VoiceRecorderProps) {
width: toRem(2), width: toRem(2),
height: toRem(2 + (h / barMax) * 16), height: toRem(2 + (h / barMax) * 16),
borderRadius: toRem(1), borderRadius: toRem(1),
background: lotusTerminal ? '#00FF88' : 'var(--tc-primary-normal)', background: lotusTerminal ? 'var(--lt-accent-green)' : 'var(--tc-primary-normal)',
flexShrink: 0, flexShrink: 0,
}} }}
/> />
+4 -4
View File
@@ -10,7 +10,7 @@ import {
TooltipProvider, TooltipProvider,
toRem, toRem,
} from 'folds'; } from 'folds';
import React, { ReactNode, useId } from 'react'; import React, { ReactNode } from 'react';
import * as css from './styles.css'; import * as css from './styles.css';
import { Presence, usePresenceLabel } from '../../hooks/useUserPresence'; import { Presence, usePresenceLabel } from '../../hooks/useUserPresence';
@@ -27,7 +27,7 @@ type PresenceBadgeProps = {
}; };
export function PresenceBadge({ presence, status, size }: PresenceBadgeProps) { export function PresenceBadge({ presence, status, size }: PresenceBadgeProps) {
const label = usePresenceLabel(); const label = usePresenceLabel();
const badgeLabelId = useId(); const ariaLabel = status ? `${label[presence]}${status}` : label[presence];
return ( return (
<TooltipProvider <TooltipProvider
@@ -36,7 +36,7 @@ export function PresenceBadge({ presence, status, size }: PresenceBadgeProps) {
offset={4} offset={4}
delay={200} delay={200}
tooltip={ tooltip={
<Tooltip id={badgeLabelId}> <Tooltip>
<Box style={{ maxWidth: toRem(250) }} alignItems="Baseline" gap="100"> <Box style={{ maxWidth: toRem(250) }} alignItems="Baseline" gap="100">
<Text size="L400">{label[presence]}</Text> <Text size="L400">{label[presence]}</Text>
{status && <Text size="T200"></Text>} {status && <Text size="T200"></Text>}
@@ -47,7 +47,7 @@ export function PresenceBadge({ presence, status, size }: PresenceBadgeProps) {
> >
{(triggerRef) => ( {(triggerRef) => (
<Badge <Badge
aria-labelledby={badgeLabelId} aria-label={ariaLabel}
ref={triggerRef} ref={triggerRef}
size={size} size={size}
variant={PresenceToColor[presence]} variant={PresenceToColor[presence]}