Commit Graph

487 Commits

Author SHA1 Message Date
Mike Sawka
a7746bc5cc
fix rpc no-route errors, fix fileopen in preview (#313) 2024-09-03 21:08:51 -07:00
Evan Simkowitz
6413d49119
Make default monaco theme transparent, remove import errors (#308)
This makes the background for the "wave-theme-dark" theme transparent.
The light theme is still opaque because otherwise it will look somewhat
dark.

This also suppresses TypeScript/JavaScript import errors in the default
linter, since we don't have support for project directories.

This also reworks the useWidth and useHeight hooks to use the
useResizeObserver hook, which limits the number of ResizeObserver
instances floating around, thereby improving performance
2024-09-03 18:43:59 -07:00
Evan Simkowitz
eeceb17c75
Clean up preview.tsx (#310) 2024-09-03 18:27:41 -07:00
Evan Simkowitz
f5fb1c2664
Move xterm.css to resolve Vite warning (#309) 2024-09-03 18:11:28 -07:00
Evan Simkowitz
16e1b7f65c
Unmagnify the final leaf in a layout (#307)
This handles an edge case where a user deletes all unmagnified nodes,
leaving a final node that is still magnified. Because we ignore
magnify/unmagnify operations when there's only one leaf remaining, this
would result in the last node being stuck magnified until a new node is
added.

Also fixes a bug where the layout would not always update when a new
block was added.
2024-09-03 14:26:29 -07:00
Evan Simkowitz
383a71fc25
Fix infinite loop in layoutAtom, improve iconbutton disable code (#306)
Fixes an infinite loop in the layoutModel atom synchronization that
would cause the atom to update indefinitely when the root node is
deleted.

Also adds a dedicated `disabled` flag for the IconButton decl so we can
disable the onClick handler when the button is disabled.

Also updates the Magnify toggle button to use this new flag, so that
when there's only one leaf in a layout, the magnify button is disabed.
2024-09-03 11:24:45 -07:00
sawka
9d344b899d fix issues with layouteffects in block 2024-09-03 10:24:00 -07:00
sawka
c94ff3495b fix terminal paste handler -- use paste fn, unify key handlers. add extra if stmts to focusNode calls in block 2024-09-03 00:02:03 -07:00
sawka
70ef76be62 implement cmd:i, hook up telemetry switch, fix some settings types 2024-09-02 20:21:35 -07:00
Mike Sawka
e3b7ab73c0
preview refactor for keyboard/focus (#303) 2024-09-02 16:48:10 -07:00
Sylvie Crowe
226bc4ee6f
Connect With Non-Terminal Widgets (#304)
- Adds connection buttons for previews
- Makes it possible for graphs and previews to connect on backend
(without a terminal open to connection)
- Changes the wsh install message
2024-09-02 12:34:49 -07:00
Red J Adaya
63cfe1d279
preview edit (#302) 2024-08-31 11:57:45 -07:00
Evan Simkowitz
aab487541b
Resolve BlockNum in WSH commands (#301) 2024-08-30 20:20:25 -07:00
Evan Simkowitz
be1ce1f71e
add delay to the magnify transition so I can actually see the animation 2024-08-30 17:45:37 -07:00
sawka
1975b9b1db connstatus icon 2024-08-30 14:36:16 -07:00
sawka
8aa4025907 add restart controller to context menu 2024-08-30 14:01:53 -07:00
sawka
74f551b212 connstatus fix, update connection icons appropriately for status 2024-08-30 13:56:53 -07:00
Evan Simkowitz
ef95fd20ed
remove magnify.less prefers-reduced-motion query 2024-08-30 12:52:58 -07:00
Evan Simkowitz
cb664cff41
ignore prefers-reduced-motion for resize handle line delay 2024-08-30 12:52:02 -07:00
Evan Simkowitz
86d6c5cd60
set prefers-reduced-motion as a global override 2024-08-30 12:48:06 -07:00
Evan Simkowitz
3f4026a6b7
fix resize handle transition timing 2024-08-30 12:45:12 -07:00
Evan Simkowitz
e9b78c354f
Resize handle improvements (#299)
Adds a delay to the resize handle line first showing so it doesn't flicker when the mouse briefly passes over it. Also removes an unnecessary findNode call that was happening on every move. Also adjusts the pointer offset based on the display container bounding rect.
2024-08-30 12:31:03 -07:00
Mike Sawka
e488862355
remote sysinfo data plotting (#294) 2024-08-30 11:33:04 -07:00
sawka
945c63a3e5 add monokai, make themes more generic -- display:name/display:order 2024-08-29 21:35:33 -07:00
sawka
6e704f74e3 suppress the error message after it has shown once 2024-08-29 18:08:05 -07:00
Mike Sawka
53d3ad04b7
focus/key handling for directory preview (#291) 2024-08-29 17:00:24 -07:00
Mike Sawka
a104a6e446
new focus system part 1 (#290) 2024-08-29 16:06:15 -07:00
Evan Simkowitz
637eaa4206
Use webview's built-in history for navigation (#232) 2024-08-29 13:37:05 -07:00
Evan Simkowitz
87d69eb5bc
fix treereducer getting out of sync 2024-08-29 12:38:13 -07:00
Red J Adaya
c440fb774e
suggestions UI (#286) 2024-08-28 23:47:45 -07:00
sawka
bfab5e4223 detect single keypresses 2024-08-28 18:42:04 -07:00
Evan Simkowitz
56a930c1dc
Make disabled iconbuttons more distinct (#289)
Increases the idle opacity for enabled buttons in the header slightly
and decreases opacity for disabled buttons. Also sets a default cursor
when the button is disabled:

Forward button enabled and idle, back button disabled:

![image](https://github.com/user-attachments/assets/b2f4dfc3-2fe8-46e0-9eac-edfebf42dfdd)
Forward button enabled and hovered, back button disabled:

![image](https://github.com/user-attachments/assets/34b4f89d-ba6a-4b57-8533-527ef1bc9868)
2024-08-28 18:30:41 -07:00
sawka
afcbb35341 countGraphemes and add debug package 2024-08-28 17:12:52 -07:00
Evan Simkowitz
c9a1e9afe3
fix drag overlay losing rect changes 2024-08-28 16:24:25 -07:00
Evan Simkowitz
59979b13e7
use linear timing function for layout transitions 2024-08-28 14:25:47 -07:00
Evan Simkowitz
099c196cae
Use transition events to better-coordinate debouncing of NodeModel innerRect (#288)
Rather than using a timeout to debounce changes to the
NodeModel.innerRect, I'll use a transition event on the display
container. This way, if the user disables transitions using the reduced
motion setting, changes to the innerRect value will not be debounced.
2024-08-28 13:28:49 -07:00
sawka
a7606b8363 update visuals to say gpt-4o-mini 2024-08-28 12:05:36 -07:00
Evan Simkowitz
fb65ec1e23
Explicitly set focus on insert (#285)
Adds a flag to the insert layout action to explicitly set the focus of a
newly inserted node. This also adds a flag in the starter layout to
focus on the terminal block.
2024-08-27 23:16:07 -07:00
Mike Sawka
a3aa941b68
implement wsh setconfig (#284) 2024-08-27 22:02:21 -07:00
Mike Sawka
8630e23239
new config system (#283) 2024-08-27 18:49:49 -07:00
Evan Simkowitz
c9c555452a
Establish wlayout for coordinating backend layout actions (#282) 2024-08-27 18:38:57 -07:00
Sylvie Crowe
ee0bc0a377
Windows Bug Fixes (#281)
Fixes two bugs
- ai component now works on windows
- forces files to use lf line endings on windows instead of crlf
2024-08-27 15:12:26 -07:00
Evan Simkowitz
7d90a3912b
fix nullref in layoutNode.findNode 2024-08-27 13:48:53 -07:00
Evan Simkowitz
755f8f2385
add back top padding for tabcontent 2024-08-27 13:46:13 -07:00
sawka
730c0b1eea fix nullptr for non-focused node 2024-08-27 13:45:05 -07:00
Evan Simkowitz
c892c39a73
Fix block content sizing (#280)
Make the block content sizing update once when its node moves or becomes
magnified. By manually updating this inner sizing rather than letting
the block flow in the DOM, the animations of the block frames are much
smoother.

This also fixes an issue where two scrollbars were being rendered for
the Directory Preview widget.

This also sets zero padding on nodes when there's only a single node
being rendered.
2024-08-27 13:41:36 -07:00
Evan Simkowitz
86fc45fc13
fix double scrollbars in directory preview 2024-08-27 13:28:10 -07:00
Evan Simkowitz
8fcc856740
fix node collapse edge case 2024-08-27 13:25:02 -07:00
sawka
c2d2ad9136 separate cmd+o from switch connection (disconnect typeaaheadatom), and allow width to 95% 2024-08-26 21:03:12 -07:00
Red J Adaya
a665d372e3
telemetry toggle (#278)
<img width="1316" alt="image"
src="https://github.com/user-attachments/assets/01dc517c-2e9c-46ea-aaf0-4fff1fd3909d">
2024-08-26 18:03:32 -07:00
sawka
fd7fa9f6f1 useatomvaluesafe 2024-08-26 16:56:37 -07:00
sawka
19ebfa0361 fix local icon for term connections 2024-08-26 16:54:39 -07:00
Evan Simkowitz
fac706fb4f
remove .js from imports 2024-08-26 16:37:05 -07:00
Evan Simkowitz
56757e4bb0
fix layoutTree tests 2024-08-26 16:35:35 -07:00
Red J Adaya
7d98aeb2c9
fix dynamic setting of suggestions modal (#272) 2024-08-26 16:33:05 -07:00
Evan Simkowitz
cefc491bf2
fix layoutNode and layout util tests 2024-08-26 16:27:57 -07:00
Mike Sawka
c2fe3b18e1
move connection switching to blockheader (#276) 2024-08-26 16:19:03 -07:00
Mike Sawka
f28bdccb5d
move CreateX functions to wcore (#275) 2024-08-26 15:17:37 -07:00
sawka
2118c24c0d fix ctrl:shift 2 2024-08-26 13:53:46 -07:00
Evan Simkowitz
eea57af80b
Fix Cmd-W to close focused node (#273)
Fixes the in-memory focused node stack so it can be used to find the currently-focused node. This is necessary for `closeFocusedNode` to work.  Also fixes `validateFocusedNode` so it will set the first node to be focused if no focused node is available. Also cleans up leafOrder update pattern.
2024-08-26 12:32:28 -07:00
Evan Simkowitz
164afeeb66
Unified node model to pass data from layout to blocks (#259)
This adds a new NodeModel, which can be passed from the TileLayout to
contained blocks. It contains all the layout data that the block should
care about, including focus status, whether a drag operation is
underway, whether the node is magnified, etc.

This also adds a focus stack for the layout, which will let the focus
switch to the last-focused node when the currently-focused one is
closed.

This also addresses a regression in the resize handles that caused them
to be offset from the cursor when dragged.

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-08-26 11:56:00 -07:00
Sylvia Crowe
fe8b1c1924 fix: correct ConnStatus uninitialized field 2024-08-24 15:27:14 -07:00
Mike Sawka
62d9d53e52
fix terminal paste (inverted colors) (#271) 2024-08-23 22:12:27 -07:00
Sylvie Crowe
636d71e652
Change Connection UI (#269)
This allows the user to select different connections from the terminal
block. Some features include:
- a status bar at the top of the term block that shows your current
connection
- an icon next to the status bar that shows whether the connection is
currently connected
- the ability to click the status bar and type in a new connection in
order to change the current connection

---------

Co-authored-by: sawka <mike.sawka@gmail.com>
2024-08-23 18:12:40 -07:00
Red J Adaya
b9c87a0ce3
hide when Enter is pressed (#262) 2024-08-23 09:46:04 -07:00
Red J Adaya
c1684d28d1
suggestions modal (#260) 2024-08-23 00:18:49 -07:00
Red J Adaya
af3bc7d249
reduce target area for tab close btn (#261) 2024-08-23 00:15:54 -07:00
Evan Simkowitz
7c03a58b1b
don't set ready in effect 2024-08-22 19:26:22 -07:00
sawka
43138f754c fix double model creation 2024-08-22 16:25:53 -07:00
sawka
9237208e49 quick edits to help 2024-08-22 11:36:35 -07:00
sawka
9e7df9787d move widgets back to right hand side 2024-08-22 11:36:35 -07:00
Evan Simkowitz
d5140129cd
Fix block numbering and switching with arrow keys (#258) 2024-08-21 17:43:11 -07:00
Mike Sawka
dedfc31344
implement Cmd-I and restructure block viewmodels (#257) 2024-08-21 15:49:23 -07:00
Evan Simkowitz
e527e2ab77
Add authkey header for requests to the backend (#256)
With this PR, Electron will generate a new authorization key that the Go
backend will look for in any incoming requests. The Electron backend
will inject this header with all requests to the backend to ensure no
additional work is required on the frontend.

This also adds a `fetchutil` abstraction that will use the Electron
`net` module when calls are made from the Electron backend to the Go
backend. When using the `node:fetch` module, Electron can't inject
headers to requests. The Electron `net` module is also faster than the
Node module.

This also breaks out platform functions in emain into their own file so
other emain modules can import them.
2024-08-21 15:04:39 -07:00
Evan Simkowitz
23261a7a98
Add flag for specifying a new node as magnified on insert (#253) 2024-08-20 20:14:14 -07:00
Evan Simkowitz
bd4bf93d4a
Update copyright indicators on a bunch of files (#255) 2024-08-20 17:01:29 -07:00
Mike Sawka
037497e7f1
wsh edit working (#252) 2024-08-20 14:56:48 -07:00
sawka
2f020099ec cmd:n and cmd:t 2024-08-19 22:39:52 -07:00
sawka
e70e08e531 implement history functions for preview 2024-08-19 22:07:35 -07:00
sawka
9a06b43266 implement a viewmodel keydown handler 2024-08-19 18:41:47 -07:00
sawka
f535c5c1ab default file to ~ 2024-08-19 18:33:52 -07:00
sawka
a0734a3bbe implement cmd+t 2024-08-19 18:28:28 -07:00
sawka
a639fc3c8d implement defaultwidgets 2024-08-19 17:21:44 -07:00
Red J Adaya
964c422a02
about modal (#244) 2024-08-19 15:49:40 -07:00
Mike Sawka
534fcc5d0a
client support for rpc cancel (#249) 2024-08-19 15:44:30 -07:00
sawka
00958b8fed refactor 2024-08-19 15:01:00 -07:00
Mike Sawka
0d8c159101
remote file preview (streaming) working (#248) 2024-08-19 14:37:52 -07:00
Evan Simkowitz
319d84d0b5
remove layout Dimensions declaration in favor of global 2024-08-19 14:33:44 -07:00
Evan Simkowitz
bdfd7b22d9
increase debounce time 2024-08-19 14:29:58 -07:00
Evan Simkowitz
fd375b95d8
uselayouteffect for window controls overlay callback 2024-08-19 14:28:01 -07:00
Evan Simkowitz
a52e5c6c9b
remove unused declarations in app.tsx 2024-08-19 14:23:58 -07:00
Evan Simkowitz
e6003c310e
Set background color for window controls on Linux (#247)
The Window Controls Overlay API applies a transparent overlay on
Windows, but not on Linux. This PR addresses this by capturing the area
underneath the overlay, averaging the color of the area, and setting
this as the overlay background color.

It will also detect whether to make the control symbols white or black,
depending on how dark the background color is.

On Linux, this will set both the background color and the symbol color,
on Windows it will just set the symbol color.

<img width="721" alt="image"
src="https://github.com/user-attachments/assets/e6f9f8f8-a49f-41b6-984e-09e7d52c631d">
2024-08-19 14:16:09 -07:00
sawka
3f37837394 fix term keydown handler 2024-08-19 12:24:08 -07:00
sawka
b412f72f6b remove unsafe btoa calls 2024-08-19 11:54:54 -07:00
Mike Sawka
8651659c02
get remote preview working (#246)
almost all there -- just need to fix streamfile for web urls.
2024-08-19 11:02:40 -07:00
Sylvie Crowe
c30188552f
Add Unix Domain Socket Listener when Establishing Connections (#243)
This makes it possible to send wsh commands from wsh on a remote session
to wavesrv running locally. The exact behavior of running those commands
isn't implemented, but the underlying interface is added here.
2024-08-17 11:21:25 -07:00
Evan Simkowitz
6df50a5790
use one multiply instead of two divide for minnodesize calc 2024-08-17 00:15:03 -07:00
Evan Simkowitz
c8d32c1668
set min resize size for nodes 2024-08-17 00:13:55 -07:00
Evan Simkowitz
07a843f7bd
render resize handles first so they can't interfere with a magnified block 2024-08-17 00:02:08 -07:00
Evan Simkowitz
edfe711eda
Use Window Controls Overlay API for native-like experience on Windows and Linux (#240)
This PR implements the [Window Controls Overlay
API](https://web.dev/articles/window-controls-overlay) to let us hide
the menu bar on Windows and Linux and directly embed the window controls
in our tab bar. With #239 merged, we no longer need the menu bar on
these platforms.

The overlaid window controls are transparent so they will take on the
background from the app. I've updated the tab bar to flow properly using
the API's CSS environment variables.

At some point, we may want to update the logic around the symbolColor so
that it can ensure a proper contrast between the background and the
symbols in the window controls. For now, setting them to white works for
all the backgrounds we currently support.

![image
(2)](https://github.com/user-attachments/assets/7610f10b-9696-435c-9a2d-a435bee9fadb)


https://github.com/user-attachments/assets/8d19b512-5281-42b9-8abb-ccb9b850061f
2024-08-16 23:45:22 -07:00