diff --git a/.docs/flutter-3-50-upgrade/brief.md b/.docs/flutter-3-50-upgrade/brief.md new file mode 100644 index 00000000..f9ccb117 --- /dev/null +++ b/.docs/flutter-3-50-upgrade/brief.md @@ -0,0 +1,5 @@ +# Flutter 3.50 upgrade — brief + +**What:** Move CI and the release builds from Flutter 3.47.1 to the latest stable, **3.50.0** (Dart 3.14, released 2026-11-11). This includes the Android toolchain bumps that 3.50 requires. + +**Why:** The owner asked for the latest Flutter and forui (2026-11-12). forui 0.27.7, the latest version, is the base of the UI redesign. diff --git a/.docs/flutter-3-50-upgrade/changelog.md b/.docs/flutter-3-50-upgrade/changelog.md new file mode 100644 index 00000000..d1c97733 --- /dev/null +++ b/.docs/flutter-3-50-upgrade/changelog.md @@ -0,0 +1,22 @@ +# Changelog + +- 2026-11-12: Started. The owner asked for the latest Flutter and forui. +- 2026-11-12: Flutter 3.50.0 upgrade done on `chore/flutter-3.50` (full detail in `report.md`). + - **CI pin** 3.47.1 → 3.50.0 in `pr-test.yml` and `release.yml`. Tag `3.50.0` exists upstream (ab2912035e) and is in the stable release manifests, so both `subosito/flutter-action` and the ARM64 `git clone -b` steps resolve it. + - **Android toolchain.** Gradle 9.1.0 → 9.5.1, AGP 9.0.1 → 9.3.3, Kotlin 2.3.20 → 2.4.21. Why: Flutter 3.50's Gradle plugin throws below Gradle 9.3.1 / AGP 9.1.1 / KGP 2.4.10 and warns below 9.5.0 / 9.3.1 / 2.4.20. The versions chosen are the newest set inside every compatibility table: + - KGP 2.4.20–2.4.21 documents AGP ≤ 9.3.1, so AGP stays on 9.3.x (9.3.3 is the newest patch; 9.3.2 fixed a lint crash on JDK 17). + - AGP 9.3 needs Gradle ≥ 9.5.0. Flutter 3.50 tests and knows Gradle only up to 9.5.0, so Gradle stays on 9.5.x (9.5.1). + - AGP 9.4 and 9.5 are outside KGP 2.4's documented range, and Kotlin 2.5.0 is only an RC. + - No DSL migration was needed. The app already matches the 3.50 template (`android.newDsl=false`, `android.builtInKotlin=false`, `kotlin { compilerOptions }`). `minSdk` 24, `targetSdk` 36, `compileSdk` 36 and NDK 28.2 are the same in 3.47.1 and 3.50.0. + - `packages/flutter_pty/android` was left unchanged: it has a namespace, no Kotlin, and its buildscript AGP 8.1.0 classpath is shadowed by the app's settings classpath, as before. + - **New `android` job** in `pr-test.yml` runs `flutter build apk --debug`, on JDK 17 and `setup-java` v6 pinned by SHA. The `test` gate now needs it. Before this, the Android build was only exercised by `release.yml` on master, which is how PR #113's breakage went unnoticed. + - **Lock.** `app/pubspec.lock` changed only in SDK-pinned packages: matcher, meta, test_api, stack_trace, clock, vector_math, and the new `listen` dependency of `package:flutter`. All URLs are pub.dev. + - **Generated project migrations (separate commit).** These come from Flutter 3.47.1 too, not from 3.50. The 0.3.0 release build on 3.47.1 printed the same "Upgrading …" lines. Develop simply never committed them, so every local build dirtied the tree. + - `pub get` adds `analyzer.exclude` (`build/**` and the platform folders) to `app/analysis_options.yaml`. The block was moved below `include:`. + - `flutter build macos` raises `MACOSX_DEPLOYMENT_TARGET` / `platform :osx` from 10.15 to 12.0. + - Swift Package Manager is on by default, so `Podfile.lock` only lists the plugins that lack SwiftPM support. + - Shipped builds already target macOS 12.0, so this is not a new user-facing requirement. + - The two Xcode `swiftpm/Package.resolved` files the build creates stay untracked, as in the main checkout. + - **Analyzer.** 0 issues on 3.47.1 → 214 infos on 3.50.0, all `deprecated_member_use` for `package:flutter/material.dart`. The material_ui migration is a separate task. + - **Docs.** CLAUDE.md gained a Toolchain section (the pin and the "bump Android with Flutter" rule). CHANGELOG `[Unreleased]` says "Built with Flutter 3.50". +- 2026-11-12: PR #120 green (incl. new android job; only notice: third-party plugins still apply KGP); merged into develop. diff --git a/.docs/flutter-3-50-upgrade/context.md b/.docs/flutter-3-50-upgrade/context.md new file mode 100644 index 00000000..b2302192 --- /dev/null +++ b/.docs/flutter-3-50-upgrade/context.md @@ -0,0 +1,16 @@ +# Context + +**Earlier attempt.** CI was pinned to 3.47.1 in PR #113, because Flutter 3.50 rejected the Android toolchain. +- Flutter 3.50 requires Gradle ≥ 9.3.1, AGP ≥ 9.1.1 and Kotlin ≥ 2.4.10. +- The app uses Gradle 9.1.0, AGP 9.0.1 and Kotlin 2.3.20. + +**Pins** (`FLUTTER_VERSION`): +- `.github/workflows/pr-test.yml` +- `.github/workflows/release.yml`, which also has two `git clone -b $FLUTTER_VERSION` steps for Windows and Linux. + +**Android modules:** +- `app/android` +- `packages/flutter_pty/android` (local fork) +- any other plugin package that has an `android/` directory + +**Analyzer.** About 215 analyzer infos come from material.dart deprecations in 3.47+. CI uses `--no-fatal-infos`. diff --git a/.docs/flutter-3-50-upgrade/plan.md b/.docs/flutter-3-50-upgrade/plan.md new file mode 100644 index 00000000..521bcd2e --- /dev/null +++ b/.docs/flutter-3-50-upgrade/plan.md @@ -0,0 +1,7 @@ +# Plan + +1. Bump `FLUTTER_VERSION` to 3.50.0 in every workflow. +2. Bump Android Gradle, AGP and Kotlin to Flutter 3.50's minimums or later, in app and in the forked plugin modules. Migrate any AGP 9 DSL breakages. +3. Run `flutter pub get` on 3.50. The lock must contain only pub.dev URLs. +4. Run `flutter analyze` (0 errors) and `flutter test` (green). Build macOS and Android (`flutter build apk --debug`) locally. +5. Open a PR and get CI green. diff --git a/.docs/flutter-3-50-upgrade/report.md b/.docs/flutter-3-50-upgrade/report.md new file mode 100644 index 00000000..bab894fa --- /dev/null +++ b/.docs/flutter-3-50-upgrade/report.md @@ -0,0 +1,59 @@ +# Flutter 3.50 upgrade — report + +## Versions + +| | Before | After | Flutter 3.50 rejects below / warns below | +|---|---|---|---| +| Flutter | 3.47.1 | **3.50.0** (Dart 3.14.0) | — | +| Gradle | 9.1.0 | **9.5.1** | 9.3.1 / 9.5.0 | +| AGP | 9.0.1 | **9.3.3** | 9.1.1 / 9.3.1 | +| Kotlin | 2.3.20 | **2.4.21** | 2.4.10 / 2.4.20 | +| JDK | 17 | 17 | — | + +`minSdk`, `targetSdk`, `compileSdk` and the NDK version are unchanged. + +Each version is the newest that all parties document as compatible: +- **Kotlin 2.4.21** is the newest stable release. +- **AGP 9.3.3:** Kotlin 2.4 supports AGP up to 9.3.x. +- **Gradle 9.5.1:** AGP 9.3 needs Gradle 9.5 or later. +- **AGP 9.4 and 9.5 are excluded.** They need Gradle 9.6, which is outside the AGP range Kotlin 2.4 supports. + +Sources: +- Flutter SDK 3.50.0: `DependencyVersionChecker.kt` and `gradle_utils.dart` +- kotlinlang.org, the Gradle compatibility table +- The AGP 9.3, 9.4 and 9.5 release notes + +## Changes + +- **CI pins.** `pr-test.yml` and `release.yml` move to 3.50.0. +- **New `android` job in pr-test.** It runs `flutter build apk --debug` with Temurin 17, has a 30-minute timeout and needs no secrets. It is part of the `test` aggregate. +- **Android build files.** `gradle-wrapper.properties` now points to Gradle 9.5.1. `settings.gradle.kts` now uses AGP 9.3.3 and Kotlin 2.4.21. +- **Lockfile.** Only the versions the 3.50 SDK forces changed: + + | Package | Version | + |---|---| + | clock | 1.1.3 | + | matcher | 0.12.20 | + | meta | 1.19.0 | + | stack_trace | 1.12.2 | + | test_api | 0.7.14 | + | vector_math | 2.4.4 | + | listen | 1.0.1 (new) | + + All URLs are on pub.dev. +- **Generated project migrations committed.** These are the `analysis_options` excludes, the macOS deployment target 12.0, and the Podfile/SPM change. The 0.3.0 release build already applied them, but develop never committed them. + +## Verification + +- **Analyze:** 0 errors, 0 warnings, 214 infos. The infos are `deprecated_member_use` warnings about material.dart. +- **App tests:** 2023 passed, 3 skipped. +- **Bridge tests:** rdp and vnc pass. +- **macOS build:** `flutter build macos --debug` succeeds. +- **Android:** verified only by the new CI job, since there is no Android SDK locally. + +## Risks + +- Only master runs the release-only builds: the release APK, the Windows and Linux desktop builds, and the macOS release build. +- `flutter analyze --suggestions` caps the AGP 9.3 template at Gradle 9.5.0. This is a tooling cap, not a build break. +- AGP 10 will remove the old DSL, including `newDsl=false`, `builtInKotlin=false` and the `BaseExtension` compileSdk hack. +- `release.yml` still uses setup-java v4, which only produces a deprecation warning. diff --git a/.docs/ui-redesign/brief.md b/.docs/ui-redesign/brief.md new file mode 100644 index 00000000..0f96e4b4 --- /dev/null +++ b/.docs/ui-redesign/brief.md @@ -0,0 +1,9 @@ +# UI redesign with forui — brief + +**What:** Redesign every YourSSH screen on the forui design system, "Amber Brand" direction (B): dark stone neutrals, amber accent, bundled Inter font, Lucide icons. Same look on macOS, Windows, Linux, Android and iOS. + +**Why:** The owner finds every screen unattractive and inconsistent across platforms. + +**Docs:** +- Spec: `docs/superpowers/specs/2026-11-12-yourssh-ui-redesign-design.md` +- Mockups: `docs/superpowers/specs/assets/ui-redesign/` diff --git a/.docs/ui-redesign/changelog.md b/.docs/ui-redesign/changelog.md new file mode 100644 index 00000000..8e3c58c9 --- /dev/null +++ b/.docs/ui-redesign/changelog.md @@ -0,0 +1,10 @@ +# Changelog + +- 2026-11-12: Built the spike: 3 directions, 18 screenshots. The owner chose B. +- 2026-11-12: Spec written. A builder check raised 6 questions, all settled as defaults (see "Decided here"). +- 2026-11-12: Phase 0–1 plan written. +- 2026-11-12: Phase 0 done (PR #118, awaiting owner OK). Phase 1 tasks 7-9 done on feature/ui-shell. Phases 2-6 plan written (17 tasks). +- 2026-11-12: Phase 1 (shell) done on feature/ui-shell. +- 2026-11-12: Phases 2-6 plan written and executed (phases 2-5 desktop, phase 6 mobile); Task 17 token sweep, lint gate and docs done. +- 2026-11-13: Final review fix round (P30): host editor remounts per edit target (data-loss fix), mail catcher skips the ESMTP options preamble, confirms for dashboard host Delete and Known Hosts Remove, terminal header and status bar follow host edits, proxy port range check, discovery and monitor sheets plus inline rename and fallback editor on forui, lint gate extended, `yourssh_web_tools` in the plugin CI matrix, watch banner cue restored, docs completed. +- 2026-11-13: Docs user-journey harness (app/integration_test/docs/) drove the final app against demo containers and captured 208 screenshots (untracked, screenshots/docs/). Its findings plus a controller review of every shot gave 22 fixes in 4 parallel worktrees (P31), incl. a pre-existing snippets data-loss bug from the half-migrated bundled JS Snippets plugin (P32). Journey re-run clean; README screenshots refreshed from it. diff --git a/.docs/ui-redesign/context.md b/.docs/ui-redesign/context.md new file mode 100644 index 00000000..153c8144 --- /dev/null +++ b/.docs/ui-redesign/context.md @@ -0,0 +1,20 @@ +# Context + +**Spike.** forui 0.27.7 needs Flutter >=3.47 and Dart >=3.13. The app now builds on Flutter 3.50.0 (CI pins it). The throwaway spike lives in the session scratchpad. + +**Current UI.** +- Palette: `AppColors` with a green accent, plus a separate mobile palette `MobileColors`/`MobileTokens`. +- Theme: Material `buildAppTheme()`; mobile uses `google_fonts`, which fetches fonts at runtime. +- `AppColors.accent`: 193 uses in 46 files. Some mean "success", others mean "primary". +- Material widgets: 117 of 261 files import Material. + +**Shell.** The shell is inside `app/lib/screens/main_screen.dart`: `_Sidebar` and `_TopTabBar` (1842 lines). Session tab: `app/lib/widgets/session_tab.dart`. + +**Terminal theme.** "YourSSH Dark" already exists in the catalog. The new default is therefore named "YourSSH Amber" and applies to new installs only. + +**State after phases 2-6.** +- The whole app (desktop and mobile) and the Snippets, DevOps and Web Tools plugins are on forui and the `yourssh_ui` components (`YsTab`, `YsFileTable`, `YsHostCard`, `YsStatusBar`, `YsPluginHost`, dialogs, toasts). +- `AppColors` and `MobileColors` stay as `@Deprecated` aliases of `YsColors`. +- `tool/check_ui_lint.sh` blocks Material `IconButton(`, `AlertDialog(`, `SnackBar(`, `Icons.`, `ScaffoldMessenger`, `showDialog(`, `showModalBottomSheet` and `TextField(`; the allowlist is empty. +- The host editor (`HostDetailPanel`) reads `existing` only in `initState`, so the shell mounts it with `hostEditorKey(editing, serial)`. +- Terminal header chips and the status bar read the host through `selectLiveHost` (fresh `HostProvider` lookup, snapshot fallback). diff --git a/.docs/ui-redesign/plan.md b/.docs/ui-redesign/plan.md new file mode 100644 index 00000000..8d368f5e --- /dev/null +++ b/.docs/ui-redesign/plan.md @@ -0,0 +1,7 @@ +# Plan + +- Phases 0-1 plan: `docs/superpowers/plans/2026-11-12-yourssh-ui-redesign-phase0-1.md` (done: foundation + shell). +- Phases 2-6 plan: `docs/superpowers/plans/2026-11-12-yourssh-ui-redesign-phase2-6.md` (done: dialogs and settings, hosts/dashboard/editor, terminal workspace, SFTP and tools, web tools, mobile). +- Task 17: token sweep, `AppColors`/`MobileColors` deprecated aliases, UI lint gate (`tool/check_ui_lint.sh`), CLAUDE.md and CHANGELOG. +- Final whole-branch review fix round (ruling P30): host editor reset, mail parser, delete/host-key confirms, live host in header and status bar, proxy port range, remaining Material sheets and fields, lint extension, CI for `yourssh_web_tools`, docs. +- Decision ledger and rulings P1-P30: `.superpowers/sdd/2026-11-12-yourssh-ui-redesign-phase2-6/progress.md`. diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index ccd10431..4ae237a9 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -19,11 +19,13 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -# Flutter is pinned: the stable channel moved to 3.50, which deprecates -# package:flutter/material.dart and requires Gradle >= 9.3.1 / AGP >= 9.1.1 / -# Kotlin >= 2.4.10 for Android. Bump this together with that migration. +# Flutter is pinned so a new stable release never changes CI under an open PR. +# Bump it together with release.yml and with the Android toolchain in +# app/android (Gradle wrapper, AGP and Kotlin in settings.gradle.kts): each +# Flutter release raises the minimum versions its Gradle plugin accepts, and +# the `android` job below is what proves the pair still builds. env: - FLUTTER_VERSION: 3.47.1 + FLUTTER_VERSION: 3.50.0 jobs: # The app suite needs no Rust at all: nothing under app/test loads the native @@ -62,6 +64,63 @@ jobs: working-directory: app run: flutter test + # forui-based UI kit: pure Dart widgets, no native bridge, so a small job. + ui: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + + - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + flutter-version: ${{ env.FLUTTER_VERSION }} + + # Pure shell, no Flutter needed: fails on new Material IconButton / + # AlertDialog / SnackBar / Icons. / ScaffoldMessenger outside yourssh_ui. + - name: UI lint gate + run: | + bash tool/check_ui_lint_selftest.sh + bash tool/check_ui_lint.sh + + - name: Install dependencies + working-directory: packages/yourssh_ui + run: flutter pub get + + - name: Analyze (yourssh_ui) + working-directory: packages/yourssh_ui + run: flutter analyze --no-fatal-infos + + - name: Test (yourssh_ui) + working-directory: packages/yourssh_ui + run: flutter test + + # Plugin packages built on yourssh_ui; pure Dart/Flutter, no native bridge. + plugins: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: [yourssh_snippets, yourssh_devops, yourssh_web_tools] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + + - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Install dependencies + working-directory: packages/${{ matrix.package }} + run: flutter pub get + + - name: Analyze (${{ matrix.package }}) + working-directory: packages/${{ matrix.package }} + run: flutter analyze --no-fatal-infos + + - name: Test (${{ matrix.package }}) + working-directory: packages/${{ matrix.package }} + run: flutter test + # One job per Rust crate. The cargo tests, build.sh and the Dart bridge tests # stay together on purpose: both cargo invocations use --release, so the # library build reuses the test build's compilation. Splitting them across jobs @@ -98,6 +157,95 @@ jobs: working-directory: packages/${{ matrix.crate }} run: flutter test + # Debug APK only: proves the Android toolchain (Gradle / AGP / Kotlin in + # app/android) still satisfies the pinned Flutter's Gradle plugin and that + # every Android plugin module, including the flutter_pty fork's CMake build, + # still compiles. It needs no secrets: debug builds sign with the debug key + # the Android SDK generates, and the mobile UI is SSH-only, so no Rust + # libraries are built (same as release.yml's build-android). + android: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + + # AGP 9 needs JDK 17 or newer; 17 matches release.yml's build-android. + - uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6 + with: + distribution: temurin + java-version: '17' + + - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Install dependencies + working-directory: app + run: flutter pub get + + - name: Build debug APK + working-directory: app + run: flutter build apk --debug + + # Pure-Dart CLI protocol package: no Flutter, no native libs. + cli: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + + - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Install dependencies + working-directory: packages/yourssh_cli + run: dart pub get + + - name: Test (yourssh_cli) + working-directory: packages/yourssh_cli + run: dart test + + - name: Compile smoke (yourssh_cli) + working-directory: packages/yourssh_cli + run: dart compile exe bin/yourssh.dart -o "$RUNNER_TEMP/yourssh" + + # The Windows CLI endpoint (named pipe, DACL, SID checks, cli.lock) only + # runs on Windows: the package suite, a compile smoke and the app's CLI + # tests on a real runner. No app build. + windows-cli: + runs-on: windows-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + + - uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2 + with: + channel: stable + flutter-version: ${{ env.FLUTTER_VERSION }} + + - name: Install dependencies (yourssh_cli) + working-directory: packages/yourssh_cli + run: dart pub get + + - name: Test (yourssh_cli) + working-directory: packages/yourssh_cli + run: dart test + + - name: Compile smoke (yourssh_cli) + working-directory: packages/yourssh_cli + shell: bash + run: dart compile exe bin/yourssh.dart -o "$RUNNER_TEMP/yourssh.exe" + + - name: Install dependencies (app) + working-directory: app + run: flutter pub get + + - name: Test (app CLI services) + working-directory: app + run: flutter test test/services/cli/ + # Aggregate gate. master's branch protection requires a check literally named # "test", so that name has to survive the split — this job carries it, and it # is red unless every job above is green. `always()` matters: without it the @@ -105,12 +253,16 @@ jobs: # forever instead of failing. test: name: test - needs: [app, bridge] + needs: [app, ui, bridge, android, cli, windows-cli] if: always() runs-on: ubuntu-latest steps: - name: Check job results run: | - echo "app=${{ needs.app.result }} bridge=${{ needs.bridge.result }}" + echo "app=${{ needs.app.result }} ui=${{ needs.ui.result }} bridge=${{ needs.bridge.result }} android=${{ needs.android.result }} cli=${{ needs.cli.result }} windows-cli=${{ needs.windows-cli.result }}" [ "${{ needs.app.result }}" = "success" ] || exit 1 + [ "${{ needs.ui.result }}" = "success" ] || exit 1 [ "${{ needs.bridge.result }}" = "success" ] || exit 1 + [ "${{ needs.android.result }}" = "success" ] || exit 1 + [ "${{ needs.cli.result }}" = "success" ] || exit 1 + [ "${{ needs.windows-cli.result }}" = "success" ] || exit 1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c53668eb..a67105b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,11 +11,11 @@ on: permissions: contents: read -# Flutter is pinned: the stable channel moved to 3.50, which deprecates -# package:flutter/material.dart and requires Gradle >= 9.3.1 / AGP >= 9.1.1 / -# Kotlin >= 2.4.10 for Android. Bump this together with that migration. +# Flutter is pinned (also the git tag the ARM64 Windows/Linux jobs clone). +# Keep it equal to pr-test.yml, whose `android` job proves the Android +# toolchain in app/android still builds with this version. env: - FLUTTER_VERSION: 3.47.1 + FLUTTER_VERSION: 3.50.0 jobs: test: @@ -370,6 +370,10 @@ jobs: $iss += "`r`n[Icons]`r`n" $iss += "Name: `"{group}\YourSSH`"; Filename: `"{app}\yourssh.exe`"`r`n" $iss += "Name: `"{commondesktop}\YourSSH`"; Filename: `"{app}\yourssh.exe`"`r`n" + $iss += "`r`n[Registry]`r`n" + $iss += "Root: HKCU; Subkey: `"Software\Classes\yourssh`"; ValueType: string; ValueData: `"URL:YourSSH`"; Flags: uninsdeletekey`r`n" + $iss += "Root: HKCU; Subkey: `"Software\Classes\yourssh`"; ValueType: string; ValueName: `"URL Protocol`"; ValueData: `"`"`r`n" + $iss += "Root: HKCU; Subkey: `"Software\Classes\yourssh\shell\open\command`"; ValueType: string; ValueData: `"`"`"{app}\yourssh.exe`"`" `"`"%1`"`"`"`r`n" $iss += "`r`n[Run]`r`n" $iss += "Filename: `"{app}\yourssh.exe`"; Description: `"Launch YourSSH`"; Flags: nowait postinstall skipifsilent`r`n" $iss | Out-File -FilePath "installer.iss" -Encoding UTF8 @@ -488,10 +492,11 @@ jobs: cat > "$PKG/usr/share/applications/yourssh.desktop" << 'DESKTOP' [Desktop Entry] Name=YourSSH - Exec=/usr/share/yourssh/yourssh + Exec=/usr/share/yourssh/yourssh %u Icon=yourssh Type=Application Categories=Network; + MimeType=x-scheme-handler/yourssh; DESKTOP cat > "$PKG/DEBIAN/control" << CTRL diff --git a/CHANGELOG.md b/CHANGELOG.md index 0216efe4..59b4a6be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.0] — 2026-11-13 + +A new look (forui "Amber Brand" design system on desktop and mobile), a `yourssh` command-line client with `yourssh://` links, and a round of fixes found by driving the finished app end to end. + +### Added +- **`yourssh` command-line client (phase 1, macOS, Linux and Windows, run from source)** — `yourssh connect `, `ls [--json] [--tag T] [--filter Q]`, `version`, `open ` and `help` talk to the running app (NDJSON protocol v1) and start the app if it is not running. Hosts resolve by id, label or `user@host[:port]`; ad-hoc `user@host[:port]` works from the CLI only and signs in with the SSH agent's keys (a password-only server needs a saved host). `yourssh version` never starts the app. A debug build of the app uses its own endpoint (`YourSSH-dev`, `\\.\pipe\yourssh-cli-dev-`); the CLI reaches it with `YOURSSH_DEV=1`. macOS/Linux: a per-user Unix socket, 0600 in a 0700 run dir, that checks the peer uid. Windows: the named pipe `\\.\pipe\yourssh-cli-` with a current-user-only DACL and remote clients rejected; the app drops clients running as another user, and the CLI checks the pipe's server the same way before sending anything (a pipe owned by another user exits 4). Every request carries a token rotated at every launch, and the app is single-instance on all three (a second launch, including a clicked link, is handed to the running app before it starts anything else). Exit codes: 0 ok, 1 error, 2 usage, 3 app unreachable, 4 denied. Not yet: packaging the CLI binary in releases (today `yourssh` in a release is the GUI app) and an install button, `sftp`/`tunnel`/`import`/`export`, MCP. +- **`yourssh://connect/` links** — open a saved host from a browser or script; saved hosts only, repeats of the same link within 2 s are ignored, and a refused link (unknown host, unsupported form) is listed in the notification bell. The scheme is registered by the macOS app, the Windows installer (current user) and the Linux .deb; the portable zip and tarball do not register it. +- **Audit source for CLI and URL connects** — SSH connect rows carry `meta.source` = `cli` / `url`; RDP and VNC rows keep `source: rdp|vnc` and carry `via` = `cli` / `url`. + +### Fixed +- A new SSH session shows a single prompt; the prompt printed before the invisible shell-integration setup no longer stays behind as an empty line. +- **Snippets no longer disappear after allowing the bundled "Snippets" plugin.** Earlier builds shipped a half-migrated script copy of Snippets that moved your snippets out of the built-in plugin's storage on first load and then failed, so the next launch showed only the defaults. The script copy is no longer installed, a leftover copy in `~/.yourssh/plugins/snippets` is ignored (script plugins can't reuse a built-in plugin's id), and the moved snippets are restored once at startup (merged, no duplicates). +- Bulk "Run command" no longer reports `exit -1` for fast commands: the SSH layer kept an exit status that arrived before the session was ready. The footer counts non-zero exits separately (`N ok · M non-zero exit · K failed`) and an unknown exit status is shown as such. +- A host whose name doesn't resolve no longer sits on "Connecting…" forever: the TCP dial times out after 15 s and the connecting screen shows the last error with the retry attempt. +- Entering RDP/VNC fullscreen no longer raises a framework error; the first RDP connect shows a neutral "verifying certificate" state behind the trust dialog instead of an error with Retry; Retry buttons have a normal width. +- Shell-integration gutter markers follow their prompt line and disappear on `clear` instead of floating on empty rows. +- Field errors in the host editor and port-forward editor clear as soon as the value is fixed, and the port error fits on one line. +- The hosts toolbar fits the 900×600 minimum window (lower-priority controls collapse into a menu); the Mail Catcher and AI chat titles no longer truncate with room to spare; multi-line Web Tools editors start at the top; the mobile Generate/Import key sheets have an opaque surface; Esc closes the LAN-sync QR dialog. +- SFTP shows readable errors (e.g. '"releases" already exists') instead of raw `SftpStatusError` codes when creating or renaming. +- An empty split pane explains how to fill it; remaining all-caps buttons and titles (Keychain, Port forwarding, Audit log, bulk dialogs) use sentence case. +- **The host editor no longer leaks one host's form into another.** Opening "Edit" on a second host (or "New host" / "Duplicate") while the editor was open kept the first host's fields, and Save wrote them (including the password) into the second host. +- The terminal header and status bar follow edits to the host (label, user, tags, jump chain) instead of showing the values from when the tab was opened. +- Mail catcher: messages whose log starts with ESMTP options (`mail options: ['BODY=8BITMIME']`) are no longer dropped; the body is parsed separately from the headers, *Clear all* persists, and the log is written unbuffered in append mode. +- Port validation ("Invalid (1–65535)") in both host editors (SSH/RDP/VNC port and proxy port), port forwarding and the Cloudflare tunnel panel; an empty port keeps its default. +- Deleting a host also removes its stored proxy password. +- The mobile sync code and anonymous key are hidden behind a reveal toggle. +- The status bar also shows in RDP and VNC sessions. +- Terminal search and input bars keep or return focus correctly (Esc, Enter, clicking away). +- The read-only "Watching" banner has its own informational colour again. +- Session and DevOps result tabs can be selected and closed from the keyboard (Tab to a tab, Enter/Space to select, Tab again to its close button). +- List items in bottom sheets on mobile are at least 44 px tall. +- The Cloudflare tunnel panel shows "Required" / "Invalid (1–65535)" for a missing label or a bad port instead of silently adding nothing or falling back to 3000 (an empty port still means 3000). + +### Changed +- **New confirmations:** clearing captured mail in the Mail Catcher, deleting a host from the dashboard card menu, removing a Known Hosts entry (its pinned key), Sync *Disconnect*, Docker Compose *Down* and opening an executable file externally now ask first; the safe choice has default focus. +- **SFTP click model:** on both panels a single click selects, and double-click or Enter opens. +- **Host editor:** a *Delete* button was added to the footer and the *CONNECT* button was removed. +- **AI chat:** Enter sends, Shift+Enter inserts a new line. +- **New look:** the app moves to the Amber Brand palette (warm dark surfaces, amber accent), the Inter font and a forui-based UI foundation on desktop and mobile. +- **New "YourSSH Amber" terminal theme**, the default for new installs. Existing installs keep their current terminal theme. +- Built with Flutter 3.50. +- **New sidebar** with grouped sections and an amber selected item. +- **New tab bar** for sessions, with the active tab marked in amber. +- **New toasts** for notifications, shown bottom-right on desktop. +- **UI clean-up:** a lint gate (`tool/check_ui_lint.sh`, run in PR CI) keeps Material `IconButton`/`AlertDialog`/`SnackBar`/`Icons`/`ScaffoldMessenger` out of the app and the plugin packages, remaining colour literals moved to tokens, the discovery and server-monitor sheets and the inline tab rename / fallback code editor fields moved to forui, the gate also rejecting `showDialog(`, `showModalBottomSheet` and `TextField(`, and `AppColors`/`MobileColors` are now `@Deprecated` aliases of the new tokens (kept rather than deleted, to avoid churn across ~460 call sites). +- **New dialogs** across the app; security prompts (host key, RDP certificate) now focus the safe choice by default. + +--- + ## [0.3.0] — 2026-11-12 ### Performance diff --git a/CLAUDE.md b/CLAUDE.md index 1a33ec93..24ddb41f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -24,6 +24,14 @@ cd app && flutter test test/services/sync_service_test.dart # single test file cd app && flutter test --name "pattern" # filter by test name ``` +## Toolchain + +- **Flutter is pinned** in CI: `FLUTTER_VERSION` in `.github/workflows/pr-test.yml` and `release.yml` (currently 3.50.0; release.yml also clones that tag for the ARM64 Windows/Linux runners). Keep both files equal. +- **Bump the Android toolchain with Flutter.** Each Flutter release raises the minimum Gradle / AGP / Kotlin its Gradle plugin accepts (3.50: Gradle ≥ 9.3.1, AGP ≥ 9.1.1, Kotlin ≥ 2.4.10) and fails the Android build below them. They live in `app/android/gradle/wrapper/gradle-wrapper.properties` and the `plugins {}` block of `app/android/settings.gradle.kts` (now Gradle 9.5.1, AGP 9.3.3, Kotlin 2.4.21). The `android` job in `pr-test.yml` (`flutter build apk --debug`) is the check; there is no other Android build before a release. +- `app/android/gradle.properties` keeps the Flutter template's `android.newDsl=false` and `android.builtInKotlin=false`: the root `build.gradle.kts` forces plugin `compileSdk` through the old-DSL `BaseExtension`, and several pub plugins (mobile_scanner, network_info_plus, package_info_plus, …) still apply the Kotlin Gradle plugin themselves. +- `flutter analyze` runs with `--no-fatal-infos` in CI: on 3.50 about 214 infos are `package:flutter/material.dart` deprecations (the material_ui migration is a separate task). Warnings and errors still fail. +- Flutter (3.47 and later) migrates project files on its own, and those changes are committed so builds leave the tree clean. `pub get` adds `build/**` and the platform folders to `analyzer.exclude` in `app/analysis_options.yaml`. `flutter build macos` raises the macOS deployment target to 12.0 (`Podfile`, `project.pbxproj`) and moves the plugins that support Swift Package Manager out of `Podfile.lock`. + ## App icon Every platform icon is generated from the vector masters in `assets/branding/` — @@ -74,9 +82,10 @@ The active codebase is `app/` — a Flutter app targeting macOS, Windows, and Li **Monorepo layout:** - `app/` — the Flutter app - `packages/yourssh_rdp` — **Rust RDP client** (IronRDP 0.15, flutter_rust_bridge v2); exposes `RdpClient` + `RdpConfig`, a `StreamSink` event bus, and `rdp_lib_version()`; `RdpClient.ensureInitialized()` lazily loads the native library + inits the FRB runtime on first RDP connect (no init in main.dart); `RdpConfig.expectedFingerprint` carries the pinned cert fingerprint — the Rust engine verifies it post-TLS / **pre-CredSSP** and aborts with `RdpEvent.certMismatch` before any credentials are sent (TLS itself uses no cert verification — the pin is the only server check); an unpinned host is connected with the sentinel `kRdpUnpinnedProbe` (`app/lib/models/rdp_session.dart`) so the first connect also stops pre-CredSSP, `RdpSession.isFirstUseProbe` routes the reported fingerprint to the first-use trust dialog (`rdpCertVerifier`), and only after the user pins it does `SessionProvider` reconnect with the real pin — credentials never reach an unaccepted cert; `RdpEvent.connected` carries the **server-negotiated** desktop size (may differ from the request); dirty rects are inclusive-rectangle corrected (+1) and clamped before extraction; the run loop peeks every X224 frame for an MCS Disconnect Provider Ultimatum (server-side session end: remote sign-out / session takeover / admin disconnect) and turns it into a graceful `RdpEvent.disconnected` — ironrdp-session 0.9's x224 processor would otherwise surface it as a raw decode error; build scripts produce `libyourssh_rdp.dylib` / `.so` / `.dll` which the Dart `NativeLoader` resolves at runtime from the app bundle (release) or `assets/native/` (dev); the built libraries are **not tracked in git** (`assets/native/` is gitignored — run `build.sh`/`build.ps1` once after clone; CI builds them fresh) -- `packages/dartssh2` — **local fork** of dartssh2; overrides the pub.dev version via `dependency_overrides` in `app/pubspec.yaml`; adds `signAsync()` for agent-backed auth and SSH agent forwarding (sends `auth-agent-req@openssh.com` on shell channels only — never exec; accepts server-opened `auth-agent@openssh.com` channels via `SSHClient.agentHandler` **only after the server accepted an `auth-agent-req` from this client** (otherwise administratively-prohibited); agent frames are capped at 256 KiB and a peer overrunning the local window loses the channel; any packet-parse failure closes the transport with `SSHPacketError` (no hung `authenticated`); DH group exchange rejects primes outside 1024–8192 bits and out-of-range g / f; a refused request is non-fatal and surfaces as `SSHSession.agentForwardingRefused`); implements strict KEX (`kex-strict-c/s-v00@openssh.com`, CVE-2023-48795 "Terrapin" mitigation: sequence numbers reset after every NEWKEYS, non-KEX messages during the initial key exchange terminate the connection, KEXINIT must be the first packet); adds `OpenSSHEd25519KeyPair.generate()` and a passphrase-encrypting `toPem({passphrase})` (bcrypt-pbkdf + aes256-ctr; null passphrase output unchanged, interop-verified against real `ssh-keygen -y`) +- `packages/dartssh2` — **local fork** of dartssh2; overrides the pub.dev version via `dependency_overrides` in `app/pubspec.yaml`; adds `signAsync()` for agent-backed auth and SSH agent forwarding (sends `auth-agent-req@openssh.com` on shell channels only — never exec; accepts server-opened `auth-agent@openssh.com` channels via `SSHClient.agentHandler` **only after the server accepted an `auth-agent-req` from this client** (otherwise administratively-prohibited); agent frames are capped at 256 KiB and a peer overrunning the local window loses the channel; any packet-parse failure closes the transport with `SSHPacketError` (no hung `authenticated`); DH group exchange rejects primes outside 1024–8192 bits and out-of-range g / f; a refused request is non-fatal and surfaces as `SSHSession.agentForwardingRefused`); implements strict KEX (`kex-strict-c/s-v00@openssh.com`, CVE-2023-48795 "Terrapin" mitigation: sequence numbers reset after every NEWKEYS, non-KEX messages during the initial key exchange terminate the connection, KEXINIT must be the first packet); adds `OpenSSHEd25519KeyPair.generate()` and a passphrase-encrypting `toPem({passphrase})` (bcrypt-pbkdf + aes256-ctr; null passphrase output unchanged, interop-verified against real `ssh-keygen -y`; reply-less channel requests (`exit-status`, `exit-signal`) that arrive before a session installs its request handler are buffered (max 16) and replayed by `setRequestHandler` — a fast exec could otherwise lose its exit status, which surfaced as `exit -1` in bulk runs) - `packages/flutter_pty` — **local fork** of flutter_pty 0.4.2 (also via `dependency_overrides`); patches `src/flutter_pty_win.c` so the Windows command line doesn't duplicate `argv[0]` (upstream issue #19 — broke keyboard input in the local PowerShell terminal) -- `packages/xterm` — **local fork** of xterm 4.0.0 (also via `dependency_overrides`); patches: (1) `lib/src/ui/custom_text_edit.dart` passes `viewId: View.maybeOf(context)?.viewId` to `TextInputConfiguration` (upstream issue #207 — newer Flutter engines on Windows reject a text-input client without a viewId, so printable keys never reached any `TerminalView` while Enter/Tab/paste still worked); (2) copy/paste reachability (issue #43) — `shortcut/shortcuts.dart` adds Ctrl+C → `TerminalCopyAndClearIntent` and Ctrl+Shift+V paste alias on Windows/Linux, `shortcut/actions.dart` adds `_CopySelectionAndClearAction` (enabled only with an active selection; copies then clears it so the next Ctrl+C reaches the shell as SIGINT — without a selection `ShortcutManager` ignores the key and it falls through as ^C), `ui/gesture/gesture_handler.dart` un-aliases tertiary taps from the secondary-tap callbacks (middle clicks also reported to mouse-mode apps as `TerminalMouseButton.middle`, not right), and `terminal_view.dart` pastes the clipboard on middle-click unless `readOnly`; (3) scrollback-trim scroll compensation — `IndexAwareCircularBuffer` exposes a monotonic `droppedLines` counter (bumped on overflow push/insert and `trimStart`) and `RenderTerminal._compensateScrollbackTrim()` shifts the scroll offset up by the trimmed amount each layout, so once the buffer hits `maxLines` the content a scrolled-up user is reading stays put instead of streaming past (offset clamped at 0, skipped while overscrolled above the top; re-baselined on main↔alt buffer switches, never corrected across them); (4) per-line picture render cache — `BufferLine.version` (monotonic, bumped by every mutator) keys `TerminalPainter.getLinePicture()`, an LRU (`_linePictureCacheLimit` 1024, disposed on eviction) of per-line recorded `Picture`s replayed by `RenderTerminal._paint`, so scrolling/steady frames replay O(visible lines) pictures instead of issuing O(visible cells) `drawParagraph` calls (~7× less per-frame paint work); keyword highlights are baked into the cached picture (regex runs on line change, not per frame) — `RenderTerminal.keywordRules` forwards to `painter.keywordRules` on structural change, and the cache invalidates on textStyle/textScaler/theme/font-change/keyword-rule/device-pixel-ratio updates and glyph-atlas admissions (patch 11) (pixel-equivalence + invalidation covered by `app/test/widgets/xterm_line_picture_cache_test.dart`, scroll behavior by `app/test/widgets/terminal_scroll_probe_test.dart`); (5) scrollback keyboard paging — Shift+PageUp/PageDown in `TerminalViewState._handleKeyEvent` page the viewport locally (main buffer only; in the alt buffer the keys still reach the application); (6) `Terminal.recoverFromStuckState()` — local `reset`-equivalent for a full-screen app that died uncleanly and left the terminal trapped in the alt screen with mouse reporting on (the cause of "wheel scrolling completely dead at a prompt"): returns to the main buffer, disables mouse mode/report mode, re-shows the cursor, resets main-buffer margins; wired to the right-click "Reset Terminal" item in `app/lib/widgets/terminal_context_menu.dart`; (7) mouse-report encoding fixes — wheel buttons reported as 64-67 (flag 64 + low two bits of X11 buttons 4-7; upstream sent 68-71, which no application recognizes, so wheel scrolling was dead inside every mouse-aware TUI: claude CLI, htop, vim `mouse=a`, tmux with mouse on), and normal/UTF report mode no longer adds an extra +1 to the row byte (every event was reported one row below the pointer); covered by `app/test/widgets/xterm_mouse_report_test.dart`; (8) combining-mark composition — `Buffer.writeChar` merges a zero-width combining mark into the preceding cell when a precomposed NFC form exists (`unorm_dart`; preserves the base cell's style via `setCodePoint`, skips wide-char continuation cells), so decomposed Vietnamese (macOS `ls` filenames, NFD output from many tools) renders correctly instead of one displaced cell per diacritic; marks with no precomposed form keep the legacy own-cell behavior (single-codepoint cell model); covered by `app/test/widgets/xterm_combining_chars_test.dart`; (9) DoS limits on remote output — `CSI 8;r;c t` window resize is ignored, REP (`CSI n b`) is clamped to the screen size, a pending OSC over 64 KiB or CSI over 4096 chars is dropped and parsing resumes, CSI params are clamped to 65535 (covered by `app/test/widgets/xterm_dos_limits_test.dart`); (10) output throughput (≈10× in AOT) — `EscapeParser` decodes each chunk once into a reusable `Uint32List` and scans it by index (switch dispatch, allocation-free CSI params; an incomplete trailing sequence is still re-scanned from its ESC on the next write, and the rest of a chunk whose handler threw is processed by the next write, as before); `Terminal` implements `EscapeTextSink`, so runs of text go to `Buffer.writeChars` (one cursor-line lookup per line, printable ASCII copied straight into the line's `Uint32List` by `BufferLine.writeAsciiRun`, exact `writeChar` semantics for everything else); NFC composition of a (base, mark) pair is memoized; a line feed with full scrollback reuses the line it trims (`BufferLine.tryRecycle` — skipped for lines carrying anchors or a different capacity, `version` bumped so the picture cache never matches stale content); `Terminal.writeBytes(Uint8List)` decodes UTF-8 straight into the parser, identical to one chunked `Utf8Decoder(allowMalformed: true)` + `write` (malformed bytes → U+FFFD as that decoder reports them, stream-start BOM dropped); behavior pinned by `app/test/widgets/xterm_write_snapshot_test.dart` (state digests recorded on the pre-optimization code: corpora, fuzz incl. malformed input and exceptions, generic handler path), `xterm_line_recycling_test.dart` and `xterm_write_bytes_test.dart`; AOT benchmark `packages/xterm/benchmark/write_benchmark.dart` (compile with `--packages=../../app/.dart_tool/package_config.json`); (11) glyph-atlas text path — `TerminalPainter.getLinePicture(line, deviceOffset:)` records lines through `GlyphAtlas` (`lib/src/ui/glyph_atlas.dart`): each (code point, bold/italic/faint, ARGB color, horizontal subpixel phase 0–3, device y fraction) is rendered once with the exact paragraph `paintCellForeground` draws, read back after the frame (`toImage` + `toByteData`, batches ≤ 256) for its ink bounds, and packed into one page image (`toImageSync` of old page + new tiles; 2048 px wide, ≤ 2048 tall; full → reset, full again within 10 s → admission frozen 10 s); a line then draws merged background runs with `drawRect` and its glyphs with one `drawRawAtlas` per segment instead of `drawRect` + `drawParagraph` per cell (121x40 flood frame: ~6 → ~1 ms build, ~3.6 → ~1 ms raster), and `TerminalWriteQueue.floodInterval` is 16 ms (60 fps, was 33). Exactness (pixel tests in `xterm_line_picture_cache_test.dart`, tolerance 1/255 = premultiplied 8-bit tile rounding; `app/integration_test/terminal_atlas_pixel_test.dart` repeats them on the real macOS backend): tiles are per color (tinting one white mask is off by up to 65 levels — Skia picks the text gamma by color luminance); sprites land on exact device pixels (`RenderTerminal` passes the dpr from `MediaQuery` and each line's device-space origin from `getTransformTo(null)`; a non-translation transform → paragraphs); glyph x snaps like Skia (`floor(x + 1/8)`, phase `floor(frac * 4)`; a column within 1e-3 px of a phase boundary falls back); a background is never queued under a queued glyph's measured ink (the segment is flushed first); runs merge only when their anti-aliased top/bottom rows are whole device pixels (`paintLine`'s overlapping per-cell rects blend those rows twice). Drawn by the old paragraph code, in paint order: underlined cells (decorations sit at the exact fractional x), code points outside the allowlist (combining marks, format characters, U+2600–27BF, above U+FFFF, double-width outside CJK/Hangul/fullwidth), tiles whose ink reaches the slot border or is not the paint color (emoji), glyphs not admitted yet, and keyword foregrounds (a second glyph over the cell's own would round twice; their paragraphs are cached per (char, color)). Line pictures also key on atlas generation (admission drops them and `onGlyphAtlasChanged` repaints) and device fraction; the atlas resets on textStyle/textScaler/dpr/system-font changes and survives theme changes (tiles are keyed by final color) +- `packages/xterm` — **local fork** of xterm 4.0.0 (also via `dependency_overrides`); patches: (1) `lib/src/ui/custom_text_edit.dart` passes `viewId: View.maybeOf(context)?.viewId` to `TextInputConfiguration` (upstream issue #207 — newer Flutter engines on Windows reject a text-input client without a viewId, so printable keys never reached any `TerminalView` while Enter/Tab/paste still worked); (2) copy/paste reachability (issue #43) — `shortcut/shortcuts.dart` adds Ctrl+C → `TerminalCopyAndClearIntent` and Ctrl+Shift+V paste alias on Windows/Linux, `shortcut/actions.dart` adds `_CopySelectionAndClearAction` (enabled only with an active selection; copies then clears it so the next Ctrl+C reaches the shell as SIGINT — without a selection `ShortcutManager` ignores the key and it falls through as ^C), `ui/gesture/gesture_handler.dart` un-aliases tertiary taps from the secondary-tap callbacks (middle clicks also reported to mouse-mode apps as `TerminalMouseButton.middle`, not right), and `terminal_view.dart` pastes the clipboard on middle-click unless `readOnly`; (3) scrollback-trim scroll compensation — `IndexAwareCircularBuffer` exposes a monotonic `droppedLines` counter (bumped on overflow push/insert and `trimStart`) and `RenderTerminal._compensateScrollbackTrim()` shifts the scroll offset up by the trimmed amount each layout, so once the buffer hits `maxLines` the content a scrolled-up user is reading stays put instead of streaming past (offset clamped at 0, skipped while overscrolled above the top; re-baselined on main↔alt buffer switches, never corrected across them); (4) per-line picture render cache — `BufferLine.version` (monotonic, bumped by every mutator) keys `TerminalPainter.getLinePicture()`, an LRU (`_linePictureCacheLimit` 1024, disposed on eviction) of per-line recorded `Picture`s replayed by `RenderTerminal._paint`, so scrolling/steady frames replay O(visible lines) pictures instead of issuing O(visible cells) `drawParagraph` calls (~7× less per-frame paint work); keyword highlights are baked into the cached picture (regex runs on line change, not per frame) — `RenderTerminal.keywordRules` forwards to `painter.keywordRules` on structural change, and the cache invalidates on textStyle/textScaler/theme/font-change/keyword-rule/device-pixel-ratio updates and glyph-atlas admissions (patch 11) (pixel-equivalence + invalidation covered by `app/test/widgets/xterm_line_picture_cache_test.dart`, scroll behavior by `app/test/widgets/terminal_scroll_probe_test.dart`); (5) scrollback keyboard paging — Shift+PageUp/PageDown in `TerminalViewState._handleKeyEvent` page the viewport locally (main buffer only; in the alt buffer the keys still reach the application); (6) `Terminal.recoverFromStuckState()` — local `reset`-equivalent for a full-screen app that died uncleanly and left the terminal trapped in the alt screen with mouse reporting on (the cause of "wheel scrolling completely dead at a prompt"): returns to the main buffer, disables mouse mode/report mode, re-shows the cursor, resets main-buffer margins; wired to the right-click "Reset Terminal" item in `app/lib/widgets/terminal_context_menu.dart`; (7) mouse-report encoding fixes — wheel buttons reported as 64-67 (flag 64 + low two bits of X11 buttons 4-7; upstream sent 68-71, which no application recognizes, so wheel scrolling was dead inside every mouse-aware TUI: claude CLI, htop, vim `mouse=a`, tmux with mouse on), and normal/UTF report mode no longer adds an extra +1 to the row byte (every event was reported one row below the pointer); covered by `app/test/widgets/xterm_mouse_report_test.dart`; (8) combining-mark composition — `Buffer.writeChar` merges a zero-width combining mark into the preceding cell when a precomposed NFC form exists (`unorm_dart`; preserves the base cell's style via `setCodePoint`, skips wide-char continuation cells), so decomposed Vietnamese (macOS `ls` filenames, NFD output from many tools) renders correctly instead of one displaced cell per diacritic; marks with no precomposed form keep the legacy own-cell behavior (single-codepoint cell model); covered by `app/test/widgets/xterm_combining_chars_test.dart`; (9) DoS limits on remote output — `CSI 8;r;c t` window resize is ignored, REP (`CSI n b`) is clamped to the screen size, a pending OSC over 64 KiB or CSI over 4096 chars is dropped and parsing resumes, CSI params are clamped to 65535 (covered by `app/test/widgets/xterm_dos_limits_test.dart`); (10) output throughput (≈10× in AOT) — `EscapeParser` decodes each chunk once into a reusable `Uint32List` and scans it by index (switch dispatch, allocation-free CSI params; an incomplete trailing sequence is still re-scanned from its ESC on the next write, and the rest of a chunk whose handler threw is processed by the next write, as before); `Terminal` implements `EscapeTextSink`, so runs of text go to `Buffer.writeChars` (one cursor-line lookup per line, printable ASCII copied straight into the line's `Uint32List` by `BufferLine.writeAsciiRun`, exact `writeChar` semantics for everything else); NFC composition of a (base, mark) pair is memoized; a line feed with full scrollback reuses the line it trims (`BufferLine.tryRecycle` — skipped for lines carrying anchors or a different capacity, `version` bumped so the picture cache never matches stale content); `Terminal.writeBytes(Uint8List)` decodes UTF-8 straight into the parser, identical to one chunked `Utf8Decoder(allowMalformed: true)` + `write` (malformed bytes → U+FFFD as that decoder reports them, stream-start BOM dropped); behavior pinned by `app/test/widgets/xterm_write_snapshot_test.dart` (state digests recorded on the pre-optimization code: corpora, fuzz incl. malformed input and exceptions, generic handler path), `xterm_line_recycling_test.dart` and `xterm_write_bytes_test.dart`; AOT benchmark `packages/xterm/benchmark/write_benchmark.dart` (compile with `--packages=../../app/.dart_tool/package_config.json`); (11) glyph-atlas text path — `TerminalPainter.getLinePicture(line, deviceOffset:)` records lines through `GlyphAtlas` (`lib/src/ui/glyph_atlas.dart`): each (code point, bold/italic/faint, ARGB color, horizontal subpixel phase 0–3, device y fraction) is rendered once with the exact paragraph `paintCellForeground` draws, read back after the frame (`toImage` + `toByteData`, batches ≤ 256) for its ink bounds, and packed into one page image (`toImageSync` of old page + new tiles; 2048 px wide, ≤ 2048 tall; full → reset, full again within 10 s → admission frozen 10 s); a line then draws merged background runs with `drawRect` and its glyphs with one `drawRawAtlas` per segment instead of `drawRect` + `drawParagraph` per cell (121x40 flood frame: ~6 → ~1 ms build, ~3.6 → ~1 ms raster), and `TerminalWriteQueue.floodInterval` is 16 ms (60 fps, was 33). Exactness (pixel tests in `xterm_line_picture_cache_test.dart`, tolerance 1/255 = premultiplied 8-bit tile rounding; `app/integration_test/terminal_atlas_pixel_test.dart` repeats them on the real macOS backend): tiles are per color (tinting one white mask is off by up to 65 levels — Skia picks the text gamma by color luminance); sprites land on exact device pixels (`RenderTerminal` passes the dpr from `MediaQuery` and each line's device-space origin from `getTransformTo(null)`; a non-translation transform → paragraphs); glyph x snaps like Skia (`floor(x + 1/8)`, phase `floor(frac * 4)`; a column within 1e-3 px of a phase boundary falls back); a background is never queued under a queued glyph's measured ink (the segment is flushed first); runs merge only when their anti-aliased top/bottom rows are whole device pixels (`paintLine`'s overlapping per-cell rects blend those rows twice). Drawn by the old paragraph code, in paint order: underlined cells (decorations sit at the exact fractional x), code points outside the allowlist (combining marks, format characters, U+2600–27BF, above U+FFFF, double-width outside CJK/Hangul/fullwidth), tiles whose ink reaches the slot border or is not the paint color (emoji), glyphs not admitted yet, and keyword foregrounds (a second glyph over the cell's own would round twice; their paragraphs are cached per (char, color)). Line pictures also key on atlas generation (admission drops them and `onGlyphAtlasChanged` repaints) and device fraction; the atlas resets on textStyle/textScaler/dpr/system-font changes and survives theme changes (tiles are keyed by final color); (12) ED 2/3 (and the other erase-display variants) dispose the `CellAnchor`s on the lines they erase, so the shell-integration gutter markers (`ShellCommand.anchor`, created with `buffer.createAnchorFromCursor` at OSC 133;A) follow their prompt line through scroll/trim and disappear on `clear` instead of floating on stale rows +- `packages/yourssh_cli` — pure-Dart `yourssh` command-line client (no Flutter dependency): protocol, endpoint resolution, transport, app launcher, output formatting; the app imports it for the shared protocol/endpoint types. See **CLI** below - `packages/yourssh_plugin_api` — abstract plugin interface (`YourSSHPlugin`, `YourSSHPluginContext`) - `packages/yourssh_devops` — DevOps plugin (containers (Docker/K8s), network tools, Cloudflare tunnel, mail catcher, MCP server, S3 browser) - `packages/yourssh_web_tools` — Web Tools plugin (in-app browser over port-forwarded HTTP) @@ -104,7 +113,7 @@ Flutter UI (widgets/screens) - `SyncProvider` — holds Supabase sync config (URL/key, optional passphrase, status); `enabled` is derived from `isSupabaseConfigured` — no separate stored flag; passphrase stored in secure storage via `StorageService` - `KnownHostsProvider` — persists known host fingerprints (one entry per host:port:keyType); exposes `pendingChallenge` for TOFU dialog; an unknown endpoint is accepted on first use, but a key of a **new type** for an endpoint already pinned under another type raises a blocking `HostKeyChallenge` (`oldKeyType` set, dialog says "Host key type changed") — a MITM offering a different host-key algorithm can't slip past the pin - `SettingsProvider` — app-wide prefs (auto-reconnect, tmux, hotkeys, feature flags for DevOps/WebTools/Snippets) -- `TerminalLayoutProvider` — split layout (none/horizontal/vertical), input bar visibility, and the right-side workspace panel via the `SidePanel` enum (`none`/`snippets`/`terminalConfig`; `toggleSidePanel()` opens one panel at a time — opening one closes the other; `toggleSnippetsPanel()` kept as alias). The snippets panel and the terminal-appearance config panel (`TerminalConfigPanel`, toggled by the tune icon; hosts `TerminalAppearanceControls`, the theme/font-size/font controls shared with Settings → Terminal) both render inside the shared `WorkspaceSidePanel` frame (340px, header + close) +- `TerminalLayoutProvider` — split layout (none/horizontal/vertical), input bar visibility, and the right-side workspace panel via the `SidePanel` enum (`none`/`snippets`/`terminalConfig`; `toggleSidePanel()` opens one panel at a time — opening one closes the other; `toggleSnippetsPanel()` kept as alias). The snippets panel and the terminal-appearance config panel (`TerminalConfigPanel`, toggled by the tune icon; hosts `TerminalAppearanceControls`, the theme/font-size/font controls shared with Settings → Appearance) both render inside the shared `WorkspaceSidePanel` frame (340px, header + close) - `LocalFilePanelProvider` — local filesystem state for the dual-panel SFTP view - `SftpPanelProvider` — remote SFTP panel state (current path, directory listing) - `SftpTransferProvider` — in-progress upload/download transfer queue and status @@ -116,7 +125,7 @@ Flutter UI (widgets/screens) - `ShellIntegrationProvider` — per-session shell-integration state (cwd + command list) keyed by `sessionId`; `handleOsc(sessionId, code, args, absoluteCursorY)` routes xterm `onPrivateOSC` events through `ShellIntegrationService` into `ShellSessionState`; exposes `cwdFor`/`maybeStateFor` and a per-session `revisionFor` so consumers `context.select` to their own session; `clear(sessionId)` on shell close / disconnect - `UpdateProvider` — in-app update flow: launch check + periodic re-check (`startPeriodicChecks()`, `Timer.periodic` every `checkInterval`, default 6h) + window-focus re-check (wired in `main.dart.onWindowFocus`) + manual check — auto checks all debounced 24h via `last_update_check` in `SharedPreferences`; semver compare, download progress, and install hand-off; `showBanner` derived from `status == available && version != dismissedVersion`; `dismiss()` persists per-version; surfaces state to `UpdateBanner` and the Settings Updates section - `AuditProvider` — filter state (host/type/time-range/search) + lazy paging (200/page) over `AuditService` for the Audit Log screen; `exportCsv`/`exportJson` of the active filter -- `NotificationCenterProvider` — in-memory store behind the notification bell in the top tab bar (`NotificationBell` widget); `add()` dedupes via `AppNotification.dedupeKey` (`update:`, `disconnect:`) and caps at 50 items; `markAllRead()` on panel open, `clearAll()` / `remove(id)`; fed in `main.dart` by an `UpdateProvider` listener (one update notification per version) and `SessionProvider.onSessionDropped` +- `NotificationCenterProvider` — in-memory store behind the notification bell in the top tab bar (`NotificationBell` widget); `add()` dedupes via `AppNotification.dedupeKey` (`update:`, `disconnect:`) and caps at 50 items; `markAllRead()` on panel open, `clearAll()` / `remove(id)`; fed in `main.dart` by an `UpdateProvider` listener (one update notification per version), `SessionProvider.onSessionDropped` and `CliServer.onUrlRefused` (refused `yourssh://` links, `link-refused:`) **Services** (`app/lib/services/`): - `SshService` — owns `SSHClient` and `SSHSession` maps keyed by host ID; handles connect, shell, exec, sftp, `testConnection` (TCP+auth without opening a shell; verifies the target and every hop through `defaultHostKeyVerifier` and fails closed when it is unset), disconnect; `connect`/`dialHop` reject host keys when no verifier is passed (`hostKeyDecision`); `ensureClient(host)` returns the open client or auto-connects with stored credentials (evicts dead cached clients; resolves `Host.keyId` via the `defaultKeyLookup` callback, host keys via `defaultHostKeyVerifier`, and `Host.jumpHostIds` via `defaultJumpHostLookup` so SFTP/exec/port-forward auto-connects tunnel through the bastion chain like sessions do). **Multi-hop jump chains:** `connect(jumpChain:)` (`JumpHop = (host, keyEntry)`) dials each hop over the previous hop's `forwardLocal`, authenticating + host-key-verifying every hop; clients are cached by chain-prefix key (`a`, `a>b` — `B through A` ≠ direct `B`) and torn down deepest-first by refcount (`_teardownJumpChain`); cycle-guarded (duplicate hop or target-in-chain throws). `testConnection` dials the chain with per-hop temp clients closed in `finally`. An unresolved hop fails the connect (no silent skip) @@ -146,7 +155,7 @@ Flutter UI (widgets/screens) - `agent_probe.dart` — pure pre-connect probe (`probeAgentStatus`) behind the host panel's `AgentStatusLine` — reports system-agent identity count, Keychain-fallback key count, or nothing-to-serve; never throws (every failure maps to a displayable result) - `KeyGenService` — SSH key generation: Ed25519 pure-Dart (the fork's `OpenSSHEd25519KeyPair.generate()` + `toPem(passphrase:)`), RSA-4096/ECDSA-P256 via `ssh-keygen` (`probeSshKeygen` gates the panel options when the binary is missing); `buildDeployCommand` (ssh-copy-id-style, `grep -qxF` idempotent, `EXISTS`/`ADDED` marker) used by `DeployKeyDialog` over `SshService.exec`; generated keys land in `Documents/YourSSH/keys` with mode 600 and the passphrase saved as `pp_` via `KeyProvider.savePassphrase` (callback wired to `StorageService` in main.dart — `addKeyFromFile` returns the created entry) - `RecordingService` — writes asciicast v2 (`.cast`) files; tracks active recordings keyed by `sessionId`; passive intercept pattern — `SshService` always calls `writeOutput()` / `onShellClosed()`, which no-op when not recording; when `redact:` is on (effective = `SettingsProvider.recordingRedactionEnabled` AND `Host.recordingRedaction`, both default true; sampled once at start via `RecordingProvider.redactionPolicy` wired in main.dart with a fresh `HostProvider` lookup — the session's Host snapshot goes stale after a panel edit), output is line-buffered (split at the last newline, start-once `flushDelay` timer, default 500 ms, stop flushes the tail) and passed through `AuditRedactor.redact()` before writing — coalesces events per line, which also strips keystroke timing; ANSI escapes inside a secret and a secret straddling a flushDelay boundary defeat the regexes (defense-in-depth, not a guarantee) -- `ShellIntegrationService` — pure (no Flutter/IO): `parseOsc(code, args)` maps xterm `onPrivateOSC` to a typed `ShellOscEvent` (OSC 7 cwd, OSC 133 A/D; C ignored); `buildInjectionScript()` is the guarded one-line bash/zsh prompt-hook installer (auto-on, opt-out via `Host.shellIntegration` + `SettingsProvider.shellIntegrationEnabled`), delivered **invisibly** via a two-phase handshake: `buildBootstrapLine()` (short line that disables tty echo and blocks in `read -rs`, printing `__YS_RDY__`/`__YS_DONE__` sentinels) + `buildPayloadLine({includeInstaller, workingDir, envVars})` (the installer plus the per-host session-template setup — `cd -- ''` + `export K='v'`, single-quote-escaped via `shQuote`, keys checked by `isValidEnvKey`; a failing cd prints a warning placed *after* the DONE sentinel so it survives the gate discard; consumed by `read` so never echoed). `SshService.openShell` wires `terminal.onPrivateOSC` and injects only when `injection_gate.dart`'s `InjectionReadiness` confirms the line editor is reading (bracketed-paste `ESC[?2004h` toggle + settle, bare-`\n` probe fallback for bash ≤ 5.0; skipped on alt-screen/user typing/never-confirmed) while `InjectionGate` withholds and discards the bootstrap echo; `path_completion.dart` (pure) plans cwd-aware path completion for the input bar over `SshService.listDirectory`. Design: `docs/superpowers/specs/2026-06-03-invisible-shell-integration-design.md` +- `ShellIntegrationService` — pure (no Flutter/IO): `parseOsc(code, args)` maps xterm `onPrivateOSC` to a typed `ShellOscEvent` (OSC 7 cwd, OSC 133 A/D; C ignored); `buildInjectionScript()` is the guarded one-line bash/zsh prompt-hook installer (auto-on, opt-out via `Host.shellIntegration` + `SettingsProvider.shellIntegrationEnabled`), delivered **invisibly** via a two-phase handshake: `buildBootstrapLine()` (short line that disables tty echo and blocks in `read -rs`, printing `__YS_RDY__`/`__YS_DONE__` sentinels) + `buildPayloadLine({includeInstaller, workingDir, envVars})` (the installer plus the per-host session-template setup — `cd -- ''` + `export K='v'`, single-quote-escaped via `shQuote`, keys checked by `isValidEnvKey`; a failing cd prints a warning placed *after* the DONE sentinel so it survives the gate discard; consumed by `read` so never echoed). `SshService.openShell` wires `terminal.onPrivateOSC` and injects only when `injection_gate.dart`'s `InjectionReadiness` confirms the line editor is reading (bracketed-paste `ESC[?2004h` toggle + settle, bare-`\n` probe fallback for bash ≤ 5.0; skipped on alt-screen/user typing/never-confirmed) while `InjectionGate` withholds and discards the bootstrap echo and, on a clean DONE, clears the line still holding the prompt painted before the bootstrap (`kClearPromptLine`) and drops the sentinel's line break, so a new session shows one prompt, not an empty one above it; `path_completion.dart` (pure) plans cwd-aware path completion for the input bar over `SshService.listDirectory`. Design: `docs/superpowers/specs/2026-06-03-invisible-shell-integration-design.md` - `AuditService` / `AuditRedactor` — local SQLite audit trail (`sqlite3` + `sqlite3_flutter_libs`, WAL, `/audit.db`): `connect`/`disconnect`/`exec`/`input` events with denormalized host fields; commands pass `AuditRedactor` (pure regex masking: `key=value` secrets incl. prefixed `PGPASSWORD=`, Bearer tokens, `sshpass -p`, mysql/mariadb attached `-p`, URL userinfo — psql `-p` is the port, deliberately excluded) **before** insert; every write fail-soft (never breaks SSH ops); `SshService.exec` takes `auditSource` (`'app'` default; `'bulk'`/`'devops'`/`'plugin:'`/`'plugin:js'` threaded by callers; `null` = skip — used by the network-stats poll so it can't flood the log); connect failures logged only when no retry is scheduled; retention pruned at startup (`auditRetentionDays`, default 90, 0 = forever); CSV/JSON export of the filtered view - `SandboxMigrationService` — **macOS is not sandboxed** (`app/macos/Runner/*.entitlements` deliberately omit `com.apple.security.app-sandbox`): the sandbox rewrote `HOME` to `~/Library/Containers/com.thangnm.yourssh/Data`, where `~/Downloads`, `~/Desktop` and `~/.ssh` are only symlinks that raise `EPERM` — unusable for an SSH/SFTP client, and Apple ships no entitlement that covers Desktop/Documents (the exception entitlements that would, `keychain-access-groups` and `temporary-exception.*`, are restricted: an ad-hoc-signed build claiming one is SIGKILLed at launch, and this app ships unsigned via DMG/zip, not the Mac App Store). Folder access is now governed by macOS privacy (TCC) prompts, explained by the `NS*FolderUsageDescription` strings in `Info.plist`. This service is the one-time carry-over run from `main()` before any provider reads prefs: `parseXmlPlist` (pure) reads the container's prefs domain via `plutil -convert xml1`, `planPrefsMigration` (pure) drops keys the new domain already has, and the audit database + `~/.yourssh/plugins` are copied file-by-file, never overwriting. Keys and recordings are deliberately *not* copied — prefs hold their absolute container paths and an unsandboxed app can still read the container, so copying would only duplicate private key material. Every step is fail-soft and the `macos_sandbox_migration_done` marker is written either way - `UpdateService` — in-app update glue: `fetchLatestRelease()` (GitHub `releases/latest`, stable-only), pure `isNewerVersion` (semver, fail-closed on blank) and `assetForPlatform` (OS/arch → release asset; macOS ships a universal DMG — Intel only matches it, falling back to the browser on pre-universal releases), `downloadAsset` (streamed to Downloads with progress, cleans up partial file), `launchInstaller` (macOS: `verifyMacInstallerSignature` requires a Developer ID signature by `releaseTeamId` 84T567KMYD via `codesign -R` before `open` — our own downloads carry no quarantine xattr, so Gatekeeper never checks them; an unsigned/foreign DMG throws and the user is sent to the release page; Windows: run installer `.exe`; Linux: `xdg-open`); throws typed `UpdateException`; takes an injectable `http.Client` for testing @@ -158,7 +167,7 @@ Flutter UI (widgets/screens) - `file_mode.dart` — POSIX mode helpers: `modeToOctal` / `parseOctal` (3–4 octal digits only — shorter is a partially-typed mode and never parses), the 9 `kMode*` permission-bit constants used by `PermissionsDialog`'s rwx grid, and `chmodLocal` (system `chmod`, macOS/Linux; callers hide the menu item on Windows) - `app_launcher.dart` — `launchFileDefault` (OS default app via url_launcher), `launchFileWithApp` (macOS `open -a` / Windows `Process.run` without a shell / Linux direct exec; `buildAppLaunch` is the pure plan), `isExecutableExtension(name, platform)` — "open externally" refuses server-supplied executables (`.bat/.exe/.lnk/.command/.desktop/…`) and points the user to Download instead, `pickApplication` (file_selector) — shared by `ExternalEditService` and the local file panel - `fs_error.dart` — `describeFileSystemError` maps a `dart:io` failure to a sentence the UI can show: EPERM/EACCES (macOS privacy denial, POSIX mode) becomes a "grant access in System Settings → Privacy & Security" hint, ENOENT becomes "no longer exists", anything else keeps its own message; used by the local file panel's list/create/rename/delete/chmod paths instead of a raw `PathAccessException` dump -- `terminal_appearance.dart` — `resolveTerminalAppearance` merges per-host theme/font/size overrides with the global Settings → Terminal values (unknown theme name → global, not catalog[0]); consumed by `terminal_view.dart` with a fresh-host lookup (HostProvider absent in tests → session snapshot) +- `terminal_appearance.dart` — `resolveTerminalAppearance` merges per-host theme/font/size overrides with the global Settings → Appearance / Terminal values (unknown theme name → global, not catalog[0]); consumed by `terminal_view.dart` with a fresh-host lookup (HostProvider absent in tests → session snapshot) **Key models** (`app/lib/models/`): - `AppSession` — abstract base interface for all session types; provides `id`, `tabLabel`, `customLabel`, `colorTag`, `isPinned`; implemented by `TerminalSession` (SSH + local shells) and `RdpSession` @@ -173,11 +182,13 @@ Flutter UI (widgets/screens) - `RecordingEntry` — immutable metadata for one `.cast` file; `hostTitle` and `recordedAt` parsed from path (`{basePath}/{user}@{host}/session_YYYY-MM-DD_HH-mm-ss.cast`) - `AuditEvent` — one immutable audit row (`AuditEventType`: connect/disconnect/exec/input; denormalized host fields, redacted command, exit code, JSON `meta` with `source`/`error`) -**UI entry point:** `app/lib/main.dart` — instantiates services and long-lived providers, wires callbacks between them (key lookup, host-key verifier, sync-on-mutation), then mounts `MainScreen` under `MultiProvider`. The app is dark-only (`ThemeMode.dark`); theme constants live in `app/lib/theme/app_theme.dart` (`AppColors`). +**UI entry point:** `app/lib/main.dart` — instantiates services and long-lived providers, wires callbacks between them (key lookup, host-key verifier, sync-on-mutation), then mounts `MainScreen` under `MultiProvider`. The app is dark-only (`ThemeMode.dark`); the palette comes from the `yourssh_ui` design system (see **Design system** below), surfaced to app code through `AppColors` in `app/lib/theme/app_theme.dart` (and `MobileColors` in `app/lib/mobile/theme/mobile_theme.dart`), which are `@Deprecated` aliases of the `YsColors` tokens (kept, not deleted: ~460 call sites would churn for no visual change; new code uses `YsColors` directly). -**Navigation:** `MainScreen` (`app/lib/screens/main_screen.dart`) renders a top tab bar (pinned Home/SFTP + scrollable SSH session tabs) and a left sidebar. The session tab itself is `SessionTab` (`app/lib/widgets/session_tab.dart`, extracted for testability): health dot, distro/OS glyph (fresh `detectedOs` looked up from `HostProvider` — the session's `Host` snapshot goes stale after `copyWith`), recording/color dots, rename, context menu, middle-click close (pinned tabs protected). `NavSection` enum: `hosts`, `keychain`, `portForwarding`, `sftp`, `knownHosts`, `recordings`, `audit`, `settings`, `plugins`. Each maps to a top-level screen widget under `app/lib/widgets/`. Both SFTP panels share `EntryContextMenu` (`app/lib/widgets/entry_context_menu.dart`) — Open / Open with / View / Edit / Copy to target (with up-front disabled reasons from `_copyBlockReason`, incl. the same-folder block) / Refresh / New folder / Permissions (`PermissionsDialog`) / Rename / Delete. The host panel's CONNECTION CHAIN section is `HostChainEditor` (`app/lib/widgets/host_chain_editor.dart`) — pure-presentational Termius-style **multi-hop** chain (hop cards → arrows → destination card, persistent Add-a-Host picker that excludes hosts already in the chain, per-hop remove ×, key icon on the last hop when agent forwarding is on, Clear resets to direct); writes the full ordered id list back via `onChanged` to the panel's `_jumpHostIds`. `HostDetailPanel` is the **single host editor** (the old `AddHostDialog`/`HostListPanel` were dead code and removed): an SSH/RDP `SegmentedButton` at the top switches protocol (port auto-flips between `HostProtocol.defaultPort`s only when still on the other default); RDP mode shows domain / RDP-security / single-hop SSH-tunnel dropdown (stale tunnel ids render as "Direct connection", never a dropdown assert) and hides all SSH-only sections; `_save` preserves `protocol`/`domain`/`rdpSecurity`/`createdAt`. The shared `RdpBadge` widget (`app/lib/widgets/rdp_badge.dart`) marks RDP hosts on dashboard cards, list rows, and the panel header. `RdpWorkspace` supports **fullscreen** (`isFullscreen` + `onFullscreenChanged(bool)` — the widget reports intent, `MainScreen._setRdpFullscreen` owns `windowManager.setFullScreen` and collapses the app chrome to just the workspace): toolbar button enters (enabled only while connected), an auto-hiding hover pill at the top screen edge (mstsc-style; flashes 2.5 s on entry) exits, and the workspace auto-requests windowed mode when the session leaves `connected`; `MainScreen.build` also force-exits if the active tab stops being the RDP session (tab switch/close via hotkey), so the user can never be trapped chrome-less. Dashboard host actions are protocol-aware: SFTP/Test hidden for RDP, bulk Run/Push filter to SSH hosts (with a skipped-count snack), CONNECT ALL counts live RDP tabs, Duplicate keeps the RDP fields, Copy URL uses `rdp://` for RDP hosts. +**Design system** (spec `docs/superpowers/specs/2026-11-12-yourssh-ui-redesign-design.md`, plan `docs/superpowers/plans/2026-11-12-yourssh-ui-redesign-phase0-1.md`): `packages/yourssh_ui` wraps forui ("Amber Brand", dark only) and re-exports `package:forui/forui.dart`, so app code imports `package:yourssh_ui/yourssh_ui.dart` and gets forui (`F*` widgets, `FLucideIcons`) plus the `Ys*` tokens. Tokens: `YsColors` (`background` 0D0C0A, `card`, `secondary`/`muted`, `foreground`, `mutedForeground`, `border` = #FFEBD2 at 12%, `primary` amber F3A231, `primaryForeground`, `accentText`, `chrome`, `sidebar`, `terminalSurface`, status `ok`/`warn`/`off`/`error`), `YsSpace` (`s1`..`s6` = 4/8/12/16/24/32), `YsRadius` (`control` 6, `card` 10, `mobileCard` 14), `kYsFontFamily` (`'Inter'`). Themes (built once and cached, so `MaterialApp` rebuilds do not recreate them): `ysThemeData()` (desktop sizing), `ysThemeDataTouch()` (touch sizing, mobile), and `ysMaterialTheme()` (Material fallback theme built from the same tokens, for widgets not yet ported). The app root is wrapped in `FTheme` + `FToaster` by `ysRootBuilder` (desktop) or `ysRootBuilderTouch` (mobile), both in `app/lib/theme/app_theme.dart`, passed as `MaterialApp.builder` so dialogs, routes and toasts inherit them. Widget tests use `ysTestApp(child, {touch})` from `app/test/helpers/ys_test_app.dart` (MaterialApp with `ysMaterialTheme` + the matching root builder). Inter is bundled under `app/assets/fonts/inter/`; UI text never uses `google_fonts` (the dependency was removed; terminal fonts are the bundled Nerd/Powerline/Meslo files). New icons use Lucide (`FLucideIcons`). **Components:** `YsFileTable` (file listings), `YsHostCard` (dashboard host card), `YsStatusBar` (+ `YsStatusItem`, the session status line) and `YsPluginHost` (the themed frame a plugin renders in) sit in `yourssh_ui` beside `YsTab` (browser-style tab chrome: active = card background + 2 px amber bottom indicator; presentational chrome, callers own state, but focusable: Tab reaches it, Enter/Space selects; the close button shows on hover, focus or when active and stays reachable by Tab while hidden, inert to pointer and semantics). `showYsToast(context, message, {kind, actionLabel, onAction, duration})` shows a forui toast; `YsToastKind` is `info` / `success` / `error` (info/success auto-dismiss after 3 s, error after 5 s and uses the destructive variant), placed bottom-right on desktop and bottom-centre on Android/iOS (`ysRootBuilderTouch` lifts the toaster by the mobile tab-bar height so toasts never cover `MobileTabBar`); `ScaffoldMessenger` and `scaffoldMessengerKey` are gone. `showYsDialog` (forui dialog route on the root navigator with a tint-only barrier, no backdrop blur, so a streaming terminal is not re-blurred every frame; the barrier and Escape close it only while `barrierDismissible`; a barrier tap uses `Navigator.pop`, so a `PopScope` inside is bypassed, while Escape calls `maybePop` and honours it — a dialog guarding against dismissal must still pass `barrierDismissible: false`), `YsDialog` (title or `titleWidget`, optional body, `actions` laid out in an `OverflowBar`: right-aligned, stacked when they do not fit), `showYsConfirm` (returns bool; when `destructive`, Cancel holds default focus and confirm is destructive) and `YsDialogFrame` (card shell for dialogs that lay out their own content, replaces `Dialog(backgroundColor: ...)`). Give the safe choice `autofocus: true`. The TOFU prompts (`TofuDialog`, `HostKeyDialog`, `RdpCertDialog`, `FpRow`) are public in `app/lib/widgets/tofu_dialogs.dart`; they focus the safe choice by default and an accept that changes a pinned key/certificate is styled destructive. `SettingsScreen` (`app/lib/widgets/settings/`, one file per section — Connection, Appearance, Terminal, Keyword highlighting, Recording, Monitoring, Audit, Security, Sync, AI providers, Keyboard (opens `HotkeySettingsScreen`), Updates — with shared tiles in `settings_tiles.dart`, which re-exports `app/lib/widgets/ys_form_controls.dart` — the form controls also used outside Settings: `settingsTileGroup`, `SettingsSelect`, `SettingsIconButton`, `SettingsCaption`, `settingsButtonText`; `widgets/settings_screen.dart` is an export shim) is built on `FTileGroup`/`FSwitch`/`FSelect`/`FTextField`: one column at the window minimum, two columns (each its own focus traversal group) from 1040 px of content; only `ysThemeDataTouch()` lifts forui's touch `FItem` content padding so items measure >= 44 px (the desktop theme does not); both themes turn `slideableTiles`/`slideableItems` off for every tile and item group app-wide (ruling P16): the `FTappableGroup` a slideable group adds swallowed taps on buttons inside a text field's suffix (the password reveal toggle, an `FButton` suffix); `settingsTileGroup` is now a plain alias. Switch rows (`settingsSwitchTile`, the host editor's option tiles) toggle on a press anywhere on the row via the tile's `onPress`. `AppSnack` (`app_theme.dart`) delegates to `showYsToast`; use `AppSnack` or `showYsToast` for toasts and `showYsDialog`/`showYsConfirm` for dialogs rather than `showDialog`/`SnackBar`. **Rule:** new or rebuilt UI is built from forui widgets or `Ys*` components, not hand-styled Material. **Lint gate:** `tool/check_ui_lint.sh` (run by the `ui` job in `pr-test.yml`, with `tool/check_ui_lint_selftest.sh`) fails on `IconButton(`, `AlertDialog(`, `SnackBar(`, `Icons.`, `ScaffoldMessenger`, `showDialog(`, `showModalBottomSheet` and `TextField(` (word-boundary matched, so `FTextField(` and `showYsDialog(` pass) in `app/lib` and the snippets/devops/web_tools plugin packages (not `yourssh_ui`); justified exceptions go in `tool/ui_lint_allowlist.txt` as `path:pattern # reason` (empty today). Direct `Color(0x…)` literals are not allowed in widgets: use tokens (exempt: the terminal theme catalog, the `hostColors`/`tabColors` user palettes, keyword-highlight palette, OS glyph colours, the `AppColors.accentDim`/`textTertiary`/`orange`/`blue`/`purple` and `MobileColors.blue`/`tabInactive`/`borderSoft`/`accentSoft`/`textFaint` aliases, the web_tools `http_client/models.dart` HTTP-method palette and `history_panel.dart`). `AppColors` aliases: `bg`/`sidebar`/`card`/`cardHover`/`border`/`accent`(amber)/`textPrimary`/`textSecondary`/`red` map to `YsColors`, plus `success`/`warning`/`offline` (from `ok`/`warn`/`off`) — use `success` for status (connected/healthy) and `accent` (amber) for primary/active/selected state, never green for "active". `app` and `yourssh_ui` import `package:flutter/material.dart` (not `material_ui`): `material_ui`'s `ThemeData` is a different type from `MaterialApp`'s, so moving to `material_ui` is a separate later migration (ruling P6). Terminal themes live in `app/lib/theme/terminal_themes.dart`; `kDefaultTerminalTheme` is `'YourSSH Amber'`, applied to new installs only — `SettingsProvider.load` runs once when no `terminalTheme` pref is stored and pins existing installs (those with `yourssh.hosts`) to `'Dracula'`. -**Bulk actions:** the hosts dashboard's SELECT mode drives `app/lib/widgets/bulk/` — `BulkActionBar` (SELECT ALL / CLEAR / CONNECT ALL / RUN COMMAND / PUSH FILES / DONE; action cluster right-anchored, scrolls when narrow), `BulkRunDialog` + `BulkRunController` (parallel exec with bounded concurrency, 30 s per-host timeout, per-host failure isolation), `BulkDiffView` (groups identical outputs against a promotable baseline, side-by-side compare), `BulkPushDialog` (multi-host upload via `SftpTransferService.uploadDirectory(overwrite: true)`), `BulkHostStatusList` (shared per-host status rows). Closing a dialog mid-run confirms, cancels queued hosts, and lets in-flight operations finish. +**Navigation:** `MainScreen` (`app/lib/screens/main_screen.dart`) renders a top tab bar and a left sidebar, both in `app/lib/screens/shell/`. The sidebar is `AppSidebar` (`app_sidebar.dart`, also home of the `NavSection` enum), built on `FSidebar`; its amber selected style is defined once in `ys_theme.dart`. The tab bar is `SessionTabBar` (`session_tab_bar.dart`: pinned Home/SFTP + drag-reorderable scrollable SSH session tabs, "+" menu, notification bell). The session tab itself is `SessionTab` (`app/lib/widgets/session_tab.dart`, extracted for testability), rendered through `YsTab` from `yourssh_ui`: health dot, distro/OS glyph (fresh `detectedOs` looked up from `HostProvider` — the session's `Host` snapshot goes stale after `copyWith`), recording/color dots, rename, context menu, middle-click close (pinned tabs protected). `NavSection` enum: `hosts`, `keychain`, `portForwarding`, `sftp`, `knownHosts`, `recordings`, `audit`, `settings`, `plugins`. Each maps to a top-level screen widget under `app/lib/widgets/`. Both SFTP panels share `EntryContextMenu` (`app/lib/widgets/entry_context_menu.dart`) — Open / Open with / View / Edit / Copy to target (with up-front disabled reasons from `_copyBlockReason`, incl. the same-folder block) / Refresh / New folder / Permissions (`PermissionsDialog`) / Rename / Delete. The host panel's CONNECTION CHAIN section is `HostChainEditor` (`app/lib/widgets/host_chain_editor.dart`) — pure-presentational Termius-style **multi-hop** chain (hop cards → arrows → destination card, persistent Add-a-Host picker that excludes hosts already in the chain, per-hop remove ×, key icon on the last hop when agent forwarding is on, Clear resets to direct); writes the full ordered id list back via `onChanged` to the panel's `_jumpHostIds`. `HostDetailPanel` (`app/lib/widgets/host_detail_panel/`, one part file per section; the old path is an export shim) is the **single host editor** (the old `AddHostDialog`/`HostListPanel` were dead code and removed), built on forui: an SSH/RDP/VNC `FTabs` switch at the top switches protocol (port auto-flips between `HostProtocol.defaultPort`s only when still on the other default); GENERAL is the label, then hostname and port side by side, so Tab runs label → hostname → port → username, and Enter in any single-line field saves (same validation as Save); dropdowns are `FSelect`s over indexed options, so a `null` option ("follow global", "Direct connection") and a stale value (shown as the hint) never assert; RDP mode shows domain / RDP-security / single-hop SSH-tunnel select (stale tunnel ids render as "Direct connection") and hides all SSH-only sections; the per-host options are `FSwitch`es in an `FTileGroup`; the pinned footer holds Delete (existing hosts only; `showYsConfirm`, then `HostProvider.deleteHost`), Test (SSH only) and Save; `_save` preserves `protocol`/`domain`/`rdpSecurity`/`createdAt`. The shared `ProtocolBadge` widget (`app/lib/widgets/protocol_badge.dart`, a `YsStatusBadge`) marks RDP/VNC hosts on dashboard cards, list rows, and the panel header. `RdpWorkspace` supports **fullscreen** (`isFullscreen` + `onFullscreenChanged(bool)` — the widget reports intent, `MainScreen._setRdpFullscreen` owns `windowManager.setFullScreen` and collapses the app chrome to just the workspace): toolbar button enters (enabled only while connected), an auto-hiding hover pill at the top screen edge (mstsc-style; flashes 2.5 s on entry) exits, and the workspace auto-requests windowed mode when the session leaves `connected`; `MainScreen.build` also force-exits if the active tab stops being the RDP session (tab switch/close via hotkey), so the user can never be trapped chrome-less. Dashboard host actions are protocol-aware: SFTP/Test hidden for RDP, bulk Run/Push filter to SSH hosts (with a skipped-count snack), CONNECT ALL counts live RDP tabs, Duplicate keeps the RDP fields, Copy URL uses `rdp://` for RDP hosts. + +**Bulk actions:** the hosts dashboard's SELECT mode drives `app/lib/widgets/bulk/` — `BulkActionBar` (Select all / Clear / Connect all / Run command / Push files / Done, forui buttons; action cluster right-anchored, scrolls when narrow), `BulkRunDialog` + `BulkRunController` (parallel exec with bounded concurrency, 30 s per-host timeout, per-host failure isolation), `BulkDiffView` (groups identical outputs against a promotable baseline, side-by-side compare), `BulkPushDialog` (multi-host upload via `SftpTransferService.uploadDirectory(overwrite: true)`), `BulkHostStatusList` (shared per-host status rows), `bulk_dialog_chrome.dart` (shared header/footer and window-fitting body of the two dialogs). Closing a dialog mid-run confirms, cancels queued hosts, and lets in-flight operations finish. **Code editor:** `CodeEditorScreen` renders a Monaco editor via `webview_flutter` using the bundled `assets/monaco_editor.html`. @@ -192,7 +203,7 @@ Compiled into the app. Registered in `app/lib/plugins/plugin_registry.dart` (`kR 2. Import and instantiate in `plugin_registry.dart` Each implements `YourSSHPlugin` (from `yourssh_plugin_api`): -- `buildUI(context, pluginContext)` — plugin's widget +- `buildUI(context, pluginContext)` — plugin's widget; wrap it in `YsPluginHost` (from `yourssh_ui`) so it keeps the Ys forui theme even when mounted without the app's root builder (as Snippets, DevOps and Web Tools do) - `onActivate(ctx)` / `onDeactivate()` — lifecycle hooks - `minApiVersion` — checked at runtime against `kApiVersion` @@ -207,11 +218,11 @@ Loaded at runtime from a plugins directory via `packages/yourssh_script_engine`. - `QuickJsRuntime` — Dart FFI bindings for the QuickJS C engine; evaluates JS, calls hooks, returns structured results - `JsRuntimeRegistrar` — registers all Dart → JS bridge APIs into a `QuickJsRuntime` - `HookBus` — typed event bus; supports `transform` (modify data), `intercept` (block), and `observe` (side-effect) hooks; wired into `SshService` for `terminal.output`, `terminal.input`, and session lifecycle events -- `PluginLoader` — scans a directory for `plugin.json` manifests, loads plugins, watches the filesystem for changes and hot-reloads modified plugins +- `PluginLoader` — scans a directory for `plugin.json` manifests, loads plugins, watches the filesystem for changes and hot-reloads modified plugins; `reservedIds` (the built-in Dart plugin ids from `kRegisteredPlugins`, passed in `main.dart`) are never loaded or prompted for — a stale `~/.yourssh/plugins/snippets` copy of the old bundled JS Snippets (`dev.yourssh.snippets`, no longer shipped) is skipped with a console line. That copy used to move the native `yourssh.snippets` prefs into `plugin::dev.yourssh.snippets::storage::snippets` and delete them; `recoverJsSnippets` (`packages/yourssh_snippets`, run once from `SnippetProvider._load`, marker `yourssh.snippets.js_recovered`) restores or merges them back - `PermissionGuard` — enforces manifest-declared permissions before dispatching bridge calls - `PluginErrorTracker` — circuit breaker wired into hook/panel dispatch: errors count 1, timeouts 5, success resets; at 10 the plugin's hooks are skipped and it is unloaded - **Execution limits** (`native/bridge/qjs_bridge.c`): interrupt-handler deadline per call (250 ms hooks/panel messages, 5 s load) → `QuickJsTimeoutException`, 64 MiB memory cap, 512 KiB stack; host-callback results use the bridge's own `qjs_alloc` (freed in C). Only the macOS `assets/native/macos/libqjsbridge.dylib` (arm64) is prebuilt — rebuild with `native/build_macos.sh` after changing the C bridge -- **Consent** is bound to a SHA-256 of every file in the plugin dir (any change re-prompts) and stored grants are intersected with the manifest's current permissions; pending consents queue FIFO; `resolvePluginFile` keeps `manifest.entry` / panel `webviewEntry` inside the plugin dir (rejects `../`, absolute paths, escaping symlinks); `terminal.read` observes output only (its return value is ignored — rewriting needs `terminal.transform`); `MigrationBridge` is registered only for `dev.yourssh.snippets` +- **Consent** is bound to a SHA-256 of every file in the plugin dir (any change re-prompts) and stored grants are intersected with the manifest's current permissions; pending consents queue FIFO; `resolvePluginFile` keeps `manifest.entry` / panel `webviewEntry` inside the plugin dir (rejects `../`, absolute paths, escaping symlinks); `terminal.read` observes output only (its return value is ignored — rewriting needs `terminal.transform`) - `PluginUiRegistry` — plugins can register Flutter widgets by calling the `ui.register(id, widgetSpec)` JS API; the app renders these in the plugin manager **Bridges (Dart APIs exposed to JS):** @@ -225,6 +236,39 @@ Loaded at runtime from a plugins directory via `packages/yourssh_script_engine`. - `plugin_manager_screen.dart` — lists installed JS plugins, enable/disable toggle, reload action - `plugin_console_screen.dart` — per-plugin `console.log` output viewer +## CLI + +`yourssh` is a thin client that asks the running app to act: `connect `, `ls [--json] [--tag T] [--filter Q]`, `version`, `open `, `help` (`activate` is an internal request used by a second app launch to raise the window). There is no `--split` flag. Runs on macOS, Linux and Windows, from source: `dart run packages/yourssh_cli/bin/yourssh.dart …` or `dart compile exe packages/yourssh_cli/bin/yourssh.dart`. Design: `docs/superpowers/specs/2026-11-12-yourssh-cli-design.md`. + +**File map** +- `packages/yourssh_cli/bin/yourssh.dart` — entry; resolves the endpoint with `CliEndpoint.forCli` (uid on macOS/Linux, user SID on Windows; dev variant when `YOURSSH_DEV=1`, which also never launches the installed app — `DevBuildLauncher`) and picks `UnixSocketTransport` / `WindowsPipeTransport` +- `packages/yourssh_cli/lib/protocol.dart` — `CliRequest`/`CliResponse`, `CliExit`, `validateArgs`, size caps +- `packages/yourssh_cli/lib/endpoint.dart` — `CliEndpoint.resolve(dev:)`, `CliEndpoint.forCli`, `writeToken`/`readToken`, `tokensEqual` +- `packages/yourssh_cli/lib/client.dart` — `runCli` (arg parsing, shared-temp check `checkSharedRunDir`, token read, launch-and-wait loop, output), `UnixSocketTransport`, `SystemAppLauncher`/`MacAppLauncher`/`LinuxAppLauncher`/`WindowsAppLauncher`/`DevBuildLauncher`, `SystemPathInspector` (`/usr/bin/stat`, BSD or GNU flags) +- `packages/yourssh_cli/lib/src/win_pipe.dart` (exported by `lib/win_pipe.dart`) — hand-written `dart:ffi` bindings to kernel32/advapi32 (no `win32` package), shared by the app's listener and the client: `currentUserSid`, `pipeSddlForSid`, `processRunsAsCurrentUser` (EqualSid of token users), overlapped pipe create/connect/read/write with a stop event, `pipeExists` (lists `\\.\pipe\`, never opens the pipe). No decision depends on `GetLastError`: under the Dart VM it reads 0, so it only feeds messages (R25). Connect/read/write go through ntdll `NtFsControlFile(FSCTL_PIPE_LISTEN)`/`NtReadFile`/`NtWriteFile`, whose NTSTATUS return (or the IO_STATUS_BLOCK at the head of `OVERLAPPED` after completion) is classified; kernel32's `ReadFile` etc. can't be used without the last error, because they set `OVERLAPPED.Internal` to `STATUS_PENDING` before issuing the request, so a synchronous failure looks pending +- `packages/yourssh_cli/lib/src/win_pipe_transport.dart` — `WindowsPipeTransport` (blocking pipe I/O in a short-lived isolate) +- `packages/yourssh_cli/lib/output.dart` — `ls` table / JSON (`jsonHosts` also escapes U+007F–U+009F, which `jsonEncode` leaves raw); `sanitize` strips C0/C1 control chars from server-provided text +- `app/lib/services/cli/` — `cli_server.dart` (transport-independent `handleLine`: decode, token check, same-URL debounce, providers-ready gate, dispatch, `onUrlRefused`), `cli_listener*.dart` (`createCliListener`, `prepareCliRunDir`: Unix socket listener, `cli_listener_windows.dart` named-pipe listener), `peer_cred.dart` (peer uid), `single_instance.dart` (`claimSingleInstance`, `InstanceLock`, `acquireInstanceLockOrForward`, `startCliEndpoint`, forward a second launch), `host_resolver.dart`, `app_cli_handlers.dart` (bridge to `SessionProvider`/`HostProvider`), `url_channel.dart` (`yourssh://` delivery, `raiseWindowForCli`), `link_refused.dart` (bell entry), `host_summary.dart` +- Wiring: `main.dart` (`claimSingleInstance` in `main()` before any start-up work; `_startCliEndpoint` after the first frame with the held lock and one `CliServer` shared by the listener and `UrlChannel`; `onWindowClose` cleanup); macOS `Info.plist` + `MainFlutterWindow.swift` for URLs and `activate` + +**Endpoint** (`CliEndpoint.resolve`): macOS `~/Library/Application Support/YourSSH/run/`; Linux `$XDG_RUNTIME_DIR/yourssh/`, else `~/.local/state/yourssh/run/`. Files: `cli.sock`, `cli.token`, `cli.lock`, `app.path`. When `cli.sock` would be ≥ 100 bytes the run dir falls back to `$TMPDIR/yourssh-run` (macOS, if `TMPDIR` set) or `/tmp/yourssh-`; for that shared-temp location the listener refuses a pre-existing dir that is not ours or not 0700, and the CLI (`checkSharedRunDir`: dir ours + 0700, socket ours + no group/other bits, via `/usr/bin/stat`) and the app's forwarder (`isPrivateRunDir` + the socket peer's uid) check it before reading the token or sending anything (CLI exit 4; the forwarder does not forward). Windows: run dir `%LOCALAPPDATA%\YourSSH\run\` (`cli.token`, `cli.lock`, `app.path`) and named pipe `\\.\pipe\yourssh-cli-` (the current user's SID from the process token). **Dev variant** (`resolve(dev: true)`): non-release app builds (`!kReleaseMode`, i.e. `flutter run`, tests) use `YourSSH-dev` (macOS/Windows) / `yourssh-dev` (Linux) run dirs, fallbacks `yourssh-dev-run` / `/tmp/yourssh-dev-`, and pipe `\\.\pipe\yourssh-cli-dev-`, so a debug build never takes the installed app's lock or endpoint; the CLI selects it with `YOURSSH_DEV=1`. + +**Protocol v1** (`protocol.dart`): NDJSON over the socket or pipe, one request line and one response line per connection. Request `{v,id,token,cmd,args}`, response `{v,id,ok,result}` or `{v,id,ok:false,code,error,candidates?}`. Request cap 64 KiB (`kMaxRequestBytes`, oversize connection is dropped without reply), response cap 16 MiB, 5 s server read timeout, 30 s client timeout. Unknown fields and unknown args are rejected (usage); a version other than 1 maps to exit 3. Exit codes (`CliExit`): 0 ok, 1 runtime error, 2 usage (bad args, unknown or ambiguous host; ambiguity returns `candidates`), 3 app unreachable / protocol mismatch, 4 denied (token/permission). + +**Security model**: run dir 0700, socket/token 0600; the listener rejects any peer whose uid (`SO_PEERCRED` / `LOCAL_PEERCRED`) differs from ours or cannot be read; a fresh 32-byte hex token is written at every app launch and compared in constant time; `cli.lock` (exclusive lock held for the app lifetime: `fcntl` on macOS/Linux, `LockFileEx` on Windows) makes the app single-instance and decides who owns the endpoint — `claimSingleInstance` runs in `main()` before the sandbox migration, `runApp` and every start-up side effect (port forwards, plugins, `migratePlaintextSecrets`, update check, sync): an answering instance or a busy lock → the launch forwards its request (URL or `activate`, retrying up to 5 s while the owner starts) and exits; the token, listener and `app.path` follow after the first frame (`startCliEndpoint(lock:)`); if the endpoint fails to start the lock stays held (still one instance, no CLI); a stale socket is replaced only if nothing answers on it; removed on normal quit, and `CliEndpointOwner.stop` releases the lock only after the listener has stopped (so it never unlinks a relaunch's socket). Windows (`WindowsPipeCliListener`): the first instance is created with `FILE_FLAG_FIRST_PIPE_INSTANCE` (if that fails and the name is listed under `\\.\pipe\` — ours or another user's — → `CliEndpointInUse`), a protected DACL `D:P(A;;GA;;;)` (current user only) and `PIPE_REJECT_REMOTE_CLIENTS`, byte mode, overlapped; the listener drops, without a reply, any client whose process token user (`GetNamedPipeClientProcessId` → `OpenProcess` → `OpenProcessToken`) is not `EqualSid` to ours, and the client (and its `probe`) checks the server the same way (`GetNamedPipeServerProcessId`) before it sends the token — the pipe namespace is global, so a squatted name exits 4 "the YourSSH pipe is owned by another user"; the client opens with SQOS identification level (a server can never impersonate it). Client open: not listed → unreachable (launch); listed but CreateFileW fails → `WaitNamedPipeW` 2 s and one retry, then exit 4 "cannot open the YourSSH pipe (access denied or busy)". `cli.token` is overwritten in place on Windows; on window close the lock is released only after the listener closed every instance. An accept isolate always keeps a listening instance (the next one is created before a connected one is handed over) and each client gets short-lived worker isolates for read and write, so a client that never sends a newline cannot block others (dropped after `kCliReadTimeout`, 5 s); every wait also watches a stop event, which `stop()` signals. Server errors return a generic `internal error` (detail stays in the local log). The `yourssh` client sanitizes everything it prints. + +**Launch when the app is not running** (client): on an unreachable endpoint it launches once, then retries every 200 ms for up to 15 s; `version` never launches (prints the CLI version and "YourSSH app: not running", exit 3), and with `YOURSSH_DEV=1` nothing is launched. A server failure with code 3 (e.g. "still starting") is exit 3. macOS: `/usr/bin/open -b com.thangnm.yourssh` (absolute path); a non-zero exit (app not installed) is exit 3 at once with a hint. Linux: executes the path in `/app.path` (written by the app on start) only if the run dir and that file are owned by the current user, not group/world-writable, and the file is a regular file with an absolute path; otherwise it asks the user to start YourSSH once from the launcher. Windows: starts the `.exe` recorded in `\app.path` (no mode checks; the run dir is per-user under `%LOCALAPPDATA%`) only if it is an absolute drive path to an existing regular `.exe` with no control/reserved characters (no UNC, `\\?\` or `:stream` paths), detached; otherwise it asks the user to start YourSSH once from the Start menu. A token file that exists but is denied/unreadable exits 4. + +**Host resolution** (`host_resolver.dart`): saved host by id, then label (case-insensitive, NFC, trimmed; several matches → ambiguous, exit 2 with candidates), then `user@hostname[:port]` equal to a saved host. Only after that, for CLI `connect`, an ad-hoc `user@host[:port]` (port default 22): user `[A-Za-z0-9._-]+`, host a DNS name/IPv4 or `[IPv6]`, port 1–65535, and neither user nor host may start with `-`. The ad-hoc host is `AuthType.agent` (system ssh-agent identities): it has no stored password and the app has no interactive SSH password prompt, so a password-only server needs a saved host. Ad-hoc is never allowed via URLs. `connect` returns as soon as the tab exists (≤ 10 s wait, auth is not awaited) and focuses the window. `ls`, `connect` and `open` wait (≤ 15 s, then code 3) until hosts, known hosts and keys are loaded. + +**Raising the window** (`raiseWindowForCli`, the handlers' `focus`): `windowManager.show()` + `focus()`; on macOS also the native `activate` method on the `yourssh/url` channel (`NSApp.activate(ignoringOtherApps: true)` + `makeKeyAndOrderFront`); on Windows the client (CLI and the second-launch forwarder) calls `AllowSetForegroundWindow(serverPid)` (`GetNamedPipeServerProcessId`) after the server SID check and before writing the request (`pipeRoundTrip(beforeSend:)`); Linux unchanged. Needs a manual check per platform (focus-stealing rules). + +**URL scheme**: `yourssh://connect/` only (one path segment, no query/fragment/userinfo/port); saved hosts only. Handled by the `open` command with `trusted` delivery (no token; only `open`/`activate` are accepted that way). `CliServer` (one instance for the socket/pipe and `UrlChannel`) drops a repeat `open` of the same URL (case-insensitive) within 2 s on every path — CLI, forwarded launch, macOS URL event — answering ok without opening; a refused `open` (unknown/ambiguous host, unsupported shape) calls `onUrlRefused`, which adds an `AppNotificationType.linkRefused` bell entry ("Link refused: …", control/bidi characters stripped, deduped per link). Registration: macOS `CFBundleURLTypes` in `Info.plist`; `MainFlutterWindow.swift` installs the Apple Event handler in `awakeFromNib` and forwards over the `yourssh/url` method channel, queueing (newest 8) until Dart sends `ready`. Windows: the Inno installer built inline in `.github/workflows/release.yml` writes `HKCU\Software\Classes\yourssh` (`URL Protocol`, `shell\open\command` = `"{app}\yourssh.exe" "%1"`) for the installing user; the portable zip does not register. Linux: the `.deb`'s `yourssh.desktop` (same workflow) has `Exec=/usr/share/yourssh/yourssh %u` and `MimeType=x-scheme-handler/yourssh;`; the tarball does not register. On Linux and Windows a second launch's URL is forwarded to the running instance (`single_instance`); a cold launch handles its own URL (`openLaunchUrl`). + +**Audit**: `SessionProvider.connectAny(auditSource:)` records `meta.source` = `cli` / `url` on SSH connect rows (omitted when the source is `app`); RDP/VNC rows keep `source: rdp|vnc` and add `via: cli|url`. + +**Not yet**: packaging the binary in release builds and an "Install command-line tool" button (phase 2), `sftp`/`tunnel`/`import`/`export` (phase 2), MCP (phase 4). In release builds today `yourssh` / `yourssh.exe` (and `/usr/bin/yourssh` from the .deb) is the GUI app; the CLI binary is not packaged yet, so run it from source. + ## Sync feature **Supabase sync** (cloud): opt-in. The 12-char sync code (`SyncCode`, ~60 bits, `Random.secure`) is the only secret: it is the PBKDF2-HMAC-SHA256 (100k iterations, per-row random 16-byte salt, format `v1:`) input for the AES-256-GCM payload key, and the Supabase row id is its one-way hash `SyncCode.rowId` — the RLS policy lets any anon-key holder read/write `sync_data`, so the code must never be stored server-side. Residual risk: anon-key holders can delete/overwrite rows (DoS, surfaces as a decrypt failure). The payload carries host JSON plus `pw_` passwords. `SyncService.push` fires from `HostProvider.onMutation` and retries every 30 s on failure (`sync_pending_push` flag). `SyncService.pull` runs on `WindowFocus`; it fetches only when the row's `updated_at` is newer than `last_push_at`, and — because that column is attacker-controllable — applies the payload only if its **inner** (authenticated) `updated_at` is strictly newer than both `sync_last_push_at` and `sync_last_applied_at` (anti-rollback). `SyncProvider.enabled` is derived from `isSupabaseConfigured` — no separate flag. diff --git a/README.md b/README.md index d55c9db5..57276c39 100644 --- a/README.md +++ b/README.md @@ -265,6 +265,29 @@ sudo dpkg -r yourssh --- +## Command line + +```bash +yourssh ls # list saved hosts +yourssh ls --tag prod --json # filter by tag, machine-readable +yourssh connect prod-db # open a saved host (id or label) in YourSSH +yourssh connect deploy@10.0.0.5:2222 # unsaved user@host[:port], signs in with your SSH agent +yourssh open yourssh://connect/prod-db +yourssh version +``` + +`yourssh` starts YourSSH if it is not running (`yourssh version` never does; it reports "YourSSH app: not running" and exits 3). An unsaved `user@host[:port]` authenticates with the keys in your SSH agent (`ssh-add`); a server that only accepts a password needs a saved host. `yourssh://connect/` links open saved hosts only (registered by the macOS app, the Windows installer and the Linux .deb; not by the portable zip or tarball); a link that names no saved host is ignored and shown in the notification bell. Exit codes: 0 ok, 1 error, 2 usage/unknown or ambiguous host, 3 app unreachable, 4 denied. + +A debug build (`flutter run`) uses its own endpoint, so it never takes over from an installed YourSSH; point the CLI at it with `YOURSSH_DEV=1 yourssh …`. + +Availability: macOS, Linux and Windows, from source for now (`dart run packages/yourssh_cli/bin/yourssh.dart …`); the CLI binary is not packaged in releases yet (in a release, `yourssh` / `yourssh.exe` is the GUI app). On Linux and Windows, auto-starting the app needs it to have run once (it writes `app.path`). + +The CLI talks to the app over a per-user Unix socket on macOS/Linux and over the named pipe `\\.\pipe\yourssh-cli-` on Windows (current-user-only DACL, local clients only). On Windows the app checks that a client runs as the same user before it reads the request, and the CLI checks the same about the app before it sends the token. YourSSH is single-instance on all three: a second launch, such as a clicked `yourssh://` link, is handed to the running app. + +Not yet: packaged CLI binary and an "Install command-line tool" button; `sftp`/`tunnel`/`import`/`export`; MCP. + +--- + ## Tech Stack | Layer | Technology | diff --git a/app/analysis_options.yaml b/app/analysis_options.yaml index 0d290213..5e3d14cc 100644 --- a/app/analysis_options.yaml +++ b/app/analysis_options.yaml @@ -9,6 +9,18 @@ # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml +# Build output and the platform runner projects are not analyzed. `flutter pub +# get` (Flutter 3.47 and later) adds any of these that are missing +# (AnalysisOptionsMigration), so removing them only makes the next `pub get` +# rewrite this file. +analyzer: + exclude: + - build/** + - android/** + - windows/** + - macos/** + - linux/** + linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` diff --git a/app/android/gradle/wrapper/gradle-wrapper.properties b/app/android/gradle/wrapper/gradle-wrapper.properties index 2d428bfb..2f745f99 100644 --- a/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/app/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-all.zip diff --git a/app/android/settings.gradle.kts b/app/android/settings.gradle.kts index c21f0c5b..fe4da50d 100644 --- a/app/android/settings.gradle.kts +++ b/app/android/settings.gradle.kts @@ -19,8 +19,8 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "9.0.1" apply false - id("org.jetbrains.kotlin.android") version "2.3.20" apply false + id("com.android.application") version "9.3.3" apply false + id("org.jetbrains.kotlin.android") version "2.4.21" apply false } include(":app") diff --git a/app/assets/bundled_plugins/snippets/index.js b/app/assets/bundled_plugins/snippets/index.js deleted file mode 100644 index 5d9fdfbb..00000000 --- a/app/assets/bundled_plugins/snippets/index.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict'; - -var DEFAULTS = [ - { id: 'd1', label: 'Disk usage', command: 'df -h', description: 'Show disk usage per filesystem', tag: 'system' }, - { id: 'd2', label: 'Memory', command: 'free -h', description: 'Show memory and swap usage', tag: 'system' }, - { id: 'd3', label: 'Top processes', command: 'ps aux --sort=-%cpu | head -20', description: 'CPU-sorted process list', tag: 'system' }, - { id: 'd4', label: 'Syslog tail', command: 'tail -f /var/log/syslog', description: 'Follow system log', tag: 'logs' }, - { id: 'd5', label: 'Network interfaces', command: 'ip addr show', description: 'List network interfaces', tag: 'network' }, - { id: 'd6', label: 'Open ports', command: 'ss -tlnp', description: 'Show listening TCP ports', tag: 'network' } -]; - -var _activeSessionId = null; - -function getSnippets() { - var raw = _storage.get(JSON.stringify({ key: 'snippets' })); - if (raw === null || raw === 'null') return DEFAULTS.slice(); - try { - var parsed = JSON.parse(raw); - if (parsed === null) return DEFAULTS.slice(); - return JSON.parse(parsed.value || '[]'); - } catch (e) { - return DEFAULTS.slice(); - } -} - -function saveSnippets(list) { - _storage.set(JSON.stringify({ key: 'snippets', value: JSON.stringify(list) })); -} - -function migrateIfNeeded() { - try { - var migrated = _storage.get(JSON.stringify({ key: 'migrated' })); - if (migrated !== null && migrated !== 'null') return; - - var oldRaw = _migration.readOldSnippets(JSON.stringify({})); - if (oldRaw !== null && oldRaw !== 'null') { - try { - var oldData = JSON.parse(oldRaw); - if (Array.isArray(oldData) && oldData.length > 0) { - saveSnippets(oldData); - _migration.clearOldSnippets(JSON.stringify({})); - console.log('[snippets] Migrated ' + oldData.length + ' snippets from old storage'); - } - } catch (e) { - console.error('[snippets] Failed to parse old snippets: ' + e); - } - } - _storage.set(JSON.stringify({ key: 'migrated', value: '1' })); - } catch (e) { - console.error('[snippets] Migration error: ' + e); - } -} - -plugin.on('session.connect', function(ctx) { - _activeSessionId = ctx.sessionId; -}); - -plugin.on('session.disconnect', function(ctx) { - if (_activeSessionId === ctx.sessionId) { - _activeSessionId = null; - } -}); - -migrateIfNeeded(); - -function _handlePanelMessage(msg) { - try { - if (msg.type === 'get-snippets') { - return { type: 'snippets', data: getSnippets() }; - } - if (msg.type === 'add-snippet') { - var list = getSnippets(); - var snippet = msg.snippet; - snippet.id = 's' + String(new Date().getTime()) + Math.random().toString(36).slice(2, 6); - list.push(snippet); - saveSnippets(list); - return { type: 'ok' }; - } - if (msg.type === 'delete-snippet') { - var filtered = getSnippets().filter(function(s) { return s.id !== msg.id; }); - saveSnippets(filtered); - return { type: 'ok' }; - } - if (msg.type === 'run-snippet') { - if (!_activeSessionId) { - return { type: 'error', message: 'No active SSH session. Connect to a host first.' }; - } - _ssh.inject(JSON.stringify({ sessionId: _activeSessionId, text: msg.command + '\n' })); - return { type: 'ok' }; - } - if (msg.type === 'copy-snippet') { - _ui.copyToClipboard(JSON.stringify({ text: msg.command })); - _ui.notify(JSON.stringify({ message: 'Copied to clipboard', type: 'info' })); - return { type: 'ok' }; - } - return { type: 'error', message: 'Unknown message type: ' + msg.type }; - } catch (e) { - console.error('[snippets] onMessage error: ' + e); - return { type: 'error', message: String(e) }; - } -} - -plugin._setPanelMessage(_handlePanelMessage); - -ui.panel.register({ - title: 'Snippets', - icon: 'code', - webviewEntry: 'panel/index.html', - onMessage: _handlePanelMessage -}); diff --git a/app/assets/bundled_plugins/snippets/panel/index.html b/app/assets/bundled_plugins/snippets/panel/index.html deleted file mode 100644 index 4c9d3664..00000000 --- a/app/assets/bundled_plugins/snippets/panel/index.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - -Snippets - - - - -
- - -
- -
- - - -
- - - - diff --git a/app/assets/bundled_plugins/snippets/plugin.json b/app/assets/bundled_plugins/snippets/plugin.json deleted file mode 100644 index 49feb016..00000000 --- a/app/assets/bundled_plugins/snippets/plugin.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "dev.yourssh.snippets", - "name": "Snippets", - "version": "2.0.0", - "entry": "index.js", - "minAppVersion": "1.0.0", - "permissions": [ - "session.observe", - "terminal.inject", - "ui.clipboard", - "ui.notify", - "ui.panel" - ] -} diff --git a/app/assets/fonts/inter/Inter-Bold.ttf b/app/assets/fonts/inter/Inter-Bold.ttf new file mode 100644 index 00000000..9fb9b751 Binary files /dev/null and b/app/assets/fonts/inter/Inter-Bold.ttf differ diff --git a/app/assets/fonts/inter/Inter-Medium.ttf b/app/assets/fonts/inter/Inter-Medium.ttf new file mode 100644 index 00000000..458cd060 Binary files /dev/null and b/app/assets/fonts/inter/Inter-Medium.ttf differ diff --git a/app/assets/fonts/inter/Inter-Regular.ttf b/app/assets/fonts/inter/Inter-Regular.ttf new file mode 100644 index 00000000..b7aaca8d Binary files /dev/null and b/app/assets/fonts/inter/Inter-Regular.ttf differ diff --git a/app/assets/fonts/inter/Inter-SemiBold.ttf b/app/assets/fonts/inter/Inter-SemiBold.ttf new file mode 100644 index 00000000..47f8ab1d Binary files /dev/null and b/app/assets/fonts/inter/Inter-SemiBold.ttf differ diff --git a/app/assets/fonts/inter/OFL.txt b/app/assets/fonts/inter/OFL.txt new file mode 100644 index 00000000..9b2ca37b --- /dev/null +++ b/app/assets/fonts/inter/OFL.txt @@ -0,0 +1,92 @@ +Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION AND CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/app/assets/monaco_editor.html b/app/assets/monaco_editor.html index 39b2eaf6..775cee43 100644 --- a/app/assets/monaco_editor.html +++ b/app/assets/monaco_editor.html @@ -5,13 +5,13 @@ @@ -26,12 +26,31 @@