Commit Graph
298 Commits
Author SHA1 Message Date
Kang ffd315951b Merge branch 'main' into feat/android-native-adb 2026-11-11 19:01:57 +08:00
Kang 48d3dae5c4 fix(desktop): unify quick command category search and creation
Use one typed category choice list for search, selection and staged creation.
Prefer existing matches, retain a create option unless the trimmed name has
an exact match, and share highlight, scrolling and submission across keys
and pointer input. Restore trigger focus after closing the picker.

Route input actions before Submitted and isolate modified Enter and IME
confirmation from category selection and the editor save shortcut. Remove
the second editor input and its routing; retain the standalone category
dialog and existing save-time persistence and duplicate rules.

Validation on Linux/headless GPUI:
- 27 targeted desktop tests passed, including both editor view surfaces.
- App/workspace check, fmt check and strict workspace Clippy passed.
- Workspace tests: 6116 passed, 3 failed, 40 ignored. Two desktop failures
  passed individually; the readonly-file test passed without root privileges.
- Architecture check matches the original PR failure: two unapproved test
  thread spawns in completion_runtime.rs. Architecture script tests passed.

Real graphical IME and macOS/Windows native-window verification remain open.
No persistence formats, dependency versions or fork revisions changed.

Refs: https://github.com/nyakang/nyaterm/pull/1240
2026-11-11 18:35:53 +08:00
Kang 9ad1e38c66 fix(desktop): restore Android CI after merging main
Map saved ADB preparations to the requested view and preserve the runtime AI profiles. Register the caller-owned command suggestion scrollbar with the architecture checker.

Validation: workspace check, workspace tests (6401 passed, 40 ignored), formatting, architecture checks and workspace Clippy with warnings denied passed on Linux. Tests ran as an ordinary user with a writable temporary HOME.
2026-11-11 17:13:32 +08:00
Kang ba050afa26 test(android): normalize Windows temporary paths in import checks 2026-11-10 22:09:49 +08:00
Kang 4f06406553 fix(android): prepare MSVC import libraries and repair cached installs 2026-11-10 21:59:06 +08:00
Kang bd7e28d3b4 feat(android): integrate native Android views with bundled ADB 2026-11-10 20:37:41 +08:00
Kang 88c919234d refactor(desktop): extract reusable logic and split feature modules
Move preview decoding and translation HTTP clients into dedicated
UI-independent crates. Move file operations, terminal algorithms and
presentation helpers, TRZSZ execution, parsing and workspace algorithms
to their authoritative crates.

Split desktop session/settings state, terminal frame processing and the
connection editor by responsibility without duplicating mutable state.
Keep GPUI composition, task ownership and persistence adaptation in
desktop, and register the new crates in architecture checks and CI.

Preserve persisted formats and credential encryption contracts. Document
the boundaries and validation in DESKTOP_SPLIT_PLAN.md. Bound ETXTBSY
retries in temporary executable test fixtures without changing production
behavior or assertions.

Linux validation: workspace/app checks, formatting, workspace Clippy,
architecture checks and 39 Python tests passed. Full workspace tests
passed: 5,953 passed and 37 existing ignored, using a non-root runner with
the desktop parent serialized and subprocess fixtures at eight threads.
2026-11-09 06:39:11 +08:00
Kang 445481f6c7 docs(desktop): record post-merge batch edit verification 2026-11-09 00:08:28 +08:00
Kang 580aae733e fix(transport): isolate zsh injection from persistent history
Use anonymous in-memory zsh history, guard the pop, and emit ready before cleanup can fail. Cover saved history, options, unprivileged PTYs, and all delivery paths. Clean batch editor lint suggestions and record workspace and platform validation.
2026-11-08 21:50:13 +08:00
Kang 7e07ad356b fix(desktop): scope batch edits and make asset selection predictable 2026-11-08 21:35:35 +08:00
Kang bc4c32a854 fix(terminal): route multiline suggestions through paste review
Open the existing paste review from both suggestion entry points, preserving
complete quick commands and replacing the query only after confirmation.
Revalidate the input and session before sending; require bracketed paste for
direct filling and retain explicit line-by-line execution. Preserve literal
newlines through Telnet while sharing input recording and write guards.

Add multiline candidate labels, translations, regression coverage and docs.
No persistence format, dependency or fork revision changes.

Validation: workspace check, test (5863 passed, 37 ignored), fmt check and
clippy --all-targets passed. File permission tests used an unprivileged runner.
Linux Bash, Zsh and Fish PTY checks preserved continuations and blank lines,
with execution only after manual Enter. GUI, Windows and macOS unverified.
2026-11-08 20:02:00 +08:00
Kang c0a20564c4 fix(terminal): restore full-command suggestions and fuzzy filling
Share whole-history and named quick-command search between automatic
suggestions and Alt+R. Keep contextual token supplements in automatic mode,
deduplicate final target lines, and retain whole-command metadata.

Replace confirmed shell input through the shared editing-key encoder, wait
for echo, and require another manual Enter to execute. Remove the legacy
history badge and description without changing stored history formats.

Validation: core completion tests; 57 related desktop tests; workspace
check; cargo fmt check; workspace clippy with all targets. Also verify
manual Enter records the complete replacement command exactly once.

Workspace tests hit an existing read-only permission assertion under root;
the same test passes as nobody. Remaining package tests and doctests pass.
2026-11-08 19:04:49 +08:00
Kang c9ec77efde fix(ci): register updater crate in job selection
Register nyaterm-updater so the workspace coverage guard allows Rust and Docs orchestration to proceed. Cover updater source changes selecting the Rust job set.

Validated the 30 selection tests and all 199 common script tests (3 platform tests skipped).
2026-11-07 11:49:08 +08:00
Kang d5a44ac3e3 refactor(desktop): extract updater and recording pipeline
Move native update execution into nyaterm-updater and the recording writer into nyaterm-recording. Keep desktop state, progress UI, scheduling, and lifecycle ownership in place; preserve existing data and helper contracts.

Update crate boundary checks, release validation ownership, and architecture documentation. Linux workspace checks, Clippy, formatting, all test executables, and doctests were validated; file tests ran without root privileges.
2026-11-07 11:44:25 +08:00
Kang c092b70736 feat(ci): add Rust toolchain and formatting configuration
- Introduced `rust-toolchain.toml` to specify Rust version 1.99.1 with a minimal profile.
- Added `rustfmt.toml` to enforce the 2024 edition style for Rust formatting.
- Updated GitHub Actions workflows to read the Rust toolchain version dynamically and adjusted caching strategies accordingly.
- Enhanced CI workflows with orchestrate jobs for better job selection and dependency management.
- Implemented scheduled runs for CI workflows to ensure regular checks.
2026-11-07 10:55:14 +08:00
Kang 669049e682 refactor(desktop): extract AI and cloud storage adapters
Move native AI and cloud-storage implementations into UI-independent crates
while preserving desktop entry points, runtime ownership and data contracts.

Share cloud fixtures behind test-support, retain compatibility coverage and
enforce dependency boundaries for the new crates.

Validated on Windows with workspace check, tests (one build job and one test
thread), fmt and clippy, plus architecture checks and their unit tests.
2026-11-07 01:03:27 +08:00
Kang 3c11a4a57c Merge pull request #1106 from jayxuz/compat/glibc231-opengl
feat(linux): 添加 glibc 2.31 兼容构建、GPU 默认与图标修复
2026-11-06 23:39:04 +08:00
Kang 2c0ea73d88 chore(terminal): merge main and resolve PR 1098 conflicts
Keep both sets of desktop test dependencies, recording and role-setting methods, and terminal regression tests. Adapt the stale-history event test to the unified snapshot API. Windows workspace check, 5,598 tests, clippy, fmt, and architecture checks pass; earlier performance data remains labeled as pre-merge.
2026-11-06 22:37:59 +08:00
Kang 51b5e00632 test(terminal): add reproducible keyword highlighting probes
Compare immutable release binaries across the ancestor, original PR, and optimized tree. Add an opt-in native GPUI probe, capture resource and latency distributions, and resume missing samples after failed processes.
2026-11-06 22:13:25 +08:00
Kang 0569c4e7b1 refactor: terminal history management and selection handling (#1043)
- Change the visibility of the `terminal` module to `pub(crate)` to limit its scope.
- Introduce `TerminalHistoryChange` struct to encapsulate changes in terminal history.
- Update `TerminalHistoryState` to provide a method for calculating changes since a previous state.
- Refactor snapshot handling to support reanchoring of history without copying rows.
- Enhance selection handling to preserve direction and sides while clipping evicted rows.
- Add tests to verify the behavior of history changes, selection reanchoring, and eviction handling.
- Ensure that retained history correctly shares rows and rejects evicted or mutable windows.
2026-11-06 17:21:20 +08:00
Kang 833d6d357c fix(ci): stabilize cross-platform regression tests
Use platform-aware copy and select-all shortcuts in transcript tests.
Route the mock AI server through the joinable thread factory and register
the model-row fixture's caller-owned scroll handle in the architecture allowlist.

Skip Ubuntu's global compinit in the isolated Zsh startup fixture, which
otherwise waits for insecure-directory confirmation before reporting shell
identity. Reproduced the original failure and verified the fix on Ubuntu 24.04.

Make the event-pump regression enter connect settling explicitly and derive
its paced drain count from the existing 4 KiB budget. Wait for the post-pull
configuration refresh before submitting recovery in the sync sidebar test.

Validation: workspace check, rustfmt, architecture checks and strict clippy
passed. The event-pump regression passed 10 consecutive runs and the sync
round trip passed three. Workspace tests had one root-only read-only-file
assertion failure; the entire files crate passed as an unprivileged user
(204 tests). Native macOS verification remains for CI.
2026-11-06 14:25:04 +08:00
Kang 557266fc44 feat: Enhance command context handling and shell integration
- Introduced `CommandContext` event to manage shell command contexts more effectively.
- Updated `SessionManager` to create and push command contexts based on shell program and arguments.
- Enhanced `SshShellIntegrationState` to capture shell identities and push command contexts during SSH sessions.
- Added support for dialect detection in WSL environments.
- Implemented a new catalog generation script for offline command completion using Carapace.
- Added performance benchmarks for command completion.
- Updated documentation and tests for the new completion features.
2026-11-06 08:30:53 +08:00
Kang e967621060 feat(agents): introduce new crates for file management and remote operations
- Added `nyaterm-files` for local and remote file services, including SFTP and shell file backends.
- Introduced `nyaterm-remote-ops` for system metrics, process management, and Docker operations.
- Updated `AGENTS.md` to reflect the new crates and their responsibilities.
- Ensured that the new crates remain independent of GPUI and desktop presentation types.
- Updated `Cargo.toml` and `Cargo.lock` to include new dependencies and workspace members.
2026-11-05 22:04:39 +08:00
Kang e23682be80 docs(linux): record compatibility review validation 2026-11-05 19:57:19 +08:00
Kang 1d5381a285 merge(upstream): sync main into glibc compatibility build 2026-11-05 19:51:56 +08:00
Kang 42eede8ef2 fix(linux): harden glibc compatibility packaging 2026-11-05 19:51:47 +08:00
Kang 6076d462c1 fix(ci): select first MSVC linker candidate 2026-11-05 08:48:39 +08:00
Kang d95da58672 fix(ci): use MSVC linker for Windows packaging 2026-11-05 01:00:42 +08:00
Kang 817a54b8e7 fix(release): allow authorized legacy helper cleanup in MSI verification 2026-11-05 00:09:59 +08:00
Kang 15908b7204 refactor(external_process): restructure child process management and enhance cleanup
- Introduced `AgentChild` to manage the lifecycle of external agent processes, ensuring proper cleanup of child processes and their associated resources.
- Updated `ExternalAgentChild` to utilize `AgentChild`, improving the handling of process termination and output capturing.
- Added tests for descendant cleanup behavior on Windows to ensure that child processes are properly terminated and resources are released.
- Refactored related code in `claude_code_runtime` and `codex_runtime` to use the new `spawn` method for process initialization.
- Enhanced shutdown logic in `app_state` to cancel all running agents and chats when closing terminals, improving resource management.
2026-11-04 15:04:27 +08:00
Zhijie Xu ff2ebcdf97 docs(linux): 记录上游同步及 GPU 默认修订版验证 2026-11-04 01:43:39 +00:00
Zhijie Xu 19a48f8f2d build(linux): 支持独立兼容修订版本 2026-11-04 00:53:25 +00:00
Zhijie Xu eefd9da985 merge(upstream): 同步 main 至 a7f53827 并保留 GPU 兼容方案 2026-11-04 00:50:34 +00:00
Zhijie Xu 9733e232a8 fix(linux): 默认优先 GPU 并保留显式 CPU 回退 2026-11-03 09:52:19 +00: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
Zhijie Xu 04477c4412 docs(linux): record 2.0.1 compatibility validation against e855789 2026-11-03 01:54:48 +00:00
Zhijie Xu 4c343583e3 fix(linux): normalize portable archive permissions and ownership 2026-11-03 00:47:52 +00:00
Zhijie Xu e5fb1f083c merge(upstream): sync main through e855789 while preserving Linux compatibility 2026-11-03 00:44:33 +00: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
Zhijie Xu 873422e716 docs(linux): close test attribution with standard debug validation 2026-11-02 06:22:38 +00:00
Zhijie Xu 9846d40cd1 docs(linux): record full workspace validation results and test constraints 2026-11-02 05:21:11 +00: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
Zhijie Xu 8d5b4f7baa test(linux): record focal packaging validation and wait for X11 identity 2026-11-02 04:31:45 +00:00
Zhijie Xu c2a4fadd89 fix(linux): distinguish prereleases from build labels in focal packages 2026-11-02 04:15:11 +00:00
Zhijie Xu d82e7e48d9 feat(linux): make focal Debian packaging reproducible 2026-11-02 04:13:49 +00:00
Zhijie Xu c7906bcb5e fix(linux): package readable icons and match the X11 window class 2026-11-02 04:13:49 +00:00
Zhijie Xu 15c1ceeaeb Merge upstream main into glibc 2.31 compatibility branch 2026-11-02 04:05:45 +00:00
Kang f89a8edb8a feat(portable): implement Windows portable update handling and validation (#1089)
- Added support for testing and validating portable updates on Windows, including handling ARM64 executables.
- Introduced a new module for managing the portable package contract, ensuring consistency between the Rust and Python packaging processes.
- Updated the release workflow to include tests for portable ZIP files, validating their structure and contents against the defined contract.
- Enhanced error handling for portable updates, including recovery mechanisms for failed updates.
- Added comprehensive tests to ensure the integrity and correctness of portable package handling.

This update significantly improves the reliability and user experience of the portable updater, addressing previous issues with ConPTY and ActiveX file handling.
2026-11-01 19:41:17 +08:00
Kang bd2d91ef82 feat(protocols): implement URL protocol handling for Windows
- Added support for registering and unregistering URL protocols on Windows, allowing external applications to invoke NyaTerm.
- Introduced a new module for managing URL protocol registration, including functions for creating, setting, and deleting registry keys.
- Updated the main application logic to handle incoming protocol requests and execute corresponding actions.
- Enhanced the activation request parsing to accommodate new connection types and behaviors.
- Added tests to validate the URL protocol registration and handling functionality.

This update significantly improves the integration of NyaTerm with external applications, enhancing user experience and connectivity options.
2026-11-01 12:41:49 +08:00
Kang 23cad4b366 test(ci): include sync manifest in architecture fixtures 2026-10-31 17:48:01 +08:00