feat(overlay): add in-app changelog modal (#187)

This commit is contained in:
2026-08-05 22:19:13 -07:00
committed by GitHub
parent a0dde4ee3e
commit 441ecf3c04
55 changed files with 3686 additions and 242 deletions
+41
View File
@@ -0,0 +1,41 @@
export type ChangelogItem = {
/** Bullet text with inline markdown preserved. */
text: string;
/** Nested bullets, as written with indentation in CHANGELOG.md. */
children: ChangelogItem[];
};
export type ChangelogSection = {
/** Section heading as written in CHANGELOG.md, e.g. "Added", "Fixed". */
heading: string;
items: ChangelogItem[];
/** True when the section lived inside the collapsed "Internal changes" block. */
internal: boolean;
};
export type ChangelogEntry = {
version: string;
date: string;
/** major.minor of `version`, used to decide which entries render expanded. */
groupKey: string;
sections: ChangelogSection[];
};
export type ChangelogSourceKind = 'remote' | 'bundled';
export type ChangelogSnapshot = {
entries: ChangelogEntry[];
/** Version this build reports, e.g. "0.19.2". */
installedVersion: string;
/** Newest version present in the fetched changelog, or null when empty. */
latestVersion: string | null;
/** Group key whose entries should start expanded. */
expandedGroupKey: string | null;
source: ChangelogSourceKind;
/** Release tag the remote changelog was read from, when known. */
releaseTag?: string;
/** Populated when the remote fetch failed and a fallback was used. */
warning?: string;
/** Populated when no changelog could be loaded at all. */
error?: string;
};
+2
View File
@@ -20,6 +20,8 @@ export interface OverlayNotificationAction {
id: string;
label: string;
noteId?: number;
/** Leaves the notification on screen after the action fires (default: dismiss). */
keepOpen?: boolean;
}
export interface OverlayNotificationPayload {
+7 -2
View File
@@ -4,6 +4,7 @@ import type {
KikuMergePreviewRequest,
KikuMergePreviewResponse,
} from './anki';
import type { ChangelogSnapshot } from './changelog';
import type { ResolvedConfig, ShortcutsConfig } from './config';
import type {
CompiledSessionBinding,
@@ -507,6 +508,8 @@ export interface ElectronAPI {
onRuntimeOptionsChanged: (callback: (options: RuntimeOptionState[]) => void) => void;
onOpenRuntimeOptions: (callback: () => void) => void;
onOpenSessionHelp: (callback: () => void) => void;
onOpenChangelog: (callback: () => void) => void;
getChangelogSnapshot: (options?: { refresh?: boolean }) => Promise<ChangelogSnapshot>;
onOpenControllerSelect: (callback: () => void) => void;
onOpenControllerDebug: (callback: () => void) => void;
onOpenJimaku: (callback: () => void) => void;
@@ -563,7 +566,8 @@ export interface ElectronAPI {
| 'controller-debug'
| 'subtitle-sidebar'
| 'session-help'
| 'character-dictionary',
| 'character-dictionary'
| 'changelog',
) => void;
notifyOverlayModalOpened: (
modal:
@@ -578,7 +582,8 @@ export interface ElectronAPI {
| 'controller-debug'
| 'subtitle-sidebar'
| 'session-help'
| 'character-dictionary',
| 'character-dictionary'
| 'changelog',
) => void;
reportOverlayContentBounds: (measurement: OverlayContentMeasurement) => void;
onConfigHotReload: (callback: (payload: ConfigHotReloadPayload) => void) => void;