Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ test-results.xml
docsite/

.kilo-format-temp-*
.superpowers
docs/superpowers
.claude
8 changes: 8 additions & 0 deletions emain/emain-ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ export function initIpcHandlers() {
menu.popup();
});

electron.ipcMain.on("webview-mouse-navigate", (event: electron.IpcMainEvent, direction: string) => {
if (direction === "back") {
event.sender.navigationHistory.goBack();
} else if (direction === "forward") {
event.sender.navigationHistory.goForward();
}
});

electron.ipcMain.on("download", (event, payload) => {
const baseName = encodeURIComponent(path.basename(payload.filePath));
const streamingUrl =
Expand Down
11 changes: 11 additions & 0 deletions emain/preload-webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@ document.addEventListener("contextmenu", (event) => {
// do nothing
});

document.addEventListener("mouseup", (event) => {
// Mouse button 3 = back, button 4 = forward
if (!event.isTrusted) {
return;
}
if (event.button === 3 || event.button === 4) {
event.preventDefault();
ipcRenderer.send("webview-mouse-navigate", event.button === 3 ? "back" : "forward");
}
});

console.log("loaded wave preload-webview.ts");
5 changes: 3 additions & 2 deletions frontend/app/tab/tabbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ const TabBar = memo(({ workspace, noTabs }: TabBarProps) => {
const addBtnWidth = getOuterWidth(addBtnRef.current);
const appMenuButtonWidth = appMenuButtonRef.current?.getBoundingClientRect().width ?? 0;
const workspaceSwitcherWidth = workspaceSwitcherRef.current?.getBoundingClientRect().width ?? 0;
const waveAIButtonWidth = waveAIButtonRef.current != null ? getOuterWidth(waveAIButtonRef.current) : 0;
const waveAIButtonWidth =
!hideAiButton && waveAIButtonRef.current != null ? getOuterWidth(waveAIButtonRef.current) : 0;

const nonTabElementsWidth =
windowDragLeftWidth +
Expand Down Expand Up @@ -276,7 +277,7 @@ const TabBar = memo(({ workspace, noTabs }: TabBarProps) => {
// Check if all tabs are loaded
const allLoaded = tabIds.length > 0 && tabIds.every((id) => tabsLoaded[id]);
if (allLoaded) {
setSizeAndPosition(newTabId === null && prevAllLoadedRef.current);
setSizeAndPosition(false);
saveTabsPosition();
if (!prevAllLoadedRef.current) {
prevAllLoadedRef.current = true;
Expand Down
3 changes: 3 additions & 0 deletions pkg/util/shellutil/shellutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ func WaveshellLocalEnvVars(termType string) map[string]string {
}
// these are not necessary since they should be set with the swap token, but no harm in setting them here
rtn["TERM_PROGRAM"] = "waveterm"
if os.Getenv("COLORTERM") == "" {
rtn["COLORTERM"] = "truecolor"
}
rtn["WAVETERM"], _ = os.Executable()
rtn["WAVETERM_VERSION"] = wavebase.WaveVersion
rtn["WAVETERM_WSHBINDIR"] = filepath.Join(wavebase.GetWaveDataDir(), WaveHomeBinDir)
Expand Down