Skip to content

Commit 489cbc2

Browse files
chore: 1.1.1 — chart x-axis polish + retry signed updater
- Larger, brighter x-axis labels with month names ("Apr 24" not "04/24") - Daily mode labels every Monday + first-of-month for context - Hover guideline + bold today label - Tick marks below axis - Bump to 1.1.1 to retry signed release after dropping bogus TAURI_SIGNING_PRIVATE_KEY_PASSWORD secret Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 71ab387 commit 489cbc2

4 files changed

Lines changed: 63 additions & 16 deletions

File tree

apps/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code-reviewer/desktop",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"private": true,
55
"scripts": {
66
"dev": "lsof -ti:1420 | xargs kill -9 2>/dev/null; vite",

apps/desktop/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-utils/schema.json",
33
"identifier": "com.codevetter.desktop",
44
"productName": "CodeVetter",
5-
"version": "1.1.0",
5+
"version": "1.1.1",
66
"build": {
77
"beforeDevCommand": "npm run dev",
88
"beforeBuildCommand": "npm run build",

apps/desktop/src/pages/Home.tsx

Lines changed: 60 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -417,18 +417,32 @@ function TokenUsageChart({
417417

418418
// ViewBox in nice round units — scales responsively.
419419
const W = 600;
420-
const H = 140;
420+
const H = 160;
421421
const padX = 4;
422-
const padBottom = 14;
422+
const padBottom = 22;
423423
const padTop = 4;
424424
const barW = n > 0 ? (W - padX * 2) / n : 0;
425425
const chartH = H - padTop - padBottom;
426426

427+
const MONTHS = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
428+
427429
const labelFor = (d: { date?: string; week_start?: string }): string => {
428430
const iso = d.date ?? d.week_start ?? "";
429431
if (!iso) return "";
430-
const [, m, day] = iso.split("-");
431-
return mode === "daily" ? `${m}/${day}` : `${m}/${day}`;
432+
const [, mm, dd] = iso.split("-");
433+
const mIdx = parseInt(mm, 10) - 1;
434+
const day = parseInt(dd, 10);
435+
return `${MONTHS[mIdx] ?? mm} ${day}`;
436+
};
437+
438+
// Daily: label only on Mondays + first/last bar to avoid clutter.
439+
// Weekly: label every other bar, plus the most recent.
440+
const shouldLabel = (i: number, iso: string): boolean => {
441+
if (i === n - 1 || i === 0) return true;
442+
if (mode === "weekly") return i % 2 === 0;
443+
// daily: Monday or 1st of month
444+
const dt = new Date(`${iso}T00:00:00`);
445+
return dt.getDay() === 1 || dt.getDate() === 1;
432446
};
433447

434448
const gridlines = [0.25, 0.5, 0.75, 1].map((f) => padTop + chartH * (1 - f));
@@ -466,7 +480,7 @@ function TokenUsageChart({
466480

467481
<svg
468482
viewBox={`0 0 ${W} ${H}`}
469-
className="w-full h-36"
483+
className="w-full h-40"
470484
preserveAspectRatio="none"
471485
onMouseLeave={() => setHover(null)}
472486
>
@@ -510,21 +524,54 @@ function TokenUsageChart({
510524
</g>
511525
);
512526
})}
527+
{/* Hover guideline */}
528+
{hover != null && (
529+
<line
530+
x1={padX + hover * barW + barW / 2}
531+
x2={padX + hover * barW + barW / 2}
532+
y1={padTop}
533+
y2={padTop + chartH}
534+
stroke="#22d3ee"
535+
strokeWidth={0.5}
536+
strokeDasharray="2 2"
537+
opacity={0.4}
538+
pointerEvents="none"
539+
/>
540+
)}
541+
{/* Tick marks */}
542+
{data.map((_, i) => {
543+
if (i % (mode === "daily" ? 5 : 1) !== 0 && i !== n - 1) return null;
544+
const x = padX + i * barW + barW / 2;
545+
return (
546+
<line
547+
key={`tick-${i}`}
548+
x1={x}
549+
x2={x}
550+
y1={padTop + chartH}
551+
y2={padTop + chartH + 3}
552+
stroke="#334155"
553+
strokeWidth={0.5}
554+
/>
555+
);
556+
})}
557+
{/* X-axis labels */}
513558
{data.map((d, i) => {
514-
const showLabel =
515-
mode === "daily"
516-
? i % 5 === 0 || i === n - 1
517-
: i % 2 === 0 || i === n - 1;
518-
if (!showLabel) return null;
559+
const iso = (d as { date?: string; week_start?: string }).date
560+
?? (d as { date?: string; week_start?: string }).week_start
561+
?? "";
562+
if (!shouldLabel(i, iso)) return null;
519563
const x = padX + i * barW + barW / 2;
564+
const isHover = hover === i;
565+
const isLast = i === n - 1;
520566
return (
521567
<text
522568
key={`t-${i}`}
523569
x={x}
524-
y={H - 3}
570+
y={H - 6}
525571
textAnchor="middle"
526-
fontSize={8}
527-
fill="#475569"
572+
fontSize={9}
573+
fontWeight={isHover || isLast ? 600 : 400}
574+
fill={isHover ? "#22d3ee" : isLast ? "#cbd5e1" : "#64748b"}
528575
>
529576
{labelFor(d)}
530577
</text>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "code-reviewer",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"private": true,
55
"workspaces": [
66
"apps/*"

0 commit comments

Comments
 (0)