Commit graph

2620 commits

Author SHA1 Message Date
Mike Sawka
59b8368f6d
Block Header should use waveEnv for context menu (for mocking) (#3041) 2026-03-11 22:54:28 -07:00
Mike Sawka
52dd0a2637
Add Claude Code Integration Guide + Fix Badge Priority Bug (#3040) 2026-03-11 22:16:02 -07:00
Copilot
82048b6c64
Add preview-native context menus and fix submenu rendering in frontend/preview (#3035)
`frontend/preview` was still routing context menus through the
Electron-backed production path, so preview menus did not behave
correctly. This change adds a preview-native menu renderer, then
tightens its sizing and fixes submenu clipping so nested menus are fully
visible and usable.

- **Preview-native context menu host**
  - Adds `frontend/preview/preview-contextmenu.tsx`
- Renders context menus directly in the preview app via
`@floating-ui/react`
- Supports existing `ContextMenuItem` features already used by previews:
    - nested submenus
    - checkbox/radio states
    - separators / headers
    - click handlers
    - outside-click / escape dismissal

- **Mock env integration**
- Wires the mock `WaveEnv.showContextMenu` path to the preview renderer
- Keeps existing preview callers unchanged (`env.showContextMenu(menu,
e)`)

- **Preview root mounting**
- Mounts a single shared context menu host in
`frontend/preview/preview.tsx`
  - Makes tabbar/widgets previews work without any Electron dependency

- **Menu sizing + submenu visibility**
  - Reduces menu width, font size, and row padding for a denser menu
- Switches the menu panel to `overflow-visible` so submenu panels are
not clipped by the parent container

```tsx
// frontend/preview/mock/mockwaveenv.ts
showContextMenu: overrides.showContextMenu ?? showPreviewContextMenu,
```

<screenshot>

![Preview context menu with visible
submenu](https://github.com/user-attachments/assets/18501804-c01b-4c33-a1ff-800854f25489)

</screenshot>

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-11 19:24:18 -07:00
Mike Sawka
8164ffc68f
v0.14.2 release notes and onboarding (#3039) 2026-03-11 17:23:00 -07:00
Mike Sawka
9ee654dd6e
Preview Directory Updates (modtime format, zebra, default sort, yml, context-menu) (#3038)
Lots of small updates:
* Fix modtime format to show time not just "today". Make fixed font.
* Zebra stripe rows
* Fix .yml files to be detected as yaml
* Add a new config option for changing the default sort (Name vs Mod
Time)
* Add ability to change the defaults using the context menu
* Make Size column fixed font
* Add vertical bars between header columns (more visual resize handles)
2026-03-11 16:20:05 -07:00
Copilot
8762b476dd
Add full sysinfo block preview backed by mock WaveEnv/WOS data (#3033)
This adds a standalone preview for `sysinfo` using the newer WaveEnv
mock pattern, but renders the full block instead of the bare view. The
preview seeds a mock block in WOS (`meta.view = "sysinfo"`), provides
history via mock RPC, and drives live updates through frontend-only WPS
event dispatch.

- **What changed**
- Added `frontend/preview/previews/sysinfo.preview.tsx` to render a full
`Block` with sysinfo block chrome, tab/workspace context, and mock WOS
objects.
- Added `frontend/preview/previews/sysinfo.preview-util.ts` to generate
deterministic sysinfo history + live events for preview use.
- Added `frontend/preview/previews/sysinfo.preview.test.ts` to lock down
the mock event/history shape used by the preview.

- **Preview wiring**
- Seeds mock `workspace`, `tab`, and `block` objects so the preview
exercises the real block path rather than a component-only render.
  - Configures the mock block metadata with:
    - `view: "sysinfo"`
    - `connection: "local"`
    - `sysinfo:type: "CPU + Mem"`
    - `graph:numpoints`
- Overrides `EventReadHistoryCommand` in the preview env so
`SysinfoViewModel` can load initial history normally.

- **Live FE-only event flow**
- Uses `handleWaveEvent()` directly in the preview to simulate incoming
`sysinfo` events without touching backend transport.
- Keeps the preview aligned with the real WPS subscription path already
used by `sysinfo.tsx`.

```tsx
const env = applyMockEnvOverrides(baseEnv, {
    mockWaveObjs: {
        [`block:${PreviewBlockId}`]: {
            otype: "block",
            oid: PreviewBlockId,
            version: 1,
            meta: {
                view: "sysinfo",
                connection: "local",
                "sysinfo:type": "CPU + Mem",
                "graph:numpoints": 90,
            },
        } as Block,
    },
    rpc: {
        EventReadHistoryCommand: async (_client, data) => {
            if (data.event !== "sysinfo" || data.scope !== "local") {
                return [];
            }
            return historyRef.current.slice(-(data.maxitems ?? historyRef.current.length));
        },
    },
});
```

- **Result**
- The preview now exercises the real sysinfo block path: block
frame/header, model initialization, history load, and ongoing chart
updates.

- **Screenshot**
-
<screenshot>https://github.com/user-attachments/assets/dc2ed145-9ec8-4fde-adb0-79adc62c3071</screenshot>

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-11 16:06:06 -07:00
Copilot
2cf8c26ccb
Share tab badge rendering with vertical tabs (#3034)
Vertical tabs were still using the older single-badge path and did not
honor the newer `tab:flagcolor` metadata. This updates `vtab` to use the
same badge rendering model as `tab`, including validated flag-color
badges.

- **Shared badge renderer**
- Extract `TabBadges` from `tab.tsx` into a shared
`frontend/app/tab/tabbadges.tsx` component.
- Keep the existing horizontal tab behavior unchanged while making the
badge stack reusable by `vtab`.

- **Vertical tab badge parity**
- Replace the legacy `badge` icon rendering in `vtab.tsx` with
`TabBadges`.
- Support both existing `badge` callers and the newer `badges` array
shape.
- Add `flagColor` support in `vtab` using the same
`validateCssColor(...)` guard as `tab.tsx`, so invalid colors are
ignored rather than rendered.

- **Preview / regression coverage**
  - Update the `vtabbar` preview to show:
    - multiple badges
    - flag-only tabs
    - mixed badge + flag tabs
- Add focused `vtab` coverage for valid and invalid `flagColor`
handling.

- **Example**
  ```tsx
  const rawFlagColor = tab.flagColor;
  let flagColor: string | null = null;
  if (rawFlagColor) {
      try {
          validateCssColor(rawFlagColor);
          flagColor = rawFlagColor;
      } catch {
          flagColor = null;
      }
  }

  <TabBadges badges={badges} flagColor={flagColor} />
  ```

- **Screenshot**
- Updated vertical tab preview:
https://github.com/user-attachments/assets/7d79930f-00cc-49a7-a0ec-d5554fb9e166

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-11 16:03:29 -07:00
Mike Sawka
60cdf05375
Do not minify preview builds, and fix HMR reload warning (#3036) 2026-03-11 16:02:54 -07:00
Copilot
ecccad6ea1
TabBar full preview + much more FE mocking via WaveEnv to enable it (#3028)
Large PR that extends WaveEnv mocking to fully cover the (complicated) TabBar implementation.  Also includes a full preview of the tab bar in the preview server with lots of controls to simulate different scenarios.

As a result of this mocking, also fixed a bunch of dependencies, and layout errors, random bugs, and visual UX bugs in the tab bar, making it more robust.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-11 13:54:12 -07:00
Mike Sawka
568027df21
add wsh badge documentation (#3031) 2026-03-10 16:44:18 -07:00
Mike Sawka
e3c46b7e5e
update copilot instructions for how to run the preview server (#3030) 2026-03-10 16:30:22 -07:00
Mike Sawka
fc96f49206
add new skill to copilot-instructions (#3029) 2026-03-10 16:20:34 -07:00
wave-builder[bot]
a327921c15
chore: bump package version to 0.14.2-beta.1 2026-03-10 23:03:02 +00:00
Mike Sawka
cb8166e6f0
Expanding WaveEnv to cover all of frontend/app/block components (#3024)
* lots of updates to WaveEnv to make it cover more functionality
* Create BlockEnv as a narrowing of WaveEnv that covers all of
frontend/app/block functionality
* Fixed a lot of dependencies in the block components that caused
unnecessarily re-renders
* Added atom caching to WOS
2026-03-10 16:00:11 -07:00
Shay12tg
29f49dc100
fix: search bar clipboard and focus improvements (#3025)
Two small fixes to the in-app search feature:
- **Skip copy-on-select during search navigation** — when iterating
through
search results in the terminal, the clipboard kept getting overwritten
with
  the matched text on every step. This was annoying on its own, but also
  polluted paste history managers. The root cause was
that xterm.js updates the terminal selection programmatically to
highlight
each match, which triggered the copy-on-select handler. The fix skips
the
clipboard write whenever an element inside `.search-container` is the
active
  element.
- **Refocus search input on repeated Cmd+F** — pressing Cmd+F while the
search
bar was already open was a no-op (setting the `isOpen` atom to `true`
again
has no effect). The fix detects the already-open case and directly calls
`focus()` + `select()` on the input, so the user can immediately type a
new
  query.
2026-03-10 15:55:21 -07:00
Mike Sawka
7119970794
flip bell-indicator to true by default (#3023) 2026-03-09 20:35:22 -07:00
Copilot
e087a4cdcf
Expose platform metadata on WaveEnv and preview mocks (#3021)
WaveEnv did not surface platform information, so platform-aware behavior
could not be added through the shared environment contract. This updates
the contract, production implementation, and preview mock to carry
platform state without wiring it into any consumers yet.

- **WaveEnv contract**
  - Add `platform: NodeJS.Platform`
  - Add `isWindows()` and `isMacOS()` helpers

- **Production implementation**
- Populate `platform` from `PLATFORM` in `frontend/util/platformutil.ts`
- Forward `isWindows` / `isMacOS` from the same utility into
`makeWaveEnvImpl()`

- **Preview mock**
  - Add optional `platform` override to `MockEnv`
  - Default mock platform to macOS
  - Expose `platform`, `isWindows()`, and `isMacOS()` on the mock env
  - Preserve platform overrides through `applyMockEnvOverrides()`

Example:

```ts
const env = useWaveEnv();

env.platform;      // "darwin" | "win32" | ...
env.isMacOS();     // boolean
env.isWindows();   // boolean
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-09 20:34:54 -07:00
Mike Sawka
f5480cbfbc
mock out settings better (use default config) (#3022) 2026-03-09 17:04:25 -07:00
Mike Sawka
1aee6e22bf
Expand WaveEnv to cover all the deps in sysinfo.tsx (#3019) 2026-03-09 16:15:54 -07:00
Copilot
39b68fbdf6
Remove invalid forwardRef from preview directory table row (#3018)
Wave was emitting React’s `forwardRef render functions accept exactly
two parameters` warning on startup with no useful stack trace. The
warning came from the preview directory row component being wrapped in
`React.forwardRef` even though it neither accepted nor used a forwarded
ref.

- **Root cause**
- `frontend/app/view/preview/preview-directory.tsx` defined `TableRow`
with `React.forwardRef(...)`, but the render function was effectively a
plain props-only component.

- **Change**
  - Removed the unnecessary `forwardRef` wrapper from `TableRow`.
- Kept the component behavior unchanged; it still uses its internal drag
ref wiring for DnD.

- **Impact**
  - Eliminates the startup warning.
- Aligns the component definition with its actual usage: callers render
`TableRow` as a normal component and do not pass refs.

```tsx
// before
const TableRow = React.forwardRef(function ({ row, idx, ...props }: TableRowProps) {
    return <div ref={dragRef}>...</div>;
});

// after
function TableRow({ row, idx, ...props }: TableRowProps) {
    return <div ref={dragRef}>...</div>;
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-09 16:04:33 -07:00
Mike Sawka
e6e559c1e0
New WaveEnv, for preview server + mocking (#3015) 2026-03-09 13:21:31 -07:00
Mike Sawka
e41aabf758
Block Level Indicators/Badges, Update TabBar Styling, Add Badges/Flags to Tabs (#3009) 2026-03-09 13:13:32 -07:00
Mike Sawka
71f7e98175
create a FE rpc mock (#3014) 2026-03-07 14:09:40 -08:00
Copilot
68719988ea
Fix connparse handling for scheme-less //... WSH shorthand URIs (#3006)
`pkg/remote/connparse` was failing on shorthand WSH inputs that omit the
`wsh://` scheme, including remote hosts, WSL targets, and Windows local
paths. The parser was splitting on `://` too early and misclassifying
leading `//` inputs before WSH shorthand handling ran.

- **What changed**
- Detect scheme-less WSH shorthand up front with `strings.HasPrefix(uri,
"//")`
- Route those inputs through the existing WSH path parsing flow instead
of the generic `://` split path
- Reuse the same shorthand flag when deciding whether to parse as
remote/local WSH vs current-path shorthand

- **Behavioral impact**
- `//conn/path/to/file` now parses as host `conn` with path
`path/to/file`
- `//wsl://Ubuntu/path/to/file` now preserves the WSL host and absolute
path shape
- `//local/C:\path\to\file` now parses as local Windows shorthand
instead of being treated as a current-path string

- **Scope**
  - Keeps the existing test expectations intact
  - Limits the change to `pkg/remote/connparse/connparse.go`

```go
isWshShorthand := strings.HasPrefix(uri, "//")

if isWshShorthand {
    rest = strings.TrimPrefix(uri, "//")
} else if len(split) > 1 {
    scheme = split[0]
    rest = strings.TrimPrefix(split[1], "//")
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-06 17:55:55 -08:00
Copilot
46593b9f4a
Add Release Notes entry to the settings menu (#3005)
This adds a **Release Notes** action to `SettingsFloatingWindow` in the
requested position: after **Secrets** and before **Help**. It also wires
that action to open the existing `onboarding-upgrade-patch.tsx` UI as a
standalone modal, so release notes remain accessible even when automatic
upgrade onboarding would not render for up-to-date clients.

- **Settings menu**
- Adds a new **Release Notes** item to
`frontend/app/workspace/widgets.tsx`
  - Places it between **Secrets** and **Help**
- Uses the existing modal system rather than creating a new view/block
path

- **Release notes launch path**
  - Registers `UpgradeOnboardingPatch` in the modal registry
- Opens it from the settings menu via
`modalsModel.pushModal("UpgradeOnboardingPatch", { isReleaseNotes: true
})`

- **Standalone modal behavior**
- Extends `UpgradeOnboardingPatch` with a lightweight `isReleaseNotes`
mode
- In release-notes mode, closing the modal pops the stacked modal
instead of toggling `upgradeOnboardingOpen`
- Preserves the existing automatic upgrade-onboarding flow and version
metadata update behavior for the original path

```tsx
{
    icon: "book-open",
    label: "Release Notes",
    onClick: () => {
        modalsModel.pushModal("UpgradeOnboardingPatch", { isReleaseNotes: true });
        onClose();
    },
}
```

- **<screenshot>**
  - Release notes modal content:
![Release Notes
modal](https://github.com/user-attachments/assets/914041a0-1248-4d1a-8eed-125713f7b067)

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-06 17:54:22 -08:00
Copilot
56c18291e6
Update aiusechat read_dir tests for typed entry output (#3007)
`pkg/aiusechat/tools_readdir_test.go` was still asserting the old
`entries` payload shape after `read_dir` moved to returning typed
directory entries. This caused the `pkg/aiusechat` test failures even
though the tool behavior itself was already correct.

- **Align test expectations with current callback output**
- Update `TestReadDirCallback` to treat `entries` as
`[]fileutil.DirEntryOut`
- Assert directory/file classification via the `Dir` field instead of
map lookups

- **Fix truncation/sorting coverage**
- Update `TestReadDirSortBeforeTruncate` to validate the typed slice
returned by `readDirCallback`
- Preserve the existing intent of the test: directories should still be
sorted ahead of files before truncation

- **Keep scope limited to stale tests**
  - No changes to `read_dir` implementation or output contract
  - Only the broken test assumptions were corrected

```go
entries, ok := resultMap["entries"].([]fileutil.DirEntryOut)
if !ok {
    t.Fatalf("entries is not a slice of DirEntryOut")
}

for _, entry := range entries {
    if entry.Dir {
        // directory assertions
    }
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-06 17:51:40 -08:00
Mike Sawka
7ef0bcd87f
preview updates (mock electron api, wos checks) (#2986)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-06 16:50:41 -08:00
Copilot
3f4484a9e2
Remove dead “move block to new window” path and dependent unused APIs (#3002)
`WindowService.MoveBlockToNewWindow` appears to be unreferenced, and its
supporting path had become isolated. This change removes that dead RPC
surface and the backend/eventbus helpers that existed only for that
flow.

- **Window service cleanup (backend RPC)**
- Removed `MoveBlockToNewWindow_Meta` and `MoveBlockToNewWindow` from
`pkg/service/windowservice/windowservice.go`.
  - Dropped now-unused imports tied to that method (`log`, `eventbus`).

- **Store cleanup**
  - Removed `MoveBlockToTab` from `pkg/wstore/wstore.go`.
  - Removed now-unused `utilfn` import from the same file.

- **Eventbus cleanup**
  - Removed unused event constant `WSEvent_ElectronNewWindow`.
- Removed `getWindowWatchesForWindowId` and `BusyWaitForWindowId`, which
were only used by the deleted move-to-new-window path.
  - Removed now-unused `time` import.

- **Generated frontend service surface**
- Regenerated service bindings and removed
`WindowServiceType.MoveBlockToNewWindow(...)` from
`frontend/app/store/services.ts`.

Example of removed RPC surface:
```ts
// removed from frontend/app/store/services.ts
MoveBlockToNewWindow(currentTabId: string, blockId: string): Promise<void> {
    return WOS.callBackendService("window", "MoveBlockToNewWindow", Array.from(arguments))
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-06 16:47:12 -08:00
Mike Sawka
76f78f0f97
fix failing layout test (#2999) 2026-03-06 16:07:11 -08:00
Mike Sawka
c6f61247ce
update about, add sponsor and gradient (#3001) 2026-03-06 15:59:55 -08:00
wave-builder[bot]
f82845b5b6
chore: bump package version to 0.14.2-beta.0 2026-03-06 18:23:50 +00:00
Mike Sawka
ff673e1500
break out wsh editor and clarify behavior. also document -m flag... (#2988)
fix documentation issue #2948
2026-03-06 10:21:22 -08:00
Mike Sawka
0f60c70666
broadcast zoom changed notifications (#2989) 2026-03-06 10:19:14 -08:00
dependabot[bot]
1b3c7c708b
Bump tar from 7.5.9 to 7.5.10 (#2992)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.9 to 7.5.10.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2b72abc1d4"><code>2b72abc</code></a>
7.5.10</li>
<li><a
href="7bc755dd85"><code>7bc755d</code></a>
parse root off paths before sanitizing .. parts</li>
<li><a
href="c8cb84629d"><code>c8cb846</code></a>
update deps</li>
<li>See full diff in <a
href="https://github.com/isaacs/node-tar/compare/v7.5.9...v7.5.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tar&package-manager=npm_and_yarn&previous-version=7.5.9&new-version=7.5.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/wavetermdev/waveterm/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 10:07:38 -08:00
dependabot[bot]
5e6d33d10d
Bump github.com/shirou/gopsutil/v4 from 4.26.1 to 4.26.2 (#2993)
Bumps
[github.com/shirou/gopsutil/v4](https://github.com/shirou/gopsutil) from
4.26.1 to 4.26.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/shirou/gopsutil/releases">github.com/shirou/gopsutil/v4's
releases</a>.</em></p>
<blockquote>
<h2>v4.26.2</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>disk</h3>
<ul>
<li>[disk][linux]: fix Device set to &quot;none&quot; for virtual
filesystems by <a
href="https://github.com/skartikey"><code>@​skartikey</code></a> in <a
href="https://redirect.github.com/shirou/gopsutil/pull/2002">shirou/gopsutil#2002</a></li>
<li>fix(disk): skip drives returning ERROR_INVALID_FUNCTION or
ERROR_NOT_SUPPORTED in IOCounters on Windows by <a
href="https://github.com/jose-manuel-almaza"><code>@​jose-manuel-almaza</code></a>
in <a
href="https://redirect.github.com/shirou/gopsutil/pull/2003">shirou/gopsutil#2003</a></li>
<li>[linux][disk]: fix disk mountinfo parsing bug by <a
href="https://github.com/shirou"><code>@​shirou</code></a> in <a
href="https://redirect.github.com/shirou/gopsutil/pull/2007">shirou/gopsutil#2007</a></li>
</ul>
<h3>host</h3>
<ul>
<li>refactor: move timeSince and timeSinceMillis to common package by <a
href="https://github.com/Dylan-M"><code>@​Dylan-M</code></a> in <a
href="https://redirect.github.com/shirou/gopsutil/pull/1998">shirou/gopsutil#1998</a></li>
</ul>
<h3>process</h3>
<ul>
<li>[common][process]: fix gosec lint by <a
href="https://github.com/shirou"><code>@​shirou</code></a> in <a
href="https://redirect.github.com/shirou/gopsutil/pull/2006">shirou/gopsutil#2006</a></li>
</ul>
<h3>Other Changes</h3>
<ul>
<li>[doc]: Update 'golang' to 'Go' for consistency by <a
href="https://github.com/alexandear"><code>@​alexandear</code></a> in <a
href="https://redirect.github.com/shirou/gopsutil/pull/1993">shirou/gopsutil#1993</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/alexandear"><code>@​alexandear</code></a> made
their first contribution in <a
href="https://redirect.github.com/shirou/gopsutil/pull/1993">shirou/gopsutil#1993</a></li>
<li><a
href="https://github.com/jose-manuel-almaza"><code>@​jose-manuel-almaza</code></a>
made their first contribution in <a
href="https://redirect.github.com/shirou/gopsutil/pull/2003">shirou/gopsutil#2003</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/shirou/gopsutil/compare/v4.26.1...v4.26.2">https://github.com/shirou/gopsutil/compare/v4.26.1...v4.26.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="33fab7d608"><code>33fab7d</code></a>
Merge pull request <a
href="https://redirect.github.com/shirou/gopsutil/issues/2009">#2009</a>
from shirou/dependabot/github_actions/actions/setup-...</li>
<li><a
href="6320f9ee4b"><code>6320f9e</code></a>
Merge pull request <a
href="https://redirect.github.com/shirou/gopsutil/issues/2007">#2007</a>
from shirou/fix/fix_disk_mountinfo_parsing_bugs</li>
<li><a
href="a69a8e2112"><code>a69a8e2</code></a>
chore(deps): bump actions/setup-go from 6.2.0 to 6.3.0</li>
<li><a
href="6a6e2157d2"><code>6a6e215</code></a>
Merge pull request <a
href="https://redirect.github.com/shirou/gopsutil/issues/2008">#2008</a>
from shirou/dependabot/go_modules/github.com/ebiteng...</li>
<li><a
href="e140450726"><code>e140450</code></a>
chore(deps): bump github.com/ebitengine/purego from 0.9.1 to 0.10.0</li>
<li><a
href="2ef7eb7835"><code>2ef7eb7</code></a>
[linux][disk]: fix disk mountinfo parsing bug</li>
<li><a
href="962bfd89f4"><code>962bfd8</code></a>
Merge pull request <a
href="https://redirect.github.com/shirou/gopsutil/issues/2000">#2000</a>
from shirou/dependabot/go_modules/golang.org/x/sys-0...</li>
<li><a
href="8de66e7a4f"><code>8de66e7</code></a>
Merge pull request <a
href="https://redirect.github.com/shirou/gopsutil/issues/2006">#2006</a>
from shirou/fix/fix_gosec_lint</li>
<li><a
href="a92742331b"><code>a927423</code></a>
fix: ignore s390x golangci-lint due to becoming always fail</li>
<li><a
href="4e9a8de427"><code>4e9a8de</code></a>
[common][process]: fix gosec lint</li>
<li>Additional commits viewable in <a
href="https://github.com/shirou/gopsutil/compare/v4.26.1...v4.26.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/shirou/gopsutil/v4&package-manager=go_modules&previous-version=4.26.1&new-version=4.26.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 10:06:57 -08:00
Mike Sawka
06bac333ae
handle second-instance events (auto-generated new window action on gnome) (#2998) 2026-03-06 10:06:14 -08:00
dependabot[bot]
73b2fb6be8
Bump postcss from 8.5.6 to 8.5.8 in the dev-dependencies-patch group (#2995)
Bumps the dev-dependencies-patch group with 1 update:
[postcss](https://github.com/postcss/postcss).

Updates `postcss` from 8.5.6 to 8.5.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/releases">postcss's
releases</a>.</em></p>
<blockquote>
<h2>8.5.8</h2>
<ul>
<li>Fixed <code>Processor#version</code>.</li>
</ul>
<h2>8.5.7</h2>
<ul>
<li>Improved source map annotation cleaning performance (by CodeAnt
AI).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/postcss/postcss/blob/main/CHANGELOG.md">postcss's
changelog</a>.</em></p>
<blockquote>
<h2>8.5.8</h2>
<ul>
<li>Fixed <code>Processor#version</code>.</li>
</ul>
<h2>8.5.7</h2>
<ul>
<li>Improved source map annotation cleaning performance (by CodeAnt
AI).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="65de53745f"><code>65de537</code></a>
Release 8.5.8 version</li>
<li><a
href="b2c6d9786e"><code>b2c6d97</code></a>
Run git hook register</li>
<li><a
href="0ae0a492e9"><code>0ae0a49</code></a>
Update Processor#version</li>
<li><a
href="6ee9f14d3a"><code>6ee9f14</code></a>
Release 8.5.7 version</li>
<li><a
href="3fbc95172a"><code>3fbc951</code></a>
Fix uvu Node.js 25 support</li>
<li><a
href="52db53ea43"><code>52db53e</code></a>
Update dependencies</li>
<li><a
href="497daef797"><code>497daef</code></a>
Speed up source map annotation cleaning by moving from RegExp</li>
<li><a
href="41e739a940"><code>41e739a</code></a>
Remove banner</li>
<li><a
href="1329142fc7"><code>1329142</code></a>
chore: speed up space-only string check in lib/parser.js (<a
href="https://redirect.github.com/postcss/postcss/issues/2064">#2064</a>)</li>
<li><a
href="23beff9a7c"><code>23beff9</code></a>
Update dependencies</li>
<li>Additional commits viewable in <a
href="https://github.com/postcss/postcss/compare/8.5.6...8.5.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=postcss&package-manager=npm_and_yarn&previous-version=8.5.6&new-version=8.5.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 10:01:18 -08:00
dependabot[bot]
aefd4dacc5
Bump globals from 17.3.0 to 17.4.0 in the dev-dependencies-minor group (#2996)
Bumps the dev-dependencies-minor group with 1 update:
[globals](https://github.com/sindresorhus/globals).

Updates `globals` from 17.3.0 to 17.4.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sindresorhus/globals/releases">globals's
releases</a>.</em></p>
<blockquote>
<h2>v17.4.0</h2>
<ul>
<li>Update globals (2026-03-01) (<a
href="https://redirect.github.com/sindresorhus/globals/issues/338">#338</a>)
d43a051</li>
</ul>
<hr />
<p><a
href="https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0">https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a9cfd7493f"><code>a9cfd74</code></a>
17.4.0</li>
<li><a
href="d43a051c48"><code>d43a051</code></a>
Update globals (2026-03-01) (<a
href="https://redirect.github.com/sindresorhus/globals/issues/338">#338</a>)</li>
<li>See full diff in <a
href="https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=globals&package-manager=npm_and_yarn&previous-version=17.3.0&new-version=17.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-06 09:18:33 -08:00
Mike Sawka
f59fdb55db
Fix focusedWaveWindow (also fixes bug w/ save session as....) (#2987) 2026-03-05 11:33:56 -08:00
Copilot
1a1cd853f8
Add wave:term component with direct SSE output + /api/terminput input path (#2974)
This PR introduces a standalone Tsunami terminal element (`wave:term`)
and routes terminal IO outside the normal render/event loop for
lower-latency streaming. It adds imperative terminal output
(`TermWrite`) over SSE and terminal input/resize delivery over a
dedicated `/api/terminput` endpoint.

- **Frontend: new `wave:term` element**
  - Added `tsunami/frontend/src/element/tsunamiterm.tsx`.
  - Uses `@xterm/xterm` with `@xterm/addon-fit`.
- Renders as an outer `<div>` (style/class/ref target), with xterm
auto-fit to that container.
  - Supports ref passthrough on the outer element.

- **Frontend: terminal transport wiring**
  - Registered `wave:term` in `tsunami/frontend/src/vdom.tsx`.
- Added SSE listener handling for `termwrite` in
`tsunami/frontend/src/model/tsunami-model.tsx`, dispatched to the
terminal component via a local custom event.
- `onData` and `onResize` now POST directly to `/api/terminput` as JSON
payloads:
    - `id`
    - `data64` (base64 terminal input)
    - `termsize` (`rows`, `cols`) for resize updates

- **Backend: new terminal IO APIs**
- Added `/api/terminput` handler in `tsunami/engine/serverhandlers.go`.
  - Added protocol types in `tsunami/rpctypes/protocoltypes.go`:
    - `TermInputPacket`, `TermWritePacket`, `TermSize`
  - Added engine/client support in `tsunami/engine/clientimpl.go`:
    - `SendTermWrite(id, data64)` -> emits SSE event `termwrite`
    - `SetTermInputHandler(...)` and `HandleTermInput(...)`
  - Exposed app-level APIs in `tsunami/app/defaultclient.go`:
    - `TermWrite(id, data64) error`
    - `SetTermInputHandler(func(TermInputPacket))`

- **Example usage**
  ```go
  app.SetTermInputHandler(func(input app.TermInputPacket) {
      // input.Id, input.Data64, input.TermSize.Rows/Cols
  })

  _ = app.TermWrite("term1", "SGVsbG8gZnJvbSB0aGUgYmFja2VuZA0K")
  ```

- **<screenshot>**
- Provided screenshot URL:
https://github.com/user-attachments/assets/58c92ebb-0a52-43d2-b577-17c9cf92a19c

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-05 09:32:01 -08:00
Copilot
0ab26ef947
Add a mousedown handler to also signal user activity in the app (#2976)
`mousedown` activity signaling was structured such that async telemetry
concerns leaked into event handling. This change moves fire-and-forget
behavior to the model boundary and keeps telemetry failures non-fatal.

- **`mousedown` handler path**
- `AppKeyHandlers` now calls `GlobalModel.getInstance().setIsActive()`
directly (no async wrapper in the handler).

- **`GlobalModel.setIsActive` structure**
  - `setIsActive()` is now synchronous (`void`).
  - Throttle logic remains unchanged.
- Electron telemetry call is executed via `util.fireAndForget(...)`
inside `setIsActive()`.

- **Telemetry error containment**
- `getApi().setIsActive()` is wrapped in `try/catch` inside the
fire-and-forget callback.
- Errors are logged with `console.log("setIsActive error", e)` and do
not bubble.

- **Focused coverage**
  - Added `frontend/app/store/global-model.test.ts` for:
    - fire-and-forget invocation + throttling behavior
    - error logging/swallowing on rejected telemetry call

```ts
setIsActive(): void {
    const now = Date.now();
    if (now - this.lastSetIsActiveTs < GlobalModel.IsActiveThrottleMs) {
        return;
    }
    this.lastSetIsActiveTs = now;
    util.fireAndForget(async () => {
        try {
            await getApi().setIsActive();
        } catch (e) {
            console.log("setIsActive error", e);
        }
    });
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

🔒 GitHub Advanced Security automatically protects Copilot coding agent
pull requests. You can protect all pull requests by enabling Advanced
Security for your repositories. [Learn more about Advanced
Security.](https://gh.io/cca-advanced-security)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-04 16:25:53 -08:00
Copilot
7f5487d9ac
Remove mock-heavy OSC52 Vitest coverage (#2975)
The issue called out that the OSC52 unit tests were mostly validating
mock setup rather than meaningful behavior. This PR trims that
low-signal coverage by removing the Vitest suite for OSC52.

- **Scope**
  - Deleted `frontend/app/view/term/osc-handlers.test.ts`.
  - No production/runtime code changes.

- **Rationale reflected in changes**
- Removes brittle, mock-dominant tests for logic considered too simple
for this unit-test shape.
  - Keeps the codebase focused on higher-value test coverage.

```diff
- frontend/app/view/term/osc-handlers.test.ts
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-04 16:24:42 -08:00
Copilot
edc20f7ec0
Bring Anthropic usechat backend to OpenAI-level tool-use parity and stream robustness (#2971)
This updates `pkg/aiusechat/anthropic` from partial implementation to
full backend parity for core tool-use orchestration and stream behavior.
The main gaps were unimplemented tool lifecycle methods, missing
persisted tool-use UI state, and weaker disconnect/error handling versus
the OpenAI backend.

- **Tool-use lifecycle parity (critical path)**
  - Implemented Anthropic backend support for:
    - `UpdateToolUseData`
    - `RemoveToolUseCall`
    - `GetFunctionCallInputByToolCallId`
- Wired `pkg/aiusechat/usechat-backend.go` to call Anthropic
implementations instead of stubs.
- Added Anthropic run-step nil-message guard so `nil` responses are not
wrapped into `[]GenAIMessage{nil}`.

- **Persisted tool-use state in Anthropic native messages**
  - Added internal `ToolUseData` storage on Anthropic `tool_use` blocks.
- Ensured internal-only fields are stripped before API requests via
`Clean()`.

- **UI conversion parity for reloaded history**
- Extended `ConvertToUIMessage()` to emit `data-tooluse` parts when
tool-use metadata exists, in addition to `tool-{name}` parts.

- **Streaming UX parity for tool argument deltas**
  - Added `aiutil.SendToolProgress(...)` calls during:
    - `input_json_delta` (incremental updates)
    - `content_block_stop` for `tool_use` (final update)

- **Disconnect/stream robustness**
  - Added `sse.Err()` checks in event handling and decode-error path.
- Added partial-text extraction on client disconnect and deterministic
ordering of partial blocks.
- Cleans up completed blocks from in-flight state to avoid duplicate
partial extraction.

- **Correctness + hygiene alignment**
- Continuation model checks now use `AreModelsCompatible(...)` (instead
of strict string equality).
- Added hostname sanitization in Anthropic error paths (HTTP error
parsing and `httpClient.Do` failures).
- Replaced unconditional Anthropic debug `log.Printf` calls with
`logutil.DevPrintf`.

- **Targeted coverage additions**
  - Added Anthropic tests for:
    - function-call lookup by tool call id
    - tool-use data update + removal
    - `data-tooluse` UI conversion behavior

```go
// usechat-backend.go
func (b *anthropicBackend) RunChatStep(...) (..., []uctypes.GenAIMessage, ...) {
    stopReason, msg, rateLimitInfo, err := anthropic.RunAnthropicChatStep(ctx, sseHandler, chatOpts, cont)
    if msg == nil {
        return stopReason, nil, rateLimitInfo, err
    }
    return stopReason, []uctypes.GenAIMessage{msg}, rateLimitInfo, err
}
```

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-04 16:20:50 -08:00
Copilot
9d4acb7aad
Add builder-launch strip to AppsFloatingWindow (#2979)
AppsFloatingWindow currently lists local apps but does not provide an
in-context way to open the app builder picker. This change adds a bottom
ghost-style action strip (`+ Build/Edit Apps`) that launches the builder
via Electron preload with `openBuilder(null)`.

- **What changed**
  - Added a new bottom strip action inside `AppsFloatingWindow`:
    - Label: `+ Build/Edit Apps`
- Visual style: ghost-like footer strip with top border, hover state,
full-width click target
- Wired the strip to call the preload API and close the floating window:
    - `getApi().openBuilder(null)` (`null` app id opens the app picker)
- Kept the change scoped to `frontend/app/workspace/widgets.tsx` with no
behavior changes to app-grid item launching.

- **Implementation detail**
  - Imported `getApi` from `@/store/global`
  - Added a memoized handler for builder launch:
  
```tsx
const handleOpenBuilder = useCallback(() => {
    getApi().openBuilder(null);
    onClose();
}, [onClose]);
```

- **UI preview**
-
<screenshot>https://github.com/user-attachments/assets/1448588f-ff1d-41b5-af72-2849135ca1f3</screenshot>

<!-- START COPILOT CODING AGENT TIPS -->
---

 Let Copilot coding agent [set things up for
you](https://github.com/wavetermdev/waveterm/issues/new?title=+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Co-authored-by: sawka <mike@commandline.dev>
2026-03-04 16:18:29 -08:00
dependabot[bot]
73f7715245
Bump immutable from 5.1.3 to 5.1.5 (#2980)
Bumps [immutable](https://github.com/immutable-js/immutable-js) from
5.1.3 to 5.1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/immutable-js/immutable-js/releases">immutable's
releases</a>.</em></p>
<blockquote>
<h2>v5.1.5</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix Improperly Controlled Modification of Object Prototype
Attributes ('Prototype Pollution') in immutable</li>
<li>Upgrade devtools and use immutable version by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2158">immutable-js/immutable-js#2158</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/immutable-js/immutable-js/compare/v5.1.4...v5.1.5">https://github.com/immutable-js/immutable-js/compare/v5.1.4...v5.1.5</a></p>
<h2>v5.1.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Migrate some files to TS by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2125">immutable-js/immutable-js#2125</a>
<ul>
<li>Iterator.ts</li>
<li>PairSorting.ts</li>
<li>toJS.ts</li>
<li>Math.ts</li>
<li>Hash.ts</li>
</ul>
</li>
<li>Extract CollectionHelperMethods and convert to TS by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2131">immutable-js/immutable-js#2131</a></li>
<li>Use npm <a href="https://docs.npmjs.com/trusted-publishers">trusted
publishing only</a> to avoid token stealing.</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Fix/a11y issues by <a
href="https://github.com/lyannel"><code>@​lyannel</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2136">immutable-js/immutable-js#2136</a></li>
<li>Doc add Map.get signature update by <a
href="https://github.com/borracciaBlu"><code>@​borracciaBlu</code></a>
in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2138">immutable-js/immutable-js#2138</a></li>
<li>fix(doc):minor-issues#2132 by <a
href="https://github.com/JayMeDotDot"><code>@​JayMeDotDot</code></a> in
<a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2133">immutable-js/immutable-js#2133</a></li>
<li>Fix algolia search by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2135">immutable-js/immutable-js#2135</a></li>
<li>Typo in OrderedMap by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2144">immutable-js/immutable-js#2144</a></li>
</ul>
<h3>Internal</h3>
<ul>
<li>chore: Sort all imports and activate eslint import rule by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2119">immutable-js/immutable-js#2119</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/JayMeDotDot"><code>@​JayMeDotDot</code></a>
made their first contribution in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2133">immutable-js/immutable-js#2133</a></li>
<li><a href="https://github.com/lyannel"><code>@​lyannel</code></a> made
their first contribution in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2136">immutable-js/immutable-js#2136</a></li>
<li><a
href="https://github.com/borracciaBlu"><code>@​borracciaBlu</code></a>
made their first contribution in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2138">immutable-js/immutable-js#2138</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/immutable-js/immutable-js/compare/v5.1.3...v5.1.4">https://github.com/immutable-js/immutable-js/compare/v5.1.3...v5.1.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md">immutable's
changelog</a>.</em></p>
<blockquote>
<h2>5.1.5</h2>
<ul>
<li>Fix Improperly Controlled Modification of Object Prototype
Attributes ('Prototype Pollution') in immutable</li>
</ul>
<h2>5.1.4</h2>
<ul>
<li>Migrate some files to TS by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2125">immutable-js/immutable-js#2125</a>
<ul>
<li>Iterator.ts</li>
<li>PairSorting.ts</li>
<li>toJS.ts</li>
<li>Math.ts</li>
<li>Hash.ts</li>
</ul>
</li>
<li>Extract CollectionHelperMethods and convert to TS by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2131">immutable-js/immutable-js#2131</a></li>
<li>Use npm <a href="https://docs.npmjs.com/trusted-publishers">trusted
publishing only</a> to avoid token stealing.</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Fix/a11y issues by <a
href="https://github.com/lyannel"><code>@​lyannel</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2136">immutable-js/immutable-js#2136</a></li>
<li>Doc add Map.get signature update by <a
href="https://github.com/borracciaBlu"><code>@​borracciaBlu</code></a>
in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2138">immutable-js/immutable-js#2138</a></li>
<li>fix(doc):minor-issues#2132 by <a
href="https://github.com/JayMeDotDot"><code>@​JayMeDotDot</code></a> in
<a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2133">immutable-js/immutable-js#2133</a></li>
<li>Fix algolia search by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2135">immutable-js/immutable-js#2135</a></li>
<li>Typo in OrderedMap by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2144">immutable-js/immutable-js#2144</a></li>
</ul>
<h3>Internal</h3>
<ul>
<li>chore: Sort all imports and activate eslint import rule by <a
href="https://github.com/jdeniau"><code>@​jdeniau</code></a> in <a
href="https://redirect.github.com/immutable-js/immutable-js/pull/2119">immutable-js/immutable-js#2119</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b37b855686"><code>b37b855</code></a>
5.1.5</li>
<li><a
href="16b3313fdf"><code>16b3313</code></a>
Merge commit from fork</li>
<li><a
href="fd2ef4977e"><code>fd2ef49</code></a>
fix new proto key injection</li>
<li><a
href="6734b7b2af"><code>6734b7b</code></a>
fix Prototype Pollution in mergeDeep, toJS, etc.</li>
<li><a
href="6f772de1e4"><code>6f772de</code></a>
Merge pull request <a
href="https://redirect.github.com/immutable-js/immutable-js/issues/2175">#2175</a>
from immutable-js/dependabot/npm_and_yarn/rollup-4.59.0</li>
<li><a
href="5f3dc61fd0"><code>5f3dc61</code></a>
Bump rollup from 4.34.8 to 4.59.0</li>
<li><a
href="049a594410"><code>049a594</code></a>
Merge pull request <a
href="https://redirect.github.com/immutable-js/immutable-js/issues/2173">#2173</a>
from immutable-js/dependabot/npm_and_yarn/lodash-4.1...</li>
<li><a
href="2481a77331"><code>2481a77</code></a>
Merge pull request <a
href="https://redirect.github.com/immutable-js/immutable-js/issues/2172">#2172</a>
from mrazauskas/update-tstyche</li>
<li><a
href="eb047790b4"><code>eb04779</code></a>
Bump lodash from 4.17.21 to 4.17.23</li>
<li><a
href="b973bf3b62"><code>b973bf3</code></a>
format</li>
<li>Additional commits viewable in <a
href="https://github.com/immutable-js/immutable-js/compare/v5.1.3...v5.1.5">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by [GitHub Actions](<a
href="https://www.npmjs.com/~GitHub">https://www.npmjs.com/~GitHub</a>
Actions), a new releaser for immutable since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=immutable&package-manager=npm_and_yarn&previous-version=5.1.3&new-version=5.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/wavetermdev/waveterm/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-04 16:17:35 -08:00
Mike Sawka
c65147da1b
add sponsor section to readme (#2978) 2026-03-04 13:12:55 -08:00
Mike Sawka
ceca94bc3c
add funding.yml file (#2977) 2026-03-04 13:05:40 -08:00
Copilot
f4acfc9456
Add virtualized flat-list TreeView component and preview sandbox (#2972)
This PR introduces a new frontend TreeView widget intended for
VSCode-style explorer use cases, without backend wiring yet. It provides
a reusable, backend-agnostic API with virtualization, flat visible-row
projection, and preview coverage under `frontend/preview`.

- **What this adds**
- New `TreeView` component in `frontend/app/treeview/treeview.tsx`
designed around:
    - flat `visibleRows` projection with `depth` (not recursive render)
    - TanStack Virtual row virtualization
    - responsive width constraints + horizontal/vertical scrolling
    - single-selection, expand/collapse, and basic keyboard navigation
- New preview: `frontend/preview/previews/treeview.preview.tsx` with
async mocked directory loading and width controls.
- Focused tests: `frontend/app/treeview/treeview.test.ts` for
projection/sorting/synthetic-row behavior.

- **Tree model + projection behavior**
- Defines a canonical `TreeNodeData` wrapper (separate from direct
`FileInfo` coupling) with:
- `id`, `parentId`, `isDirectory`, `mimeType`, flags, `childrenStatus`,
`childrenIds`, `capInfo`
- Builds `visibleRows` from `nodesById + expandedIds` and injects
synthetic rows for:
    - `loading`
    - `error`
    - `capped` (“Showing first N entries”)

- **Interaction model implemented**
  - Click: select row
  - Double-click directory (or chevron click): expand/collapse
  - Double-click file: emits `onOpenFile`
  - Keyboard:
    - Up/Down: move visible selection
    - Left: collapse selected dir or move to parent
    - Right: expand selected dir or move to first child

- **Sorting + icon strategy**
  - Child sorting is deterministic and stable:
    - directories first
    - case-insensitive label order
    - id/path tie-breaker
- Icon resolution supports directory/file/error states and simple
mimetype/extension fallbacks.

- **Example usage**
```tsx
<TreeView
    rootIds={["workspace:/"]}
    initialNodes={{ "workspace:/": { id: "workspace:/", isDirectory: true, childrenStatus: "unloaded" } }}
    fetchDir={async (id, limit) => ({ nodes: data[id].slice(0, limit), capped: data[id].length > limit })}
    maxDirEntries={120}
    minWidth={100}
    maxWidth={400}
    height={420}
    onSelectionChange={(id) => setSelection(id)}
/>
```

- **<screenshot>**
-
https://github.com/user-attachments/assets/6f8b8a2a-f9a1-454d-bf4f-1d4a97b6e123

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
2026-03-03 18:25:42 -08:00
wave-builder[bot]
d47329d491
chore: bump package version to 0.14.1 2026-03-03 23:22:35 +00:00
Mike Sawka
98c374b8cd
quick updates to get apptype (#2969) 2026-03-03 15:19:23 -08:00