Skip to content

fix(web): remove non-functional file-upload icon from composer (closes #160) - #162

Merged
HaoxuanLiTHUAI merged 1 commit into
mainfrom
fix/remove-upload-icon
Jun 24, 2026
Merged

fix(web): remove non-functional file-upload icon from composer (closes #160)#162
HaoxuanLiTHUAI merged 1 commit into
mainfrom
fix/remove-upload-icon

Conversation

@HaoxuanLiTHUAI

Copy link
Copy Markdown
Contributor

Closes #160.

What

Removes the file-upload (Paperclip) button from the chat composer. File upload was never a supported feature — the button depended on a sandbox that local non-Docker mode never provides, so it was permanently disabled. This aligns it with the already-hidden #47 Plus (add-context) and Mic (voice) controls.

Changes

  • Remove the Paperclip upload button + hidden <input type="file">, the handleFilesChosen uploader, the attachment chips, the attachments/uploading/fileInputRef state, and the send-time attachment notice.
  • Extract the composer's right-hand send cluster into a presentational ComposerSendTools component (model picker + send button passed in as nodes), so it can be rendered in isolation — the monorepo has no jsdom/@testing-library.
  • Add composerSendTools.test.tsx: asserts the cluster renders the model picker + send button and contains no file input, guarding against upload creeping back.

Verification

  • packages/web: 16 test files / 121 tests pass (incl. the new 3), typecheck clean, vite build ok.
  • Net: PromptComposer −69 lines.

🤖 Generated with Claude Code

…#160)

File upload was never a supported feature — the Paperclip button depended on a
sandbox that local non-Docker mode never provides, so it was permanently
disabled. Aligns with the already-hidden #47 Plus/Mic controls.

- Remove the Paperclip upload button + hidden file input, the handleFilesChosen
  uploader, attachment chips, attachments/uploading/fileInputRef state, and the
  send-time attachment notice.
- Extract the send cluster into a presentational ComposerSendTools component so
  it can be rendered in isolation (no jsdom in the monorepo).
- Add composerSendTools.test.tsx: asserts the cluster renders the model picker +
  send button and contains no file input, guarding against upload creeping back.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@HaoxuanLiTHUAI
HaoxuanLiTHUAI merged commit f8439b4 into main Jun 24, 2026
2 of 3 checks passed
@HaoxuanLiTHUAI
HaoxuanLiTHUAI deleted the fix/remove-upload-icon branch June 24, 2026 06:12
@HaoxuanLiTHUAI HaoxuanLiTHUAI mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: 移除 composer 里未落地的文件上传 icon(与已隐藏的 Plus/Mic 对齐)

2 participants