Repository navigation
Commit e889505
committed
fix(files): scope the single-file picker, and restore the v2 route
Three fixes from the AI reviewers on #7377.
The single-file picker kept its unscoped options when the folder changed:
singleFileOptions read scopedWorkspaceFiles but listed workspaceFiles in its
memo dependencies, so it never recomputed. That is the picker Append uses, so
the folder narrowing I added for it did nothing after the first render.
The v2 files-folders route called toWorkspaceFileFolderPathView while importing
staging's toV2Folder — a conflict resolution I got half right, and a compile
error I would have found by running the type-check I skipped. The file is back
to staging's version, since keeping its projection was the decision anyway.
fileFamilyInput took Record<string, any>, which the repo's TypeScript rules
forbid. It now takes an interface naming the three fields it actually reads, so
a shape change fails at the call site rather than at run time.1 parent b5a77e3 commit e889505
3 files changed
Lines changed: 12 additions & 8 deletions
File tree
- apps/sim
- app
- api/v2/files/folders
- workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload
- blocks/blocks
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
| |||
46 | 43 | | |
47 | 44 | | |
48 | 45 | | |
49 | | - | |
| 46 | + | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
64 | | - | |
| 61 | + | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
| 738 | + | |
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| |||
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
149 | | - | |
| 156 | + | |
150 | 157 | | |
151 | 158 | | |
152 | 159 | | |
| |||
0 commit comments