Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Cancelling a field puts it back the way it was before you started and hands the
| `Tab` / `⇧Tab` | Next / previous row on pages that have them (Settings). Never a different action. |
| `→` / `←` | Step into / out of a level, or through a carousel. While a value is being picked, they step the value instead (see `Space`). |
| `⏎` | The selected row's main action: open, approve, activate. Every row that shows a `⏎` hint has to do something with it. |
| `Space` | Flip a toggle (Phrases defaults, the update log). In Settings it does what `⏎` does on every row: flips an on/off row, fires an action row, and on a value row (a sound, a duration, a threshold) starts picking. While picking, `←` / `→` step through the values and `Space` or `⏎` settles on one; moving to another row settles it too. |
| `Space` | Flip a toggle (Phrases defaults). In Settings it does what `⏎` does on every row: flips an on/off row, fires an action row, and on a value row (a sound, a duration, a threshold) starts picking. While picking, `←` / `→` step through the values and `Space` or `⏎` settles on one; moving to another row settles it too. |
| `⌫` / `⌦` | Dismiss the selected item, where that loses nothing (an Events nudge, an Outcomes row). Anything destructive that has no confirmation step takes `⌘⌫` (killing a session, removing a phrase or an extension), and ignores autorepeat. |
| `/` | Focus the page's text field, where it has one. |

Expand Down
5 changes: 1 addition & 4 deletions panel/Panel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4429,17 +4429,14 @@ final class PanelController: NSObject, NSApplicationDelegate, PanelKeyDelegate,
}

// Updating: ← back to Settings, and only after a failure (so the user
// can't accidentally abandon a live install). Space toggles the log.
// can't accidentally abandon a live install).
if nav.mode == .updating {
let plain = mods.intersection([.command, .control, .option, .shift]).isEmpty
guard plain else { return false }
switch event.keyCode {
case KeyCode.leftArrow where nav.updaterPhase == .failed:
nav.mode = .settings
return true
case KeyCode.space:
nav.updaterShowLog.toggle()
return true
default:
return false
}
Expand Down
5 changes: 2 additions & 3 deletions panel/PanelNav.swift
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,10 @@ final class PanelNav: ObservableObject {
// (e.g. private repo without auth).
@Published var updateReleaseNotes: String?
// Live updater state. updaterPhase advances as install.sh emits STAGE
// markers; updaterLog accumulates the raw install output for the
// expandable "Show output" detail in UpdatingView.
// markers; updaterLog accumulates the raw install output UpdatingView
// shows under the progress bar.
@Published var updaterPhase: UpdatePhase = .idle
@Published var updaterLog: String = ""
@Published var updaterShowLog: Bool = false
// Post-update screen state. Populated on launch when the status file
// from a previous in-flight update is found; drives the welcome-style
// PostUpdateView (mode = .postUpdate). Cleared on dismiss.
Expand Down
49 changes: 31 additions & 18 deletions panel/Updater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1261,8 +1261,8 @@ struct MarkdownNotesView: View {
// MARK: - Updating view

// Shown while install.sh is running. Top half: spinner + current phase
// label + step counter. Bottom half: a disclosure that reveals the raw
// install log (toggled via "Show output").
// label + step counter. Bottom half: the raw install output, always shown
// so a slow or stuck step can be read without asking for it.
struct UpdatingView: View {

@ObservedObject var nav: PanelNav
Expand All @@ -1272,7 +1272,7 @@ struct UpdatingView: View {
VStack(alignment: .leading, spacing: 14) {
phaseHeader
progressBar
detailDisclosure
output
}
.padding(.horizontal, 14)
.padding(.vertical, 14)
Expand Down Expand Up @@ -1314,26 +1314,39 @@ struct UpdatingView: View {
.tint(nav.updaterPhase == .failed ? .red : .accentColor)
}

@ViewBuilder
private var detailDisclosure: some View {
DisclosureGroup(isExpanded: $nav.updaterShowLog) {
ScrollView {
Text(nav.updaterLog.isEmpty ? "Waiting for output…" : nav.updaterLog)
.font(.caption.monospaced())
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
.textSelection(.enabled)
.padding(8)
private static let outputEnd = "output-end"

private var output: some View {
VStack(alignment: .leading, spacing: 6) {
Text("Output")
.font(.caption)
.foregroundStyle(.secondary)
// Takes whatever height the page has left, never more, so the panel
// keeps its size. Once the output outgrows it, it follows the newest
// line, so the step that's running is the one on screen.
ScrollViewReader { proxy in
ScrollView {
VStack(alignment: .leading, spacing: 0) {
Text(nav.updaterLog.isEmpty ? "Waiting for output…" : nav.updaterLog)
.font(.caption.monospaced())
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity, alignment: .leading)
.textSelection(.enabled)
.padding(8)
Color.clear.frame(height: 0).id(Self.outputEnd)
}
}
.background(ThinScrollers())
.onChange(of: nav.updaterLog) { _ in
proxy.scrollTo(Self.outputEnd, anchor: .bottom)
}
.onAppear { proxy.scrollTo(Self.outputEnd, anchor: .bottom) }
}
.frame(maxHeight: 140)
.frame(maxHeight: .infinity)
.background(
RoundedRectangle(cornerRadius: 6, style: .continuous)
.fill(Color.primary.opacity(0.05))
)
} label: {
Text("Show output")
.font(.caption)
.foregroundStyle(.secondary)
}
}
}
Expand Down
Loading