Skip to content

test(native-chat): carry over path-link cases after host checks - #26697

Closed
brennanb2025 wants to merge 1 commit into
brennanb2025/sta-9683-click-filefrom
brennanb2025/chat-link-cases-on-26675
Closed

brennanb2025 wants to merge 1 commit into
brennanb2025/sta-9683-click-filefrom
brennanb2025/chat-link-cases-on-26675

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​170 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​170
Prod 0 0 0 0

ELI5

Chat used to underline commands, web addresses and version numbers as files, then report that they could not be found when clicked. #26675 adds a check on the workspace's host before underlining a path; this tests-only PR carries over the useful cases from Kelvin's #26586 to protect that behavior.

What Changed

Stacked on #26675, with base brennanb2025/sta-9683-click-file at 978741679ee. Users see no additional change from this child PR: missing path candidates stay plain, confirmed paths still link, and existing spaced paths remain usable.

Adds 15 regression cases across rendered chat markdown and the terminal's real path resolver and existence-check provider. The current #26675 head deliberately retains chat's existing path-shape rules before the host check; this stack preserves that policy.

Decisions from #26586

Case or proposed rule Decision Reason
/orca-native-chat:orca-chat-visuals Handled by #26675; regression added The existing boundary rule prevents linking half the command name; missing candidates do not link.
/code-review, /clear and /compact Handled by the existence check; regression added No matching host path means no underline. If /code-review actually names an existing path, it remains usable in both surfaces.
/api/v1 Handled by the existence check; regression added An absent route stays plain; a real host path with that name can still link.
HTTP/1.1, 1.5/2.0, z-ai/glm-5.3 Handled by the existence check; regression added Absent version-shaped paths do not link. No additional version rule is needed.
git log origin/main..HEAD in inline code Handled by the existence check; regression added The command does not resolve to an existing path.
example.com/docs/guide.html, 127.0.0.1/api/data.json Handled by the existence check; regression added Missing hostname-shaped paths stay plain. An actual relative file under a directory named example.com can still link; no hostname allowlist is added.
conf.d/nginx.conf, v1.2/notes.md, docs/archive.7z, man/ls.1, lib/libfoo.so.1 Already supported; regressions added Confirmed paths with dotted directories or numeric extensions retain links.
/tmp as a bare root Drop #26586's blanket rejection A missing path stays plain; an existing absolute path remains eligible, as in the terminal. Syntax alone cannot distinguish a slash command from a real host path.
/etc/hosts, /usr/local/bin, /data/out.json, /data/raw, /mnt/c/Users/me/notes.md, /Users/me/project/src/main.ts:12 Already supported; regressions added Existing absolute paths and line suffixes work without an allowlist of root directories, including unknown roots and WSL-shaped paths.
My Folder/notes.md, "Brennan's Folder/notes.md", relative spaced paths with line suffixes Drop #26586's removal of these links #26675 already keeps the complete path when it exists; inline code and quotes disambiguate the text. Existing coverage is retained and Kelvin's examples are added.
~/Library/Application Support/orca/log.json, Windows spaced paths and line/column suffixes Already supported; regressions added The existing root and location handling continues to work when the host confirms the path.
Plain or inline file:// URIs, including extensionless basenames, spaces and line anchors Already handled by the shared URI detector and host check; regressions added URIs decode to rooted paths and need no new chat bypass. Missing URIs stay plain.
docs/Makefile, .github/CODEOWNERS in chat Drop from this stack under #26675's final policy Chat still requires a root, location suffix or extension before checking a relative path; broadening that policy is a separate product change. An explicit ./ prefix already makes these eligible. The terminal already recognizes the paths without that prefix, which the new terminal test covers.
Expand bare extensionless filenames from 11 to 26 Dropped Separator paths do not need this list. Expanding it would add host existence checks for every newly recognized bare word, including SSH, without fixing the retained chat policy.
New root, hostname and version prefilters Dropped No measured reduction in host checks justifies another set of syntax rules; this stack adds no candidates or probes.

Why

The broken-click cases are already addressed by #26675's host check. Regression tests preserve Kelvin's useful examples without adding a competing chat-only classifier, rejecting legitimate paths with command-like names, removing working spaced-path links, or increasing SSH checks through the expanded bare-name list.

Kelvin's examples are carried over from #26586 and credited in the commit as Co-authored-by: Kelvin Amoaba <[email protected]>, matching his PR-head author identity.

Linked Issue

Refs STA-9683, #26675 and #26586.

Visual Proof

N/A — this child PR changes tests only and has no additional visual or interaction change; #26675 owns the user-facing behavior change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Renderer typecheck passed using the brief's queued tsc command. The 15 explicit terminal detection/provider/hit-testing, CommentMarkdown link and native-chat file-link suites passed with 290 tests and --maxWorkers=2.

orca-ci-checks --no-typecheck: 21/22 checks passed. The only failure is the existing max-lines error (301 counted lines) in src/main/native-chat/agent-session-wire/structured-agent-session-host.ts, which is byte-for-byte unchanged from #26675; all changed-code checks passed. GitHub CI fails at the same inherited lint error (static analysis log); the dependent verify check also fails after preflight fails and downstream checks are skipped. Those skipped jobs, including the full CI test/build runs, were not verified by this run.

Tests ran on macOS. Existing unit suites cover Windows and WSL path strings and mocked remote-host routing; no live Windows, Linux, SSH or Electron session was exercised, and no full build was run.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No production code, wire format, persisted data, bare-name candidate list or lockfile changes. Terminal fixtures use terminal filename lists; chat fixtures also cover the existing chat-specific prose, quote and inline-code handling.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Author: Brennan Benson (@BrennanKB5)

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Closing: #26819 already landed these #26586 path-link cases as regression tests on main.

@brennanb2025
brennanb2025 deleted the brennanb2025/chat-link-cases-on-26675 branch October 12, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant