Repository navigation
Replies: 1 comment
|
Superseded by #16500, which covers editing any workspace text file from mobile instead of only Markdown. Closing this one so the conversation stays in one place. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Moved here from issue #14438 following Julius’s suggestion. His triage confirmed the mobile editing gap is real and is not a duplicate.
Problem or use case
I want to make small edits to workspace Markdown files from the T3 Code mobile app without prompting an agent. The main use case is updating
AGENTS.md: correcting an instruction, adding a project convention, or removing an outdated rule. The same flow should work for README files and other Markdown documents, then eventually all file formats should be supported.Mobile currently lets me browse workspace files, view rendered Markdown or its source, and copy the contents, but it does not offer direct editing or saving back to the workspace. For a small text change, I have to ask an agent or use another client/editor.
Desktop and web already support direct source editing of workspace text files, with automatic saving. Mobile should offer a simple way to make the same kind of change.
Proposed behavior
Show the workspace-relative file path while editing so it is clear which file will change. Use the active environment and workspace/worktree, including remote connections; saving must not target a different checkout or create a copy on the phone.
If a save fails or the connection drops, keep the draft available and show an actionable error. Only report a successful save after the server confirms the write.
If an agent or another device changes the file after editing begins, do not silently overwrite it. Keep the draft and offer to reload the current file or explicitly overwrite it.
Smallest useful scope
AGENTS.mdfiles.A dedicated Open AGENTS.md shortcut and creation of a missing instructions file would be useful follow-ups. Longer term, mobile should support editing all workspace files, with Markdown as the first step. Rich-text editing, general code editing, Markdown formatting tools, and a full mobile IDE are outside the initial scope.
Editing
AGENTS.mdchanges the file on disk. This feature should not promise that an already-running provider session immediately reloads its instructions.Willingness to contribute
I’m happy to build this if maintainers are interested in the feature and agree on the scope. I’d start with the smallest useful version described above: editing existing workspace Markdown files on iOS and Android, with explicit Save and Cancel.
Implementation context
Source inspection of the current checkout shows that most of the file transport already exists:
apps/mobile/src/features/files/ThreadFilesRouteScreen.tsxhandles workspace file loading, preview/source modes, and file actions.apps/mobile/src/features/files/SourceFileSurface.tsxis a read-only source surface.projectEnvironment.writeFilecommand frompackages/client-runtime/src/state/projectCommands.ts.WorkspaceFileSystem.writeFilewrites workspace-relative files in the requested environment. No provider-specific adapter changes are needed to perform the edit.The current write contract accepts a path and contents without an expected file revision/content check. Conflict detection would need a small contracts/server change rather than only a mobile UI change, with an optional field to keep existing web/desktop callers compatible. The write API also creates missing files and parent directories, so the initial existing-files-only scope needs to be enforced in the mobile flow.
Acceptance criteria
AGENTS.md, change its text, and save it without sending a prompt or starting an agent turn.Related work
All reactions