From 6391f07eb63089d9cdfb28f0bece9d9140f31bbc Mon Sep 17 00:00:00 2001 From: Felipe Coutinho Date: Mon, 20 Apr 2026 17:55:09 +0000 Subject: [PATCH] =?UTF-8?q?fix(changelog):=20renderizar=20par=C3=A1grafo?= =?UTF-8?q?=20de=20resumo=20por=20vers=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parser ignorava texto livre entre o cabeçalho ## [versão] e a primeira seção ###. Adicionado campo `summary` em ChangelogVersion e captura das linhas de texto antes da primeira seção. ChangelogTab renderiza o resumo logo abaixo do cabeçalho, antes das entradas técnicas. Co-Authored-By: Claude Sonnet 4.6 --- src/features/settings/components/changelog-tab.tsx | 5 +++++ src/features/settings/lib/parse-changelog.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/features/settings/components/changelog-tab.tsx b/src/features/settings/components/changelog-tab.tsx index 84d4b22..74b8a71 100644 --- a/src/features/settings/components/changelog-tab.tsx +++ b/src/features/settings/components/changelog-tab.tsx @@ -38,6 +38,11 @@ export function ChangelogTab({ versions }: { versions: ChangelogVersion[] }) {
+ {version.summary && ( +

+ {version.summary} +

+ )} {version.sections.map((section) => (
0) { + currentVersion.summary = summaryLines.join(" ").trim(); + summaryLines = []; + } if (currentSection) { currentVersion.sections.push(currentSection); } @@ -55,6 +62,11 @@ export function parseChangelog(): ChangelogVersion[] { continue; } + if (currentVersion && !currentSection && line.trim()) { + summaryLines.push(line.trim()); + continue; + } + // **Contribuições:** ou **Autor:** com texto/link opcional const contributorMatch = line.match( /^\*\*(?:Contribuições|Autor):\*\*\s*(.+)$/,