Desktop: size the folder picker dialog (tiny on HiDPI/XWayland) + log pump failures

JFileChooser came up with an unusable size under the compositor; pin
1040x700. transcribeFile now appends its exception to
~/.config/shonar-desktop/pump-error.log instead of returning false
silently. Verified live: library lists 49 m4a files from
~/Music/Recordings, existing .transcript.md reports detected as done.
This commit is contained in:
avi 2026-09-13 00:27:56 -05:00
commit 3241bd50cf
2 changed files with 9 additions and 0 deletions

View file

@ -542,6 +542,12 @@ class DesktopState(private val appDir: File = defaultAppDir()) {
saveReport(DetailUi(file = f, transcript = transcript, summary = summary)) saveReport(DetailUi(file = f, transcript = transcript, summary = summary))
true true
} catch (e: Exception) { } catch (e: Exception) {
// Surface pump failures for diagnosis instead of swallowing them.
runCatching {
File(appDir, "pump-error.log").appendText(
"${java.time.Instant.now()} ${f.name}: $e\n",
)
}
false false
} }
} }

View file

@ -75,6 +75,9 @@ private fun chooseFolder(): File? {
dialogTitle = "Choose your recordings folder" dialogTitle = "Choose your recordings folder"
fileSelectionMode = JFileChooser.DIRECTORIES_ONLY fileSelectionMode = JFileChooser.DIRECTORIES_ONLY
isAcceptAllFileFilterUsed = false isAcceptAllFileFilterUsed = false
// Without an explicit size the dialog comes up tiny on HiDPI
// compositors (and there is no resize handle), so pin a usable one.
preferredSize = java.awt.Dimension(1040, 700)
} }
return if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) chooser.selectedFile else null return if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) chooser.selectedFile else null
} }