Skip to content

Conversation

@peterchinman
Copy link
Contributor

Summary

  • wherever you can upload files via drag and drop you can now also upload folders

Copy link
Contributor

@gbirman gbirman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterchinman can you add the data transfer logic we have in the filedrop directive into filefolder drop (see what i added here https://github.com/macro-inc/app-monorepo/pull/6430)

Copy link
Contributor

@gbirman gbirman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please address and re-request review

@peterchinman peterchinman requested a review from a team as a code owner November 24, 2025 22:28
@peterchinman peterchinman requested a review from gbirman November 24, 2025 22:28
Copy link
Contributor

@gbirman gbirman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there

@seanaye seanaye force-pushed the main branch 2 times, most recently from 6ca0007 to d484247 Compare November 27, 2025 22:14
@seanaye seanaye force-pushed the import-macro-diff branch 2 times, most recently from 3c7a8f6 to 2d7c9e4 Compare November 28, 2025 17:13
@synoet
Copy link
Contributor

synoet commented Nov 30, 2025

@peterchinman should we close this ?

@gbirman
Copy link
Contributor

gbirman commented Dec 1, 2025

@peterchinman should we close this ?

no its just a WIP, i think @peterchinman will address the comments i left

) {
const onFilesReady = (uploadEntries: UploadInput[]) => {
handleFileUpload(uploadEntries, props.inputAttachments, (_attachment) => {
props.onChange(markdownState());
Copy link
Contributor

@gbirman gbirman Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it ok to do this after every file upload vs. at the very end like we had before? assume its not a problem and makes sense to me if the markdown state is indeed changing

});
use:fileFolderDrop={{
onDrop: (files, folders) => {
setIsDraggingOverChannel(false);
Copy link
Contributor

@gbirman gbirman Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i moved this setter out before the file upload whereas before we had it after upload, figure that's fine/correct behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes seems fine

}
return false;

props.onPasteFilesAndDirs(fileEntries, directoryEntries);
Copy link
Contributor

@gbirman gbirman Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterchinman you had code that took directories only to prevent "duplicate phantom files". what does that mean? i got rid of it as i think the api makes more sense this way but i'd like to understand what you meant so i dont accidentally introduce bugs

Copy link
Contributor Author

@peterchinman peterchinman Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a bug, I think the way it worked was that, you would upload a folder and the files within it would get uploaded twice

Copy link
Contributor Author

@peterchinman peterchinman Dec 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to test if it's working, but I can't get any folder uploads to work anywhere... websocket issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok let's circle back to this once the backend perms are fixed:

User: arn:aws:sts::569036502058:assumed-role/upload_extractor_lambda_handler-role-dev/upload_extractor_lambda_handler-dev is not authorized to perform: s3:GetObject on resource: \"arn:aws:s3:::bulk-upload-staging-dev/extract/164cb2f8-861c-4c16-b4db-0a5a66091bf7\" because no identity-based policy allows the s3:GetObject action

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I fixed, @peterchinman can you test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok yes bug still exists. the way to trigger it is to make a selection that includes both an open folder and a sibling file.

CleanShot.2025-12-03.at.15.00.09.mp4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look when I'm back

@gbirman gbirman self-requested a review December 3, 2025 00:13
Copy link
Contributor

@gbirman gbirman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterchinman so you're not blocked for this entire workflow I'll approve this under the condition that you assign me a ticket for the duplicate upload bug which can be addressed separately

@peterchinman peterchinman merged commit 9be2344 into main Dec 5, 2025
18 checks passed
@peterchinman peterchinman deleted the import-macro-diff branch December 5, 2025 16:17
nickisnoble pushed a commit that referenced this pull request Dec 5, 2025
Co-authored-by: Gabriel Birman <25272206+gbirman@users.noreply.github.com>
seanaye pushed a commit that referenced this pull request Dec 16, 2025
Co-authored-by: Gabriel Birman <25272206+gbirman@users.noreply.github.com>
seanaye pushed a commit that referenced this pull request Dec 16, 2025
Co-authored-by: Gabriel Birman <25272206+gbirman@users.noreply.github.com>
seanaye pushed a commit that referenced this pull request Dec 16, 2025
Co-authored-by: Gabriel Birman <25272206+gbirman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants