Skip to content

Codex APP File Tree: can not copy directory path and flush files/dirs during chat creating #20164

Open

Description

@yepYoung

What version of the Codex App are you using (From “About Codex” dialog)?

26.422.71525 (2210)

What subscription do you have?

GPT Pro

What platform is your computer?

MacOS

What issue are you seeing?

  1. I can not copy the directory of file tree (only can copy specific file). It means that i can not tell Codex you should attention which dir, and i must open VSCode or Finder to copy path.
  2. The files/dirs during chat ceating can not flush in File Tree. It means that if i want to find these files/dirs, i must scroll up lasting.

What steps can reproduce the bug?

See What issue are you seeing?

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on Apr 29, 2026
  2. added
    bug
    on Apr 29, 2026
  3. github-actions commented on Apr 29, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. yepYoung commented on Apr 30, 2026

    @yepYoung
    Author

    not a duplicate

  5. abcjhby2871 commented on Jul 18, 2026

    @abcjhby2871

    This is still reproducible in the current Codex Desktop build (26.715.31925, macOS arm64), and it is especially disruptive in SSH remote workspaces.

    The file tree should provide the following actions for both files and directories:

    • Copy relative path
    • Copy absolute path
    • Copy name
    • Reveal/select the path when it is referenced in a conversation

    At present, directory paths still cannot be copied reliably, so users have to open VS Code, Finder, or a terminal just to reference a folder in a Codex prompt.

    The refresh problem also remains important. Files and directories created, renamed, moved, or deleted by Codex should appear immediately through filesystem watching. The tree should also expose a manual Refresh action as a fallback, including for SSH remote workspaces.

  6. oso0x34 commented on Sep 27, 2026

    @oso0x34

    Still reproducible on Linux, Codex app 26.917.71314 (chatgpt .deb). Right-clicking a folder in the file tree shows no context menu at all; files get Copy path.

    Root cause (from the shipped bundle, webview/assets/review-file-tree-pane-*.js): the tree's onContextMenu handler only resolves the clicked item if it is a file:

    function Ua(e){for(let t of e.composedPath()){if(!(t instanceof Element)||t.getAttribute(`data-item-type`)!==`file`)continue;let e=t.getAttribute(`data-item-path`);if(e)return e}return null}

    Folder rows are rendered with data-item-type="folder" (t.kind === 'directory' ? 'folder' : 'file'), so this returns null → Va() returns null → the menu builder La() bails with if (o == null) return []. That drops every item for folders (Copy path, Add to chat, Open in…, Save as…), not just Copy path.

    Everything downstream is directory-agnostic, so the fix is to accept any tree row in that check (e.g. getAttribute('data-item-type') == null) and strip the trailing / from directory paths before copying.

    Related (also covers the follow-up on #23133): the tree menu only offers an absolute Copy path. A Copy relative path item for both files and folders would be easy to add here — the wham.diff.contextMenu.copyRelativePath string already exists in the app.

    This has been open since April without a response and is a one-condition fix — would be great to get it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions