mirror of
https://github.com/RickeyWard/WBaHTerm.git
synced 2026-12-01 03:40:59 +00:00
Putty Alternative with Vibes
- Rust 97.9%
- WGSL 0.9%
- CSS 0.5%
- HLSL 0.5%
- Python 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* working
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix blank SVG icons under gpui-ce
gpui-ce builds its asset registry from AssetSource::list("") and never
loads unlisted paths. EmbeddedAssets returned an empty list, so every
svg().path() icon (pane split/expand/tab-list, filter icons) was blank.
Keep the embedded assets in one table that both load and list read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drain the SSH PTY channel so sessions don't stall
russh 0.65 queues every incoming channel message on the Channel itself
(bounded at 100) and awaits space there before calling the Handler.
Terminal output is consumed through the Handler, so nothing read that
queue; after ~100 messages (about 25 prompts of holding Enter) the
session stopped processing output and input. Split the PTY channel,
drain the read half in a task, and keep the write half for the input
pump.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add terminal shader effects (View > Terminal Shader)
Terminal panes can now run an HLSL effect: whole-pane filters (CRT,
glow, phosphor), Burn-In around the text grid (fed by per-character
ages), and animated backgrounds (Starfield, Blue Geometry, Quasar, Star
Grid). Windows-only: the vendored gpui-ce gains a `Filter::Shader`
style and scene primitive, and the DirectX renderer compiles and runs
the shaders at runtime.
The menu also sets background strength, a frame-rate cap for the
animated backgrounds (default 30 fps, 0 = unlimited), and whether they
keep animating while the window is inactive (default off), so an idle
window doesn't burn GPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop other platforms' shader source from the binary
gpui_ce_render's generated shader table references every dialect's
source (GLSL 330, GLES 300, MSL) from one const, so the linker kept all
of it: ~3.9 MB of text a Windows build never reads. Vendor the crate and
embed only what the target can use: MSL on Apple targets, GLSL on
non-Windows non-Apple targets, neither on Windows. DXBC is unchanged,
and every dialect is still generated and validated at build time.
Set GPUI_EMBED_ALL_SHADER_SOURCES=1 at build time to embed everything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Don't hold the sessions lock across remote sudo commands
The sudo/su probe and the *_sudo SFTP helpers borrowed a SessionHandle
from a sessions-map read guard and ran the whole remote command under
it. The map is a write-preferring RwLock that every new connect writes,
so one slow command (a wrong password's 2-3 s PAM delay, a hung sudo up
to the 30 s timeout) left all new connects stuck at "Connecting...".
Add exec::SessionRef (the map plus a session id) and pass it instead:
it takes the lock only to open the command's channel. run_sudo_command,
sudo_probe, su_validate_password and the 13 *_sudo helpers take it;
about 20 call sites in sftp/operations.rs and app.rs change.
live_session() keeps the "SFTP not connected" error for sudo stats
whose failure is .ok()'d into "no such file", so a vanished session
can't read as a missing file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Load and decrypt SSH keys off the async workers
Key loading ran inline in tokio tasks: a key file read plus, with a
passphrase, a deliberately slow bcrypt_pbkdf (~150-250 ms, seconds at
high rounds or in debug), and for managed keys a blob read, the DEK and
an OS keyring lookup. That stalled a worker and every SSH session
scheduled on it.
keys::resolve now does this on the blocking pool, and every connect
path (terminal, SFTP-only, reconnect, test connect, key install) loads
the key before calling in. The connect functions require the key for
both key auth methods instead of loading it themselves. AuthKeyCache
shares one load between a tab's terminal and its separate SFTP
connection, so a passphrase key is decrypted once, not twice. The agent
key-file path moves to spawn_blocking too, and passphrases are held in
Zeroizing buffers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Move folder walks off the UI thread and tokio workers
- Dropping local folders onto the file explorer walked the tree with
sync fs calls on the UI thread; it now runs on the blocking pool.
- Cross-host folder drag walked the local tree inline in a tokio task;
it now uses spawn_blocking.
- The recursive custom-command target walk awaited russh-sftp directly
in a gpui cx.spawn. russh-sftp's request timeouts need the tokio
reactor and panic with "no reactor" there; the walk now runs on the
tokio runtime.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add live SSH tests against a disposable sshd
Ten tests covering what unit tests can't: password and passphrase-key
login for terminal, SFTP-only and key install; one shared key decrypt
for a tab's two connections; sudo with good and bad passwords; the sudo
file operations, upload/download and server-to-server copy into a
root-only directory; and that slow remote commands leave the sessions
lock free.
Skipped unless VIZTERM_LIVE_SSH=host:port is set. The container is
docs/live-ssh-tests.Dockerfile; the module doc has the commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fall back to Segoe UI Emoji/Symbol for uncovered symbols
gpui-ce's Parley text system falls back to Lilex, IBM Plex Sans and
Arial, then fontique's per-script system fallback. Symbols that belong
to no particular script, such as U+21B5 and the dingbats U+2718 and
U+27A4, matched none of those and drew as boxes; Zed's gpui got them
from DirectWrite's system fallback. Add Segoe UI Emoji, then Segoe UI
Symbol, to the vendored Windows text system's fallback list. Emoji
goes first so emoji keep their color glyphs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Bundle Cascadia Mono NF as the terminal's Nerd Font fallback
Prompts (Powerline separators, starship/oh-my-posh segments) and
`ls --icons` use Nerd Font glyphs in the Private Use Area. No system
font covers them, so they drew as boxes unless the terminal font was
itself a Nerd Font.
Embed Cascadia Mono NF Regular (same v2407.24 release and OFL licence as
the Cascadia fonts already bundled, unmodified) on every platform and
set it as the terminal font's fallback, so icons render with any
terminal font. Regular only, as OTF (~1 MB smaller than the TTF); adds
about 2 MB to the binary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Render combining marks and other zero-width chars
alacritty_terminal stores combining accents, Thai/Devanagari vowel
signs, ZWJ and similar zero-width chars on the cell they follow
(`cell.zerowidth()`), and the renderer dropped them: "e" + U+0301
showed as a bare "e".
Collect them per row by column, separate from the row text, which
stays one char per cell because grid_paint's column math and Burn-In
depend on that. grid_paint gives a marked cell its own segment and
shapes the cell's char together with its marks, so the shaper places
them on the glyph and later columns don't move.
Copy was already correct: selection_to_string includes zero-width
chars.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ease background shaders to a stop and resume where they left off
The background shaders (Starfield, Blue Geometry, Quasar, Star Grid)
took their time from the wall clock. When the window went inactive the
frame timer stopped, but any other redraw (terminal output, the
activation change) still drew the animation at the current wall time,
so it stuttered along while inactive and leapt ahead on reactivation.
Give each pane an animation clock that only advances while the
animation runs. It eases to a stop over 1.5 s when the window goes
inactive and back to full speed over 0.75 s when it's active again,
and caps each step at 0.1 s so a hidden pane or sleeping machine can't
jump it ahead. Frames stop once it's at rest.
Rename the menu toggle "Animate When Inactive" to "Pause When Inactive"
(checked by default). The preference is still stored as
terminal_shader_animate_inactive, so saved settings carry over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Close sibling submenus as soon as another opens
Each submenu closed only through its own 180 ms hover-out timer, so
moving from one trigger to the next left both panels up and
overlapping. Opening a submenu (by hover or click) now closes its
sibling straight away:
- View: Theme and Terminal Shader (closing Theme also drops its
preview).
- File explorer context menu: Custom Commands and New (Custom Commands
closes even when pinned for filtering).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Preview background shader strength on hover
Hovering a Background N% row in View > Terminal Shader applies that
strength live, like hovering a theme. Clicking keeps it; closing the
submenu any other way restores the saved strength. The checkmark stays
on the saved value while previewing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Add Star Grid (Accent) background shader
Same shader as Star Grid, tinted with the active theme's accent colour.
The accent is scaled so its brightest channel matches Star Grid's own
blue, so every accent glows about as brightly as the original; a black
accent falls back to that blue. It follows theme changes and theme
previews.
Star Grid's time-scale parameter was always 1.0, so it is now fixed in
the shader and its slots (params.zw, params2.w) carry the tint. The
original Star Grid passes its old colour and renders as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Ignore a saved terminal shader off Windows
Only the Windows renderer draws shaders and only Windows shows the
View > Terminal Shader menu, but the saved choice was loaded everywhere.
A preferences file from Windows made other platforms animate unseen,
with no menu to turn it off.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Put every pane's background shader frames on one grid
Each pane timed its capped-rate frames from its own last frame, and each
frame redraws the whole window. A pane made later by a split ran out of
step with the others, so two panes at 30 fps could redraw 60 times a
second. Frames are now due on multiples of the interval since one shared
start.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Don't rescan a row's runs for every painted segment
A row of box drawing or CJK has a segment per cell, and slice_runs
walked the runs from the first one for each, making the row
cells x runs. It now keeps its place between segments.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Record the local gpui-ce patches as a patch file
Vendoring and patching landed in one commit, so git couldn't show what
was changed on top of gpui-ce 0.3.0. The patch file applies to the
crates.io sources and reproduces vendor/. Also drop the top-edge resize
patch from the Cargo.toml list; upstream covers it and no such hunk
exists.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Fix the Linux build: name the font list's element type
`fonts.extend([...])` left the array's type to inference, which took the
first font's size (`&[u8; N]`) and rejected the rest. The block is
`#[cfg(not(windows))]`, so Windows builds never saw it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Add a live test for the PTY channel drain
Nothing failed if the drain task was removed: the session would just
freeze again once russh's 100-message channel queue filled. The test
sends 150 prompts and expects an echo back; it fails with the drain
disabled.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Keep Burn-In smooth on tabs open for days
Cell ages were f32 seconds since the tab opened. After about 12 days an
f32 moves in 1/8 s steps, so the fade and the flames stuttered. Ages are
now f64, and the shader gets a time that wraps every 4096 s.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Drop the unused env_logger dependency
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Return focus to the terminal after a menu row is clicked
Pressing a menu row is a click outside the menu's filter box, which
blurs it, and the focus sweep then parks focus on the window root. The
restore step only acted while focus was still on the filter box, so
after any row click typing went nowhere until the terminal was clicked.
It now also restores when focus is on the root or on nothing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Run terminal shaders on Linux, and hold them still when animations are reduced
Linux: the shaders only ran in the Windows Direct3D renderer. The wgpu
renderer gpui-ce uses on Linux (gpui_ce_wgpu, now vendored) gets the same
shader pass, and every shader has a WGSL twin next to its HLSL file; the
two must be changed together. View > Terminal Shader now shows on Linux.
A test validates each WGSL shader with naga on any platform, since only
the Linux renderer compiles them, at runtime.
Reduce animations: a window drawn by the CPU (no GPU) pays for every
animation frame with a full-window redraw, so the app now detects
software rendering and forces reduce-animations mode on; Settings shows
the switch locked with the reason. In that mode, forced or chosen, the
animated shader backgrounds render one frame per pane and keep it
(ShaderFilter::bake, in both renderers), Burn-In is off, and the menu
hides the rows that would do nothing. In the software-rendered test
container idle CPU went from 290% (Starfield) and 1868% (Quasar) to 0.2%.
gpui's recorded paint operations had grown to 704 bytes each because the
filter list kept four ShaderFilters inline; it now keeps one, which
brings them back to 248.
Tested on Linux under X11 with the CPU renderer, on Vulkan and on the
OpenGL fallback. The Windows kept-frame path is compiled and unit-tested
but was not seen running.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Bump version to 0.2.0 and update the changelog
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Let the Direct3D renderer take a whole-program shader
A ShaderFilter's HLSL was always an `effect` function the renderer wrapped
in its own declarations. Source that starts with COMPLETE_HLSL_MARKER is
now compiled as it is, so a shader translated from another language (which
comes out as a complete program) can be used.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Add custom terminal shaders
A .wgsl file in <data dir>/shaders/ shows up under View > Terminal Shader.
The same file runs on Windows and Linux: wgpu compiles it as it is, and for
Direct3D it is translated to HLSL with naga (about 1.8 MB more in the
Windows binary). Every file is checked as both renderers would compile it,
so one that loads on one platform loads on the other.
A shader defines wb_shader(uv, px) and reads the terminal through wb_...()
functions: time, strength, cursor, mouse, cell grid, theme colours, and
seconds since the last key press, output and bell. They reach it in the
data texture shader filters already had, numbers carried as the four bytes
of a texel, so a new input needs no renderer change. Shaders can declare
knobs ("//@ knob name default=.. min=.. max=.."), edited as number fields
in Settings > Appearance, where the card also opens the folder, writes a
commented example that uses every input, reloads, and shows why a file
didn't load. The text input gained a decimal-only mode for those fields.
Two guards, since the folder's contents are not ours:
- A file that makes the compiler overflow the stack would end the app at
every start. The file being compiled is named in a marker; one left
behind is skipped until its text changes.
- A shader the app dies drawing is switched off at the next start.
Not seen running on Windows after the last round of fixes (both-renderer
check, reload keeping unchanged shaders, debounced knob saving); only the
tests and the Linux test run cover those there.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Load shader files saved with a byte order mark, and let Reload retry refused ones
A file saved as "UTF-8 with BOM", which some Windows editors do by
default, failed to compile: the mark reached the compiler as a stray
character. It is now dropped when the file is read.
A file that once took the shader compiler down was skipped until its
text changed. That left no way back when the crash had another cause,
so the user's Reload now tries such files again. Startup still skips
them, where another crash would be a loop.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Make terminal shaders cheaper and show what they cost
Six changes to the terminal shaders. They overlap in the same files and
lines, so they are committed together rather than as a series whose
in-between states were never built.
One place for every shader. CRT, Phosphor and Glow were applied to the
pane's wrapper in app.rs while the backgrounds and custom shaders went on
the terminal view's root. They all go on the view's root now. The still
ones no longer cover the file browser or the drop overlays of a pane.
wb_mouse() is off screen while the pointer isn't over the pane. It used
to keep the last position (and start at the window's corner), so an
effect drawn around the pointer stayed behind. Typing doesn't count as
leaving.
Quasar is removed. It was the most expensive shader by a factor of
three and didn't look good. A saved choice of it falls back to none.
Shader cost readout. With the FPS counter on, the status bar shows the
GPU time the selected shader's passes take per frame, and Settings rates
the selected custom shader light, medium or heavy against a 60 Hz frame.
Both renderers time the passes with GPU timestamp queries. Reading the
time is what turns the measuring on, and it stops by itself three
seconds after the last read: with no readout on screen a frame pays one
atomic load and no query exists. The figure is a running average over
frames picked at random, since frames differ in what they draw.
A paused background shader is kept, not rerun. When the window is
inactive and the animation has eased to a stop, the built-in backgrounds
switch to the picture the renderer keeps of them (as reduce-animations
mode already did), so output scrolling in a background window no longer
runs the shader on every redraw.
`//@ background` for custom shaders. A shader that only draws on the
empty background can say so. Its picture is then drawn over a flat
background, kept, and laid under the text, and it is drawn again only
when one of its inputs changes: on the frames of its own animation, not
on every keystroke. `scale=` keeps a smaller picture. For this a kept
picture (ShaderBake) can read a data texture and follows its contents,
is told where its filter's region is, reuses its texture between frames,
and its pass is timed like any other. Inputs a shader doesn't read
(now also the cursor) are held constant so they don't cause a redraw.
wb_source() does one read instead of four on a pixel's centre.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Fix six terminal and shader bugs found in review
- Draw a tab as a space. The emulator keeps the tab in the first cell it
jumped over, the font has no glyph for it, and the shaper drew a box
(`ls`, `printf '\t'` on Linux and over SSH).
- Save a shader file that killed the compiler to the refused list before
compiling anything else. With two such files, each start cleared the
other's entry and the app crashed on every start.
- Skip `wb_since_...()` flashes while the animation is paused. An inactive
window draws no more frames, so a flash started then stayed on screen.
- Start the animation time over every 32768 s of animating, so the f32 the
shaders get keeps steps of 2 ms or finer. The background jumps once at
each restart; left to grow, it juddered after about three days.
- Reset Burn-In when a terminal view is hidden, so what was written while
hidden doesn't all light up when the tab is shown again.
- Release kept pictures, data textures and an unwanted timer when a scene
has no shader filters (Direct3D and wgpu). They were held until the
next scene that used a shader.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Add a shader reload command and a --check-shader flag
For writing custom terminal shaders: check a file from the command line,
then preview each edit without opening Settings.
- Command palette: "Reload Terminal Shader" reads the shaders folder again
and switches to the new version of the selected shader. A toast says it
reloaded, or gives the first line of the error and its line number.
- `wbahterm --check-shader <file.wgsl>...` builds each file the way the app
does when it loads it and prints the result, without starting the UI.
Exit code 0 if every file builds, 1 if one doesn't, 2 if none was named.
On Windows it also runs Direct3D's own compiler, which the app only does
when the shader is first drawn, and attaches to the parent console so a
release build's output shows there.
- docs/custom-shaders.md is the manual: the loop, the output format, every
input, the `//@` lines and what each error means. A test fails if an
input is added without being listed in it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* Show the whole error when a shader fails on only one renderer
The reload toast took the error's first line. For a shader that compiles
for one renderer and not the other, that line is only the heading ("Only
on Linux (wgpu):"), so the toast never said what was wrong. It now adds
the line after a heading.
--check-shader no longer leaks each shader it checks; nothing needed it
to live past the summary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Restructure the shader code and tidy the code around it
Code-quality pass from a review of the branch. Behavior is the same except
where noted.
Terminal shaders:
- TerminalShader::effect() classifies the selected shader once, replacing
the predicates and matches scattered through shader_effects.rs, the menu
and the terminal view. A new terminal/pane_shader.rs owns a pane's
Burn-In, background-frame and custom-input state; the view calls it once
per job.
- custom_shaders.rs (1236 lines) is split by job into build.rs, guard.rs
and inputs.rs.
- One crash guard: a custom shader the app died drawing now goes on the
same refused list as one that crashed the compiler. It stays the saved
choice; Reload or editing the file brings it back. (Before, the saved
choice was switched to None.)
- The custom: key prefix, the strength lookup and the colour conversion
each live in one place; the built-in WGSL test reuses check().
Renderer patch:
- The shader-filter policy the Direct3D and wgpu renderers each had a copy
of (bake keys and plans, data-texture sync, input selection, uniform
packing, timing on/off) lives once in gpui_ce_render/src/shader_filter.rs.
Both renderers release kept pictures the same way.
- Shader-filter code moved out of upstream gpui files into the patch's own
files: 844 changed lines in upstream files are now 431.
- downcast_active_drag is removed; the app reads active_drag() directly.
The patch file is regenerated.
Elsewhere:
- One SSH authenticate() replaces four copies of the auth match and three
of authenticate_with_key. SFTP's missing-key error now reads "private key
not loaded before connect", like the other paths.
- The last hand-written channel opens go through SessionRef, and
open_session_channel is private, so the sessions lock can't be held
across a remote command by mistake.
- The title bar reads the reduce-animations setting instead of a copy.
- The UI theme uses gpui::rgb/rgba instead of its own copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop Parley's dictionary line breaking: 3 MB smaller
gpui_ce_parley turned on Parley's `complex-scripts` feature, which links
ICU's word dictionaries for Thai, Lao, Khmer, Burmese, Chinese and
Japanese, used only to choose where wrapped text breaks. That data was
3.1 MB of the Windows exe (60.2 MB -> 57.1 MB in a release build).
gpui_ce_parley is now vendored with the feature made opt-in; the app's
`complex-scripts` Cargo feature turns it back on. Without it, those
scripts break between characters in wrapped UI text. Languages with
spaces, English included, break the same as before, and the terminal
grid never wraps through Parley.
The vendor patch file now covers gpui_ce_parley too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Return focus to the parent menu when the Custom Commands submenu closes
A pinned Custom Commands submenu holds focus in its filter box. When the
sibling "New" submenu opened it, focus stayed on the now-gone input, so
typing and Escape did nothing until a click. Hand focus to the parent
menu's filter if it shows one, else to the root.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Sample shader source with SampleLevel so data-driven loops compile
HLSL's Sample needs derivatives, which aren't available inside a loop
whose length depends on data, so such shaders failed on Direct3D while
working on Linux. The source has no mips, so level 0 is the same picture.
Also correct the docs on when a still shader redraws.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Drop a redundant scope and a stale comment in the sudo paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
||
| docs | ||
| packaging/linux | ||
| src | ||
| vendor | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| todo.md | ||
| wbahterm.rc | ||