Commit Graph

129 Commits

Author SHA1 Message Date
Mike Sawka
8dbe5749f8
fix shutdown for auto-update (#1162) 2024-10-28 09:56:42 -07:00
Mike Sawka
7e6f96348f
fix for waveterm environment variables leaking from prod to dev (#1153) 2024-10-27 13:12:41 -07:00
Evan Simkowitz
e831f84711
fix for ~/.waveterm getting ignored 2024-10-22 21:23:24 -07:00
Evan Simkowitz
33f05c6e0c
Update data and config paths to match platform defaults (#1047)
Going forward for new installations, config and data files will be
stored at the platform default paths, as defined by
[env-paths](https://www.npmjs.com/package/env-paths).

For backwards compatibility, if the `~/.waveterm` or `WAVETERM_HOME`
directory exists and contains valid data, it will be used. If this check
fails, then `WAVETERM_DATA_HOME` and `WAVETERM_CONFIG_HOME` will be
used. If these are not defined, then `XDG_DATA_HOME` and
`XDG_CONFIG_HOME` will be used. Finally, if none of these are defined,
the [env-paths](https://www.npmjs.com/package/env-paths) defaults will
be used.

As with the existing app, dev instances will write to `waveterm-dev`
directories, while all others will write to `waveterm`.
2024-10-22 09:26:58 -07:00
Evan Simkowitz
39fff9ecfd
Allow separate directories for each config part, add dropdown for editing AI presets (#1074)
Adds new functionality on the backend that will merge any file from the
config directory that matches `<partName>.json` or `<partName>/*.json`
into the corresponding config part (presets, termthemes, etc.). This
lets us separate the AI presets into `presets/ai.json` so that we can
add a dropdown in the AI preset selector that will directly open the
file so a user can edit it more easily. Right now, this will create a
preview block in the layout, but in the future we can look into making
this block disconnected from the layout.

If you put AI presets in the regular presets.json file, it will still
work, since all the presets get merged. Same for any other config part.
2024-10-21 16:51:18 -07:00
sawka
0590ba2509 merge main to dev 0.9 2024-10-18 09:29:39 -07:00
Mike Sawka
dc70ab4014
ws reconnection bug + clean up logging (#1058) 2024-10-17 23:42:55 -07:00
Evan Simkowitz
7eeb6e89f5
fix expect-error in viewmgr 2024-10-17 14:52:51 -07:00
Mike Sawka
c1c90bb4f8
browser view (#1005) 2024-10-17 14:34:02 -07:00
Evan Simkowitz
88445b2f1d
Add expect-error to two emain event handlers (#1052)
There were two type errors after the most recent electron upgrade, but
they're both benign (event handler parameter mismatch) so I am adding
ts-expect-error to both instances.
2024-10-17 10:17:47 -07:00
Evan Simkowitz
a5e1cc9c77
Prevent the app from downgrading when a user installs beta over latest (#1014) 2024-10-10 19:32:15 -07:00
Mike Sawka
8de0c3e210
make size computation a bit more general. adjust for workarea x/y (#1012) 2024-10-10 16:35:11 -07:00
Mike Sawka
3d2d68bc73
fix initial size of windows (#1011) 2024-10-10 16:12:56 -07:00
Evan Simkowitz
64084d3e27
Remove global.ts dependency from emain (#1003)
Removes global atoms dependency from emain by moving WOS to grab the
globalAtoms from window, if present. Also removes interdependency
between wshrpcutil and wps

Also adds showmenubar setting for Windows and Linux
2024-10-10 10:12:42 -07:00
Mike Sawka
9ad8068d13
fix rare bad shutdown loop with logger throwing errors (#1001) 2024-10-09 16:15:42 -07:00
Sylvie Crowe
c43fd787a0
Simple Quicklook (#998)
This adds some ability to use quicklook from the directory view with the
spacebar on mac.
2024-10-09 15:12:20 -07:00
Mike Sawka
f4c7269195
remove special shutdown logic for windows (#992) 2024-10-08 18:39:26 -07:00
Sylvie Crowe
c5527dd87b
Add a Notification Subcommand to Wsh (#985)
This allows users to use the `wsh notify` command to make a popup
notification, even from a remote connection.
2024-10-08 10:22:17 -07:00
Mike Sawka
545a914c4c
better shutdown logic to capture waveapp logs from wavesrv shutdown (#931) 2024-10-06 13:40:02 -07:00
Mike Sawka
1bd2fe83cb
right click save image in webview (#962) 2024-10-04 16:34:05 -07:00
Evan Simkowitz
74cda378f8
Embed static copy of docsite for help view (#949)
This will take the latest artifact from the waveterm-docs repo and embed
it in the app binary. When the help view is launched, it will be served
from our backend. If the embedded copy doesn't exist, such as in
unpackaged versions of the app or in locally packaged versions, it will
use the hosted site instead.

There is a sibling PR in the docs repository to build the embedded
version of the app (strips out some external links, removes Algolia
DocSearch, updates the baseUrl)
https://github.com/wavetermdev/waveterm-docs/pull/46
2024-10-03 20:28:05 -07:00
Sylvie Crowe
de92e53c38
Checkbox and Radio Context Menu Items (#861)
Expands the context menu to allow checkbox and radio button items.
2024-09-25 20:53:32 -07:00
Mike Sawka
a4bc0fa93b
if WAVETERM_HOME is set, use that in emain (#859) 2024-09-25 16:16:07 -07:00
Evan Simkowitz
f886aa1e8e
Fail silently if launch settings don't exist (#857) 2024-09-25 15:34:31 -07:00
Evan Simkowitz
d35f022b5c
Fetch settings directly from filesystem on launch (#855)
This bypasses the Go backend when fetching the settings for the app on first launch. This allows for actions that need to be performed before the app is ready, such as disabling hardware acceleration.
2024-09-25 14:43:05 -07:00
Evan Simkowitz
d5abf7ea95
Move settings check after wavesrv startup (#854) 2024-09-25 13:46:13 -07:00
Evan Simkowitz
4b665dec90
Add setting to disable Chromium hardware acceleration (#847) 2024-09-25 10:08:15 -07:00
Evan Simkowitz
0f09a70836
Add native titlebar setting (#837) 2024-09-24 22:05:38 -07:00
sawka
c31bd4a94d thenextwave cleanups 2024-09-19 14:04:47 -07:00
Evan Simkowitz
370ea132fe
Save update channel to user setting automatically (#401)
When a user first launches Wave, we will read the updater config and
store the channel as a user setting for use on future launches. This
should ensure that if a user on a beta channel gets updated to a latest
release, they will still be subscribed to beta releases going forward.
If a user manually updates the user setting, it will be honored.

---------

Co-authored-by: sawka <mike@commandline.dev>
2024-09-19 11:04:18 -07:00
Mike Sawka
d2366df9db
updated ws loading code (#397) 2024-09-19 10:42:53 -07:00
Evan Simkowitz
231c960ca8
missed a change 2024-09-18 14:30:45 -07:00
Evan Simkowitz
e5e6259dec
Show updater status banner for all statuses (#396)
Also adds updater channel to about modal
2024-09-18 14:25:52 -07:00
Evan Simkowitz
adcc564d35
Fix emain package error 2024-09-18 12:06:34 -07:00
Mike Sawka
c7a60a80f8
initwshrpc in electron (#391) 2024-09-17 23:10:09 -07:00
Evan Simkowitz
9f53524971
update version regex 2024-09-17 14:03:10 -07:00
Evan Simkowitz
5b7535d08f
Add release channels (#385)
## New release flow

1. Run "Bump Version" workflow with the desired version bump and the
prerelease flag set to `true`. This will push a new version bump to the
target branch and create a new git tag.
    - See below for more info on how the version bumping works.
2. A new "Build Helper" workflow run will kick off automatically for the
new tag. Once it is complete, test the new build locally by downloading
with the [download
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/download-staged-artifact.sh).
3. Release the new build using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to beta
users.
4. Run "Bump Version" again with a release bump (either `major`,
`minor`, or `patch`) and the prerelease flag set to `false`.
6. Release the new build to all channels using the [publish
script](https://github.com/wavetermdev/thenextwave/blob/main/scripts/artifacts/publish-from-staging.sh).
This will trigger electron-updater to distribute the package to all
users.

## Change Summary

Creates a new "Bump Version" workflow to manage versioning and tag
creation.

Build Helper is now automated.

### Version bumps

Updates the `version.cjs` script so that an argument can be passed to
trigger a version bump. Under the hood, this utilizes NPM's `semver`
package.

If arguments are present, the version will be bumped.
If only a single argument is given, the following are valid inputs:
    - `none`: No-op.
    - `patch`: Bumps the patch version.
    - `minor`: Bumps the minor version.
    - `major`: Bumps the major version.
    - '1', 'true': Bumps the prerelease version.
If two arguments are given, the first argument must be either `none`,
`patch`, `minor`, or `major`. The second argument must be `1` or `true`
to bump the prerelease version.

### electron-builder

We are now using the release channels support in electron-builder. This
will automatically detect the channel being built based on the package
version to determine which channel update files need to be generated.
See
[here](https://www.electron.build/tutorials/release-using-channels.html)
for more information.

### Github Actions

#### Bump Version

This adds a new "Bump Version" workflow for managing versioning and
queuing new builds. When run, this workflow will bump the version,
create a new tag, and push the changes to the target branch. There is a
new dropdown when queuing the "Bump Version" workflow to select what
kind of version bump to perform. A bump must always be performed when
running a new build to ensure consistency.

I had to create a GitHub App to grant write permissions to our main
branch for the version bump commits. I've made a separate workflow file
to manage the version bump commits, which should help prevent tampering.
Thanks to using the GitHub API directly, I am able to make these commits
signed!

#### Build Helper

Build Helper is now triggered when new tags are created, rather than
being triggered automatically. This ensures we're always creating
artifacts from known checkpoints.

### Settings

Adds a new `autoupdate:channel` configuration to the settings file. If
unset, the default from the artifact will be used (should correspond to
the channel of the artifact when downloaded).

## Future Work

I want to add a release workflow that will automatically copy over the
corresponding version artifacts to the release bucket when a new GitHub
Release is created.

I also want to separate versions into separate subdirectories in the
release bucket so we can clean them up more-easily.

---------

Co-authored-by: wave-builder <builds@commandline.dev>
Co-authored-by: wave-builder[bot] <181805596+wave-builder[bot]@users.noreply.github.com>
2024-09-17 13:10:35 -07:00
Evan Simkowitz
822920bd2c
fix dirname issue 2024-09-16 15:58:35 -07:00
Evan Simkowitz
891fab7422
fix type error in emain 2024-09-11 11:28:26 -07:00
Mike Sawka
5fe0cae244
wsh web (#358) 2024-09-10 12:50:55 -07:00
sawka
5190556c37 always recreate existing window if possible (for the last window only) 2024-09-09 11:49:57 -07:00
sawka
98a55b2290 updates for local 2024-09-05 18:54:12 -07:00
sawka
fc5e53e476 update FE paths 2024-09-05 15:01:28 -07:00
Mike Sawka
a5f563b52d
new directory structure and oldmigrate (#327) 2024-09-05 14:05:42 -07:00
Evan Simkowitz
0413b240dd
Only copy the relevant wavesrv binary when packaging for a specific architecture (#316)
This change shaves ~20 MB off the download size by only copying over the
wavesrv binary that is relevant for whichever architecture we're
currently packaging. This is only relevant for macOS at the moment,
though it can also apply to Windows when we get multi-arch builds
working.

This required renaming our Go binaries from .amd64 to .x64 to comply
with electron-builder's naming conventions.
2024-09-04 11:23:39 -07:00
Evan Simkowitz
0de41fab08
Fix the client version in the about modal (#315)
The client version in the about modal was hard-coded. Now, it will use
the same values that powered the Electron about modal.
2024-09-03 21:45:44 -07:00
Evan Simkowitz
b7ed626667
fix settings check in updater code 2024-09-03 19:16:04 -07:00
Mike Sawka
a104a6e446
new focus system part 1 (#290) 2024-08-29 16:06:15 -07:00
Mike Sawka
8630e23239
new config system (#283) 2024-08-27 18:49:49 -07:00
Mike Sawka
ab5a9ec749
update window close logic for windows/linux (#268)
Co-authored-by: Sylvia Crowe
2024-08-26 22:03:43 -07:00