diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index b50449d..302ab07 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -840,17 +840,25 @@ fun DetailScreen(state: DesktopState) { val hasSummary = detail.summary != null || (report?.contains("## Summary") == true) val remoteKnown = state.remoteIdFor(detail.file) != null - // Personality for the next summary: pick a voice, then hit - // Re-summarize. Neutral = the plain house voice. + // A voice chip IS the action: clicking one re-summarizes in + // that voice immediately — no separate Re-summarize button. + val sumBusy = detail.jobs.firstOrNull { it.jobType == "summarize" } + ?.status in setOf("queued", "running") + val voicesEnabled = remoteKnown && hasTranscript && !sumBusy Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text("Summarize in the voice of", + Text(if (hasSummary) "Re-summarize in the voice of" + else "Summarize in the voice of", style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant) Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { SUMMARIZE_PERSONAS.forEach { (label, tone) -> FilterChip( selected = sumTone == tone, - onClick = { sumTone = tone }, + enabled = voicesEnabled, + onClick = { + sumTone = tone + state.summarize(tone) + }, label = { Text(label) }, ) } @@ -860,13 +868,6 @@ fun DetailScreen(state: DesktopState) { TextButton({ state.transcribe() }) { Text(if (hasTranscript) "Re-transcribe" else "Transcribe") } - TextButton({ state.summarize(sumTone) }, - enabled = remoteKnown && hasTranscript) { - Text(buildString { - append(if (hasSummary) "Re-summarize" else "Summarize") - sumTone?.let { append(" · $it") } - }) - } } // Progress right where the buttons are: the busy spinner near // the top is off-screen once a report fills the page, which