Composer "Upload skill file" does nothing after a file is chosen
Summary
We use Agent Native. In the chat composer, + → Create Skill → Upload skill file opens the file chooser, but after a SKILL.md file is chosen nothing happens. No review form appears, no request is made and no skill is saved. Reopening the menu shows the normal menu, and the chosen file is gone.
The menu closes as soon as the file chooser takes focus from the page. The review-and-save step for an uploaded skill is rendered inside that menu, so once the menu has closed, the upload can't continue.
Uploading the same file through Settings → Skills → Add skill → Upload works.
Environment
- Versions:
@agent-native/core,@agent-native/toolkitand@agent-native/agentkit0.209.2. Also seen on0.207.0. - Latest stable when checked:
0.212.1.ComposerPlusMenu.tsxis unchanged from0.209.2. - App: reproduced in a freshly scaffolded app (
create --standalone --template chat), run withagent-native dev, as well as in our internal app. - We use the shared AgentKit chat and its default composer.
Steps and observed behavior
- Open the chat and click + (Add context) in the composer.
- Open Create Skill and choose Upload skill file. The file chooser opens.
- Choose a valid
SKILL.mdfile withnameanddescriptionfront matter. - Nothing happens. The menu is closed, no review form appears, no request is sent to
/_agent-native/resources, and no skill is created. - Open + → Create Skill again. The submenu shows Create new skill and Upload skill file again. There's no trace of the chosen file.
To narrow it down, we took focus away from the page while both menus were open, as the file chooser does. Both the menu and the Create Skill submenu closed straight away.
As a control, we stopped the native file chooser from opening, so the page kept focus, and gave the file input the same SKILL.md. In that case the menu stayed open, the review form appeared ("Review the content from SKILL.md before saving", with the skill name and the skills/<name>/SKILL.md path), and Save created the skill. The upload flow works once a file reaches it. It fails because the menu closes while the chooser is open.
Expected behavior
After a skill file is chosen with Upload skill file, the review form appears and the skill can be saved, as it is from Settings → Skills.
Impact
Users can't upload a skill from the chat composer. The chooser opens and then nothing happens, with no error, so it looks like the file was ignored.
Relevant code observations
These are static source observations from 0.209.2:
- In
src/composer/ComposerPlusMenu.tsx, the Upload skill file item callsskillFileInputRef.current?.click()from itsonSelect. When a file is chosen,handleSkillFileSelectedreads it and switches the Create Skill entry to itsskill-uploadview, which is rendered inside the menu. The entry'sonDismissiscancelSkillWork. - In
src/composer/ComposerContextMenu.tsx, closing the menu (changeOpen(false)) or the submenu callsdismissPage, which runs the entry'sonDismiss. The submenu'sonFocusOutsidekeeps it open only when focus moves to another composer menu element, not when the page loses focus. - For comparison,
AddSkillMenuinsrc/app/settings/shell/pages/resource-settings-page.tsxkeeps its file input outside the dropdown and uploads directly from the input'schangehandler, so its menu closing doesn't affect the upload.
These observations fit the menu dismissing, and discarding the in-progress upload, when the native file chooser takes focus.