Repository navigation
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ac86235604
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| appModel.cloud.threads.filter { | ||
| $0.threadId == context.threadID && $0.companyId == context.model.thread.companyId | ||
| && $0.environmentId == context.model.thread.environmentId && $0.shell.deletedAt == nil |
There was a problem hiding this comment.
Resolve file links from projected child threads
When a provider-native subagent message supplies its child threadId, or the user opens that child through makeChildModel, the child is loaded from orchestration.getThreadProjection and need not exist in appModel.cloud.threads. This lookup then returns nil and always shows “File unavailable” despite the live child model and environment connection, so file links do not work in those conversations. Resolve the child from the current model when its ID matches, and otherwise load its projection instead of requiring a cloud-discovery row.
AGENTS.md reference: AGENTS.md:L71-L75
Useful? React with 👍 / 👎.
| if !isFileURL, !windowsDrive, let scheme = url.scheme { | ||
| // A bare "file.swift:42" also parses as a URL scheme. Numeric tel/mailto URLs do not identify files. | ||
| guard line != nil, path == scheme, path.contains(".") else { return nil } |
There was a problem hiding this comment.
Accept line links to extensionless root files
When an agent links a root-level extensionless file with a conventional line suffix, such as [Dockerfile](Dockerfile:12) or [Makefile](Makefile:8), Foundation interprets the filename as the URL scheme. This guard then rejects it solely because the parsed path has no dot, so the modifier forwards the URL to iOS instead of opening the workspace file. Handle common extensionless filenames, or otherwise disambiguate valid numeric line references without requiring an extension.
Useful? React with 👍 / 👎.
| } else if let fragment = url.fragment?.removingPercentEncoding, | ||
| fragment.range(of: #"^[Ll]\d+(?:[Cc]\d+)?$"#, options: .regularExpression) != nil { | ||
| line = Int(fragment.dropFirst().prefix(while: \.isNumber)) |
There was a problem hiding this comment.
Support range-style line anchors
When an agent emits a GitHub-style range anchor such as src/App.swift#L42-L50, this exact fragment match rejects the range suffix. The fragment has already been removed from the file path, so the file still opens but line remains nil and the viewer stays at the top, making the documented line-navigation behavior fail for a common citation format. Accept range anchors and use their first line as the scroll target.
Useful? React with 👍 / 👎.
| .background(.yellow.opacity(0.2)).id(initialLine) | ||
| if initialLine < lines.count { Text(lines.dropFirst(initialLine).joined(separator: "\n")) } | ||
| } | ||
| } else { Text(contents) } |
There was a problem hiding this comment.
Handle line targets beyond the preview limit
When a valid line target lies after the first 1 MiB of a file, projects.readFile returns only its truncated prefix, making initialLine greater than lines.count; this fallback then displays that prefix from the top without highlighting or explaining that the requested location was omitted. Large-file links therefore fail their core navigation behavior. Add a bounded read around the requested line rather than increasing the entire WebSocket payload, or explicitly report that the target is outside the preview.
AGENTS.md reference: AGENTS.md:L11-L13
Useful? React with 👍 / 👎.
What Changed
Tapping an agent's link to a workspace file on iPhone previously did nothing: Markdown rendered a clickable link, but the client sent the environment's filesystem path to iOS as an ordinary URL. File links now open Pathway's existing file viewer through the message's environment and workspace.
The handler supports absolute and relative paths, encoded filenames, Windows paths, and line references. It keeps website, mail, telephone, and product links on their existing handlers. Files outside the thread's workspace show an explanation.
Why
An agent's
[Design and verification notes](/Users/.../docs/plans/report-a-bug.md)link looked usable on the phone but could not open. Reusing the workspace viewer provides remote access through the existing transport and workspace checks, with Done returning to the conversation.Verification
30 focused native tests passed across file links, Markdown images, workspace operations, and workspace scope checks.
The six file-link regression tests passed again after the final telephone-link handling adjustment.
Regression coverage includes the exact reported Markdown link and its
projects.readFilerequest, URL encoding, line references, Windows paths, ordinary external links, and workspace boundaries.Native iPhone test build and
git diff --checkpassed.Rebased onto the latest
main; this PR is independent of the bug-report feature.After the final rebase, all 26 targeted bug-report, issue-data, and Markdown file-link native tests passed.
UI Changes
A focused native UI test reproduced the no-op tap on
mainand passed with the fix: tap opens the expected document; Done returns to the conversation. Captured on iPhone 17 Pro / iOS 26.3 using fixture conversation and environment data.Tap/open/return recording · Capture details
Checklist
Model: GPT-6. Harness: Codex.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.