Commit 6d80815
authored
Removed Total file, Progress was stuck at 0% fixed and added stop or cancel transfer
total 43872768 in every folder — phantom row, now gone
That wasn't a file at all — it was ls -la's total N summary line being parsed as an entry. The parser skipped empty lines but not this, so it appeared in every folder with a checkbox. One-line fix to skip /^total\s+\d+$/. (Selecting it before would also have poisoned downloads with a guaranteed-failed entry.)
2. Stuck "0%" while gigabytes move
Your screenshot shows the exact failure: stat gave no usable total for that file, so the UI sat at 0% with "Calculating…" while 1.5 GB flowed. Two fixes:
Sizes now travel with the request — the file list already knows every size from ls, so selections carry a sizeHint and the first progress event has totals immediately (verified: first event carried totalBytes: 67203777).
Bytes-moved headline — when no total exists, the big readout shows 1.5 GB transferred instead of a lying 0% complete.
3. Upload MBs
adb push reports nothing mid-flight, so the main process now runs the push as a tracked child while polling the remote size every 500ms. Proven live: a 67MB upload emitted 54%, 89% with real byte counts; totals are announced up-front from local stat.
4. Stop button
New Stop button in the sheet header (× still just hides to the pill). A transfer registry tracks live child processes per transfer ID; Stop kills them, loops abort between files, and handlers report {cancelled: true} so the sheet shows "Transfer cancelled" instead of an error. Batch return shapes changed to {results, cancelled} — call sites updated. Also fixed as a bonus: progress events now carry the transfer ID, so a previous transfer's late events can't paint over a new one.1 parent 66ba188 commit 6d80815
13 files changed
Lines changed: 2761 additions & 395 deletions
Binary file not shown.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
140 | 150 | | |
141 | 151 | | |
142 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | 284 | | |
289 | 285 | | |
290 | 286 | | |
| |||
1067 | 1063 | | |
1068 | 1064 | | |
1069 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
1070 | 1114 | | |
1071 | 1115 | | |
1072 | 1116 | | |
0 commit comments