Repository navigation
Conversation
Filter file-browser and uploaded server paths at the shared paste boundary before mention or raw formatting. Skip whole paths containing C0, DEL or C1 controls, warn without displaying rejected filenames, and preserve accepted paths in the same drop. Cover both drop sources, toolbar and Shift modes, upload failures and late uploads after disposal with regression tests. Document the behavior and intended mention/raw usage.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files from an opened workspace can contain line breaks or other terminal control characters in their names. Dropping them onto a terminal can turn those characters into input actions. This change skips those paths and shows a warning, while continuing to insert the other files in the drop.
Closes #516.
Technical changes
Validation
Tested on macOS with Python 3.12 against upstream
cfb130130af90b51abd9ae22c4c19783acef7b84:pytest tests/ -q: 2,258 passed; one event-loop teardown warning.jlpm tsc --noEmit: passed.jlpm lint:check: passed.jlpm jest: 54 suites and 724 tests passed, including 102 terminal-drop tests.git diff --check: passed.The frontend tests exercise DOM drop handlers with mocked terminal and upload boundaries; no live terminal UI session was exercised. Mention mode remains intended for an agent accepting
@paths, and raw mode provides POSIX shell quoting. This guard does not make mention syntax safe for arbitrary shell commands.