diff --git a/.github/workflows/ios-sim.yml b/.github/workflows/ios-sim.yml index 3c4f79bdb7..498ba4f06e 100644 --- a/.github/workflows/ios-sim.yml +++ b/.github/workflows/ios-sim.yml @@ -193,7 +193,12 @@ jobs: # core and backend are skipped when an earlier run built them if: ${{ !cancelled() && !failure() }} runs-on: macos-latest - timeout-minutes: 90 + environment: + name: app-sim-claude + deployment: false + timeout-minutes: 330 + env: + CLAUDE_RUN: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[claude-test]') }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -262,6 +267,24 @@ jobs: - name: Run smoke test run: scripts/ci/ios-sim/smoke-test.sh "$RUNNER_TEMP/DerivedData/Build/Products/Debug-iphonesimulator/SimpleX.app" "$RUNNER_TEMP/smoke-test" + - name: Install Claude Code + if: env.CLAUDE_RUN == 'true' + run: | + npm install -g @anthropic-ai/claude-code@2.1.300 + claude --version + + - name: Run the device test plan with Claude + if: env.CLAUDE_RUN == 'true' + timeout-minutes: 240 + env: + CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + BACKEND_DIR: ${{ runner.temp }}/backend + run: scripts/ci/ios-sim/claude-test.sh "$RUNNER_TEMP/claude-test" + + - name: Report Claude usage + if: ${{ always() && env.CLAUDE_RUN == 'true' }} + run: scripts/ci/ios-sim/claude-usage.sh "$RUNNER_TEMP/claude-test" + - name: Stop test backend if: ${{ !cancelled() }} run: scripts/ci/ios-sim/backend.sh stop "$RUNNER_TEMP/backend" @@ -280,6 +303,17 @@ jobs: uses: actions/upload-artifact@v4 with: name: ios-sim-backend-logs - path: ${{ runner.temp }}/backend/*.log + path: | + ${{ runner.temp }}/backend/*.log + ${{ runner.temp }}/backend/seed.md retention-days: 3 if-no-files-found: warn + + - name: Upload Claude test results + if: ${{ always() && env.CLAUDE_RUN == 'true' }} + uses: actions/upload-artifact@v4 + with: + name: ios-sim-claude-test + path: ${{ runner.temp }}/claude-test + retention-days: 14 + if-no-files-found: warn diff --git a/scripts/ci/ios-sim/claude-prompt.md b/scripts/ci/ios-sim/claude-prompt.md new file mode 100644 index 0000000000..9f468fe4f8 --- /dev/null +++ b/scripts/ci/ios-sim/claude-prompt.md @@ -0,0 +1,49 @@ +# Device test session: SimpleX Chat iOS, online search + +You are testing the SimpleX Chat iOS app in an iPhone 17 simulator (iOS 26.5, screen 402 x 874 points) on a GitHub Actions runner. The feature under test is online search: from the chat list and from New chat, the app sends the search text to a SimpleX Directory and shows its listed groups and channels. You run the cases of the device test plan (at the end of this prompt) that the section "This session" names, in the layout it names, and write a report. You cannot change the app or the runner; anything wrong you find is a finding for the report. + +## Tools + +- **Bash runs only the `ui` helper**, one command per call: `ui tap "Search in Directory"`, `ui find Directory`. Any other program, a pipe, a redirection, `;` or `&&` is denied. Its commands are listed under "The ui commands" below. +- **Read, Write and Edit work only in the current directory.** Screenshots go to `shots/` (look at the `-view.jpg` files, they are smaller), and you write `report.md` here. + +## What you need to know about the app and the helper + +- **Layouts.** With the one-hand UI (reachable toolbar, the default) the chat list is drawn from the bottom up: the search field is near the bottom (y about 754), the list tags ("Add list" when there are no lists) or the online search rows are just above it, and chats and results stack upwards from there. With the top bar the search field is at the top, the tags above it, and "Search in Directory" and "Connect to …" appear below it. Stay in the layout the session names; the app starts in it, and `ui relaunch` keeps it. +- **Positions.** "Above" means a smaller y. Judge order and position from the tree's coordinates, and look at a screenshot when you judge layout (truncation, overlap, avatars). +- **The search field** has no label; tap it with `ui tap-value "Search or paste SimpleX link"` when empty, or by its text. The "Close" image in the field clears it; "Cancel" next to the field clears it and hides the keyboard. The keyboard does not capitalize, correct or predict. The keyboard's Search key is `ui key return`; keyboard keys are below the screen and not listed in the tree. +- **Pasting** (C4, W3): `ui clipboard ""`, tap the empty field once to focus it and once more to open its menu, then `ui tap Paste`. +- **Directory search.** "Search in Directory" (a row) searches the directory; the first time after the hints are reset the alert "Search in Directory?" asks first, with "Cancel", "Search" and "Search and don't show again" (`ui tap Search` taps the alert's button). Results come as a heading `Heading "Directory"`, then per entry an avatar image, `"#name"`, the description, "N members" or "N subscriber(s)", and "Join group" or "Join channel" as separate texts. A failed search shows "Search failed, tap to retry"; more results show "Show more". A search takes a few seconds (it sets up an encrypted connection) and times out after 10 s. +- **Hidden elements.** The tree always contains the closed user picker: the profile name, "Create SimpleX address", "Chat preferences", "Your chat profiles", "Use from desktop", "Settings", at coordinates on the screen even while it is hidden. Do not tap them unless you opened the picker by tapping your profile image in the toolbar (`Image "Account"`, 32 x 32; tap its centre with `ui tap-xy`). +- **Settings → Reset all hints:** open the picker, "Settings", scroll to the bottom, the app version row ("v…"), "Developer", "Reset all hints". Go back with the navigation back buttons and close Settings by swiping it down. +- **New chat** is the "Compose" button (the pencil) in the toolbar. +- **Counting requests.** `ui requests` tells how many directory searches the app sent; compare before and after an action to prove that something was or was not sent (C6, C9, D12, D13). +- **The test directory** can be stopped and started (`ui directory stop|start`). Use it instead of turning networking off (D8, D9; the simulator shares the runner's network). After `ui directory start`, wait about 15 s before searching again; while it is stopped, searches fail after 10 s. +- **Text size** (D3): `ui text-size accessibility-large`, and back to `ui text-size medium` afterwards. Only one phone size is available. +- **Joining.** Tapping a directory row starts the usual join flow; joining a channel works (the test relay is online), joining a group may stay "connecting". Joined chats then appear in the chat list, and the profile is no longer "without conversations". +- **A second profile** (D14, and D15 once the first profile has chats): open the picker, "Your chat profiles", add a profile; a new profile has no conversations. Switch back to `citester` when done. +- **If the app gets stuck**, `ui relaunch` restarts it (search text and results are cleared, everything else stays). +- Waiting: prefer `ui wait ` over repeated trees. + +## How to run the cases + +- Run each case of the session's list, in the plan's order unless a case needs another first (for example D15 needs a profile without conversations, U1 and U2 need a joined channel from D6). +- For each case, do what the plan says, decide pass or fail against the plan's "Expect" column, and take at least one `ui shot` at the moment that shows the result, named after the case and layout, for example `ui shot D2-reachable`. +- Pass only what you saw: quote the evidence (element labels, values and coordinates from the tree, or what a screenshot shows). If an expectation cannot be checked here, say which part and why, and mark the case passed for the parts you checked only if those parts are the substance of the case; otherwise skipped. +- **Skip** the N cases (no name-resolving server here), and any case that needs something this runner lacks, saying exactly what is missing. Known: U3 (needs a listed group joined through another link), W7, W8 and G1 (need contacts with SimpleX names), W10 (needs a notification from another profile), W11 unless "Archived contacts" is shown. Do not skip a case only because it takes several steps. +- **The Directory header** must be above its results in this layout (D2, D4, D8 and every screen with results): record the heading's y and the first and last result's y each time, and note whether `Heading "Directory"` comes before or after the result texts in the tree's order. +- **Avatars and the response size limit** (part of D2 and D7): search `ci avatar`. Six entries match; each has an avatar about the size the app makes, and a directory response must fit 10737 bytes, so expect about one entry per page. Tap "Show more" until it disappears and record which entries each page added. Compare with the page-by-page table under "Test directory" below: every entry reachable, none twice, none silently missing. Look at the screenshots: does every row show its picture (not the placeholder icon), is any row drawn wrong? +- Other app bugs you notice are findings: write what you did, what you saw, what you expected, and the screenshot. + +## The report + +Write `report.md` in the current directory as you go: create it after the first case and update it after every case, so a session that is cut short still leaves its results. Its sections: + +1. `# Device test report: ` and one line on the app state at the start. +2. `## Results`: a table with one row per case of the session's list: `| ID | Result | Evidence | Screenshots |`, Result being pass, fail or skipped (with the reason). +3. `## Directory header`: per screen with results, the heading's y and the first and last result's y, and the heading's place in the tree order. +4. `## Avatars and the size limit`: what each "Show more" added, compared with the table below, and how the avatars looked. +5. `## Findings`: app bugs, each with steps, what you saw, what you expected, screenshots. +6. `## Harness notes`: anything about `ui` or the runner that got in the way. + +End the session by making sure `report.md` is complete; your final message is a three-line summary: passed, failed and skipped counts, and the most important finding. diff --git a/scripts/ci/ios-sim/claude-scope b/scripts/ci/ios-sim/claude-scope new file mode 100644 index 0000000000..12f5d1da96 --- /dev/null +++ b/scripts/ci/ios-sim/claude-scope @@ -0,0 +1,6 @@ +# What claude-test.sh runs: one Claude session per layout (reachable, top), the plan's cases, and each session's bounds. +model: claude-haiku-5-5 +layouts: reachable +cases: C2, D2, D7 +max-turns: 80 +max-budget-usd: 2 diff --git a/scripts/ci/ios-sim/claude-test.sh b/scripts/ci/ios-sim/claude-test.sh new file mode 100755 index 0000000000..e888652dac --- /dev/null +++ b/scripts/ci/ios-sim/claude-test.sh @@ -0,0 +1,111 @@ +#!/bin/bash + +# Runs the device test plan with Claude Code on this runner after the smoke test, one session per layout, +# as claude-scope says. A session drives the app only through the ui helper, and reads and writes only its +# own directory /: prompt.md, report.md, shots/, transcript.jsonl (stream-json). +# Usage: scripts/ci/ios-sim/claude-test.sh +# Needs CLAUDE_CODE_OAUTH_TOKEN, SIM_UDID (the booted simulator with the app) and BACKEND_DIR (the running test backend). + +set -euo pipefail + +token=${CLAUDE_CODE_OAUTH_TOKEN:?CLAUDE_CODE_OAUTH_TOKEN must be set} +# only the claude processes get the token, nothing else this script starts +unset CLAUDE_CODE_OAUTH_TOKEN + +mkdir -p "$1" +out=$(cd "$1" && pwd) +dir=$(cd "$(dirname "$0")" && pwd) +: "${SIM_UDID:?SIM_UDID must be the simulator UDID}" +: "${BACKEND_DIR:?BACKEND_DIR must be the work dir of the test backend}" + +scope() { + sed -n "s/^$1: *//p" "$dir/claude-scope" +} + +model=$(scope model) +layouts=$(scope layouts) +cases=$(scope cases) +max_turns=$(scope max-turns) +max_budget=$(scope max-budget-usd) + +export PATH="$dir:$PATH" BACKEND_DIR APP_LOG=$out/app.log CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 +cp "$BACKEND_DIR/seed.md" "$out/seed.md" + +xcrun simctl spawn "$SIM_UDID" log stream --level debug --style compact --predicate 'process == "SimpleX"' > "$APP_LOG" 2>&1 & +log_pid=$! +trap 'kill "$log_pid" 2> /dev/null || true' EXIT + +layout_name() { + case "$1" in + reachable) echo "the one-hand UI (reachable toolbar)" ;; + top) echo "the top bar" ;; + esac +} + +write_prompt() { + local layout=$1 previous=$2 + cat "$dir/claude-prompt.md" + echo + echo "## The ui commands" + echo + echo '```' + ui || true + echo '```' + echo + echo "## This session" + echo + echo "- Layout: $(layout_name "$layout")." + echo "- Cases: $cases." + if [ -z "$previous" ]; then + echo "- At the start: the smoke test onboarded the profile citester, which has no conversations, and searched the directory once, choosing \"Search\" in the alert." + else + echo "- At the start: an earlier session ran the cases in $(layout_name "$previous") on this app, so the profile may have chats, other profiles may exist and hints may be changed; look at the state first." + fi + echo "- Limits: $max_turns turns and \$$max_budget (estimated at API prices). Keep report.md current as you go." + echo + cat "$out/seed.md" + echo + cat "$dir/device-test-plan.md" +} + +status=0 +previous="" +for layout in $layouts; do + session=$out/$layout + mkdir -p "$session/shots" + ui layout "$layout" + write_prompt "$layout" "$previous" > "$session/prompt.md" + echo "::group::Claude session: $layout, cases $cases, $model, $max_turns turns, \$$max_budget" + session_status=0 + ( + cd "$session" + UI_OUT=$session/shots CLAUDE_CODE_OAUTH_TOKEN=$token claude -p \ + --model "$model" \ + --effort high \ + --restricted \ + --tools Bash,Read,Write,Edit \ + --allowedTools "Bash(ui)" "Bash(ui *)" Read Write Edit \ + --permission-mode dontAsk \ + --permission-prompts none \ + --strict-mcp-config \ + --max-turns "$max_turns" \ + --max-budget-usd "$max_budget" \ + --no-session-persistence \ + --output-format stream-json \ + --verbose \ + < prompt.md > transcript.jsonl 2> stderr.log + ) || session_status=$? + echo "claude exited with $session_status" + tail -n 20 "$session/stderr.log" + if [ -f "$session/report.md" ]; then + cat "$session/report.md" + else + echo "no report.md" + fi + echo "::endgroup::" + if [ "$session_status" -ne 0 ]; then + status=$session_status + fi + previous=$layout +done +exit "$status" diff --git a/scripts/ci/ios-sim/claude-usage.sh b/scripts/ci/ios-sim/claude-usage.sh new file mode 100755 index 0000000000..a829019990 --- /dev/null +++ b/scripts/ci/ios-sim/claude-usage.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Reports what each Claude session of claude-test.sh spent, from the final result event of its transcript, +# to the job summary and to /claude-usage.json. total_cost_usd is Claude Code's own estimate +# at API prices, not a bill. +# Usage: scripts/ci/ios-sim/claude-usage.sh + +set -euo pipefail + +out=$1 +summary=${GITHUB_STEP_SUMMARY:-/dev/stdout} +sessions=0 + +{ + echo "## Claude sessions" + echo + echo "| Session | Result | Turns | Duration | Input | Output | Cache read | Cache write | Per model, estimated at API prices | Total, estimated at API prices | Permission denials |" + echo "|---|---|---|---|---|---|---|---|---|---|---|" +} >> "$summary" + +for transcript in "$out"/*/transcript.jsonl; do + [ -f "$transcript" ] || continue + session=$(basename "$(dirname "$transcript")") + sessions=$((sessions + 1)) + result=$(jq -c -R 'fromjson? | select(.type == "result")' "$transcript" | tail -n 1) + if [ -z "$result" ]; then + echo "| $session | no result event: the session timed out or crashed | | | | | | | | | |" >> "$summary" + jq -n --arg s "$session" '{session: $s, result: "missing"}' > "$out/$session/usage.json" + continue + fi + jq --arg s "$session" '{session: $s, subtype, is_error, num_turns, duration_ms, usage: (.usage | {input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens}), modelUsage, total_cost_usd, permission_denials: (.permission_denials // [] | length)}' <<< "$result" > "$out/$session/usage.json" + jq -r --arg s "$session" '"| \($s) | \(.subtype)\(if .is_error then " (error)" else "" end) | \(.num_turns) | \(.duration_ms / 60000 | floor) min | \(.usage.input_tokens) | \(.usage.output_tokens) | \(.usage.cache_read_input_tokens) | \(.usage.cache_creation_input_tokens) | \([.modelUsage // {} | to_entries[] | "\(.key) $\(.value.costUSD // 0 | . * 100 | round / 100)"] | join(", ")) | $\(.total_cost_usd // 0 | . * 100 | round / 100) | \(.permission_denials // [] | length) |"' <<< "$result" >> "$summary" +done + +if [ "$sessions" -eq 0 ]; then + echo "No Claude session ran." >> "$summary" + echo "[]" > "$out/claude-usage.json" +else + jq -s '.' "$out"/*/usage.json > "$out/claude-usage.json" +fi +cat "$out/claude-usage.json" diff --git a/scripts/ci/ios-sim/device-test-plan.md b/scripts/ci/ios-sim/device-test-plan.md new file mode 100644 index 0000000000..07ef392e97 --- /dev/null +++ b/scripts/ci/ios-sim/device-test-plan.md @@ -0,0 +1,102 @@ +# Device test plan: iOS online search (f/directory-search) + +Run these on an iOS simulator or device on the Mac. Each case says what to do and what you should see. The case IDs map to the run's acceptance criteria (AC1–AC8) and review fixes (R1-x). + +## Setup + +1. **Build** `f/directory-search` (HEAD `e7678b634` or later) in Xcode on a simulator. Use a small one (iPhone SE) and a large one, or switch Dynamic Type to a large size for the layout cases. +2. **A directory the app can reach with service requests.** The app sends every search to `DIRECTORY_SERVICE_LINK` (`apps/ios/Shared/Model/DirectorySearch.swift:14`), which is the live SimpleX Directory. Searches against the live directory fail with `ASENotDRAddress` until it runs `/_rotate_address_keys `. Pick one: + - **Live directory:** rotate its address keys first. The published link does not change. + - **Test directory:** run `simplex-directory-service` against your own servers (it turns service requests on by itself). Create its address with `/ad pq_ratchet=on`, take the short link, and point `DIRECTORY_SERVICE_LINK` at it in your local build only. Do not commit that change. +3. **Directory content** (most useful with a test directory): + - at least one listed channel and one listed regular group; + - enough entries for more than one page (entries with large images fit about one per page); + - one entry with a long name and a two-line description; + - one entry whose name contains markdown, e.g. `*bold* [x](https://example.com)`; + - one channel the test profile has already joined. +4. **SimpleX names** (for the Names cases): the test profile needs a server that resolves names. You also need a channel with a verified `#name` and a contact address with an `@name`, each at least 5 characters long (a bare word is completed with `.testing`). Without these, only cases N4 and N7 can run. +5. **Consent alert:** Settings → "Reset all hints" brings it back between runs. +6. Run every chat-list case in **both toolbar modes** (one-hand UI on and off). + +## Chat list: search rows and consent + +| ID | Do | Expect | +|----|----|--------| +| C1 | Empty search field | Tags in the slot above the field (one-hand) or above as usual (top bar); no "Search in Directory" row | +| C2 | Type `ne` | One-hand: "Search in Directory" replaces the tags above the field. Top bar: tags stay, "Search in Directory" appears below the field | +| C3 | Type a 5+ letter word, e.g. `alice` | "Connect to alice.testing" and "Search in Directory" (same slots as C2) | +| C4 (AC4) | Paste a SimpleX link | One-hand: the **tags stay** in the slot (before this change the slot was empty). Neither mode offers "Search in Directory"; the link connects as before | +| C5 (AC8) | After resetting hints, tap "Search in Directory" | Alert "Search in Directory?": the text goes to SimpleX Directory, and if it is a SimpleX name, also to your server that resolves names. Actions: Cancel / Search / Search and don't show again | +| C6 | In C5, choose Cancel | Nothing is sent: no spinner, no results | +| C7 | Choose "Search and don't show again", then search again | No alert the second time; "Reset all hints" brings it back | +| C8 | Type text, press the keyboard **Search** key | The key is labelled Search; it runs the same directory search (alert first time) | +| C9 | Whitespace only, then press Search or tap the row | Nothing happens | + +## Chat list: directory results (AC1–AC3) + +| ID | Do | Expect | +|----|----|--------| +| D1 | Search for a term that matches listed groups | Spinner in the search field after about 1 s. While loading: **no "Directory" header**, no "No chats found" overlay | +| D2 | Results arrive | A "Directory" header row, then rows: avatar, `#` name, the directory's SimpleX name (if any), description up to 2 lines, member or subscriber count, and **"Join channel"** for channels or **"Join group"** for groups at the trailing edge | +| D3 (R1-4) | Long-named entry, small phone, large text | The verb stays on one line; the name and description truncate instead | +| D4 | Scroll the list, especially in one-hand mode | The "Directory" header scrolls with the rows and is not pinned to the screen edge | +| D5 | Entry with markdown in its name or description | Shown literally: no bold, no tappable link | +| D6 | Tap a directory row | The usual join flow (channel or group alert); the keyboard hides | +| D7 | More entries than one page | A "Show more" row; tapping it appends the next page, is disabled while loading, and disappears at the end. No entry appears twice | +| D8 | Turn networking off, search | After about 10 s: "Search failed, tap to retry" under the "Directory" header. Turn networking on, tap it: the page loads | +| D9 | Fail a "Show more" (network off), then retry | The retry continues from the next page; it does not start over | +| D10 (AC3) | Search for nonsense, e.g. `zqxvjk`, with no local chat matching | No Directory part, no "No results" row; the centred "No chats found" appears once the search finishes | +| D11 | Search for nonsense that matches a local chat name | Only the local chats; no Directory part, no overlay | +| D12 | Start a search, change the text before it returns | Results and spinner clear at once; the old reply never appears | +| D13 | Start a search, clear the field | The spinner stops; nothing appears later | +| D14 | With results shown, switch profile | Results disappear | +| D15 | Profile with no conversations (onboarding pages shown) | The search bar is above the onboarding pages. A search replaces them with the results while it runs or shows rows; a search that finds nothing shows a "No chats found" row; clearing the text brings the onboarding pages back | + +## Chat list: no duplicates (AC6) + +| ID | Do | Expect | +|----|----|--------| +| U1 | Search for the name of a channel you joined (it is also listed) | It appears once, as your local chat; no Directory row for it | +| U2 | Search for a word only in that channel's description, so the local list does not show it | It appears in the Directory part; tapping it opens the "already joined" alert for the known channel | +| U3 | A listed regular group you joined through a different link (or by invitation) | It shows twice, local and Directory. This is the documented limit, not a regression | + +## Chat list: names (AC5) + +| ID | Do | Expect | +|----|----|--------| +| N1 | Type a bare name registered only as a channel (e.g. `news1`), press **Search** | Directory results as above, plus a "Names" header above the Directory part with one row: avatar, profile name in bold, `(#news1…)` in grey, description. The "Connect to …" row disappears | +| N2 | Type `@alice.testing` (registered contact address), press Search | One Names row for the contact | +| N3 | Bare name registered as both a contact and a channel | Up to two Names rows | +| N4 (R1-6 note) | Name that is not registered, press Search | **No alert**, no Names row; "Connect to …" stays; directory results still come | +| N5 | Name of a contact you already have, shown in the local list | No Names row for it | +| N6 | A channel found both by name and in the directory | Shown once, as the Names row. If it also shows in Directory, note it (link encoding differs; nothing should ever be hidden wrongly) | +| N7 | Profile without a name-resolving server, press Search on a name | No "None of your servers…" alert; just no Names row | +| N8 | After names arrive, tap "Search in Directory", "Show more" or retry | The Names rows stay | +| N9 | Tap "Search in Directory" (not the key) with a name candidate | Directory only; no Names part | +| N10 | Tap a Names row | The usual connect flow (contact or channel alert). If the directory page is still loading, it stops, and the Names rows stay (also on the onboarding screen) | +| N11 | Start a connect (tap a result, "Loading profile…"), and while it runs press Search | The spinner stays the connection's; when both finish, no spinner is left behind | + +## New chat (AC7) + +| ID | Do | Expect | +|----|----|--------| +| W1 | Open New chat (pencil), type text | "Search in Directory" below the field; the action rows (1-time link, scan, create group/channel) hide as before | +| W2 | Type a 5+ letter word | "Connect to … " and "Search in Directory" below the field | +| W3 | Paste a link | No "Search in Directory"; the link connects as before | +| W4 | Press the keyboard **Search** key | "Names" and "Directory" sections after "Your Contacts", with uppercase grey headers like it; first time, the same consent alert | +| W5 | Search with no contact matching | "No filtered contacts" is hidden while searching and when there are results; shown when nothing is found anywhere | +| W6 | Tap a Directory or Names result | The sheet closes and the join or connect flow runs | +| W7 | Name of a contact listed in "Your Contacts" | No Names row for it | +| W8 | Name of a known contact whose display name does not contain the typed text | It shows as a Names row (documented gap); tapping opens the existing chat | +| W9 | Close the sheet while a search runs | The spinner stops; the chat list is unaffected | +| W10 (R1-1) | Sheet open with results, tap a notification from another profile | The results disappear | +| W11 | New chat → Archived contacts, type and press return | The key is "return", not Search; no online rows; empty states as before | + +## Regression checks + +| ID | Do | Expect | +|----|----|--------| +| G1 | Typing a known contact's SimpleX name on the chat list | The list narrows to it while typing, as before | +| G2 | Tag filters, unread filter, clearing the search | Unchanged | +| G3 | Tap the pencil while a chat-list search runs | The chat-list search is cancelled (spinner stops) | +| G4 | Pull to refresh (reconnect servers) | Unchanged |