# Test QH sessions and input

## Quick check in the app

Start in a spare session so these commands do not interrupt your work.

1. Type `pwd`, press Enter, and check the starting folder.
2. Run `echo $$` and note the shell PID.
3. Create a second tab, switch back, resize the window, and run `echo $$` again. The original pane should retain its PID.
4. Split the pane and run `echo $$` in the new pane. It should have a different PID.
5. Narrow the window until only the focused pane fits, then enlarge it. The saved split layout should return.
6. Run `sleep 30`, then press Ctrl+C. A prompt should return without closing the workspace.

## Unicode and color

```sh
printf 'Unicode: café 日本語 ✓\n'
printf '\033[36mcyan\033[0m normal\n'
```

Expect readable Unicode, cyan text followed by default-color text, and a prompt on the next line. Glyph coverage depends on your font.

Try command history with Up, tab completion with a known folder name, and a multiline paste. Run `vim` or `top` if installed, then quit the program and check that the prompt returns. Mouse-enabled CLIs receive mouse input. Wheel input scrolls normal history or navigates alternate-screen pagers. Hold Shift to select text or scroll history instead.

## Source checks

From the repository with dependencies installed:

```sh
bun run check
bun test
node scripts/smoke-cli.mjs
node scripts/smoke-desktop.mjs
node scripts/smoke-restore.mjs
bun run build:desktop
```

Type checking should finish without errors. The suite currently has 39 tests covering geometry, session isolation, input, ANSI output, Unicode, full-screen programs, configuration, grouping, docking, and cleanup. All smoke scripts should print a passed message and terminate their child shells.

[GitHub Actions](https://github.com/qentrah/qh/actions/workflows/ci.yml) builds and checks native Apple Silicon and Intel apps. Those checks do not replace visual inspection of every font and macOS setup.

## Report a problem

[Open an issue](https://github.com/qentrah/qh/issues) with your QH version, Mac processor, macOS version, shell, exact steps, and expected versus actual result. Include the command that triggers the problem and whether it happens in the desktop app, CLI, or both. Remove secrets and personal terminal output before sharing logs.

Checks include unknown shell commands, non-finite resize values, valid resize reporting through stty, stale process messages during restore, JSONC comment preservation, duplicate GUI shortcuts, and custom-theme validation. Try a built-in theme, record a shortcut, rename inline, select a color, and close Settings with its native close button when checking the desktop build.

The tests also cover background output while scrolled back, mouse protocols, pager navigation, explicit pane docking, current-tab resize routing, and CLI wrapper detection. A local check of `gh help environment` passed with normal history and macOS `less` while retaining the same shell PID.

## Automatic releases

A merged pull request triggers the push-to-main workflow. Pull requests run checks without publishing. Main builds both native Mac architectures, applies the next version to the app, runs source and packaged-runtime smoke checks, and verifies signatures and checksums. Only after both builds pass does the release job upload both ZIPs, checksums, and the installer to a draft and publish it as stable. No manual tag or website version edit is required. Published assets are preserved on reruns. Explicit prerelease tags publish to the preview channel.
