Skip to content

armgit / kwant

Public Imported from GitHub
0

Your own team of AI bots in one self-hosted binary: spaces, every account you have, handoffs, approvals and routines. Open-source, self-hosted alternative to Grok Bot, Claude Duet and OpenAI dots. Rust + React.

App look sweep 2: white text on rose/amber passes, gradient hovers fade, guard sees rose and amber (26g-2) (#785)

Oleksandr Ivanchenko11b08de14bcf
diff --git a/frontend/src/components/ApprovalsSetting.tsx b/frontend/src/components/ApprovalsSetting.tsx
index e2934fe5..d4da6d42 100644
--- a/frontend/src/components/ApprovalsSetting.tsx
+++ b/frontend/src/components/ApprovalsSetting.tsx
@@ -127,7 +127,7 @@ export const OffConfirm: React.FC<{
type="button"
onClick={() => onConfirm(mustMove)}
disabled={busy || checking}
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-500 disabled:opacity-50"
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-700 disabled:opacity-50"
data-off-confirm={mustMove ? 'accept-risk' : 'off'}
>
{(busy || checking) && <Loader2 size={12} className="animate-spin motion-reduce:animate-none" aria-hidden="true" />}
diff --git a/frontend/src/components/ClaudeSignIn.tsx b/frontend/src/components/ClaudeSignIn.tsx
index 16924a84..5b0f5ec5 100644
--- a/frontend/src/components/ClaudeSignIn.tsx
+++ b/frontend/src/components/ClaudeSignIn.tsx
@@ -394,7 +394,7 @@ export const ClaudeSignOut: React.FC<{ onSignedOut: (engines: EngineInfo[]) => v
type="button"
onClick={confirm}
disabled={busy}
- className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium text-white bg-rose-600 hover:bg-rose-500 disabled:opacity-50 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-rose-400"
+ className="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium text-white bg-rose-600 hover:bg-rose-700 disabled:opacity-50 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-rose-400"
>
{busy && <Loader2 size={12} className="animate-spin motion-reduce:animate-none" aria-hidden="true" />}
{busy ? 'Signing out…' : 'Sign out'}
diff --git a/frontend/src/components/CodingAgents.tsx b/frontend/src/components/CodingAgents.tsx
index 9c9ae539..2c075435 100644
--- a/frontend/src/components/CodingAgents.tsx
+++ b/frontend/src/components/CodingAgents.tsx
@@ -327,7 +327,7 @@ export const ConnectionRow: React.FC<{
<button type="button" onClick={onKeep} className={quiet} data-agent-keep>
Keep
</button>
- <button type="button" onClick={onRevoke} disabled={revoking} aria-busy={revoking} className={`${btn} text-white bg-rose-600 hover:bg-rose-500`} data-agent-revoke>
+ <button type="button" onClick={onRevoke} disabled={revoking} aria-busy={revoking} className={`${btn} text-white bg-rose-600 hover:bg-rose-700`} data-agent-revoke>
{revoking && <Loader2 size={13} className="animate-spin motion-reduce:animate-none" aria-hidden="true" />}
Revoke
</button>
diff --git a/frontend/src/components/ComposioTile.tsx b/frontend/src/components/ComposioTile.tsx
index ad955a69..0bc0d9ca 100644
--- a/frontend/src/components/ComposioTile.tsx
+++ b/frontend/src/components/ComposioTile.tsx
@@ -55,7 +55,7 @@ const btn =
const quietBtn = `${btn} border border-zinc-700 bg-zinc-800/80 text-zinc-100 hover:bg-zinc-700 hover:border-zinc-600`;
const primaryBtn = `${btn} border border-sky-600 bg-sky-600 text-white hover:bg-sky-700`;
const roseBtn = `${btn} border border-zinc-700 bg-transparent text-rose-300 hover:bg-rose-500/10 hover:border-rose-500/40`;
-const roseFill = `${btn} border border-rose-500 bg-rose-600 text-white hover:bg-rose-500`;
+const roseFill = `${btn} border border-rose-500 bg-rose-600 text-white hover:bg-rose-700`;
const field =
'w-full min-h-[40px] px-3 py-1.5 bg-zinc-950 border border-zinc-700 rounded-[10px] text-sm text-zinc-100 placeholder:text-zinc-500 focus:outline-none focus:border-sky-400 focus:ring-[3px] focus:ring-sky-400/25';
diff --git a/frontend/src/components/DeleteBotDialog.tsx b/frontend/src/components/DeleteBotDialog.tsx
index d98f4baf..58b247dd 100644
--- a/frontend/src/components/DeleteBotDialog.tsx
+++ b/frontend/src/components/DeleteBotDialog.tsx
@@ -153,7 +153,7 @@ export const DeleteBotDialog: React.FC<DeleteBotDialogProps> = ({ kwant, busy, o
onClick={doDelete}
disabled={!!blocked || deleting}
title={blocked ?? undefined}
- className={`${btn} text-white bg-rose-600 hover:bg-rose-500 focus-visible:outline-rose-400`}
+ className={`${btn} text-white bg-rose-600 hover:bg-rose-700 focus-visible:outline-rose-400`}
>
{deleting ? <Loader2 size={13} className="animate-spin motion-reduce:animate-none" aria-hidden="true" /> : <Trash2 size={13} aria-hidden="true" />}
{deleting ? 'Deleting…' : `Delete ${kwant.name}`}
diff --git a/frontend/src/components/DevModeSetup.tsx b/frontend/src/components/DevModeSetup.tsx
index 00880838..4a13a5d1 100644
--- a/frontend/src/components/DevModeSetup.tsx
+++ b/frontend/src/components/DevModeSetup.tsx
@@ -239,7 +239,7 @@ export const DevModeSetup: React.FC<DevModeSetupProps> = ({ space, initial, onCa
onClick={turnOn}
disabled={!canTurnOn}
data-dv-turn-on
- className="inline-flex items-center gap-1.5 rounded-xl bg-accent-gradient px-3.5 min-h-[44px] sm:min-h-[36px] text-meta font-semibold text-white disabled:opacity-45 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-400"
+ className="inline-flex items-center gap-1.5 rounded-xl bg-accent-gradient kw-hover-deepen px-3.5 min-h-[44px] sm:min-h-[36px] text-meta font-semibold text-white disabled:opacity-45 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-400"
>
{saving && <Loader2 size={12} className="animate-spin motion-reduce:animate-none" aria-hidden="true" />}
Turn on Dev mode
diff --git a/frontend/src/components/GetStarted.tsx b/frontend/src/components/GetStarted.tsx
index bf01207f..c46c3ea8 100644
--- a/frontend/src/components/GetStarted.tsx
+++ b/frontend/src/components/GetStarted.tsx
@@ -115,7 +115,7 @@ export const Btn: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & { kin
}) => {
const base =
kind === 'primary'
- ? `${phone ? 'h-11' : 'h-9'} px-3.5 rounded-lg bg-accent-gradient text-[13px] font-semibold text-white disabled:opacity-45 disabled:cursor-not-allowed`
+ ? `${phone ? 'h-11' : 'h-9'} px-3.5 rounded-lg bg-accent-gradient kw-hover-deepen text-[13px] font-semibold text-white disabled:opacity-45 disabled:cursor-not-allowed`
: kind === 'secondary'
? `${phone ? 'h-11' : 'h-9'} px-3 rounded-lg border border-white/[.14] bg-white/[.04] text-xs text-zinc-200 hover:bg-white/[.08]`
: `${phone ? 'min-h-11' : 'min-h-8'} px-1 text-xs text-sky-300 hover:text-sky-200`;
diff --git a/frontend/src/components/ImportDialog.tsx b/frontend/src/components/ImportDialog.tsx
index e564ce5b..93a4cf1b 100644
--- a/frontend/src/components/ImportDialog.tsx
+++ b/frontend/src/components/ImportDialog.tsx
@@ -47,7 +47,7 @@ const btn =
const primary =
'flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-xs font-medium text-white bg-sky-600 hover:bg-sky-700 transition-colors disabled:opacity-50';
const danger =
- 'flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-500 transition-colors disabled:opacity-50';
+ 'flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-700 transition-colors disabled:opacity-50';
const card = 'rounded-xl border border-zinc-800 bg-zinc-950/60';
/** One line under each source in "Bring a bot from…". */
diff --git a/frontend/src/components/LetterView.tsx b/frontend/src/components/LetterView.tsx
index b4a00e94..d452604d 100644
--- a/frontend/src/components/LetterView.tsx
+++ b/frontend/src/components/LetterView.tsx
@@ -833,7 +833,7 @@ export const LetterDetail: React.FC<LetterDetailProps> = ({ view, loading, error
<div role="group" aria-label="Delete this letter" className="rounded-lg border border-rose-500/30 bg-rose-500/5 p-3 space-y-2" data-confirm-delete>
<p className="text-xs text-rose-100">Delete this letter, its pages, everything read from it and its reminders? This can’t be undone.</p>
<div className="flex flex-wrap gap-2">
- <button type="button" disabled={acting} onClick={() => (setConfirmDelete(false), onDelete())} className={`${actionBtn} bg-rose-600 hover:bg-rose-500 text-white`}>
+ <button type="button" disabled={acting} onClick={() => (setConfirmDelete(false), onDelete())} className={`${actionBtn} bg-rose-600 hover:bg-rose-700 text-white`}>
<Trash2 size={13} aria-hidden="true" /> Delete it
</button>
<button type="button" onClick={() => setConfirmDelete(false)} className={quietBtn}>
diff --git a/frontend/src/components/LooseEndsView.tsx b/frontend/src/components/LooseEndsView.tsx
index ecb26384..af797ca7 100644
--- a/frontend/src/components/LooseEndsView.tsx
+++ b/frontend/src/components/LooseEndsView.tsx
@@ -1029,7 +1029,7 @@ export const LooseSources: React.FC<{
</button>
{confirmRemove === s.id ? (
<>
- <button type="button" disabled={busy !== null} onClick={() => run(s, 'remove')} className={`${actionBtn} bg-rose-600 hover:bg-rose-500 text-white`}>
+ <button type="button" disabled={busy !== null} onClick={() => run(s, 'remove')} className={`${actionBtn} bg-rose-600 hover:bg-rose-700 text-white`}>
<Trash2 size={13} aria-hidden="true" /> Remove it and its cases
</button>
<button type="button" onClick={() => setConfirmRemove(null)} className={quietBtn}>
diff --git a/frontend/src/components/McpServersModal.tsx b/frontend/src/components/McpServersModal.tsx
index 02993b57..b6898a27 100644
--- a/frontend/src/components/McpServersModal.tsx
+++ b/frontend/src/components/McpServersModal.tsx
@@ -901,7 +901,7 @@ export const McpServersModal: React.FC<McpServersModalProps> = ({ isOpen, onClos
<button
type="button"
onClick={() => disconnect(server)}
- className="px-2.5 py-1 rounded-md font-medium text-white bg-rose-600 hover:bg-rose-500 transition-colors"
+ className="px-2.5 py-1 rounded-md font-medium text-white bg-rose-600 hover:bg-rose-700 transition-colors"
>
Disconnect
</button>
@@ -919,7 +919,7 @@ export const McpServersModal: React.FC<McpServersModalProps> = ({ isOpen, onClos
<button
type="button"
onClick={() => handleDelete(server)}
- className="px-2.5 py-1 rounded-md font-medium text-white bg-rose-600 hover:bg-rose-500 transition-colors"
+ className="px-2.5 py-1 rounded-md font-medium text-white bg-rose-600 hover:bg-rose-700 transition-colors"
>
Delete
</button>
diff --git a/frontend/src/components/ReviewItemView.tsx b/frontend/src/components/ReviewItemView.tsx
index bd4dfe02..c9968b99 100644
--- a/frontend/src/components/ReviewItemView.tsx
+++ b/frontend/src/components/ReviewItemView.tsx
@@ -129,10 +129,10 @@ const BACK_LABEL: Record<ReviewEntry, string | null> = { inbox: null, board: 'Ba
const btnBase =
'inline-flex items-center justify-center gap-1.5 rounded-xl px-3.5 min-h-[36px] max-md:min-h-[44px] text-meta font-semibold transition-colors kw-focus disabled:cursor-not-allowed';
-const btnApprove = `${btnBase} bg-accent-gradient text-white aria-disabled:opacity-[.42] aria-disabled:cursor-not-allowed`;
+const btnApprove = `${btnBase} bg-accent-gradient kw-hover-deepen text-white aria-disabled:opacity-[.42] aria-disabled:cursor-not-allowed`;
const btnQuiet = `${btnBase} border border-hairline-strong bg-white/[0.03] text-zinc-200 hover:bg-white/[0.08] disabled:opacity-50`;
const btnRose = `${btnBase} border border-rose-400/40 bg-rose-500/[0.06] text-rose-200 hover:bg-rose-500/[0.12] disabled:opacity-50`;
-const btnRoseFill = `${btnBase} bg-rose-600 text-white hover:bg-rose-500 disabled:opacity-50`;
+const btnRoseFill = `${btnBase} bg-rose-600 text-white hover:bg-rose-700 disabled:opacity-50`;
const btnAllow = `${btnBase} bg-teal-300 text-zinc-950 font-semibold hover:bg-teal-200 disabled:opacity-50`;
const spin = 'motion-safe:animate-spin';
@@ -858,7 +858,7 @@ const SendBackForm: React.FC<{
</p>
)}
<div className={phone ? 'grid grid-cols-2 gap-2' : 'flex flex-wrap items-center gap-2'}>
- <button type="button" onClick={onSend} disabled={empty || busy} className={`${btnBase} bg-accent-gradient text-white disabled:opacity-50`} data-send-submit>
+ <button type="button" onClick={onSend} disabled={empty || busy} className={`${btnBase} bg-accent-gradient kw-hover-deepen text-white disabled:opacity-50`} data-send-submit>
{busy ? <Loader2 size={14} className={spin} aria-hidden="true" /> : <CornerUpLeft size={14} aria-hidden="true" />} Send back
</button>
<button type="button" onClick={onCancel} className={btnQuiet} data-send-cancel>
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index 0c120e1d..48f3e5c5 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -1313,7 +1313,7 @@ const MemberSheet: React.FC<{
<button type="button" onClick={onClose} className="rounded-lg border border-zinc-700 px-3 py-2 text-sm text-zinc-200 hover:bg-zinc-800">
Cancel
</button>
- <button type="button" onClick={onRemove} className="rounded-lg bg-rose-600 px-3 py-2 text-sm font-medium text-white hover:bg-rose-500">
+ <button type="button" onClick={onRemove} className="rounded-lg bg-rose-600 px-3 py-2 text-sm font-medium text-white hover:bg-rose-700">
Remove
</button>
</div>
diff --git a/frontend/src/components/SpaceSettings.tsx b/frontend/src/components/SpaceSettings.tsx
index dff5a45d..397aae8e 100644
--- a/frontend/src/components/SpaceSettings.tsx
+++ b/frontend/src/components/SpaceSettings.tsx
@@ -362,7 +362,7 @@ const ImportTab: React.FC<TabProps> = ({ space, kwants, onOpenImport, onImported
</p>
<div className="flex flex-wrap gap-2">
<button type="button" onClick={() => setConfirm(null)} className={rowBtn}>Keep them</button>
- <button type="button" onClick={() => undo(confirm.record, true)} className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-500">
+ <button type="button" onClick={() => undo(confirm.record, true)} className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-700">
Undo anyway
</button>
</div>
@@ -530,7 +530,7 @@ const GeneralTab: React.FC<Props> = ({ space, spaces, kwants, teams, onSpaceSave
type="button"
onClick={archive}
disabled={archiving}
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-500 disabled:opacity-50"
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium text-white bg-rose-600 hover:bg-rose-700 disabled:opacity-50"
>
{archiving && <Loader2 size={12} className="animate-spin motion-reduce:animate-none" />}
Archive {space.name}
diff --git a/frontend/src/components/Spaces.tsx b/frontend/src/components/Spaces.tsx
index 2c2574be..210824ba 100644
--- a/frontend/src/components/Spaces.tsx
+++ b/frontend/src/components/Spaces.tsx
@@ -101,7 +101,7 @@ export const SpaceRail: React.FC<RailProps> = ({ spaces, currentId, onSwitch, on
>
<SpaceTile space={s} size={40} dev={devStore.isOn(s.id)} devBehind="var(--kw-surface-rail)" />
{unread > 0 && (
- <span className="absolute -top-1.5 -right-1.5 min-w-[18px] px-1 py-px rounded-full bg-rose-500 text-white text-[10px] font-semibold text-center border-2 border-zinc-950">
+ <span className="absolute -top-1.5 -right-1.5 min-w-[18px] px-1 py-px rounded-full bg-rose-600 text-white text-[10px] font-semibold text-center border-2 border-zinc-950">
{badge(unread)}
</span>
)}
@@ -193,7 +193,7 @@ export const SpaceSwitcher: React.FC<SwitcherProps> = ({ spaces, currentId, onSw
<span className="block text-[11px] text-zinc-500 truncate" title={spaceSummaryTitle(s.counts)}>{spaceSummary(s.counts)}</span>
</span>
{!active && (s.counts?.unread ?? 0) > 0 && (
- <span className="min-w-[18px] px-1.5 py-px rounded-full bg-rose-500 text-white text-[10px] font-semibold text-center">{badge(s.counts.unread)}</span>
+ <span className="min-w-[18px] px-1.5 py-px rounded-full bg-rose-600 text-white text-[10px] font-semibold text-center">{badge(s.counts.unread)}</span>
)}
{active && <Check size={14} className="text-sky-400" aria-hidden="true" />}
</button>
diff --git a/frontend/src/components/TeamNeedsCard.tsx b/frontend/src/components/TeamNeedsCard.tsx
index e6d05411..85f832b4 100644
--- a/frontend/src/components/TeamNeedsCard.tsx
+++ b/frontend/src/components/TeamNeedsCard.tsx
@@ -391,7 +391,7 @@ export const UndoTeamConfirm: React.FC<{
<button ref={keep} type="button" onClick={onKeep} disabled={busy} className={`${b} px-3.5 rounded-lg border border-zinc-700 text-sm text-zinc-100 hover:bg-white/5 ${FOCUS}`}>
Keep the team
</button>
- <button type="button" onClick={onUndo} disabled={busy} className={`${b} inline-flex items-center justify-center gap-2 px-3.5 rounded-lg bg-[#be123c] hover:bg-rose-600 text-white text-sm font-medium disabled:opacity-60 ${FOCUS}`}>
+ <button type="button" onClick={onUndo} disabled={busy} className={`${b} inline-flex items-center justify-center gap-2 px-3.5 rounded-lg bg-[#be123c] hover:bg-rose-800 text-white text-sm font-medium disabled:opacity-60 ${FOCUS}`}>
{busy && <Loader2 size={14} className="animate-spin motion-reduce:animate-none" aria-hidden="true" />}
Undo team
</button>
diff --git a/frontend/src/components/TelegramCard.tsx b/frontend/src/components/TelegramCard.tsx
index 73973bf1..a9441ae4 100644
--- a/frontend/src/components/TelegramCard.tsx
+++ b/frontend/src/components/TelegramCard.tsx
@@ -34,7 +34,7 @@ const actionBtn = `inline-flex items-center justify-center gap-1.5 min-h-[44px]
const quietBtn = `${actionBtn} border border-zinc-700 bg-zinc-800/80 text-zinc-100 hover:bg-zinc-700 hover:border-zinc-600`;
const primaryBtn = `${actionBtn} text-white bg-sky-600 hover:bg-sky-700 shadow-sm`;
const dangerGhost = `${actionBtn} border border-rose-500/40 text-rose-200 hover:bg-rose-500/10`;
-const dangerBtn = `${actionBtn} text-white bg-rose-600 hover:bg-rose-500`;
+const dangerBtn = `${actionBtn} text-white bg-rose-600 hover:bg-rose-700`;
const textBtn = `inline-flex items-center min-h-[44px] max-sm:-my-[13px] align-middle sm:min-h-0 px-1 rounded text-xs font-medium text-sky-300 hover:text-sky-200 hover:underline underline-offset-2 ${focusRing}`;
const spin = 'animate-spin motion-reduce:animate-none';
diff --git a/frontend/src/components/ToolNotesSection.tsx b/frontend/src/components/ToolNotesSection.tsx
index 83081b6a..5fc5468d 100644
--- a/frontend/src/components/ToolNotesSection.tsx
+++ b/frontend/src/components/ToolNotesSection.tsx
@@ -442,7 +442,7 @@ export const NoteRow: React.FC<NoteRowProps> = ({ n, now, phone, readOnly, mode,
<button type="button" className={`${quietBtn} ${phone ? 'flex-1 min-h-[44px]' : ''}`} onClick={() => onMode('view')} autoFocus>
Cancel
</button>
- <button type="button" className={`${btn} min-h-[30px] px-3 bg-rose-700 text-white hover:bg-rose-600 ${phone ? 'flex-1 min-h-[44px]' : ''}`} onClick={() => onDelete(n)} data-confirm-delete>
+ <button type="button" className={`${btn} min-h-[30px] px-3 bg-rose-700 text-white hover:bg-rose-800 ${phone ? 'flex-1 min-h-[44px]' : ''}`} onClick={() => onDelete(n)} data-confirm-delete>
Delete
</button>
</div>
diff --git a/frontend/src/components/dev/PrepushCard.tsx b/frontend/src/components/dev/PrepushCard.tsx
index bcf6f2d4..0b9e18ad 100644
--- a/frontend/src/components/dev/PrepushCard.tsx
+++ b/frontend/src/components/dev/PrepushCard.tsx
@@ -41,7 +41,7 @@ const BTN =
'inline-flex items-center justify-center gap-1.5 rounded-lg px-3 text-xs font-medium transition-colors min-h-11 sm:min-h-[32px] max-sm:w-full outline-none focus-visible:ring-2 focus-visible:ring-sky-400 focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-900 disabled:cursor-not-allowed disabled:opacity-50';
const PLAIN = `${BTN} border border-hairline-strong bg-zinc-800 text-zinc-200 hover:bg-zinc-700`;
const PRIMARY = `${BTN} text-white`;
-const AMBER = `${BTN} bg-amber-600 text-white shadow-sm hover:bg-amber-500`;
+const AMBER = `${BTN} bg-amber-500 text-zinc-950 shadow-sm hover:bg-amber-400`;
const AMBER_OUTLINE = `${BTN} border border-amber-400/60 bg-transparent text-amber-200 hover:bg-amber-400/10`;
const LINK = 'inline-flex items-center gap-0.5 rounded px-1 text-meta font-medium text-accent outline-none hover:underline focus-visible:ring-2 focus-visible:ring-sky-400 min-h-11 sm:min-h-0';
diff --git a/frontend/src/components/dev/ProdFloorCard.tsx b/frontend/src/components/dev/ProdFloorCard.tsx
index 50b19f1d..89a763b1 100644
--- a/frontend/src/components/dev/ProdFloorCard.tsx
+++ b/frontend/src/components/dev/ProdFloorCard.tsx
@@ -64,7 +64,7 @@ const ROW: Record<RowTone, string> = {
const LEAD: Record<RowTone, string> = { ok: 'text-ok', warn: 'text-warn', bad: 'text-bad', neutral: 'text-zinc-300', info: 'text-sky-200' };
const BTN = 'flex items-center justify-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-medium transition-colors min-h-[44px] sm:min-h-0 max-sm:w-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-400 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50 aria-disabled:cursor-not-allowed';
-const AMBER = `${BTN} bg-amber-600 text-white shadow-sm hover:bg-amber-500`;
+const AMBER = `${BTN} bg-amber-500 text-zinc-950 shadow-sm hover:bg-amber-400`;
const PLAIN = `${BTN} bg-zinc-800 text-zinc-300 hover:bg-zinc-700`;
const QUIET = `${BTN} text-zinc-300 hover:bg-white/[.06] hover:text-zinc-100`;
const FIELD = 'w-full rounded-lg border border-white/[0.14] bg-zinc-950/60 px-2.5 py-2 font-mono text-[12px] text-zinc-100 placeholder:text-zinc-500 focus:border-sky-400/60 focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-sky-400 max-sm:text-[16px]';
@@ -395,7 +395,7 @@ export const ProdFloorCard: React.FC<ProdFloorCardProps> = ({
<button type="button" onClick={closeSkip} className={QUIET}>
Cancel
</button>
- <button type="button" data-floor-skip-allow aria-disabled={!skip.sure || off || undefined} onClick={allowWithoutBackup} className={`${AMBER} aria-disabled:hover:bg-amber-600`}>
+ <button type="button" data-floor-skip-allow aria-disabled={!skip.sure || off || undefined} onClick={allowWithoutBackup} className={`${AMBER} aria-disabled:hover:bg-amber-500`}>
<Check size={14} aria-hidden="true" />
Allow without a backup
</button>
diff --git a/frontend/src/components/dev/WorktreesTab.tsx b/frontend/src/components/dev/WorktreesTab.tsx
index 3f2b0044..d1f88e29 100644
--- a/frontend/src/components/dev/WorktreesTab.tsx
+++ b/frontend/src/components/dev/WorktreesTab.tsx
@@ -979,7 +979,7 @@ const RemoveDialog: React.FC<{ w: Worktree; bot: string | null; home: string | n
type="button"
onClick={go}
disabled={saving || (needsForce && !force)}
- className={`inline-flex items-center gap-1.5 rounded-lg px-3.5 h-9 text-[13px] font-medium text-white bg-rose-700 hover:bg-rose-600 disabled:bg-rose-900/60 disabled:text-rose-200/50 disabled:cursor-not-allowed ${ring}`}
+ className={`inline-flex items-center gap-1.5 rounded-lg px-3.5 h-9 text-[13px] font-medium text-white bg-rose-700 hover:bg-rose-800 disabled:bg-rose-900/60 disabled:text-rose-200/50 disabled:cursor-not-allowed ${ring}`}
data-wt-remove
>
{saving && <Loader2 size={14} className="motion-safe:animate-spin" aria-hidden="true" />}
diff --git a/frontend/src/styles/modern.css b/frontend/src/styles/modern.css
index 9c103559..c19eef0c 100644
--- a/frontend/src/styles/modern.css
+++ b/frontend/src/styles/modern.css
@@ -294,7 +294,8 @@
.kw-card-interactive the same, tappable: lifts 1px and brightens its hairline on hover/focus
.kw-chip a pill label; add .kw-chip-ok / -warn / -bad / -info / -accent for a status colour
.kw-btn-primary the accent gradient button (one per view); .kw-btn-ghost a quiet button
- .kw-hover-deepen the same hover for a hand-built bg-accent-gradient button with white text (never hover:brightness)
+ .kw-hover-deepen the same hover for a hand-built bg-accent-gradient button with white text (never hover:brightness);
+ the deeper gradient fades in over 150ms from an ::after layer (opacity only)
.kw-status-dot a 8px dot; .kw-status-ok / -warn / -bad / -idle, .kw-pulse while something is live
.kw-focus the focus ring (2px accent, 2px offset); already on every .kw-card-interactive
.kw-hit a 44px tap area on phone for a small inline link, with no visual change
@@ -354,8 +355,22 @@
}
/* Hover deepens the gradient (sky-600 to sky-700) instead of brightening it: brightness(1.12) put white text at
3.66:1 on the light stop. Now 5.1:1 or more on hover (26g). */
- .kw-btn-primary:hover:not(:disabled),
- .kw-hover-deepen:hover:not(:disabled) { background-image: linear-gradient(135deg, theme('colors.sky.600') 0%, theme('colors.sky.700') 100%); }
+ .kw-btn-primary:hover:not(:disabled) { background-image: linear-gradient(135deg, theme('colors.sky.600') 0%, theme('colors.sky.700') 100%); }
+ /* A gradient can't interpolate, so .kw-hover-deepen fades the deeper gradient in from an ::after layer
+ behind the label instead of swapping background-image (26g-2). btnApprove disables itself with aria-disabled. */
+ .kw-hover-deepen { position: relative; isolation: isolate; }
+ .kw-hover-deepen::after {
+ content: '';
+ position: absolute;
+ inset: 0;
+ border-radius: inherit;
+ background-image: linear-gradient(135deg, theme('colors.sky.600') 0%, theme('colors.sky.700') 100%);
+ opacity: 0;
+ z-index: -1;
+ pointer-events: none;
+ transition: opacity 150ms var(--kw-ease);
+ }
+ .kw-hover-deepen:hover:not(:disabled):not([aria-disabled="true"])::after { opacity: 1; }
.kw-btn-primary:hover:not(:disabled) { box-shadow: theme('boxShadow.glow'); }
.kw-btn-primary:active:not(:disabled) { transform: scale(0.97); }
.kw-btn-primary:disabled { @apply cursor-not-allowed; background-image: none; background-color: var(--kw-surface-overlay); color: theme('colors.zinc.400'); box-shadow: none; }
@@ -420,7 +435,8 @@
.kw-stagger > * { animation: none; }
.kw-home { animation: kw-home-fade 1ms linear 220ms both; }
.kw-card-interactive,
- .kw-btn-primary { transition: none; }
+ .kw-btn-primary,
+ .kw-hover-deepen::after { transition: none; }
.kw-card-interactive:hover:not(:disabled),
.kw-card-interactive:active:not(:disabled),
.kw-btn-primary:active:not(:disabled) { transform: none; }
diff --git a/frontend/tests/kwantLook.test.mjs b/frontend/tests/kwantLook.test.mjs
index 8ed15b16..f16a6cb0 100644
--- a/frontend/tests/kwantLook.test.mjs
+++ b/frontend/tests/kwantLook.test.mjs
@@ -14,6 +14,12 @@
// tailwind.config.js. It is #745bef now. The rgb(122 98 240 / a) tints are a different thing and stay.
// emerald and violet (Mira's ruling, audit section C, roadmap 26g): emerald is teal / ok and violet is kwant's
// sky (lavender), so their classes and stock hex fail too. scripts/retint-emerald-violet.mjs does the mapping.
+// 26g-2 (Rigel's finding 5 on #767): rose and amber are Tailwind's stock families in kwant, so
+// (f) text-white on an opaque bg-rose-50..500 or bg-amber-50..600 fails too (rose-500 3.67:1, amber-600 3.19:1),
+// hover: included; /alpha tints are fine. Use bg-rose-600 hover:bg-rose-700, or dark ink on amber.
+// (g) class lists split across lines (className="…", className={`…`}, const X = `…`) and CSS @apply statements
+// get the (c)/(f) checks on the whole string, reported at the line where it starts, and
+// (h) stock Tailwind red and orange hex / rgb() fail like their class names (use rose / amber).
import assert from 'node:assert/strict';
import test from 'node:test';
import { readFileSync, readdirSync, statSync } from 'node:fs';
@@ -31,9 +37,12 @@ const STOCK = {
sky: '#f0f9ff #e0f2fe #bae6fd #7dd3fc #38bdf8 #0ea5e9 #0284c7 #0369a1 #075985 #0c4a6e #082f49',
emerald: '#ecfdf5 #d1fae5 #a7f3d0 #6ee7b7 #34d399 #10b981 #059669 #047857 #065f46 #064e3b #022c22',
violet: '#f5f3ff #ede9fe #ddd6fe #c4b5fd #a78bfa #8b5cf6 #7c3aed #6d28d9 #5b21b6 #4c1d95 #2e1065',
+ // (h) from tailwindcss/colors 3.4. Not rose or amber: those are kwant's own (stock) families, e.g. #be123c is rose-700.
+ red: '#fef2f2 #fee2e2 #fecaca #fca5a5 #f87171 #ef4444 #dc2626 #b91c1c #991b1b #7f1d1d #450a0a',
+ orange: '#fff7ed #ffedd5 #fed7aa #fdba74 #fb923c #f97316 #ea580c #c2410c #9a3412 #7c2d12 #431407',
};
// The kwant family each stock family's hex should become.
-const KWANT = { zinc: 'zinc', sky: 'sky', emerald: 'teal', violet: 'sky' };
+const KWANT = { zinc: 'zinc', sky: 'sky', emerald: 'teal', violet: 'sky', red: 'rose', orange: 'amber' };
const HEX = new Map();
for (const [fam, list] of Object.entries(STOCK)) list.split(' ').forEach((h, i) => HEX.set(h, `${fam}-${SHADES[i]}`));
const rgbOf = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));
@@ -83,6 +92,12 @@ function* walk(dir) {
const whiteRe = /(?<![\w-])text-white(?![\w-])/;
const lightSkyRe = /(?<![\w-])((?:[\w-]+:)*)bg-sky-(50|100|200|300|400|500)(?![\w/-])/g;
const brightRe = /(?<![\w-])((?:[\w-]+:)*hover:)brightness-(\d+)(?![\w-])/g;
+// (f) stock rose and amber: white text needs rose-600 (4.70:1) or darker, amber-700 (5.02:1) or darker.
+const warmRe = /(?<![\w-])((?:[\w-]+:)*)bg-(rose|amber)-(50|[1-9]00)(?![\w/-])/g;
+const WHITE_ON = {
+ rose: { 50: '1.10', 100: '1.20', 200: '1.41', 300: '1.89', 400: '2.69', 500: '3.67' },
+ amber: { 50: '1.04', 100: '1.11', 200: '1.25', 300: '1.44', 400: '1.67', 500: '2.15', 600: '3.19' },
+};
const WHITE_EXEMPT = [
// None. List a real exemption here as { at: 'src/x.tsx:12', why: '...' }.
];
@@ -96,6 +111,42 @@ export function whiteOnLight(line) {
for (const m of line.matchAll(brightRe)) {
if (+m[2] > 100) out.push(`${m[0]} next to text-white lightens the fill under white text (3.66:1 on the accent gradient): use kw-hover-deepen (or hover:bg-sky-700 on a flat bg-sky-600)`);
}
+ for (const m of line.matchAll(warmRe)) {
+ const ratio = WHITE_ON[m[2]][m[3]];
+ if (!ratio) continue;
+ const hover = /hover:/.test(m[1]);
+ out.push(m[2] === 'rose'
+ ? `${m[0]} under text-white is ${ratio}:1: ${hover ? `use ${m[1]}bg-rose-700 (6.29:1), so hover deepens` : 'use bg-rose-600 (4.70:1) with hover:bg-rose-700 (6.29:1), or dark ink: text-zinc-950 (5.12:1 on rose-500)'}`
+ : `${m[0]} under text-white is ${ratio}:1: use dark ink on amber, bg-amber-500 text-zinc-950 hover:bg-amber-400 (8.76:1, 11.27:1), or bg-amber-700 hover:bg-amber-800 with white (5.02:1, 7.09:1)`);
+ }
+ return out;
+}
+
+// (g) Whole class strings that span lines, and CSS @apply statements (which can span lines too). Each gets
+// whiteOnLight on its whitespace-collapsed text and is reported at the line where it starts. One-line strings
+// are already covered by the per-line scan, so only multi-line ones are returned here (no double reports).
+const CLASS_STRING_RES = [
+ /className=(["'])([\s\S]*?)\1/g, // className="…"
+ /className=\{\s*`([^`]*)`/g, // className={`…`}
+ /\bconst\s+[\w$]+\s*=\s*`([^`]*)`/g, // const X = `…`
+];
+export function multiLineClassStrings(text) {
+ const out = [];
+ for (const re of CLASS_STRING_RES)
+ for (const m of text.matchAll(re)) {
+ const body = m[m.length - 1];
+ if (!body.includes('\n')) continue;
+ const line = text.slice(0, m.index).split('\n').length;
+ for (const msg of whiteOnLight(body.replace(/\s+/g, ' '))) out.push({ line, msg });
+ }
+ return out;
+}
+export function cssApplyWhite(text) {
+ const out = [];
+ for (const m of text.matchAll(/@apply\b([^;{}]*);/g)) {
+ const line = text.slice(0, m.index).split('\n').length;
+ for (const msg of whiteOnLight(m[1].replace(/\s+/g, ' '))) out.push({ line, msg: `@apply ${msg}` });
+ }
return out;
}
@@ -130,7 +181,12 @@ export function scan() {
for (const p of walk(src)) {
const file = relative(root, p).split('\\').join('/');
const text = readFileSync(p, 'utf8');
- if (file.endsWith('.css')) for (const h of cssBrightHovers(text)) out.push(`${file}:${h.line} ${h.msg}`);
+ if (file.endsWith('.css')) {
+ for (const h of cssBrightHovers(text)) out.push(`${file}:${h.line} ${h.msg}`);
+ for (const h of cssApplyWhite(text)) if (!WHITE_EXEMPT.some((e) => e.at === `${file}:${h.line}`)) out.push(`${file}:${h.line} ${h.msg}`);
+ } else {
+ for (const h of multiLineClassStrings(text)) if (!WHITE_EXEMPT.some((e) => e.at === `${file}:${h.line}`)) out.push(`${file}:${h.line} ${h.msg}`);
+ }
text.split('\n').forEach((line, i) => {
const at = `${file}:${i + 1}`;
out.push(...retired(at, line));
@@ -139,7 +195,8 @@ export function scan() {
if (HEX.has(h) && !exempt(file, h)) {
const [stock, n] = HEX.get(h).split('-');
const fam = KWANT[stock];
- out.push(`${at} stock Tailwind ${HEX.get(h)} ${m[0]}: use kwant's ${fam}-${n} (class ${fam}-${n}, theme('colors.${fam}.${n}')) or a --kw-* token`);
+ if (stock === 'red' || stock === 'orange') out.push(`${at} stock Tailwind ${HEX.get(h)} ${m[0]} is outside kwant's palette: use ${OFF[stock]} (${fam}-${n}, theme('colors.${fam}.${n}'))`);
+ else out.push(`${at} stock Tailwind ${HEX.get(h)} ${m[0]}: use kwant's ${fam}-${n} (class ${fam}-${n}, theme('colors.${fam}.${n}')) or a --kw-* token`);
}
}
for (const m of line.matchAll(rgbRe)) {
@@ -185,6 +242,27 @@ test('the guard itself catches what it should and lets kwant tokens through', ()
// (d) CSS hovers that brighten white text
const css = `.a { color: #fff; background: x; }\n.a:hover { filter: brightness(1.08); }\n.b { color: #fff; }\n.b:hover:not(:disabled) { filter: brightness(108%); }\n.c:hover { filter: brightness(1.1); }\n.d { color: #fff; }\n.d:hover { filter: brightness(1); }\n.e { @apply text-white; }\n.e:hover { filter: saturate(1.2) brightness(1.2); }`;
assert.deepEqual(cssBrightHovers(css).map((h) => h.line), [2, 4, 9], 'white base + brightness > 1 only');
+ // (f) white text on light stock rose and amber; tints, dark ink and rose-600+/amber-700+ are fine
+ assert.equal(whiteOnLight('bg-rose-600 text-white hover:bg-rose-500').length, 1, 'rose hover that lightens');
+ assert.equal(whiteOnLight('bg-rose-600 text-white hover:bg-rose-700').length, 0);
+ assert.equal(whiteOnLight('bg-amber-600 text-white shadow-sm hover:bg-amber-500').length, 2, 'amber rest and hover');
+ assert.equal(whiteOnLight('bg-amber-500 text-zinc-950 hover:bg-amber-400').length, 0, 'dark ink on amber');
+ assert.equal(whiteOnLight('bg-amber-700 text-white hover:bg-amber-800').length, 0);
+ assert.equal(whiteOnLight('bg-rose-500 text-zinc-950 hover:bg-rose-400').length, 0, 'dark ink on rose');
+ assert.equal(whiteOnLight('text-white hover:bg-rose-500/10 bg-amber-400/20').length, 0, 'alpha tints are fine');
+ assert.equal(whiteOnLight('dark:hover:bg-rose-300 text-white').length, 1, 'any variant prefix');
+ assert.equal(whiteOnLight('bg-[#be123c] hover:bg-rose-800 text-white').length, 0);
+ // (g) a class list split across lines, and @apply in CSS
+ const tsx = "const ok = 1;\nconst B = `px-3 text-white\n bg-rose-600 hover:bg-rose-500`;\n<div className=\"a\n bg-amber-600 text-white\" />\n<b className={`text-white\n bg-sky-500`} />\n<i className=\"text-white bg-rose-500\" />";
+ assert.deepEqual(multiLineClassStrings(tsx).map((h) => h.line), [4, 6, 2], 'multi-line strings, at their first line; one-liners are left to the line scan');
+ assert.deepEqual(multiLineClassStrings('const B = `bg-rose-600 text-white\n hover:bg-rose-700`;'), []);
+ const applyCss = '.a { @apply bg-sky-500\n text-white; }\n.b { @apply bg-rose-600 text-white hover:bg-rose-700; }\n.c { @apply text-white; background: red; }\n.d { @apply bg-amber-500 text-zinc-950; }';
+ assert.deepEqual(cssApplyWhite(applyCss).map((h) => h.line), [1]);
+ // (h) stock red and orange hex point to rose and amber; rose and amber hex are kwant's own
+ assert.equal(HEX.get('#ef4444'), 'red-500');
+ assert.equal(HEX.get('#ea580c'), 'orange-600');
+ assert.equal(RGB.get('220,38,38'), '#dc2626');
+ assert.ok(!HEX.has('#be123c') && !HEX.has('#f59e0b'), 'rose and amber hex stay allowed');
// (e) the retired stop, any case; the rgb tint is fine
assert.equal(retired('x', 'from-[#7A62F0] #7a62f0 #745bef rgb(122 98 240 / 0.2)').length, 2);
});
diff --git a/frontend/tests/prepush.test.mjs b/frontend/tests/prepush.test.mjs
index e92e8c21..90c319a0 100644
--- a/frontend/tests/prepush.test.mjs
+++ b/frontend/tests/prepush.test.mjs
@@ -238,7 +238,7 @@ test('P5 push anyway: required, autofocused, labelled; disabled under 10 charact
assert.match(hint.textContent, /at least 10 characters\. This push only; next time the checks run again\./);
assert.doesNotMatch(text(form), /pull request/, 'the reason is not copied into the PR yet (contract q10)');
const go = [...form.querySelectorAll('button')].find((b) => text(b) === 'Push anyway');
- assert.match(go.className, /bg-amber-600/);
+ assert.match(go.className, /bg-amber-500 text-zinc-950/); // dark ink on amber (26g-2): 8.76:1
assert.equal(go.disabled, true);
await type(area, ' short ');
assert.equal(go.disabled, true, '"short" trimmed is under 10');