Skip to content

Commit 6e832e0

Browse files
fix(whatsnew): drop icons and commit bodies — sober subjects-only list
The previous pass showed a per-commit type icon and a collapsible body. But the body is the raw, long, technical commit message (code refs, route paths, schema fields) — not end-user copy — and the icons read as decorative/AI noise. The dialog now lists only each commit's subject line (prefix stripped, capitalised), no icons, no body: a clean release-notes list. The API still returns the structured fields; the UI just uses titles.
1 parent 1788c27 commit 6e832e0

2 files changed

Lines changed: 11 additions & 56 deletions

File tree

‎apps/web/src/components/WhatsNew.tsx‎

Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22

33
/**
44
* "What's new" dialog, shown once per update to every signed-in user. The API serves the changes
5-
* since the build the user last acknowledged, parsed from the commit messages into structured
6-
* entries; dismissing it records the current build so it never reappears for that version.
5+
* since the build the user last acknowledged, parsed from the commit messages; dismissing it
6+
* records the current build so it never reappears for that version.
77
*
8-
* Design: sober "release notes" — no decorative icon. Each entry shows an icon derived from the
9-
* commit's conventional-commit type (feat/fix/…), a clean title, and its long-form body tucked
10-
* behind a "Details" toggle (commit bodies are verbose, so they stay collapsed by default).
8+
* Design: deliberately sober "release notes" — no icons, no decoration. Each line is just the
9+
* commit's SUBJECT (its `type(scope):` prefix stripped, capitalised). The long, technical commit
10+
* BODY is intentionally NOT shown: it is internal detail, not end-user copy.
1111
*/
1212
import { useEffect, useState } from 'react';
1313
import { createPortal } from 'react-dom';
14-
import Markdown from 'react-markdown';
15-
import remarkGfm from 'remark-gfm';
16-
import { Check, Wrench, Zap, BookOpen, ChevronDown, X, type LucideIcon } from 'lucide-react';
14+
import { X } from 'lucide-react';
1715
import { api } from '@/lib/api';
1816
import { useAuth } from '@/lib/auth';
1917
import { useT } from '@/lib/i18n';
@@ -30,49 +28,6 @@ interface WhatsNew {
3028
count?: number;
3129
}
3230

33-
// Map a conventional-commit type to a small, meaningful icon + tint. Anything unrecognised gets a
34-
// neutral dot, so the list stays calm rather than noisy.
35-
const TYPE_STYLE: Record<string, { icon: LucideIcon; cls: string }> = {
36-
feat: { icon: Check, cls: 'bg-violet-500/15 text-violet-300' },
37-
fix: { icon: Wrench, cls: 'bg-amber-500/15 text-amber-300' },
38-
perf: { icon: Zap, cls: 'bg-sky-500/15 text-sky-300' },
39-
docs: { icon: BookOpen, cls: 'bg-white/[0.06] text-zinc-300' },
40-
};
41-
42-
function EntryRow({ e }: { e: ChangelogEntry }) {
43-
const { t } = useT();
44-
const [open, setOpen] = useState(false);
45-
const style = e.type ? TYPE_STYLE[e.type] : undefined;
46-
const Icon = style?.icon;
47-
48-
return (
49-
<li className="flex gap-3">
50-
<span className={`mt-0.5 grid h-6 w-6 shrink-0 place-items-center rounded-md ${style?.cls ?? 'text-zinc-600'}`}>
51-
{Icon ? <Icon size={14} /> : <span className="h-1.5 w-1.5 rounded-full bg-zinc-600" />}
52-
</span>
53-
<div className="min-w-0 flex-1">
54-
<div className="flex items-start justify-between gap-2">
55-
<p className="text-[13.5px] leading-snug text-zinc-100">{e.title}</p>
56-
{e.body && (
57-
<button
58-
onClick={() => setOpen((o) => !o)}
59-
className="mt-0.5 flex shrink-0 items-center gap-0.5 text-[11px] text-zinc-500 transition hover:text-zinc-300"
60-
>
61-
{t('whatsnew.details')}
62-
<ChevronDown size={12} className={`transition ${open ? 'rotate-180' : ''}`} />
63-
</button>
64-
)}
65-
</div>
66-
{open && e.body && (
67-
<div className="md-prose mt-2 border-l border-white/10 pl-3 text-xs text-zinc-400">
68-
<Markdown remarkPlugins={[remarkGfm]}>{e.body}</Markdown>
69-
</div>
70-
)}
71-
</div>
72-
</li>
73-
);
74-
}
75-
7631
export function WhatsNew() {
7732
const { user } = useAuth();
7833
const { t } = useT();
@@ -129,11 +84,13 @@ export function WhatsNew() {
12984

13085
<div className="mx-6 mt-4 border-t border-white/[0.07]" />
13186

132-
<ul className="space-y-3.5 overflow-y-auto px-6 py-4">
87+
<ul className="overflow-y-auto px-6 py-2">
13388
{entries.map((e, i) => (
134-
<EntryRow key={i} e={e} />
89+
<li key={i} className="border-t border-white/[0.05] py-2.5 first:border-t-0">
90+
<p className="text-[13.5px] leading-snug text-zinc-200">{e.title}</p>
91+
</li>
13592
))}
136-
{extra > 0 && <li className="pl-9 text-xs italic text-zinc-500">{t('whatsnew.more', { count: extra })}</li>}
93+
{extra > 0 && <li className="border-t border-white/[0.05] py-2.5 text-xs italic text-zinc-500">{t('whatsnew.more', { count: extra })}</li>}
13794
</ul>
13895

13996
<div className="border-t border-white/[0.07] px-6 py-3.5 text-right">

‎apps/web/src/lib/i18n.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,6 @@ const fr: Dict = {
550550
'whatsnew.title': 'Quoi de neuf',
551551
'whatsnew.version': 'Version {version}',
552552
'whatsnew.changes': '{count} changement(s)',
553-
'whatsnew.details': 'Détails',
554553
'whatsnew.more': '+{count} autres changements',
555554
'whatsnew.gotIt': 'J’ai compris',
556555
'whatsnew.dismiss': 'Fermer',
@@ -1148,7 +1147,6 @@ const en: Dict = {
11481147
'whatsnew.title': 'What’s new',
11491148
'whatsnew.version': 'Version {version}',
11501149
'whatsnew.changes': '{count} change(s)',
1151-
'whatsnew.details': 'Details',
11521150
'whatsnew.more': '+{count} more changes',
11531151
'whatsnew.gotIt': 'Got it',
11541152
'whatsnew.dismiss': 'Close',

0 commit comments

Comments
 (0)