Skip to content

Doubao-powered voice input for Linux, Wayland and Omarchy

fix: 修正 Mac 设置侧栏残留的焦点框

quanru21debb5250a7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f2d6628..2a7e818 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@
- macOS: expose English, Simplified Chinese and system language selection in General settings with immediate switching and persistent preferences.
+## 1.5.3
+
+- Clear stale Mac settings sidebar focus when opening or navigating with the mouse, preserve Tab/Space navigation, and keep keyboard focus outlines aligned to the full rounded row.
+
## 1.5.2
- Check a public update manifest first, fall back to the GitHub API, allow longer requests, reject invalid caches and show specific Mac connection, HTTP, timeout and rate-limit errors. Ignore stale responses after cancellation.
diff --git a/README.md b/README.md
index c88dabc..d4035f4 100644
--- a/README.md
+++ b/README.md
@@ -497,7 +497,7 @@ validate package metadata and scan for secrets. The current whole-package branch
coverage floor is 55%; desktop UI, WebKit and real-device paths remain included
in the denominator.
-The current release version is **1.5.2**. A `v1.5.2` tag must match every embedded
+The current release version is **1.5.3**. A `v1.5.3` tag must match every embedded
version before CI can publish. Tag releases rebuild both offline app and Omarchy
plugin archives for Python 3.11–3.14 and attach SHA-256 checksums. A manually started
release workflow builds artifacts for inspection but does not publish them. Real
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 83a1955..52bbf53 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,33 +1,26 @@
-# Doubao Say 1.5.2
+# Doubao Say 1.5.3
-## Reliable update checks
+## Settings sidebar focus
-Mac and Linux check a public update manifest before falling back to the GitHub
-API. The manifest contains only the stable version and official package URLs;
-no API key, sign-in, settings or personal text is required. Publication checks
-require the Linux archives, both Mac DMGs and all corresponding checksum entries.
+When macOS keyboard navigation is enabled, opening Settings could focus Setup
+by default. Switching pages could leave a small rectangular focus outline around
+its text even though another page was selected.
-Mac checks allow 20 seconds per source instead of eight seconds for a single API
-request. Timeout, offline, HTTP, request-limit and invalid-response failures now
-have distinct messages. Invalid caches trigger a fresh request. Cancellation
-suppresses stale results and permits a new check. Checking the current version
-shows that it is up to date. The simple single-action update page is retained.
-
-This release addresses failure handling and source availability; it does not
-claim to identify every reported network failure on another computer. If an old
-client cannot check for updates, install this version once using its DMG.
+Settings now clears the initial and stale sidebar focus. Mouse navigation leaves
+only the selected page's background. Tab and Space still navigate and activate
+sidebar buttons, with a focus outline that follows the full rounded row.
## Download and verification
Choose the Developer ID signed, Apple-notarized arm64 or x86_64 Mac DMG. Linux
app/plugin archives remain available for Python 3.11–3.14. Settings and login data
-are retained. SHA256SUMS covers both platforms. update.json provides the public
-metadata used by this version's first update source.
+are retained. SHA256SUMS covers both platforms; update.json remains the public
+update source. Linux behavior is unchanged by this Mac interface fix.
-Tests cover timeout fallback, current-version checks, invalid cache recovery,
-HTTP and rate-limit messages, cancellation and metadata privacy. Swift,
-loopback recognition/polishing, Linux unit/contract/coverage and archive
-installation checks also run. Cross-built Intel artifacts do not establish
-execution on Intel hardware; microphone and physical hotkey checks are separate.
+Verification covers opening Settings, external page changes, mouse navigation,
+Tab/Space activation and reopening the window in English and Simplified Chinese.
+Swift, recognition/polishing loopback and Linux packaging checks also run.
+Cross-built Intel artifacts do not establish execution on Intel hardware;
+microphone, physical hotkey and VoiceOver checks remain separate.
-[Full changes](https://github.com/quanru/doubao-say/compare/v1.5.1...v1.5.2)
+[Full changes](https://github.com/quanru/doubao-say/compare/v1.5.2...v1.5.3)
diff --git a/macos/Sources/SettingsWindow.swift b/macos/Sources/SettingsWindow.swift
index c3880d1..0b75e6f 100644
--- a/macos/Sources/SettingsWindow.swift
+++ b/macos/Sources/SettingsWindow.swift
@@ -260,6 +260,7 @@ struct SettingsView: View {
@ObservedObject var model: SettingsModel
@ObservedObject var state: AppState
@State private var showingAppearance = false
+ @FocusState private var sidebarFocus: String?
@AppStorage("language") private var language = "en"
private var pages: [(String, String, String)] { [
("setup", L("Setup", "使用准备"), "checkmark.circle"),
@@ -277,13 +278,20 @@ struct SettingsView: View {
VStack(alignment: .leading, spacing: 8) {
Text("Doubao Say").font(.headline).padding(.horizontal, 12).padding(.vertical, 16)
ForEach(pages, id: \.0) { page in
- Button { model.selectedTab = page.0 } label: {
+ Button {
+ model.selectedTab = page.0
+ // Mouse navigation should not leave a keyboard focus ring behind.
+ if let event = NSApp.currentEvent, [.leftMouseDown, .leftMouseUp].contains(event.type) {
+ sidebarFocus = nil
+ }
+ } label: {
Label(page.1, systemImage: page.2)
.font(.system(size: 13, weight: model.selectedTab == page.0 ? .semibold : .regular))
.frame(maxWidth: .infinity, alignment: .leading).padding(10)
.foregroundColor(model.selectedTab == page.0 ? .accentColor : .primary)
.background(RoundedRectangle(cornerRadius: 7).fill(model.selectedTab == page.0 ? Color.accentColor.opacity(0.12) : .clear))
- }.buttonStyle(.plain)
+ .contentShape(RoundedRectangle(cornerRadius: 7))
+ }.buttonStyle(.plain).focused($sidebarFocus, equals: page.0)
}
Spacer()
Text(L("Settings", "设置")).font(.caption).foregroundColor(.secondary).padding(12)
@@ -313,6 +321,13 @@ struct SettingsView: View {
}.padding(18)
}.background(Color(nsColor: .windowBackgroundColor))
}.frame(width: 900, height: 650)
+ .onAppear {
+ // Allow the initial focus assignment to finish before clearing it.
+ DispatchQueue.main.async { sidebarFocus = nil }
+ }
+ .onChange(of: model.selectedTab) { page in
+ if sidebarFocus != page { sidebarFocus = nil }
+ }
}
@ViewBuilder private var selectedPage: some View {
switch model.selectedTab {
@@ -564,7 +579,12 @@ final class SettingsWindow: NSObject, NSWindowDelegate {
window.contentView = NSHostingView(rootView: SettingsView(model: model, state: state))
window.center()
}
- func show(refresh: Bool = true) { if refresh { model.refresh() }; NSApp.activate(ignoringOtherApps: true); window.makeKeyAndOrderFront(nil) }
+ func show(refresh: Bool = true) {
+ if refresh { model.refresh() }
+ NSApp.activate(ignoringOtherApps: true)
+ window.makeKeyAndOrderFront(nil)
+ window.makeFirstResponder(nil)
+ }
func windowWillClose(_ notification: Notification) { model.closeEditor() }
func close() { model.stopTests(); window.close() }
func hide() { window.orderOut(nil) }
diff --git a/manifest.json b/manifest.json
index 2b13b6b..eb237d6 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"schemaVersion": 1,
"id": "md.lifeos.doubao-say",
"name": "Doubao Say",
- "version": "1.5.2",
+ "version": "1.5.3",
"author": "quanru and contributors",
"description": "Doubao Say turns speech into polished text with live captions and configurable tap or hold triggers on Wayland.",
"kinds": [
diff --git a/packaging/INSTALL.md b/packaging/INSTALL.md
index 7efa968..2c100b6 100644
--- a/packaging/INSTALL.md
+++ b/packaging/INSTALL.md
@@ -1,4 +1,4 @@
-# Doubao Say 1.5.2
+# Doubao Say 1.5.3
[Website](https://doubao-say.lifeos.md/) · [简体中文安装指南](https://doubao-say.lifeos.md/zh/guide/install)
diff --git a/pyproject.toml b/pyproject.toml
index eb7e6e9..0e19d26 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "doubao-say"
-version = "1.5.2"
+version = "1.5.3"
description = "Global push-to-hold voice input for Linux/Wayland, backed by Doubao ASR"
readme = "README.md"
requires-python = ">=3.11"
diff --git a/src/doubao_input/product.py b/src/doubao_input/product.py
index b3922e6..1a7fa0e 100644
--- a/src/doubao_input/product.py
+++ b/src/doubao_input/product.py
@@ -1,6 +1,6 @@
"""Single runtime source for Doubao Say release identity."""
-VERSION = "1.5.2"
+VERSION = "1.5.3"
REPOSITORY_URL = "https://github.com/quanru/doubao-say"
LATEST_RELEASE_API = "https://api.github.com/repos/quanru/doubao-say/releases/latest"
LATEST_RELEASE_FEED = REPOSITORY_URL + "/releases/latest/download/update.json"
diff --git a/tests/contracts/test_release.py b/tests/contracts/test_release.py
index 88caa7c..6066aa3 100644
--- a/tests/contracts/test_release.py
+++ b/tests/contracts/test_release.py
@@ -49,7 +49,7 @@ class ReleaseTest(unittest.TestCase):
notes = (ROOT / "RELEASE_NOTES.md").read_text()
self.assertIn("--notes-file RELEASE_NOTES.md", workflow)
self.assertNotIn("--generate-notes", workflow)
- for expected in ("Doubao Say 1.5.2", "public update manifest", "GitHub API"):
+ for expected in ("Doubao Say 1.5.3", "keyboard navigation", "focus"):
self.assertIn(expected, " ".join(notes.split()))
def test_both_archives_exclude_ignored_source_files(self):
diff --git a/tests/contracts/test_version_check.py b/tests/contracts/test_version_check.py
index 2864f21..6907030 100644
--- a/tests/contracts/test_version_check.py
+++ b/tests/contracts/test_version_check.py
@@ -11,13 +11,13 @@ SPEC.loader.exec_module(VERSION_CHECK)
class VersionCheckTests(unittest.TestCase):
def test_sources_are_aligned_at_current_release(self):
- self.assertEqual(VERSION_CHECK.validate(root=ROOT), "1.5.2")
+ self.assertEqual(VERSION_CHECK.validate(root=ROOT), "1.5.3")
def test_exact_release_tag_is_accepted(self):
- self.assertEqual(VERSION_CHECK.validate("v1.5.2", ROOT), "1.5.2")
+ self.assertEqual(VERSION_CHECK.validate("v1.5.3", ROOT), "1.5.3")
def test_wrong_release_tag_is_rejected(self):
- with self.assertRaisesRegex(ValueError, "must be 'v1.5.2'"):
+ with self.assertRaisesRegex(ValueError, "must be 'v1.5.3'"):
VERSION_CHECK.validate("v1.1.0", ROOT)