Skip to content

Commit 4a79c1a

Browse files
committed
fix(ui): preserve existing functional color cues
1 parent a3f781b commit 4a79c1a

47 files changed

Lines changed: 291 additions & 307 deletions

Some content is hidden

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

‎AGENTS.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Tauri-based cross-platform SQL database GUI client with Vue 3 + TypeScript front
99
**Before adding or changing client UI, read [DESIGN.md](DESIGN.md).** It is the canonical client design specification; feature design documents describe behavior within that system.
1010

1111
- Preserve SQLKit's existing **blue primary**, light/dark/system themes, compact desktop workspace, and shared shadcn-vue/Radix Vue components. Keep semantic color ownership consistent and retain SQLKit's blue brand and primary actions.
12-
- Use neutral surfaces, typography, spacing, and borders for hierarchy. Keep accent areas scarce (roughly 10% of application chrome); use at most one solid primary action per operation context. Toolbar button surfaces stay neutral; small query-action and object-type icons may use the bounded recognition palette in DESIGN.md.
13-
- Colors have fixed roles: `primary` = primary actions/interaction; `success` = actual success/connected/completed; `destructive` = errors/destructive actions. Ordinary information, counts, boolean values, database properties, and file formats are neutral. Do not tint whole features or add a separate AI palette. Object-type and query-action icon colors are recognition cues, separate from operational status.
14-
- Reuse semantic CSS tokens from `src/assets/index.css` and their `uno.config.ts` mappings. Do not add palette classes or literal colors for existing UI semantics. `accent` is a neutral interaction surface, not a second brand color.
12+
- Use neutral surfaces, typography, spacing, and borders for hierarchy. Keep accent areas scarce (roughly 10% of application chrome); use at most one solid primary action per operation context. Keep Execute compact and unfilled. Preserve the original functional icon and data colors documented in DESIGN.md.
13+
- Colors have fixed roles: `primary` = primary actions/interaction; `success` = actual success/connected/completed; `destructive` = errors/destructive actions. Preserve existing boolean, key/constraint, type, filter, permission, format, and icon recognition colors, with labels or distinct glyphs alongside them. Do not tint whole features or add a separate AI palette. Recognition colors describe content and actions independently of operational status; do not flatten them to gray during surface refactors.
14+
- Reuse semantic CSS tokens from `src/assets/index.css` and their `uno.config.ts` mappings. Preserve existing palette utilities for functional recognition; a token migration must retain the original hues and theme variants. `accent` is a neutral interaction surface, not a second brand color.
1515
- `warning` is registered with light/dark foreground, muted-background, and border pairs; `info` is **not registered**. Use `primary-text` and `destructive-text` for readable colored text, reserving the corresponding base tokens for solid actions. Any new semantic token must include light/dark definitions, necessary foreground pairs, UnoCSS mappings, shared variants where needed, contrast verification, and a DESIGN.md update in the same change.
1616
- Non-interactive badges explicitly use `outline`/`secondary` by default; status colors require real state and accompanying text or icons. Syntax highlighting, data charts, diffs, and small vendor logos have the bounded exceptions documented in DESIGN.md.
1717
- Provide visible keyboard focus, accessible icon-button names, loading/empty/error states, readable contrast, and localized copy. Reuse runtime platform detection for shortcuts and native window behavior.
18-
- Existing hardcoded colors and component defaults are migration debt, not permission to repeat them. Distinguish documented targets from implemented behavior, and verify the affected themes, window sizes, and interactions when changing UI.
18+
- Existing functional recognition colors are intentional compatibility constraints. Avoid new unrelated hardcoded colors. Distinguish documented targets from implemented behavior, and verify the affected themes, window sizes, and interactions when changing UI.
1919

2020
## Build/Lint/Test Commands
2121

‎DESIGN.md‎

Lines changed: 25 additions & 30 deletions
Large diffs are not rendered by default.

‎src/__tests__/theme.test.ts‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,6 @@ describe.each(['light', 'dark'] as const)('%s theme', (name) => {
6464
},
6565
)
6666

67-
it.each(['table', 'view', 'procedure', 'function', 'database'])(
68-
'keeps %s recognition icons readable on neutral surfaces',
69-
(role) => {
70-
;['background', 'chrome', 'card', 'accent'].forEach((surface) => {
71-
expect(contrast(tokens[`icon-${role}`], tokens[surface])).toBeGreaterThanOrEqual(4.5)
72-
})
73-
},
74-
)
75-
7667
it.each(['keyword', 'string', 'number', 'comment'])(
7768
'keeps SQL %s tokens readable',
7869
(token) => {

‎src/assets/index.css‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@
4444
--syntax-string: 23.16 60.64% 36.86%;
4545
--syntax-number: 270.65 39.66% 45.49%;
4646
--syntax-comment: 98.18 12.09% 35.69%;
47-
--icon-table: 142.43 71.81% 29.22%;
48-
--icon-view: 262.12 83.26% 57.84%;
49-
--icon-procedure: 224.28 76.33% 48.04%;
50-
--icon-function: 35.65 100.00% 27.06%;
51-
--icon-database: 43.91 100.00% 27.06%;
5247
}
5348

5449
.dark {
@@ -95,11 +90,6 @@
9590
--syntax-string: 26.40 47.77% 69.22%;
9691
--syntax-number: 264.49 51.58% 81.37%;
9792
--syntax-comment: 112.50 7.55% 58.43%;
98-
--icon-table: 143.02 47.25% 64.31%;
99-
--icon-view: 265.41 80.95% 79.41%;
100-
--icon-procedure: 218.46 100.00% 77.06%;
101-
--icon-function: 36.61 79.73% 70.98%;
102-
--icon-database: 45.00 55.17% 65.88%;
10393
}
10494

10595
* {

‎src/components/connections/ConnectingModal.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ defineExpose({
153153

154154
<div
155155
v-if="errorMessage && errorHint"
156-
class="text-sm text-warning p-4 border border-warning-border rounded-md bg-warning-muted w-full"
156+
class="text-sm text-amber-700 p-4 border border-amber-500/40 rounded-md bg-amber-500/10 w-full dark:text-amber-400"
157157
>
158158
<div class="flex gap-3 items-start">
159159
<span class="i-carbon-warning mt-0.5 flex-shrink-0 h-5 w-5" />
@@ -184,7 +184,7 @@ defineExpose({
184184
no longer detected — the tunnel falls back to a direct connection -->
185185
<p
186186
v-if="!errorMessage && warningMessage"
187-
class="text-xs text-warning text-center max-w-[400px]"
187+
class="text-xs text-amber-600 text-center max-w-[400px] dark:text-amber-400"
188188
>
189189
{{ warningMessage }}
190190
</p>

‎src/components/connections/DatabaseFileField.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@ const fileDetails = computed(() => {
252252
const toneClass: Record<StatusDescriptor['tone'], string> = {
253253
info: 'text-muted-foreground',
254254
success: 'text-muted-foreground',
255-
warning: 'text-warning',
256-
error: 'text-destructive-text',
255+
warning: 'text-amber-600 dark:text-amber-500',
256+
error: 'text-destructive',
257257
}
258258
259259
const toneIcon: Record<StatusDescriptor['tone'], string> = {

‎src/components/connections/ServerCard.vue‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ const { getDatabaseIcon, getDatabaseColor } = useDatabaseIcon()
3838
const statusColor = computed(() => {
3939
switch (props.connectionStatus) {
4040
case ConnectionStatus.CONNECTED:
41-
return 'bg-success'
41+
return 'bg-green-600 dark:bg-green-500'
4242
case ConnectionStatus.CONNECTING:
43-
return 'bg-warning animate-pulse'
43+
return 'bg-yellow-600 dark:bg-yellow-500 animate-pulse'
4444
case ConnectionStatus.ERROR:
45-
return 'bg-destructive-text'
45+
return 'bg-red-600 dark:bg-red-500'
4646
default:
4747
return 'bg-muted-foreground/50'
4848
}

‎src/components/connections/ServerFormDialog.vue‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ function handleSave() {
13901390

13911391
<div
13921392
v-if="conflictingDuckDbConnection"
1393-
class="text-xs text-warning p-2 border border-warning-border rounded-md flex gap-2 items-start"
1393+
class="text-xs text-amber-600 p-2 border border-amber-500/50 rounded-md flex gap-2 items-start dark:text-amber-500"
13941394
>
13951395
<span class="i-carbon-warning mt-0.5 shrink-0 h-4 w-4" />
13961396
<div class="flex-1 space-y-1">
@@ -1529,9 +1529,9 @@ function handleSave() {
15291529
<!-- Test Connection Status -->
15301530
<div
15311531
v-if="testStatus !== 'idle' || (isJdbcDb && setupSteps.some(s => s.status !== 'pending'))" class="p-3 rounded-md" :class="{
1532-
'bg-primary/5': testStatus === 'testing',
1533-
'bg-success-muted': testStatus === 'success',
1534-
'bg-destructive-muted': testStatus === 'error',
1532+
'bg-blue-50 dark:bg-blue-900/10': testStatus === 'testing',
1533+
'bg-green-50 dark:bg-green-900/10': testStatus === 'success',
1534+
'bg-red-50 dark:bg-red-900/10': testStatus === 'error',
15351535
}"
15361536
>
15371537
<!-- Per-step status list (shown during and after setup for JDBC databases) -->
@@ -1540,11 +1540,11 @@ function handleSave() {
15401540
v-for="step in setupSteps"
15411541
:key="step.id"
15421542
class="text-xs flex gap-2 min-w-0 items-center"
1543-
:class="step.status === 'done' ? 'text-success' : step.status === 'running' ? 'text-foreground' : step.status === 'error' ? 'text-destructive-text' : 'text-muted-foreground'"
1543+
:class="step.status === 'done' ? 'text-green-600 dark:text-green-400' : step.status === 'running' ? 'text-foreground' : step.status === 'error' ? 'text-red-600 dark:text-red-400' : 'text-muted-foreground'"
15441544
>
15451545
<span v-if="step.status === 'done'" class="i-carbon-checkmark shrink-0 h-3.5 w-3.5" />
15461546
<span v-else-if="step.status === 'running' && !step.progress" class="i-carbon-circle-dash shrink-0 h-3.5 w-3.5 animate-spin" />
1547-
<span v-else-if="step.status === 'running'" class="i-carbon-circle-dash text-primary-text shrink-0 h-3.5 w-3.5 animate-spin" />
1547+
<span v-else-if="step.status === 'running'" class="i-carbon-circle-dash text-blue-500 shrink-0 h-3.5 w-3.5 animate-spin" />
15481548
<span v-else-if="step.status === 'error'" class="i-carbon-close shrink-0 h-3.5 w-3.5" />
15491549
<span v-else class="i-carbon-circle-dash shrink-0 h-3.5 w-3.5" />
15501550
<span class="font-medium whitespace-nowrap">{{ t(step.label) }}</span>
@@ -1560,7 +1560,7 @@ function handleSave() {
15601560
</span>
15611561
<!-- Error + retry button (pushed right) -->
15621562
<span v-if="step.status === 'error'" class="flex flex-1 gap-1.5 min-w-0 items-center justify-end">
1563-
<span class="text-destructive-text text-right max-w-[200px] truncate">{{ step.error || t('components.serverForm.ssh.stepFailed') }}</span>
1563+
<span class="text-red-500 text-right max-w-[200px] truncate">{{ step.error || t('components.serverForm.ssh.stepFailed') }}</span>
15641564
<button
15651565
type="button"
15661566
class="text-muted-foreground inline-flex shrink-0 gap-0.5 cursor-pointer transition-colors items-center hover:text-foreground"
@@ -1574,16 +1574,16 @@ function handleSave() {
15741574
</div>
15751575
<div class="space-y-1.5">
15761576
<!-- Loading state during connection test (always visible when testing after steps) -->
1577-
<div v-if="testStatus === 'testing'" class="text-xs text-primary-text text-primary-text mt-1.5 pt-1 flex gap-1.5 items-center" :class="{ 'border-t border-border/50': isJdbcDb }">
1577+
<div v-if="testStatus === 'testing'" class="text-xs text-blue-600 mt-1.5 pt-1 flex gap-1.5 items-center dark:text-blue-400" :class="{ 'border-t border-border/50': isJdbcDb }">
15781578
<span class="i-carbon-circle-dash shrink-0 h-3.5 w-3.5 animate-spin" />
15791579
<span class="font-medium">{{ t('common.status.testing') }}</span>
15801580
</div>
15811581
<!-- Summary result -->
1582-
<div v-if="testStatus === 'success'" class="text-xs text-success text-success mt-1.5 pt-1 flex gap-1.5 items-center" :class="{ 'border-t border-border/50': isJdbcDb }">
1582+
<div v-if="testStatus === 'success'" class="text-xs text-green-600 mt-1.5 pt-1 flex gap-1.5 items-center dark:text-green-400" :class="{ 'border-t border-border/50': isJdbcDb }">
15831583
<span class="i-carbon-checkmark shrink-0 h-3.5 w-3.5" />
15841584
<span class="font-medium">{{ t('common.status.success') }}</span>
15851585
</div>
1586-
<div v-else-if="testStatus === 'error'" class="text-xs text-destructive-text text-destructive-text mt-1.5 pt-1 space-y-0.5" :class="{ 'border-t border-border/50': isJdbcDb }">
1586+
<div v-else-if="testStatus === 'error'" class="text-xs text-red-600 mt-1.5 pt-1 space-y-0.5 dark:text-red-400" :class="{ 'border-t border-border/50': isJdbcDb }">
15871587
<div class="flex gap-1.5 items-center">
15881588
<span class="i-carbon-close shrink-0 h-3.5 w-3.5" />
15891589
<span class="font-medium">{{ t('common.status.failed') }}</span>
@@ -1596,12 +1596,12 @@ function handleSave() {
15961596
<span class="text-xs">{{ t('common.buttons.retry') }}</span>
15971597
</button>
15981598
</div>
1599-
<p v-if="testError" class="text-destructive-text pl-5">
1599+
<p v-if="testError" class="text-red-500 pl-5">
16001600
{{ testError }}
16011601
</p>
16021602
<div
16031603
v-if="testFailureHint"
1604-
class="text-xs text-warning pl-5 flex gap-2 items-start"
1604+
class="text-xs text-amber-600 pl-5 flex gap-2 items-start dark:text-amber-500"
16051605
>
16061606
<span class="i-carbon-warning mt-0.5 shrink-0 h-4 w-4" />
16071607
<div class="flex-1 space-y-1">
@@ -1634,7 +1634,7 @@ function handleSave() {
16341634

16351635
<div
16361636
v-if="testSshTunnelStripped"
1637-
class="text-sm text-warning mt-2 p-4 border border-warning-border rounded-md bg-warning-muted"
1637+
class="text-sm text-amber-700 mt-2 p-4 border border-amber-500/40 rounded-md bg-amber-500/10 dark:text-amber-400"
16381638
>
16391639
<div class="flex gap-3 items-start">
16401640
<span class="i-carbon-warning mt-0.5 flex-shrink-0 h-5 w-5" />

‎src/components/connections/SshProfileDialog.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async function save() {
214214
<p
215215
v-if="testResult"
216216
class="text-xs leading-relaxed flex gap-1.5 break-words items-start"
217-
:class="testResult.success ? 'text-success' : 'text-destructive-text'"
217+
:class="testResult.success ? 'text-green-600 dark:text-green-400' : 'text-destructive'"
218218
>
219219
<span v-if="testing" class="i-carbon-circle-dash mt-0.5 shrink-0 h-3.5 w-3.5 animate-spin" />
220220
<span v-else class="i-carbon-network-3 mt-0.5 shrink-0 h-3.5 w-3.5" />
@@ -239,7 +239,7 @@ async function save() {
239239
:disabled="testing || !valid"
240240
@click="testProfile"
241241
>
242-
<span v-if="testing" class="i-carbon-circle-dash text-primary-text h-3.5 w-3.5 animate-spin" />
242+
<span v-if="testing" class="i-carbon-circle-dash text-blue-500 h-3.5 w-3.5 animate-spin" />
243243
<span v-else class="i-carbon-network-3 h-3.5 w-3.5" />
244244
{{ t('common.buttons.testConnection') }}
245245
</Button>

‎src/components/connections/SshTunnelConfigPanel.vue‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ onMounted(detectProxy)
326326

327327
<template v-else>
328328
<div class="flex gap-2 items-center">
329-
<span class="i-carbon-locked text-muted-foreground shrink-0 h-4 w-4" />
329+
<span class="i-carbon-locked text-green-500 shrink-0 h-4 w-4" />
330330
<span class="text-sm font-medium whitespace-nowrap">{{ t('components.serverForm.ssh.useSshTunnel') }}</span>
331331
<span v-if="hopProfiles.length > 0" class="text-xs text-muted-foreground whitespace-nowrap">
332332
{{ hopProfiles.length }} {{ t('components.serverForm.ssh.hops', hopProfiles.length) }}
@@ -344,7 +344,7 @@ onMounted(detectProxy)
344344
: t('components.serverForm.ssh.testChain')"
345345
@click="testFirstHop"
346346
>
347-
<span v-if="testing" class="i-carbon-circle-dash text-primary-text h-3.5 w-3.5 animate-spin" />
347+
<span v-if="testing" class="i-carbon-circle-dash text-blue-500 h-3.5 w-3.5 animate-spin" />
348348
<span v-else class="i-carbon-network-3 h-3.5 w-3.5" />
349349
</Button>
350350

@@ -375,7 +375,7 @@ onMounted(detectProxy)
375375
<p
376376
v-if="testResult"
377377
class="text-xs leading-relaxed break-words"
378-
:class="testResult.success ? 'text-success' : 'text-destructive-text'"
378+
:class="testResult.success ? 'text-green-600 dark:text-green-400' : 'text-destructive'"
379379
>
380380
{{ testResult.success && testResult.user && testResult.host && testResult.port
381381
? t('components.serverForm.ssh.testSuccess', {
@@ -428,14 +428,14 @@ onMounted(detectProxy)
428428
connect time). -->
429429
<div
430430
v-else-if="!detectedProxy && useSystemProxy"
431-
class="px-2.5 py-1.5 border border-warning-border rounded-md bg-warning-muted flex gap-2 items-center"
431+
class="px-2.5 py-1.5 border border-amber-500/50 rounded-md bg-amber-50 flex gap-2 items-center dark:bg-amber-900/20"
432432
>
433433
<span class="text-[10px] text-muted-foreground font-bold shrink-0 w-4">0</span>
434434
<div class="flex-1 min-w-0">
435435
<div class="text-sm font-medium">
436436
{{ t('components.serverForm.ssh.systemProxy') }}
437437
</div>
438-
<div class="text-[11px] text-warning truncate">
438+
<div class="text-[11px] text-amber-600 truncate dark:text-amber-400">
439439
{{ t('components.serverForm.ssh.systemProxyNotDetected') }}
440440
</div>
441441
</div>
@@ -515,7 +515,7 @@ onMounted(detectProxy)
515515
<!-- Legacy manual (inline) config — pre-profiles connections keep editing
516516
their inline fields; new configurations always go through profiles -->
517517
<template v-if="legacyInline">
518-
<p class="text-[11px] text-warning">
518+
<p class="text-[11px] text-amber-600 dark:text-amber-400">
519519
{{ t('components.serverForm.ssh.legacyManual') }}
520520
</p>
521521
<div class="space-y-2">

0 commit comments

Comments
 (0)