Repository navigation
Studio: show attachments when editing a message - #11054
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Confirmed the edit composer in studio/frontend/src/components/assistant-ui/thread.tsx only renders the input today, so attachments stay hidden and get resent on Update; will get this reviewed. |
…tree (#11063) `Repo tests (CPU, studio)` failed on #11054, which touches three frontend files and cannot reach an installer test: ``` shutil.Error: [('.../studio/backend/requirements/.extras-filtered-_30x7ggm.txt', ..., "[Errno 2] No such file or directory")] FAILED tests/studio/install/test_studio_deps_cli.py::test_malformed_core_metadata_is_a_foreign_conflict ``` `install_python_stack._filter_requirements` writes its filtered copy beside the source on purpose, so relative -r and -c includes resolve, and its source is the real requirements tree this fixture copies into every fake venv. Under xdist that is two workers on one directory: the name was there when copytree listed the tree and gone when it read it. The fixture skips `.*-filtered-*.txt`. Ignored names are never scheduled for copying, so there is no window to lose, and a tree meant to mirror the shipped requirements no longer picks up another process's scratch either. Two tests, both failing without the ignore: the generated file is not copied, and the file vanishing between the listing and the read no longer fails the copy. The second was vacuous as first written, since copytree binds copy2 as a default argument and patching shutil.copy2 does not reach it; it passes copy_function explicitly now. No product file changes.
…tree (unslothai#11063) `Repo tests (CPU, studio)` failed on unslothai#11054, which touches three frontend files and cannot reach an installer test: ``` shutil.Error: [('.../studio/backend/requirements/.extras-filtered-_30x7ggm.txt', ..., "[Errno 2] No such file or directory")] FAILED tests/studio/install/test_studio_deps_cli.py::test_malformed_core_metadata_is_a_foreign_conflict ``` `install_python_stack._filter_requirements` writes its filtered copy beside the source on purpose, so relative -r and -c includes resolve, and its source is the real requirements tree this fixture copies into every fake venv. Under xdist that is two workers on one directory: the name was there when copytree listed the tree and gone when it read it. The fixture skips `.*-filtered-*.txt`. Ignored names are never scheduled for copying, so there is no window to lose, and a tree meant to mirror the shipped requirements no longer picks up another process's scratch either. Two tests, both failing without the ignore: the generated file is not copied, and the file vanishing between the listing and the read no longer fails the copy. The second was vacuous as first written, since copytree binds copy2 as a default argument and patching shutil.copy2 does not reach it; it passes copy_function explicitly now. No product file changes.
Main now always resends from the edit composer (unslothai#11407) and diffs attachments itself, so the original-attachments comparison is dropped; the edit composer still renders the attachments and a paste without its File previews instead of inlining.
|
Review record for #11054, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#220. Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found. Round 1: reviewed mirror
|
When you edited a message that had a file, a long paste or an image, the edit box only showed the text. The attachments were hidden but still sent again on Update, and there was no way to remove them. A message that was only a long paste opened as an empty box.
The edit box now shows the attachments with the same remove button as the main message box. Removing one counts as a change, so Update sends the message without it. Leaving them alone works like before.
On main, editing a message with a file, a long paste or an image showed no attachments and Update sent them again. With this change they show up, removing one really drops it and the model no longer sees it, and Cancel keeps them. Added tests.
Before / after
Merge base
7617fc3vs headfb02900, same Studio build steps, a scripted provider on both sides. A message was sent with a 7.4 KB paste, then edited.Edit box. Before: only the text. After: the paste shows as a card with a remove button.
Thread after sending the edit. Before: the hidden paste went out again (8033 byte request). After: the card was removed, so the resent message has no attachment (444 byte request, last user message is just
Summarise this).