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: 2 additions & 1 deletion cmd/wsh/cmd/wshcmd-connserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ func serverRun(cmd *cobra.Command, args []string) error {
var logFile *os.File
if connServerDev {
var err error
logFile, err = os.OpenFile("/tmp/connserver.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
logFilePath := fmt.Sprintf("/tmp/waveterm-connserver-%d.log", os.Getuid())
logFile, err = os.OpenFile(logFilePath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to open log file: %v\n", err)
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ wsh editconfig
| term:shiftenternewline | bool | when enabled, Shift+Enter sends escape sequence + newline (\u001b\n) instead of carriage return, useful for claude code and similar AI coding tools (default false) |
| term:macoptionismeta | bool | on macOS, treat the Option key as Meta key for terminal keybindings (default false) |
| term:bellsound <VersionBadge version="v0.14" /> | bool | when enabled, plays the system beep sound when the terminal bell (BEL character) is received (default false) |
| term:bellindicator <VersionBadge version="v0.14" /> | bool | when enabled, shows a visual indicator in the tab when the terminal bell is received (default true) |
| term:bellindicator <VersionBadge version="v0.14" /> | bool | when enabled, shows a visual indicator in the tab when the terminal bell is received (default false) |
| term:durable <VersionBadge version="v0.14" /> | bool | makes remote terminal sessions durable across network disconnects (defaults to true) |
| editor:minimapenabled | bool | set to false to disable editor minimap |
| editor:stickyscrollenabled | bool | enables monaco editor's stickyScroll feature (pinning headers of current context, e.g. class names, method names, etc.), defaults to false |
Expand Down Expand Up @@ -133,7 +133,7 @@ For reference, this is the current default configuration (v0.11.5):
"window:savelastwindow": true,
"telemetry:enabled": true,
"term:bellsound": false,
"term:bellindicator": true,
"term:bellindicator": false,
"term:copyonselect": true,
"term:durable": true,
"waveai:showcloudmodes": true,
Expand Down
60 changes: 2 additions & 58 deletions frontend/app/block/blockframe-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
renderHeaderElements,
} from "@/app/block/blockutil";
import { ConnectionButton } from "@/app/block/connectionbutton";
import { DurableSessionFlyover } from "@/app/block/durable-session-flyover";
import { ContextMenuModel } from "@/app/store/contextmenu";
import { getConnStatusAtom, recordTEvent, WOS } from "@/app/store/global";
import { globalStore } from "@/app/store/jotaiStore";
Expand All @@ -23,52 +24,6 @@ import * as jotai from "jotai";
import * as React from "react";
import { BlockFrameProps } from "./blocktypes";

function getDurableIconProps(jobStatus: BlockJobStatusData, connStatus: ConnStatus, isConfigedDurable?: boolean | null) {
let color = "text-muted";
let titleText = "Durable Session";
let iconType: "fa-solid" | "fa-regular" = "fa-solid";

if (isConfigedDurable === false) {
color = "text-muted";
titleText = "Standard Session";
iconType = "fa-regular";
return { color, titleText, iconType };
}

const status = jobStatus?.status;
if (status === "connected") {
color = "text-sky-500";
titleText = "Durable Session (Attached)";
} else if (status === "disconnected") {
color = "text-sky-300";
titleText = "Durable Session (Detached)";
} else if (status === "init") {
color = "text-sky-300";
titleText = "Durable Session (Starting)";
} else if (status === "done") {
color = "text-muted";
const doneReason = jobStatus?.donereason;
if (doneReason === "terminated") {
titleText = "Durable Session (Ended, Exited)";
} else if (doneReason === "gone") {
titleText = "Durable Session (Ended, Environment Lost)";
} else if (doneReason === "startuperror") {
titleText = "Durable Session (Ended, Failed to Start)";
} else {
titleText = "Durable Session (Ended)";
}
} else if (status == null) {
if (!connStatus?.connected) {
color = "text-muted";
titleText = "Durable Session (Awaiting Connection)";
} else {
color = "text-muted";
titleText = "No Session";
}
}
return { color, titleText, iconType };
}

function handleHeaderContextMenu(
e: React.MouseEvent<HTMLDivElement>,
blockId: string,
Expand Down Expand Up @@ -217,7 +172,6 @@ const BlockFrame_Header = ({
let viewIconUnion = util.useAtomValueSafe(viewModel?.viewIcon) ?? blockViewToIcon(blockData?.meta?.view);
const preIconButton = util.useAtomValueSafe(viewModel?.preIconButton);
const useTermHeader = util.useAtomValueSafe(viewModel?.useTermHeader);
const termDurableStatus = util.useAtomValueSafe(viewModel?.termDurableStatus);
const termConfigedDurable = util.useAtomValueSafe(viewModel?.termConfigedDurable);
const hideViewName = util.useAtomValueSafe(viewModel?.hideViewName);
const magnified = jotai.useAtomValue(nodeModel.isMagnified);
Expand All @@ -227,8 +181,6 @@ const BlockFrame_Header = ({
const isTerminalBlock = blockData?.meta?.view === "term";
viewName = blockData?.meta?.["frame:title"] ?? viewName;
viewIconUnion = blockData?.meta?.["frame:icon"] ?? viewIconUnion;
const connName = blockData?.meta?.connection;
const connStatus = jotai.useAtomValue(getConnStatusAtom(connName));

React.useEffect(() => {
if (magnified && !preview && !prevMagifiedState.current) {
Expand All @@ -240,12 +192,6 @@ const BlockFrame_Header = ({

const viewIconElem = getViewIconElem(viewIconUnion, blockData);

const { color: durableIconColor, titleText: durableTitle, iconType: durableIconType } = getDurableIconProps(
termDurableStatus,
connStatus,
termConfigedDurable
);

return (
<div
className={cn("block-frame-default-header", useTermHeader && "!pl-[2px]")}
Expand All @@ -272,9 +218,7 @@ const BlockFrame_Header = ({
/>
)}
{useTermHeader && termConfigedDurable != null && (
<div className="iconbutton disabled text-[13px] ml-[-4px]" key="durable-status">
<i className={`fa-sharp ${durableIconType} fa-shield ${durableIconColor}`} title={durableTitle} />
</div>
<DurableSessionFlyover key="durable-status" blockId={nodeModel.blockId} viewModel={viewModel} placement="bottom" divClassName="iconbutton disabled text-[13px] ml-[-4px]" />
)}
<HeaderTextElems viewModel={viewModel} blockData={blockData} preview={preview} error={error} />
<HeaderEndIcons viewModel={viewModel} nodeModel={nodeModel} blockId={nodeModel.blockId} />
Expand Down
Loading
Loading