Skip to content

feat(platform): wire target-aware PTY sessions - #45

Merged
decode2 merged 1 commit into
masterfrom
feat/platform-client-wiring
Jul 19, 2026
Merged

feat(platform): wire target-aware PTY sessions#45
decode2 merged 1 commit into
masterfrom
feat/platform-client-wiring

Conversation

@decode2

@decode2 decode2 commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Linked issue

Closes #44

  • The linked issue has the status:approved label.

Pull request type

Select exactly one option and apply the matching type:* label.

  • Bug fix (type:bug)
  • New feature (type:feature)
  • Documentation (type:docs)
  • Refactor (type:refactor)
  • Maintenance or tooling (type:chore)
  • Breaking change (type:breaking-change)

Summary

  • Routes desktop PTY creation through target-aware platform services for shell, argv, PATH, environment, and Linux spawn authority.
  • Preserves Windows session behavior and limits the xterm Windows PTY option to Windows targets.
  • Adds focused backend authority and frontend session wiring coverage without changing lifecycle, backpressure, or restart behavior.

Changes

Area or file Change
apps/desktop/src-tauri/src/lib.rs Applies platform defaults and target authority when creating PTY sessions.
apps/desktop/src-tauri/src/platform/ Exposes target-aware shell and environment inputs while preserving Windows behavior.
apps/desktop/src-tauri/capabilities/linux.json Grants the Linux PTY spawn authority required by the wired session path.
apps/desktop/src/ui/usePtySession.ts Requests platform information and configures frontend sessions by target.
Rust and frontend tests Covers authority manifests, platform wiring, PTY client calls, and Windows-only terminal options.
crates/splice-pty/src/lib.rs Keeps backend session creation aligned with target-provided options.

Test plan

  • Ran the focused automated checks: Rust platform 2/2, authority 3/3, resolver 2/2; frontend 54/54; typecheck, lint, fmt, cargo check, Windows cross-check, and candidate-scoped Clippy passed.
  • Exercised the affected terminal, AI CLI, or desktop workflow: live Unix PTY harness passed 14/14 scenarios.
  • Verified relevant Windows, Linux, or WSL behavior, or documented why it is not applicable: Linux compile-time and live PTY evidence passed; Windows cross-check passed. Native Windows and WSL runtime receipts remain task 3.3.

Verification warnings

  • SDD verification passed with warnings and no blockers. Strict workspace Clippy is blocked only by two unchanged splice-clipboard dead-code warnings; candidate-scoped Clippy with -A dead_code passes.
  • Linux/WSLg root-shell active-process detection does not yet identify child Codex/Claude processes. This behavior-activated limitation is intentionally deferred to task 3.3.

Rollback

Revert commit cfa2254 to remove this complete 10-path wiring unit. The prior platform authority boundary remains intact, and no unrelated or later task behavior is included.

Chained pull request context

  • Previous PR: feat(platform): enforce Tauri command authority #43 (platform authority manifests v2)
  • Next PR: task 3.3, runtime target/process validation
  • Review this PR first: target defaults flowing through Tauri PTY creation, Linux authority, and Windows behavior preservation.
  • Intentionally out of scope: native Windows/WSL runtime receipts, child AI CLI process targeting, and all task 3.3+ implementation.
PR6 #43 platform authority manifests
  |
  v
PR7/16 [THIS] target-aware PTY session wiring
  |
  v
PR8/16 task 3.3 runtime target/process validation (next)

Review budget: 388 authored lines across 10 paths (289 additions, 99 deletions).

Contributor checklist

  • I searched for duplicate issues and pull requests before starting.
  • I linked an approved issue using Closes, Fixes, or Resolves.
  • I selected exactly one pull request type and applied exactly one matching type:* label.
  • I completed every relevant template field and included reproducible test evidence.
  • I updated documentation when behavior or compatibility changed, or confirmed no documentation change is required for this internal wiring slice.
  • My commits follow Conventional Commits.
  • My commits contain no AI attribution, including Co-Authored-By trailers.

@decode2 decode2 added the type:feature Adds or improves functionality label Jul 19, 2026
@decode2
decode2 merged commit be9cbc7 into master Jul 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Adds or improves functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(platform): wire target-aware PTY sessions

1 participant