Make the file size limit configurable (drag-and-drop / file upload via wsh)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, typescript
Hướng nghiên cứu
Start with the hard-coded MaxFileSize and checkFileSize in cmd/wsh/cmd/wshcmd-file.go, then the constant in pkg/wshrpc/wshrpctypes_const.go and the gate in frontend/app/view/preview/preview-model.tsx. The config key naming lives in pkg/wconfig/metaconsts.go and defaultconfig.go. Done means a config key replaces the three limits, falls back to a default when config is unavailable to wsh, and is documented in docs/docs/config.mdx. Ask the maintainers whether to use one setting or separate keys before choosing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Make the file size limit configurable (drag-and-drop / file upload via wsh)
Summary
File transfers that go through the wsh file path have a hard-coded size limit, and that
limit cannot be changed by any user-facing setting. Dragging files between widgets hits this
limit, so large files simply fail — and since the limit is not configurable, there is no
supported way to raise it. I would like the limit to become a config setting.
Wave Version
0.14.5
OS
macOS 26.2 (arm64)
The problem
The limit is a hard-coded constant in three separate places, rather than a single shared
setting:
| Value | Location | Purpose |
|---|---|---|
10MB |
cmd/wsh/cmd/wshcmd-file.go:26 (MaxFileSize) |
Caps the file transfer / write path. Enforced in checkFileSize, in the stdin writer, and on append (including a remainingSpace check that caps appends to the same total). |
50MB |
pkg/wshrpc/wshrpctypes_const.go (MaxFileSize) |
RPC-layer cap for reading files. |
10MB |
frontend/app/view/preview/preview-model.tsx:34 (MaxFileSize) |
Frontend preview gate, with a separate MaxCSVSize of 1MB. |
So wsh file put / the drag-and-drop upload path cannot carry a file larger than 10MB, and
there is no way to raise it. Attempting to send a larger file errors out with
input exceeds maximum file size of 10485760 bytes (or file already at maximum size), which
at least fails loudly on the CLI side — but when the transfer is triggered by a drag gesture
there is no progress feedback at all, so the failure is easy to miss (see #3559).
Because the limit lives in compiled code, the only ways around it today are to work outside
Wave (scp / rsync from a terminal block) or to edit and rebuild the binary.
Steps to reproduce
- Open a local preview widget and a remote preview widget side by side.
- Drag a file larger than 10MB (e.g. a 200MB video or archive) from the local preview into
the remote preview directory. - The transfer fails, because the
wshfile path caps the transfer at 10MB. - Confirm there is no setting to raise it — searching the config docs /
wshconfig for a
file-size option turns up nothing;app:*config keys cover things likeapp:tabbarand
app:defaultnewblock, but nothing about transfer size.
Expected behavior
- The file size limit should be a user-facing config setting, so it can be raised without
rebuilding. - The setting should be respected consistently across all three call sites above. Right now
each has its own constant, so even a partial fix would leave the others capping the transfer. - Ideally the limits should be unified into a single constant that reads from config, rather
than three independent values that can drift apart.
Suggested configuration
Following the existing naming convention in pkg/wconfig/metaconsts.go (app:<lowercase>),
something in this shape would fit:
app:filesizelimit # bytes, for the wsh file transfer / drag-and-drop upload path
app:filepreviewlimit # bytes, for the frontend preview gate (currently 10MB)
app:csvpreviewlimit # bytes, for the CSV preview gate (currently 1MB)
Worth considering whether the preview limits should be separate from the transfer limit at all,
or whether preview and transfer can share one setting — preview has a legitimate reason to stay
small (it is about whether a file can be rendered inline), whereas transfer does not.
Implementation notes
The main work is mechanical:
- Add the config key(s) in
pkg/wconfig/metaconsts.goand register them in
pkg/wconfig/defaultconfig/defaultconfig.go/pkg/wconfig/settingsconfig.gofollowing the
existingapp:*pattern. - Replace the constants in
cmd/wsh/cmd/wshcmd-file.goandpkg/wshrpc/wshrpctypes_const.go
with a value read from the config. Thewshside would need access to the Wave config rather
than relying on a package-levelconst. - Update the frontend gates in
frontend/app/view/preview/preview-model.tsxto read the
configured value instead of the local const. - Add a line to
docs/docs/config.mdxfor the new key.
One caveat worth flagging: wsh can run standalone against a remote host, where it may not
have the local Wave config available. It may be worth keeping a sane default and only applying
the configured value when config is reachable, rather than assuming config is always present.
Anything else?
Happy to submit a PR for this — it is mostly replacing constants with config lookups plus a
docs line, and I am comfortable with the pattern used by the existing app:* keys. Please let
me know if you would prefer the three limits unified into one setting rather than exposed
separately; I can go either way.
Related: #3559 (drag-and-drop transfers have no progress feedback) and #929 / #1685
(drag-and-drop between widgets / Xftp-style transfer). This is the piece that currently puts a
ceiling on any of those working with real files.
- Ngôn ngữ chính
- Go
- Star
- 22.7k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của wavetermdev/waveterm
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wavetermdev/waveterm#3601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
wavetermdev/waveterm#3596 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: `wsh termscrollback` returns zero lines for valid ranges starting at line 0Có thể đã có người làm @bardrop đã nhận 6 ngày trước. Đang mởbug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wavetermdev/waveterm#3587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
wavetermdev/waveterm#3568 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pwsh: encodeEnvVarsForPowerShell rejects Windows-standard env var names like ProgramFiles(x86), breaking wsh token on every pwsh blockCó thể đã có người làm @vortsghost2025 đã nhận 72 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
wavetermdev/waveterm#3481 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wavetermdev/waveterm
Issue tương tự
-
good first issue help wanted javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
fullsend-ai/fullsend#9733 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
karmada-io/karmada#8101 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày