Archived
Fix regressions N1-N3 from re-verification
- Transcript: selection suspension clears when press ends; Latest re-enables follow fully (clears stale selection state) - Send disabled until transport ready in pending Type composer - Server URL: programmatic success-trim no longer erases its own saved-confirmation; only user edits clear it
This commit is contained in:
1 parent
afe37ad5f4
commit
f6722a223f
2 files changed
+21
-7
No files matched your search
@@ -74,6 +74,9 @@ struct TranscriptListView: View {
|
|||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
Spacer()
|
||||||
Button {
|
Button {
|
||||||
|
// Explicit Latest restores full eligibility,
|
||||||
|
// clearing any stale selection suspension.
|
||||||
|
selectionActive = false
|
||||||
followingLatest = true
|
followingLatest = true
|
||||||
withAnimation(reduceMotion ? nil : Nearlight.standard) {
|
withAnimation(reduceMotion ? nil : Nearlight.standard) {
|
||||||
proxy.scrollTo("latest", anchor: .bottom)
|
proxy.scrollTo("latest", anchor: .bottom)
|
||||||
@@ -130,8 +133,9 @@ struct TranscriptListView: View {
|
|||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
.onLongPressGesture(minimumDuration: 0.05, pressing: { pressing in
|
.onLongPressGesture(minimumDuration: 0.05, pressing: { pressing in
|
||||||
// Text-selection interaction begins with long-press on the row;
|
// Text-selection interaction begins with long-press on the row;
|
||||||
// suspend auto-follow while pressing/held.
|
// suspend auto-follow while pressing/held and restore when the
|
||||||
if pressing { selectionActive = true }
|
// press ends so following can resume.
|
||||||
|
selectionActive = pressing
|
||||||
}, perform: {})
|
}, perform: {})
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
Button("Copy message", systemImage: "doc.on.doc") { UIPasteboard.general.string = text }
|
Button("Copy message", systemImage: "doc.on.doc") { UIPasteboard.general.string = text }
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ struct SettingsView: View {
|
|||||||
@State private var urlJustSaved = false
|
@State private var urlJustSaved = false
|
||||||
@State private var showModelPicker = false
|
@State private var showModelPicker = false
|
||||||
@FocusState private var urlFocused: Bool
|
@FocusState private var urlFocused: Bool
|
||||||
|
@State private var applyingTrim = false
|
||||||
|
/// Guards the success-trim against the edit observer (N3).
|
||||||
|
|
||||||
init(settings: SettingsStore, session: VoiceSession) {
|
init(settings: SettingsStore, session: VoiceSession) {
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
@@ -71,10 +73,14 @@ struct SettingsView: View {
|
|||||||
.accessibilityLabel("Server URL")
|
.accessibilityLabel("Server URL")
|
||||||
.focused($urlFocused)
|
.focused($urlFocused)
|
||||||
.onAppear { urlText = settings.serverURL }
|
.onAppear { urlText = settings.serverURL }
|
||||||
.onChange(of: urlText) { _, _ in
|
.onChange(of: urlText) { oldValue, newValue in
|
||||||
// Any edit clears the saved confirmation and error.
|
// A programmatic normalization on successful Save must
|
||||||
urlJustSaved = false
|
// not erase its own confirmation; only user edits do.
|
||||||
urlError = nil
|
guard applyingTrim == false else { return }
|
||||||
|
if newValue != oldValue {
|
||||||
|
urlJustSaved = false
|
||||||
|
urlError = nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.overlay(alignment: .trailing) {
|
.overlay(alignment: .trailing) {
|
||||||
if urlJustSaved {
|
if urlJustSaved {
|
||||||
@@ -142,7 +148,11 @@ struct SettingsView: View {
|
|||||||
switch ServerConfig.parse(trimmed) {
|
switch ServerConfig.parse(trimmed) {
|
||||||
case .success:
|
case .success:
|
||||||
settings.serverURL = trimmed
|
settings.serverURL = trimmed
|
||||||
urlText = trimmed
|
if trimmed != urlText {
|
||||||
|
applyingTrim = true
|
||||||
|
urlText = trimmed
|
||||||
|
applyingTrim = false
|
||||||
|
}
|
||||||
urlError = nil
|
urlError = nil
|
||||||
urlJustSaved = true
|
urlJustSaved = true
|
||||||
urlFocused = false
|
urlFocused = false
|
||||||
|
|||||||
Reference in new issue
Block a user