[Bug]: iOS: tapping a bare filename chip like Foo.dm:314 fails when the file is in a subfolder #17830
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/mobile
Steps to reproduce#
- Open a project where a file lives in a subfolder, for example
src/Example.dm. - Get an assistant reply that names the file by bare name with a line number in inline code, like
Example.dm:314. - Tap the chip in the iOS app.
- Tap the same chip in the desktop app for comparison.
Expected behavior#
The file opens at src/Example.dm, the same as on desktop. Desktop got this in #6297 (fixes #6292): openFileInPanel in apps/web/src/components/ChatMarkdown.tsx asks the workspace index (projects.searchEntries) for an exact basename match before opening. If there is no exact match, the current error is fine.
Actual behavior#
iOS shows "File unavailable" / "Failed to read file". The server gets projects.readFile with relativePath Example.dm against the workspace root, and it fails at realpath because there is no such file at the root.
ThreadFileScreen in apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx passes the route path straight to projectEnvironment.readFile. The mobile client has no basename lookup like the one #6297 added on web.
Related but different: #8251 (desktop, slashed paths relative to a subfolder) and #7798 (mobile links outside the workspace, fixed for images and videos only).
Impact#
Minor bug or occasional failure
Version or commit#
Server 0.0.46-nightly.20261009.2873, iOS app 2.0.0 (114) (TestFlight)
Environment#
iOS app connected to a Windows 11 host, Claude provider
Logs or stack traces#
ProjectReadFileError: Failed to read workspace file 'Example.dm' in 'C:\dev\project'.
Screenshots, recordings, or supporting files#
No response
Workaround#
Open the file from the thread's file tree instead of the chip.
maria-rcks closed this
Sign in to join this conversation.