This PR adds support for mobile user agent emulation in web widgets, enabling developers to test mobile-responsive websites directly within WaveTerm. ## Changes ### New Meta Key: `web:useragenttype` Added a new metadata key that accepts the following values: - `"default"` (or `null`) - Uses the standard browser user agent - `"mobile:iphone"` - Emulates iPhone Safari (iOS 17.0) - `"mobile:android"` - Emulates Android Chrome (Android 13) ### User Interface **Settings Menu**: Added a "User Agent Type" submenu to web widget settings (accessible via right-click → Settings) with radio button options for Default, Mobile: iPhone, and Mobile: Android. **Visual Indicator**: When a mobile user agent is active, a mobile device icon appears in the widget's header toolbar with an appropriate tooltip indicating the current emulation mode. ### Implementation Details The implementation leverages Electron's webview `useragent` attribute to override the default user agent string. The setting is persisted in the block's metadata and automatically applied when the webview is rendered. User agent strings used: - **iPhone**: `Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1` - **Android**: `Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.43 Mobile Safari/537.36` ## Use Cases This feature is particularly useful for: - Testing mobile-responsive web designs - Debugging mobile-specific website behaviors - Viewing mobile versions of websites without needing physical devices - Web development workflows that require testing across different user agents ## Files Changed - `pkg/waveobj/wtypemeta.go` - Added `WebUserAgentType` field to metadata type - `frontend/types/gotypes.d.ts` - Generated TypeScript types for the new meta key - `frontend/app/view/webview/webview.tsx` - Implemented user agent selection UI and webview configuration - `pkg/waveobj/metaconsts.go` - Generated Go constants for the new meta key Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sawka <2722291+sawka@users.noreply.github.com> |
||
|---|---|---|
| .github | ||
| .roo/rules | ||
| .storybook | ||
| .vscode | ||
| .zed | ||
| aiprompts | ||
| assets | ||
| build | ||
| cmd | ||
| db | ||
| docs | ||
| emain | ||
| frontend | ||
| pkg | ||
| public | ||
| schema | ||
| testdriver | ||
| tests/copytests | ||
| tsunami | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .golangci.yml | ||
| .prettierignore | ||
| ACKNOWLEDGEMENTS.md | ||
| BUILD.md | ||
| CNAME | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| electron-builder.config.cjs | ||
| electron.vite.config.ts | ||
| eslint.config.js | ||
| go.mod | ||
| go.sum | ||
| index.html | ||
| LICENSE | ||
| NOTICE | ||
| package-lock.json | ||
| package.json | ||
| prettier.config.cjs | ||
| README.md | ||
| RELEASES.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
| staticcheck.conf | ||
| Taskfile.yml | ||
| tsconfig.json | ||
| version.cjs | ||
| vitest.config.ts | ||
Wave Terminal
Wave is an open-source terminal that combines traditional terminal features with graphical capabilities like file previews, web browsing, and AI assistance. It runs on MacOS, Linux, and Windows.
Modern development involves constantly switching between terminals and browsers - checking documentation, previewing files, monitoring systems, and using AI tools. Wave brings these graphical tools directly into the terminal, letting you control them from the command line. This means you can stay in your terminal workflow while still having access to the visual interfaces you need.
Key Features
- Flexible drag & drop interface to organize terminal blocks, editors, web browsers, and AI assistants
- Built-in editor for seamlessly editing remote files with syntax highlighting and modern editor features
- Rich file preview system for remote files (markdown, images, video, PDFs, CSVs, directories)
- Integrated AI chat with support for multiple models (OpenAI, Claude, Azure, Perplexity, Ollama)
- Command Blocks for isolating and monitoring individual commands with auto-close options
- One-click remote connections with full terminal and file system access
- Rich customization including tab themes, terminal styles, and background images
- Powerful
wshcommand system for managing your workspace from the CLI and sharing data between terminal sessions
Installation
Wave Terminal works on macOS, Linux, and Windows.
Platform-specific installation instructions can be found here.
You can also install Wave Terminal directly from: www.waveterm.dev/download.
Minimum requirements
Wave Terminal runs on the following platforms:
- macOS 11 or later (arm64, x64)
- Windows 10 1809 or later (x64)
- Linux based on glibc-2.28 or later (Debian 10, RHEL 8, Ubuntu 20.04, etc.) (arm64, x64)
The WSH helper runs on the following platforms:
- macOS 11 or later (arm64, x64)
- Windows 10 or later (arm64, x64)
- Linux Kernel 2.6.32 or later (x64), Linux Kernel 3.1 or later (arm64)
Roadmap
Wave is constantly improving! Our roadmap will be continuously updated with our goals for each release. You can find it here.
Want to provide input to our future releases? Connect with us on Discord or open a Feature Request!
Links
- Homepage — https://www.waveterm.dev
- Download Page — https://www.waveterm.dev/download
- Documentation — https://docs.waveterm.dev
- Legacy Documentation — https://legacydocs.waveterm.dev
- Blog — https://blog.waveterm.dev
- X — https://x.com/wavetermdev
- Discord Community — https://discord.gg/XfvZ334gwU
Building from Source
Contributing
Wave uses GitHub Issues for issue tracking.
Find more information in our Contributions Guide, which includes:
License
Wave Terminal is licensed under the Apache-2.0 License. For more information on our dependencies, see here.
