Skip to content

Commit fe71b37

Browse files
authored
Misc v0.14 fixes (#2860)
* Don't allow auto updater to downgrade * Kill shells with SIGHUP not SIGTERM * Fix old v0.13 references
1 parent 343d009 commit fe71b37

File tree

5 files changed

+31
-20
lines changed

5 files changed

+31
-20
lines changed

emain/updater.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export class Updater {
5959

6060
// Only update the release channel if it's specified, otherwise use the one configured in the updater.
6161
autoUpdater.channel = getUpdateChannel(settings);
62+
autoUpdater.allowDowngrade = false;
6263

6364
autoUpdater.removeAllListeners();
6465

frontend/app/onboarding/onboarding-upgrade-minor.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,25 @@ const UpgradeOnboardingMinor = () => {
124124
<div className="flex justify-center">
125125
<Logo />
126126
</div>
127-
<div className="text-center text-[25px] font-normal text-foreground">Welcome to Wave v0.13!</div>
127+
<div className="text-center text-[25px] font-normal text-foreground">Welcome to Wave v0.14!</div>
128128
</header>
129129
<OverlayScrollbarsComponent
130130
className="flex-1 overflow-y-auto min-h-0"
131131
options={{ scrollbars: { autoHide: "never" } }}
132132
>
133133
<div className="flex flex-col items-center gap-3 w-full mb-2 unselectable">
134-
<div className="flex flex-col items-center gap-4 text-center">
135-
<div className="flex h-[52px] px-3 items-center rounded-lg bg-hover text-accent text-[24px]">
136-
<i className="fa fa-sparkles" />
137-
<span className="font-bold ml-2 font-mono">Wave AI</span>
134+
<div className="flex flex-col items-center gap-4">
135+
<div className="flex flex-row gap-4 items-center">
136+
<div className="flex h-[52px] px-3 items-center rounded-lg bg-hover text-accent text-[24px]">
137+
<i className="fa fa-sparkles" />
138+
<span className="font-bold ml-2 font-mono">Wave AI</span>
139+
</div>
140+
<div className="flex h-[52px] px-3 items-center rounded-lg bg-hover text-[18px]">
141+
<i className="fa-sharp fa-solid fa-shield text-sky-500" />
142+
<span className="font-bold ml-2 text-accent">Durable SSH Sessions</span>
143+
</div>
138144
</div>
139-
<div className="text-secondary leading-relaxed max-w-[600px]">
145+
<div className="text-secondary leading-relaxed max-w-[600px] text-left">
140146
<p className="mb-4">
141147
Wave AI is your terminal assistant with full context. It can read your terminal
142148
output, analyze widgets, read and write files, and help you solve
@@ -147,13 +153,10 @@ const UpgradeOnboardingMinor = () => {
147153
supports local models and bring-your-own-key! Use Ollama, LM Studio, vLLM,
148154
OpenRouter, or any OpenAI-compatible provider.
149155
</p>
150-
<p className="py-3 px-2 border border-border rounded-md bg-hover/30">
151-
Wave AI is in beta with included AI credits while we refine the experience. We're
152-
actively improving it and would love your feedback in{" "}
153-
<a target="_blank" href="https://discord.gg/XfvZ334gwU" className="hover:underline">
154-
Discord
155-
</a>
156-
.
156+
<p className="mb-4">
157+
<span className="font-semibold text-foreground">New in v0.14:</span> Durable SSH
158+
sessions survive network drops, laptop sleep, and restarts — all without tmux or
159+
screen.
157160
</p>
158161
</div>
159162
</div>
@@ -162,7 +165,7 @@ const UpgradeOnboardingMinor = () => {
162165

163166
<div className="flex flex-col items-center gap-3 text-center max-w-[550px]">
164167
<div className="text-foreground text-base">Thanks for being an early Wave adopter! ⭐</div>
165-
<div className="text-secondary text-sm">
168+
<div className="text-secondary text-sm text-left">
166169
A GitHub star shows your support for Wave (and open-source) and helps us reach more
167170
developers.
168171
</div>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/shellexec/conninterface.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ type ConnInterface interface {
3535

3636
type CmdWrap struct {
3737
Cmd *exec.Cmd
38+
IsShell bool
3839
WaitOnce *sync.Once
3940
WaitErr error
4041
pty.Pty
4142
}
4243

43-
func MakeCmdWrap(cmd *exec.Cmd, cmdPty pty.Pty) CmdWrap {
44+
func MakeCmdWrap(cmd *exec.Cmd, cmdPty pty.Pty, isShell bool) CmdWrap {
4445
return CmdWrap{
4546
Cmd: cmd,
47+
IsShell: isShell,
4648
WaitOnce: &sync.Once{},
4749
Pty: cmdPty,
4850
}
@@ -90,6 +92,8 @@ func (cw CmdWrap) KillGraceful(timeout time.Duration) {
9092
}
9193
if runtime.GOOS == "windows" {
9294
cw.Cmd.Process.Signal(os.Interrupt)
95+
} else if cw.IsShell {
96+
syscall.Kill(cw.Cmd.Process.Pid, syscall.SIGHUP)
9397
} else {
9498
cw.Cmd.Process.Signal(syscall.SIGTERM)
9599
}

pkg/shellexec/shellexec.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func StartWslShellProcNoWsh(ctx context.Context, termSize waveobj.TermSize, cmdS
169169
if err != nil {
170170
return nil, err
171171
}
172-
cmdWrap := MakeCmdWrap(ecmd, cmdPty)
172+
cmdWrap := MakeCmdWrap(ecmd, cmdPty, true)
173173
return &ShellProc{Cmd: cmdWrap, ConnName: conn.GetName(), CloseOnce: &sync.Once{}, DoneCh: make(chan any)}, nil
174174
}
175175

@@ -287,7 +287,7 @@ func StartWslShellProc(ctx context.Context, termSize waveobj.TermSize, cmdStr st
287287
if err != nil {
288288
return nil, err
289289
}
290-
cmdWrap := MakeCmdWrap(ecmd, cmdPty)
290+
cmdWrap := MakeCmdWrap(ecmd, cmdPty, true)
291291
return &ShellProc{Cmd: cmdWrap, ConnName: conn.GetName(), CloseOnce: &sync.Once{}, DoneCh: make(chan any)}, nil
292292
}
293293

@@ -593,7 +593,9 @@ func StartLocalShellProc(logCtx context.Context, termSize waveobj.TermSize, cmdS
593593
}
594594
shellType := shellutil.GetShellTypeFromShellPath(shellPath)
595595
shellOpts = append(shellOpts, cmdOpts.ShellOpts...)
596+
var isShell bool
596597
if cmdStr == "" {
598+
isShell = true
597599
if shellType == shellutil.ShellType_bash {
598600
// add --rcfile
599601
// cant set -l or -i with --rcfile
@@ -622,6 +624,7 @@ func StartLocalShellProc(logCtx context.Context, termSize waveobj.TermSize, cmdS
622624
shellutil.UpdateCmdEnv(ecmd, map[string]string{"ZDOTDIR": shellutil.GetLocalZshZDotDir()})
623625
}
624626
} else {
627+
isShell = false
625628
shellOpts = append(shellOpts, "-c", cmdStr)
626629
ecmd = exec.Command(shellPath, shellOpts...)
627630
ecmd.Env = os.Environ()
@@ -685,7 +688,7 @@ func StartLocalShellProc(logCtx context.Context, termSize waveobj.TermSize, cmdS
685688
if err != nil {
686689
return nil, err
687690
}
688-
cmdWrap := MakeCmdWrap(ecmd, cmdPty)
691+
cmdWrap := MakeCmdWrap(ecmd, cmdPty, isShell)
689692
return &ShellProc{Cmd: cmdWrap, ConnName: connName, CloseOnce: &sync.Once{}, DoneCh: make(chan any)}, nil
690693
}
691694

0 commit comments

Comments
 (0)