Commit Graph
4250 Commits
Author SHA1 Message Date
backkoom 59aa69beb5 fix(shell): quick switch 模块不再违反架构检查
`#[path]` 属性被 `module_tree` 规则完全禁止,`use super::*;` 的豁免清单
也是空的——任何一处都算违规。#1130 引入的 quick switch 搜索模块同时踩中
这两条,导致 main 的 Lint 一直红。

改法:

- `quick_switch_search.rs` 移入 `quick_switch_runtime/` 目录,
  去掉 `#[path = "quick_switch_search.rs"]`,改用常规的 `mod` 声明。
  模块路径不变,别处无需改动。
- 测试模块里的 `use super::*;` 换成显式导入 `filter_quick_switch_items`
  与 `crate::models::QuickSwitchItem`。

`python scripts/ci/check_architecture.py` 通过,`cargo fmt --check` 通过,
nyaterm-desktop 2554 项测试全绿。
2026-11-03 17:17:01 +08:00
Kang 3bb1d66517 fix(ui): keep Dracula success labels readable on hover 2026-11-03 16:37:20 +08:00
Kang 768904827b Merge pull request #1132 from hualong1009/fix/transcript-local-timestamps
fix(recording): Transcript 日志时间戳改用本地时区
2026-11-03 16:16:28 +08:00
Kang 9c6b8a515a Merge pull request #1130 from nyakang/fix/quick-switch-field-search
fix(quick_switch): use field-aware name and endpoint matching
2026-11-03 14:47:09 +08:00
Kang e6040fb3a2 feat(diagnostic): introduce Windows diagnostic workflow and instrumentation
- Added a new GitHub Actions workflow for Windows diagnostics, allowing manual execution with specified source references and toolchains.
- Implemented a Python script to apply diagnostic instrumentation to the source code, ensuring compatibility with existing releases.
- Created a packaging script to build a frozen Windows x64 source with symbols and bounded panic probes, retaining necessary files for review.
- Developed diagnostic metadata and breadcrumb tracking for improved debugging and analysis of application behavior.
- Included unit tests to validate the functionality of the diagnostic packaging and instrumentation processes.
2026-11-03 14:46:42 +08:00
Kang afc8f9456c fix(quick_switch): match names and endpoints by field 2026-11-03 13:15:21 +08:00
fonaix 7e31eda0e4 fix(quick_switch): 为快速切换功能添加数字IP片段精确匹配规则 2026-11-03 13:15:11 +08:00
王浩生 52f9ed4bc4 fix(recording): write transcript timestamps in the local timezone
Per-record timestamps came from OffsetDateTime::now_utc while the
session header (Started), footer (Stopped) and the terminal display all
used the local clock, so a saved transcript read as if it happened hours
earlier or later than the session actually did.

Record, header and footer timestamps now share one local_now() helper
(local time with a UTC fallback where the local offset is unavailable),
and the saved transcript filename uses the same clock instead of UTC.

Fixes #1116
2026-11-03 13:11:22 +08:00
Kang 4b3f384c1f chore(locales): standardize sessionInfo translations across multiple languages
- Updated the translation for "sessionInfo" in English, French, Japanese, Korean, Simplified Chinese, and Traditional Chinese localization files for consistency.
- Removed the "editConnection" entry from Japanese and Korean localization files to streamline the translations.
2026-11-03 11:10:54 +08:00
Kang 1ab617d9ce feat(hover_card): add suspended state to NyaHoverCard for improved interaction handling
- Introduced a `suspended` state to the `NyaHoverCard` to manage interactions when competing surfaces are active.
- Updated the hover card's behavior to dismiss when suspended, enhancing user experience during overlapping interactions.
- Modified related methods to accommodate the new suspended functionality, ensuring proper opening and closing logic based on user actions.
2026-11-03 11:10:40 +08:00
Kang 84015d4542 Merge branch 'main' of https://github.com/nyakang/nyaterm 2026-11-03 09:25:07 +08:00
Kang c331e198ba refactor(rdp): remove deprecated clipboard options from localization files
- Removed unsupported clipboard mode entries from English, French, Japanese, Korean, Simplified Chinese, and Traditional Chinese localization files.
- Streamlined localization to enhance clarity and user experience by eliminating obsolete options related to clipboard functionality.
2026-11-03 09:25:04 +08:00
Kang abaa8daf79 feat(rdp): update clipboard settings and enhance compatibility
- Changed default RDP clipboard mode from "text-only" to "text-and-files" for improved functionality.
- Added tests to ensure legacy clipboard modes are preserved and correctly handled during configuration.
- Removed unsupported clipboard mode options from the connection editor, streamlining user experience.
- Updated related documentation to clarify the new clipboard behavior and its implications for users.
2026-11-03 09:24:53 +08:00
Kang 0bd5f8093b feat(rdp): enhance clipboard functionality and update dependencies
- Updated `Cargo.toml` to reflect new versions for `ironrdp-cliprdr`, `ironrdp-pdu`, and `ironrdp-svc`, ensuring compatibility with recent changes.
- Implemented a test to verify that the clipboard backend supports file capabilities across all legacy clipboard modes.
- Normalized clipboard settings to always enable text and file redirection, improving user experience and consistency across sessions.
- Adjusted related documentation to clarify the new clipboard behavior and its implications for users.
2026-11-03 09:24:25 +08:00
Kang cd3b3ba21f chore(deps): update dependencies and references in Cargo files
- Updated the `Cargo.lock` file to reflect new versions and sources for several packages, including `alacritty_terminal`, `gpui`, and `ironrdp`.
- Added new dependencies: `alloca`, `anes`, `bench_metrics`, `c-enum`, `cast`, `ciborium`, `clap`, and their respective versions.
- Removed deprecated dependencies and updated existing ones to ensure compatibility with recent changes.
2026-11-03 09:21:29 +08:00
Kang ea1750f1f8 Merge pull request #1109 from hualong1009/fix/webdav-redirect-method-preserve
fix(sync): 修复 WebDAV 重定向导致的方法降级与上传丢 body
2026-11-03 09:20:55 +08:00
Jakub Werwinski 0316f5145f fix(ui): keep confirm button text readable on pale accent fills
The settings OK button and the AI panel's green button drew white text on
the theme's link and success colors. That is unreadable (about 1.4:1) in
themes with pale accents, such as Dracula's #8be9fd and #50fa7b.

Add ThemePalette::text_on_fill: white stays the default, and is replaced by
the darker of the theme's background and text color only when white would
be below 2:1. Themes where white already works (GitHub Dark among them) keep
their look; Dracula, Nya HC, Monokai Pro, Tokyo Night, Rose Pine and
Catppuccin Mocha's success color change.
2026-11-03 00:19:30 +01:00
Jakub Werwinski 3c91ac3f2a feat(ui): align the Dracula interface roles with the VS Code theme
Take four roles from dracula/visual-studio-code instead of deriving them:
input background (#282a36), section header (#282a36), hover (#343746, the
75% alpha list.hoverBackground over the editor background) and the focus
ring (#6272a4, focusBorder).

Buttons stay purple and borders stay #44475a: the extension uses grey
buttons and #191a21 borders, which read poorly in this interface.
2026-11-03 00:09:51 +01:00
Jakub Werwinski ec17cb2d11 feat(ui): follow the official Dracula palette and add Dracula Light
The built-in Dracula used purple-tinted surfaces (#251b33) instead of the
official Dracula Classic ones. Switch it to the specification's surfaces
(#282a36, #21222c, #343746, #44475a) and add Dracula Light from the official
Alucard Classic palette (cream background).

Both themes now take the bundled JSON as their single color source through
palette_from_theme, like the WindTerm themes, so the hard-coded Dracula
palette is removed. The theme id and every color the existing tests pin
(primary, hover, on-primary, focus ring, link, accent) are unchanged, so
saved settings keep working.

The light theme keeps ANSI black dark so black text stays visible on the
light background, unlike the specification's inverted mapping.
2026-11-02 21:52:55 +01:00
Kang a1847afe10 style(desktop): format installed update validation
Apply rustfmt to the two pre-existing differences reported by PR #1109 CI so the workspace formatting gate can pass.
2026-11-03 01:21:38 +08:00
Kang fb2d5bc6da fix(sync): secure WebDAV redirects and refresh Digest signatures
Restrict redirects to the same origin or a same-host default-port TLS upgrade. Reject non-GET/HEAD 303 replays, sign Digest requests for each redirected URI, and allow exactly four redirect hops across authentication retries.

Add wire-level regressions for credential and body isolation, redirect replay policy, Digest paths and nonce counts, and redirect limits. Cloud sync data and credential formats are unchanged.
2026-11-03 01:21:33 +08:00
Kang e855789e22 Merge pull request #1120 from WerVa/fix/word-separators-persist
fix(settings): persist the word separators field when a draft is applied
2026-11-03 01:04:09 +08:00
Kang 7d9fede919 Merge pull request #1121 from WerVa/fix/nya-export-wraps-vault-key
fix(store): wrap the vault key with the password of an encrypted .nya backup
2026-11-03 00:53:25 +08:00
Kang 65d0b516af chore(deps): update dependency references for gpui and zed packages
- Updated the source references for `gpui`, `gpui-base`, `gpui-kit`, and `gpui_platform` in `Cargo.toml` to point to the latest commits.
- Adjusted the `Cargo.lock` file to reflect the new dependency versions for `zed` and `gpui-kit`, ensuring compatibility with recent changes.
2026-11-03 00:40:59 +08:00
Kang 8313096d37 feat(rdp): enhance Windows RDP integration with improved event handling and UI support
- Added support for new RDP events including `Connecting`, `AuthenticationWarningDisplayed`, and `LogonError`, enhancing the event model for better user feedback during connection processes.
- Updated the `HostStatus` structure to include surface dimensions and visibility, allowing for more detailed status reporting.
- Improved lifecycle management to ensure the login surface is displayed promptly after connection establishment, preventing user input delays.
- Adjusted viewport handling to ensure proper sizing and visibility of the RDP interface, particularly on Windows platforms.
- Enhanced documentation to reflect changes in event handling and UI behavior for Windows RDP integration.
2026-11-03 00:32:09 +08:00
Kang 89218bd802 feat(rdp): normalize Windows RDP settings and enhance clipboard handling
- Implemented normalization of RDP backend settings to ensure Windows authentication defaults to "system" and clipboard mode is set to "disabled" for Windows and ActiveX backends.
- Updated connection editor to reflect these normalized settings, preventing users from selecting unsupported clipboard modes.
- Enhanced validation logic for RDP configurations to reject invalid authentication modes and clipboard settings.
- Improved user experience by providing clear feedback on unsupported configurations during connection setup.
2026-11-02 19:49:04 +08:00
Kang 05256a1c7d feat(connections): enhance password handling and editor state management
- Added functionality to reveal editor passwords only when they are drafts, ensuring stored secrets remain secure.
- Introduced a placeholder for stored passwords to improve user experience during password entry.
- Normalized RDP backend settings during editor initialization to streamline configuration.
- Updated password placeholder logic to reflect the state of existing passwords and drafts accurately.
2026-11-02 19:48:52 +08:00
WerVa e4f7d82aad fix(store): wrap the vault key with the password of an encrypted .nya backup
An encrypted .nya is opened with the file password alone, but the export left the
vault key inside it wrapped by the store's master password or by the device key.
Import unwraps that key with the file password, so it only worked when the file
password happened to equal the master password. A source without a master password
failed with "unwrap master.key" even when the same password was typed both times,
even though the dialog asks for just "a password".

Re-wrap the key under the file password when exporting a backup, the V4 safety
backup and the safety backup an import takes first. Files exported with a password
equal to the master password are unchanged in effect, and the import side is not
touched. A new test covers a source without a master password and a saved password.
2026-11-02 12:25:42 +01:00
Kang 010f1e4215 feat(agents): add Windows RDP support and remove ActiveX helper
- Introduced `nyaterm-windows-rdp` for Windows Native RDP integration, detailing its architecture and isolation requirements.
- Removed the `nyaterm-activex-helper` crate, including all related files and dependencies, to streamline the project and focus on modern RDP implementations.
- Updated documentation in `AGENTS.md` to reflect these changes and clarify the new architecture.
- Adjusted `Cargo.toml` and `Cargo.lock` to remove references to the deleted ActiveX helper and include the new RDP crate.
- Enhanced CI workflows to configure MSVC for Windows builds, ensuring compatibility with the new RDP implementation.
2026-11-02 19:17:20 +08:00
WerVa 2b27670651 fix(settings): persist the word separators field when a draft is applied
Editing the word separators box only updated memory, so the settings draft never
marked the Interaction domain dirty. Applying the draft then wrote nothing, and
cancelling it restored the old separators, which is why the box appeared to ignore
the change unless another interaction setting was toggled in the same session.

Save through save_interaction_settings like the other text fields do, and cover it
with a test that checks the stored value after the draft is applied.
2026-11-02 12:11:24 +01:00
Kang ceefdce8b0 chore(deps): update gpui-kit dependency references in Cargo files
- Updated the source references for `gpui-base`, `gpui-component`, `gpui-component-macros`, `gpui-kit`, and `gpui-kit-assets` in `Cargo.lock` and `Cargo.toml` to point to the latest commit `355061fbf8446076283931bee2c46e8dfdd949e2`.
2026-11-02 14:26:01 +08:00
王浩生 63b8d12de9 fix(sync): keep WebDAV methods and bodies intact across redirects
The WebDAV adapter used zed-reqwest's default redirect policy, which
rewrites a redirected non-GET/HEAD request into a bodyless GET. On
servers that answer PROPFIND/MKCOL/PUT with 301/302/303 (collection
URLs without a trailing slash, http->https reverse proxies), that turned
every listing into an HTML page read ("invalid WebDAV PROPFIND
response"), made create_dir report success without creating anything,
and silently dropped every upload body, which the v4 read-back then
reported as StaleRemoteRevision.

Follow redirects in the adapter instead: same-host targets are retried
with the original method, body, and headers (max 4 hops); cross-host
targets or targets carrying userinfo/fragments are left unanswered so
credentials never travel to another host. Collection operations now
request the slashed collection URL directly, the Digest auth uri is
computed from the final URL, and a non-2xx <status> inside <propstat>
no longer discards an otherwise legal listing (RFC 4918 property-level
status). Listing failures now report the HTTP status and body size.

Fixes #1108
2026-11-02 14:14:48 +08:00
Kang 505e54b806 feat(ci): implement selective job execution for Rust workflows
- Introduced an `orchestrate` job to determine which CI jobs to run based on changed paths in pull requests.
- Updated Rust workflow to conditionally execute jobs like linting, testing, and plugin SDK based on the selection logic.
- Added a new script `select_rust_jobs.py` to handle job selection logic without requiring a Rust installation.
- Enhanced documentation to explain the new CI execution model and its implications for contributors.
2026-11-02 13:03:16 +08:00
Kang 4671cc964d fix(desktop): validate settings before saving theme drafts 2026-11-02 12:05:37 +08:00
Kang 137c495c87 Merge pull request #1101 from moonmicah/fix/settings-apply-blocked-feedback
fix(settings): keep Apply and Confirm clickable so validation blockers surface
2026-11-02 12:01:19 +08:00
Kang 9fa98a401d feat(tmux): enhance session management and pane handling
- Added `has_host` method to `TmuxFeatureState` for checking session hosts.
- Updated `NyaTermApp` to improve pane collection logic and ensure proper session state management during tab closures.
- Introduced explicit pane closing functionality in `SessionManager`, allowing for better control over remote pane lifecycle.
- Enhanced tests to validate new behaviors, including handling of zoomed and detached panes.
- Added a new stability test document for tmux control mode, detailing fixes and improvements related to pane management and session state.
2026-11-02 11:22:15 +08:00
Kang 49c2bdc22a fix(update): add validation for installed executable name on Windows
Introduced a new function `is_valid_installed_executable` to ensure the installed executable is named "NyaTerm.exe" in a case-insensitive manner. Updated the artifact preparation logic to validate the executable name and added a test case to verify the functionality across different casing variations.
2026-11-02 11:01:40 +08:00
moonmicah 6d33191807 fix(settings): let Apply and Confirm surface validation blockers
Apply used to be disabled whenever the draft had a validation error, and
Confirm was disabled by the same condition. Those two buttons are the only
place that explains why the draft cannot be saved (apply_settings_draft
reports the blocker in the status bar), so disabling them left the user
stuck on "apply your settings first" prompts with no way to learn what is
missing and no way to leave the page except Cancel.

Apply is now only disabled when the draft is clean; Confirm is always
clickable and reports the blocker without closing the page.
2026-11-02 10:54:20 +08:00
Kang b3c0f249ef Merge pull request #1080 from yaoxinghuo/feat/tmux-control-mode-gpui
feat(tmux): integrate control mode (-CC) in GPUI workspace
2026-11-02 10:45:50 +08:00
Kang 7e30ae03d6 Merge pull request #1094 from ganeshmshetty/fix/1083-windterm-bare-cr
fix(commands): keep WindTerm multi-line quick commands editable
2026-11-02 10:12:51 +08:00
Kang d18647b61c fix(commands): preserve backslashes before imported WindTerm returns
Pair an odd trailing backslash run before encoding a bare CR so the new script escape cannot be consumed as literal text. Preserve the existing execution plan, including pause chunks and delays, across WindTerm import and merge.

Add regression coverage for zero through three backslashes, mixed CR/CRLF/LF endings, and append/execute modes. Validated on Windows with cargo check --workspace, cargo test --workspace, cargo fmt --all -- --check, and cargo clippy --workspace --all-targets.
2026-11-02 10:10:59 +08:00
Kang 8efdc94898 Merge pull request #1095 from WerVa/perf/terminal-row-signature
perf(terminal): speed up row signatures and cell text ingestion
2026-11-02 09:29:30 +08:00
Jakub Werwinski b275b95b77 perf(terminal): index the grid row once per snapshot row
Snapshot row building indexed the grid per cell. Hoisting the row reference
gives about 7% on the snapshot benchmarks (11.3 -> 12.0 MB/s plain, 10.5 -> 11.3
colored, macOS arm64, median of repeated runs).
2026-11-01 21:57:21 +01:00
Jakub Werwinski 7e3f07b181 perf(terminal): speed up row signatures and cell text ingestion
Profiling terminal output ingestion showed ~85% of the time in
`line_signature`, which fed four fields per cell through SipHash for every
column of every row that scrolled past.

- Pack each cell into one word folded with a 128-bit multiply, and leave out
  trailing default-styled blanks (the significant length is hashed instead).
  Signatures are in-memory change detectors and are never persisted.
- Share one `Arc<str>` per ASCII character instead of allocating a `String`
  and an `Arc<str>` for every non-blank cell when building snapshot rows.
- Skip the color mapping for default foreground/background colors.

`render_row_signature` (test-only) shares the same hasher so the existing
`row.signature == render_row_signature(row.cells)` invariant still holds.

Adds `examples/throughput.rs` to reproduce the measurements:
`cargo run --release -p nyaterm-terminal --example throughput`.
Median of 5 runs, 24 MB of output, 200x50 terminal, macOS arm64:

  plain advance only            6.2 -> 46.6 MB/s  (7.5x)
  colored advance only          6.3 -> 43.7 MB/s  (6.9x)
  plain + snapshot per 4 KB     2.8 -> 11.3 MB/s  (4.0x)
  colored + snapshot per 4 KB   2.9 -> 10.5 MB/s  (3.6x)
2026-11-01 21:48:47 +01:00
Kang 132690b786 ci(tmux): retire the isolated baseline diagnostic
The corrected comparison continues in actions/runs/41333131240; permanent regressions remain in Rust CI.
2026-11-02 01:46:16 +08:00
Kang 87e74e95a1 ci(tmux): isolate workspace artifacts in the undo baseline comparison 2026-11-02 01:45:48 +08:00
Kang 20a745cd41 fix(transport): disable raw transfers before awaiting tmux takeover 2026-11-02 01:31:56 +08:00
Kang 617b89d048 ci(tmux): remove the one-off undo baseline workflow
The same-runner comparison is running in actions/runs/41331502900. Keep the permanent tmux compatibility matrix and platform-correct undo regression test.
2026-11-02 01:27:27 +08:00
Kang 80492d9376 ci(tmux): rebuild the fixed undo test after baseline snapshots 2026-11-02 01:26:43 +08:00
Kang 55e3fab900 fix(transport): serialize tmux pane registration with host cancellation 2026-11-02 01:24:10 +08:00