Commit Graph

179 Commits

Author SHA1 Message Date
Evan Simkowitz
62dcf1326d
Allow users to close windows without confirming, delete last window (#1598)
Adds `window:savelastwindow` and `window:confirmclose` settings, which
can be used to alter the default window close behavior. Both of these
default to `true` to maintain the existing default behavior.

If `window:savelastwindow` is unset, the same logic will be used as if
the user had more than one window remaining (see below).

If `window:confirmonclose` is unset, the user will no longer be prompted
to confirm if they are closing a window whose workspace has unsaved
changes (the workspace is not named and it has more than one tab).
2024-12-20 14:02:08 -08:00
Evan Simkowitz
0925af5300
Add warning when user is running in ARM translation mode (#1560)
Adds warning and docs to let users know when they're running in ARM
translation mode. Also lets them configure to always dismiss if they
don't care.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added a configuration option to dismiss architecture warnings during
application startup.
- Introduced new FAQs addressing ARM64 translation warnings and
instructions for joining beta builds.
- Added platform-specific requirements for macOS, Windows, and Linux in
the getting started documentation.

- **Bug Fixes**
- Enhanced build command flexibility by allowing dynamic command-line
arguments during the build process.

- **Documentation**
- Updated configuration documentation to include the new dismiss
architecture warning key.
- Minor formatting adjustments in FAQs and getting started
documentation.
	- Clarified platform compatibility details in the README.

- **Chores**
- Added a new constant for the dismiss architecture warning
configuration key.
- Introduced a new field for managing architecture warning settings in
the application configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-18 19:44:50 -08:00
Sylvie Crowe
dbc2be1c1e
Global Hotkey Docs (#1548)
Adds the following changes:
- renames "key:globalhotkey" to "app:globalhotkey"
- adds globalhostkey documentation (especially in regard to what keys are allowed)
- improves the algorithm that converts electron keybindings from wave keybindings
- fixes some regexp problems
2024-12-17 15:25:34 -08:00
Sylvie Crowe
51bd45bd2b
Global Hotkey (#1534)
Sets up a configurable global hotkey to focus the last window used in
the application. Note that this is established at startup and
configuration changes will not be applied until rebooting the app.
2024-12-16 15:24:32 -08:00
Evan Simkowitz
ec4f6c01de
Create workspace will always create a saved workspace (#1509)
Also moves icon and color definitions to the backend and makes it so the
new workspaces get created with a different icon color for each index.

If an ephemeral window has more than one tab, always create a new window
when switching workspaces

Also fixes workspace accelerators on macOS
2024-12-12 17:21:09 -08:00
Evan Simkowitz
c34f2da0c0
Fix SwitchWorkspace when no workspaces are saved (#1508)
Also cleans up a workspace created with "Create new workspace" if you
hit cancel when switching to it.
2024-12-12 15:16:34 -08:00
Evan Simkowitz
4070abadde
Squash some leftover bugs (#1495)
Only create new tab in `CheckAndFixWindow` if no tabs or pinned tabs
exist

Update `resolvers.resolveTabNum` to account for pinned tabs

Remove obsolete and unused `wstore.DeleteTab`

Only show accelerators for first 9 workspaces in workspace app menu to
be consistent with other keybindings

Fix tabbar spacing to remove min size for drag right spacer, account for
workspace switcher button size

Fix updatebanner size calculations
2024-12-11 12:52:15 -08:00
Mike Sawka
ab5e7b5bd9
add try/catch around workspace menu (#1492) 2024-12-11 10:48:50 -08:00
Mike Sawka
f1a590f51b
minor v10 cleanup (waveReadyPromise, focusedWaveWindow) (#1456) 2024-12-10 10:58:50 -08:00
Evan Simkowitz
c4fce5acc5
Make workspace switcher icons fixed width, add confirm on delete (#1455)
Also makes the confirmation dialogs shorter and fixes the logic for
showing them
2024-12-10 10:15:33 -08:00
Mike Sawka
648fa4c49a
ignore auto-updater QUIC protocol error (#1450) 2024-12-09 18:36:53 -08:00
Evan Simkowitz
9bae030371
Remove workspace oid from menu (#1449)
Now that new workspace has this already in the name, it looks weird to
have it added after


![image](https://github.com/user-attachments/assets/405d2111-25e5-4ef4-a467-fae6acb55e11)
2024-12-09 18:32:18 -08:00
Evan Simkowitz
b706d4524b
Queue workspace switching on emain (#1440) 2024-12-09 15:47:56 -08:00
Evan Simkowitz
f858d3ba0f
Pass workspace id to contextmenu-show (#1429)
Sometimes, the context menu click handlers don't seem to get passed any
window object. Here, I'm sending over the workspace id with the
`contextmenu-show` event so that we can resolve our cached copy of the
object in case the value from the click handler is empty.
2024-12-06 19:10:34 -08:00
Evan Simkowitz
e0ede0ff60
Add workspace switch accelerators, skip prompt if workspace is already open (#1427) 2024-12-06 16:35:01 -08:00
Mike Sawka
9f6cdfdbf6
closetab / tab destroy fixes (#1424) 2024-12-06 15:42:29 -08:00
Evan Simkowitz
72ea58267d
Workspace app menu (#1423)
Adds a new app menu for creating a new workspace or switching to an
existing one. This required adding a new WPS event any time a workspace
gets updated, since the Electron app menus are static.

This also fixes a bug where closing a workspace could delete it if it
didn't have both a pinned and an unpinned tab.
2024-12-06 15:33:00 -08:00
Mike Sawka
925389fc70
force createTab to go through the queue as well (#1420) 2024-12-06 12:00:24 -08:00
Mike Sawka
3b03a7ab3d
tab race condition fixes (#1407) 2024-12-06 00:10:17 -08:00
Evan Simkowitz
0fe05a725a
Refuse setActiveTab if tab is already set (#1405) 2024-12-05 20:50:55 -08:00
Evan Simkowitz
3c69237d9b
Prevent crashes when user spams Cmd:T (#1404)
When a user spams Cmd:T, a WaveTabView might be created but never end up
getting mounted to the window, since another will come along before it
can. In these cases, the WaveTabView is essentially in a bad state and
attempting to switch to it will result in the window becoming
unresponsive. While we could recover it by running waveInit again, it's
easier to just dispose of it and treat it as an unloaded tab next time
it gets switched to.

This adds a timeout to each WaveTabView where once it gets assigned a
tab ID, it has 1 second to respond "ready" or it will be destroyed. This
should help prevent resource leakages for these dead views.
2024-12-05 20:03:30 -08:00
Mike Sawka
5744f4b06f
closeTab fix (#1403)
fixes bug with closeTab when the tab didn't exist in the waveWindow cache.  also adds Cmd-Shift-W to close a tab (doesn't work for pinned tabs).  and restores Cmd-W for killing blocks on pinned tabs
2024-12-05 18:26:20 -08:00
Evan Simkowitz
7a61f25331
Auditing async usage in frontend code (#1402)
I found a lot of places where asyncs weren't being properly wrapped or
awaited
2024-12-05 18:09:54 -08:00
Evan Simkowitz
1e804f4d15
Use window destroy instead of forceClose (#1400)
`destroy` bypasses the `close` event and forces the window to close.
This means that we can use it instead of `forceClose` and we don't need
to call it in the `closed` event.
2024-12-05 16:18:42 -08:00
Mike Sawka
7386fc19f7
activity update + dont allow empty workspace names (#1393) 2024-12-05 10:35:54 -08:00
Evan Simkowitz
aa77b2c259
Pinned tabs (#1375)
![image](https://github.com/user-attachments/assets/a4072368-b204-4eed-bb65-8e3884687f9a)

This functions very similarly to VSCode's pinned tab feature. To pin a
tab, you can right-click on it and select "Pin tab" from the context
menu. Once pinned, a tab will be fixed to the left-most edge of the tab
bar, in order of pinning. Pinned tabs can be dragged around like any
others. If you drag an unpinned tab into the pinned tabs section (any
index less than the highest-index pinned tab), it will be pinned. If you
drag a pinned tab out of the pinned tab section, it will be unpinned.
Pinned tabs' close button is replaced with a persistent pin button,
which can be clicked to unpin them. This adds an extra barrier to
accidentally closing a pinned tab. They can still be closed from the
context menu.
2024-12-04 13:34:22 -08:00
Evan Simkowitz
90e31dfa48
Delete a tab when it's out of blocks, cascade to window (#1374)
Updates `DeleteBlock` to close its parent tab if the tab has no more
blocks. This will also cascade to close the workspace if it no longer
has any tabs, same for window.

I had to move some block-related functionality around on the backend.
2024-12-03 09:38:46 -08:00
Evan Simkowitz
04c4f0a203
Create and rename files and dirs in dirpreview (#1156)
New context menu options are available in the directory preview to
create and rename files and directories

It's missing three pieces of functionality, none of which are a
regression:
- Editing or creating an entry does not update the focused index. Focus
index right now is pretty dumb, it doesn't factor in the column sorting
so if you change that, the selected item will change to whatever is now
at that index. We should update this so we use the actual file name to
determine which element to focus and let the table determine which index
to then highlight given the current sorting algo
- Open in native preview should not be an option on remote connections
with the exception of WSL, where it should resolve the file in the
Windows filesystem, rather than the WSL one
- We should catch CRUD errors in the dir preview and display a popup
2024-12-02 22:23:44 -08:00
Evan Simkowitz
f606a74339
Remove child views before switching workspaces (#1371)
This was causing a crash on Windows because we were destroying a TabView
that was still parented to the window. Not sure why I couldn't repro
this on Mac...
2024-12-02 16:53:25 -08:00
Mike Sawka
da48ab5e62
quick fixes (#1369)
add term:scrollback to docs, also fix logging of datadir
2024-12-02 15:03:20 -08:00
Evan Simkowitz
0ec60f5a7b
Fix switch workspace (#1370) 2024-12-02 14:52:34 -08:00
Evan Simkowitz
f368a61c70
Fix close active tab behavior (#1367)
This fixes a bug where closing the active tab would clean up the closed
tab view before switching to an un-closed tab view, putting the window
into an unrecoverable state. This also moves around some of the CloseTab
logic so that it's more standardized and reduces unnecessary
frontend-backend comms and DB writes
2024-12-02 12:59:03 -08:00
Evan Simkowitz
82f53dc1fb
Workspaces are back! (#1282) 2024-12-02 10:56:56 -08:00
Mike Sawka
24807cfd34
add display resolutions to activity updates, update docs (#1323) 2024-11-19 19:41:53 -08:00
Mike Sawka
83f671c7a9
rename actual size to reset zoom (#1264) 2024-11-11 13:10:38 -08:00
Evan Simkowitz
3a21d3183c
Fix electron:start task not having wcloud env vars (#1261) 2024-11-11 10:46:58 -08:00
Mike Sawka
8685ca9069
move fg/active checks to window focus() instead of tab focus (#1248) 2024-11-08 12:42:35 -08:00
Mike Sawka
fb641ac717
reposition tab fixes (#1226) 2024-11-07 21:57:06 -08:00
Mike Sawka
f50ce9565c
VDom 11 (#1224)
* Fix VDom url caching -- use regular requests 
* new boilerplate to make writing apps easier
* render-blocking global styles (to prevent render flash)
* bug fixes and new functionality etc.
2024-11-07 00:07:23 -08:00
Mike Sawka
61d6b4d8eb
VDom 9 (#1205)
Lots of quality of life improvements (and bug fixes):
* Class(), ClassIf(), ClassIfElse() methods
* <wave:style> that can use a file vdom:/// url
* UseStateWithFn() to allow for functional setters
* If, IfElse, and ForEach for vdom construction
* batched updates for large updates -- streaming -- to get around packet size issues
* more flexible file sending code, for []byte, io.Reader, fs.File, and a fileName (with optional MimeType)
* fix the vdom:// protocol handler to work with fetch
* updated wshcmd-html for new best practices
2024-11-05 15:52:59 -08:00
Mike Sawka
eeda49bbde
vdom 7 (#1180) 2024-11-02 10:58:13 -07:00
Mike Sawka
be3ec7e841
another try at audio permissions (and more) for #1086 (#1192)
the permissions look scary, but the user still needs to grant them.  this just allows the app to ask.  this permission set now matches the entitlements in iTerm and other popular terminal programs (before we were too restrictive)
2024-11-01 12:17:19 -07:00
Mike Sawka
55250de97a
fix fullscreen resize bug (#1191) 2024-11-01 10:59:17 -07:00
Mike Sawka
8893a42cd6
wsh version -v (to print config/data dirs and updater-channel) (#1190) 2024-11-01 10:20:15 -07:00
Mike Sawka
48001ee734
make sure the user affirmatively acknowledged window deletion before deleting, fix for #1167 (#1181) 2024-10-31 18:13:27 -07:00
Mike Sawka
e10bcee05a
fix relaunch all windows (#1179) 2024-10-31 15:25:30 -07:00
Mike Sawka
473225d94b
issue squashing #1175 #1038 #1086 #1081 #1066 #1020 (#1177) 2024-10-31 12:34:30 -07:00
Evan Simkowitz
77fbd324c9
Check err.toString instead of err.message (#1171) 2024-10-30 14:24:37 -07:00
Evan Simkowitz
b3fdbbc331
Various updater fixes (#1170)
- Fixes updater status not showing on tabs that were previously
unloaded.
- Fixes updater status showing as error when not connected to the
internet
- Adds delay after setting installing status to avoid race condition
with any window close event handlers. This may fix #1167
2024-10-30 14:20:19 -07:00
Evan Simkowitz
17adf7b2c3
Stupid Electron behavior causes app to crash if Alt+Meta+I is a context menu accelerator (#1169)
closes #1152
2024-10-30 13:54:36 -07:00