Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

feat: land on the records window after onboarding, add window-close debug commands

wquguru67edac21bd1e
diff --git a/AGENTS.md b/AGENTS.md
index a1db5a6..6cf79b2 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -49,7 +49,7 @@ python3 scripts/site.py && python3 -m http.server -d build/site # website prev
Diagnostics (`Diagnostics.swift`, design: claude.ai/artifact/GHGzgN1sCodGfa17ZXLCa7): a "诊断" switch at the bottom left of the settings sidebar, beside the version (`diagnostics`, off by default; on in dev builds); switching it on adds a "诊断" tab below the others. It records only timings and counts, never transcript text: per heard sentence last new words → final transcript ("识别定稿") and final → translation, with Ling queue time, the provider that answered and why earlier ones fell through (`TranslateTrace`); per speak-back press release → transcript → translation → voice done; every Ling request (priority, queue, duration, outcome, tokens). Lines go to `metrics.jsonl` in the meeting folder (`type` = `sentence` / `ling`). The tab shows p50/p95, the provider split, fallback reasons, Ling rate and the last sentences as bars, and copies a plain-text report. It is separate from `debug`: the switch never enables transcript logging or the debug notification. Not done yet: the latency line under the subtitle bar and the health line in the panel.
-Debug control: dev builds always accept commands on the distributed notification `com.wquguru.cicada.debug` (release builds only with `defaults write com.wquguru.cicada debug -bool true`, which also logs transcript text). Send them with `tools/lsctl` (`start`, `stop`, `open`, `panel`, `onboarding:<step>`, `samplePlay`, `speakFile:<audio>`, `settings:<overlay|speak|records|ai|diagnostics>`, `diagnostics:<on|off>`, `diagReport`, `micTest`, `micNext`, `talkKey:<right|keyCode:mods>`, `toggleKey:<keyCode:mods>`, `shortcuts`, `aiKeyFile:<path>` (key from a 0600 file, never through the log), `aiCheck`, `aiRemove`, `aiState`, `lingSimulate:<429|hijack|timeout|off>`, `voice:<lang>[=<id>]`, `voicePreview:<lang>=<id>`, `voiceCloneFile:<wav>`, `display:<notes|bar|none>`, `subtitles:<both|translation|original>`, `meetingSubtitles:<…>`, `notesLang:<mine|source>`, `meetingNotesLang:<…>`, `notesRegenerate:<id>=<mine|source>`, `settings:language`, `notesWindow[:x,y,w,h]`, `notesClose` (its close button), `notesFrame`, `notesNow`, `notesState`, `notesShow:<id>`, `notesReplay:<id>`, `notesRender:<png>`, `notesCapturable`, `windowsRender:<dir>` (every visible window as drawn), `settingsRender:<section>=<png>` (one settings page in full), `mainShow:<id>[,transcript]`, `mainRender:<png>` (the main window, plus the shown meeting's whole notes page as `<png>.notes.png`), `place:x,y,w,font`, `frame`, `overlayState`, `export:<dir>` …).
+Debug control: dev builds always accept commands on the distributed notification `com.wquguru.cicada.debug` (release builds only with `defaults write com.wquguru.cicada debug -bool true`, which also logs transcript text). Send them with `tools/lsctl` (`start`, `stop`, `open`, `panel`, `onboarding:<step>`, `samplePlay`, `speakFile:<audio>`, `settings:<overlay|speak|records|ai|diagnostics>`, `diagnostics:<on|off>`, `diagReport`, `micTest`, `micNext`, `talkKey:<right|keyCode:mods>`, `toggleKey:<keyCode:mods>`, `shortcuts`, `aiKeyFile:<path>` (key from a 0600 file, never through the log), `aiCheck`, `aiRemove`, `aiState`, `lingSimulate:<429|hijack|timeout|off>`, `voice:<lang>[=<id>]`, `voicePreview:<lang>=<id>`, `voiceCloneFile:<wav>`, `display:<notes|bar|none>`, `subtitles:<both|translation|original>`, `meetingSubtitles:<…>`, `notesLang:<mine|source>`, `meetingNotesLang:<…>`, `notesRegenerate:<id>=<mine|source>`, `settings:language`, `notesWindow[:x,y,w,h]`, `notesClose` (its close button), `closeWindow:<main|settings|onboarding>`, `notesFrame`, `notesNow`, `notesState`, `notesShow:<id>`, `notesReplay:<id>`, `notesRender:<png>`, `notesCapturable`, `windowsRender:<dir>` (every visible window as drawn), `settingsRender:<section>=<png>` (one settings page in full), `mainShow:<id>[,transcript]`, `mainRender:<png>` (the main window, plus the shown meeting's whole notes page as `<png>.notes.png`), `place:x,y,w,font`, `frame`, `overlayState`, `export:<dir>` …).
Release: `scripts/release.sh <x.y.z>` (clean `main`, a `## x.y.z — <today>` section in `CHANGELOG.md`) bumps `Resources/Info.plist`, commits, tags `v<x.y.z>` and pushes; `.github/workflows/release.yml` (runner `macos-26`) builds the tag, checks it matches Info.plist and publishes the DMG, zip and checksums with notes from `scripts/release_notes.sh`. `build.yml` runs on pull requests and on demand only: macOS minutes are expensive for a private repo.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3da709f..212e0a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ the release workflow publishes it as the release notes.
- Fixed: entering a key that Ling refuses left the notes window asking for a key, with no sign it was wrong; it now says the key is invalid.
- Fixed: recording the shortcut that is already set (or 恢复默认 when it is the default) was refused as "taken by another app".
- Fixed: the English interface cut off the route line in Settings › Language, the "Follow system" badge and the interpreting line in the menu bar panel, the status line in the notes window, the collapsed card's "New since collapsed" and the own-voice card.
+- Fixed: the menu bar panel could open with its top above the screen (it grew upward as its contents settled); it now stays under the menu bar icon.
+- Changed: closing the notes window shows the meeting records window with that meeting open, and finishing or closing 新手引导 lands on the records window too, instead of leaving only the menu bar icon.
- Fixed: 诊断 kept counting the meeting's minutes after it ended, and 新手引导 asked for system audio permission again whenever listening was paused.
- New: the app speaks English. Menus, settings, the panel, the notes and main windows, onboarding, alerts, exports and the permission prompts follow the macOS language: Chinese on Chinese systems (Traditional too), English elsewhere. The notes themselves still follow the notes language.
- New: meetings name themselves. The notes give each meeting a short name in the notes language, and the records list, the page title and exports show the date and that name ("11月1日 Lumen 发布与结账转化问题讨论") instead of "会议 11月1日 20:16". A title you typed is kept; 恢复自动标题 in the list's right-click menu brings the automatic one back.
diff --git a/Sources/LiveSubs/AppModel.swift b/Sources/LiveSubs/AppModel.swift
index c08bde5..f69605e 100644
--- a/Sources/LiveSubs/AppModel.swift
+++ b/Sources/LiveSubs/AppModel.swift
@@ -732,6 +732,16 @@ final class AppModel: ObservableObject {
case "notesShow": notes.show(arg)
case "notesCapturable": notesWindow.setCapturable(arg != "off")
case "notesClose": notesWindow.performClose()
+ case "closeWindow":
+ // closeWindow:<main|settings|onboarding>: what the window's close button does.
+ let w = NSApp.windows.first { w in
+ switch arg {
+ case "main": w.contentView is NSHostingView<MainWindowView>
+ case "settings": w.contentView is NSHostingView<SettingsView>
+ default: w.contentView is NSHostingView<OnboardingView>
+ }
+ }
+ w?.performClose(nil)
case "notesRender":
// The whole notes column as a PNG, for checking what is below the fold.
let view = NotesContentView(notes: notes.notes, fresh: notes.fresh, live: store.liveID != nil,
@@ -1005,11 +1015,15 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate {
func windowWillClose(_ notification: Notification) {
let w = notification.object as? NSWindow
+ updateActivationPolicy(closing: w)
if w == onboardingWindow {
model.sample.stop()
UserDefaults.standard.set(true, forKey: "onboarded")
+ // Done (or 稍后): land on the records window rather than nothing but the menu bar icon.
+ if mainWindow?.isVisible != true {
+ DispatchQueue.main.async { [weak self] in MainActor.assumeIsolated { self?.showMainWindow() } }
+ }
}
- updateActivationPolicy(closing: w)
}
/// A regular app (name and menus top left, Dock icon, ⌘Tab) while the main, settings or
diff --git a/site/changelog.json b/site/changelog.json
index f9509f9..11a5ff4 100644
--- a/site/changelog.json
+++ b/site/changelog.json
@@ -150,6 +150,16 @@
"kind": "fixed",
"title": "英文界面文字被截断。",
"text": "设置里的语言路线、菜单栏面板、纪要窗口状态行和收起小卡等处的英文不再被截断。"
+ },
+ {
+ "kind": "fixed",
+ "title": "菜单栏面板顶部被挡。",
+ "text": "菜单栏面板有时会向上超出屏幕,顶部看不到;现在始终贴在菜单栏图标下方。"
+ },
+ {
+ "kind": "changed",
+ "title": "关掉纪要窗口回到会议记录。",
+ "text": "关闭实时纪要窗口后会打开会议记录并定位到这场会议;新手引导完成或关闭后也会打开会议记录,而不是只剩菜单栏图标。"
}
]
},