fix(ui): report failed paste/drop in the interactive terminal
PasteAsync silently swallowed every exception and returned void, so a package update renaming Iciclecreek's private write seam would break Ctrl+V/drop with zero user-visible signal. PasteAsync/SendTextAsync now return bool (mirroring SendLineAsync), and the view checks the result, routing a failure through InteractiveTerminalViewModel.ErrorReported -> ConPtyPaneViewModel.ErrorReported -> the existing footer error strip.
This commit is contained in:
@@ -35,4 +35,14 @@ public class PtyTerminalSessionTests
|
||||
|
||||
Assert.Equal(0, gate.CurrentCount); // acquired
|
||||
}
|
||||
|
||||
// Fix: PasteAsync used to be void and swallow every failure. Not-started is the cheap case to
|
||||
// cover without a real TerminalControl/ConPTY spawn.
|
||||
[Fact]
|
||||
public async Task PasteAsync_ReturnsFalse_WhenNotStarted()
|
||||
{
|
||||
using var session = new PtyTerminalSession();
|
||||
|
||||
Assert.False(await session.PasteAsync());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user