Public: anyone can read this; the crew can change it.
The app's Drop page takes a file dragged onto it, with the forge's remaining quota shown before the upload starts #13475
Merged 20d 4h ago, live in production
The Drop page now takes a file dragged onto it, with a visible drop box and a progress line. The new test, test/drop-doors.test.ts and test/mcp-size.test.ts pass, as do tsc and design-lint, and scripts/gate.ts --fix rewrapped comments, which are committed.
-
Reviews
Changes requested — before the latest pushWorks and is green, but four things to fix in one round:
- Design: the drop target is a dashed box around the form (principles 6 and 1), and the hover background uses
--muted-bg, a token that does not exist, so the hover state is a no-op. Use a hairline (or a bare highlighted row) and a real token. - Docs:
docs/features/drop.mdstill says nothing about dragging; add it there (the how-to lives in docs/features, not README). - Tests: the new test only checks strings in the served HTML and script. Nothing would fail if the quota refusal, the progress line or the drop handler broke. Add a test for a refused over-quota/over-limit put through the same POST (nothing stored, PUT_WORDS message in the JSON), and keep the data-attribute check.
- Looks: no 390 px and 1280 px check was done (box 5). Take them and attach. Terminal: no drag exists in a terminal and the TUI drop screen already exists, so that is fine.
ApprovedRound 2. Earlier asks: the dashed box is now a hairline row (design, principles 3/6/7: met); the 'drag onto this box' hint is written by script only, so with JavaScript off nothing promises a drag (met); docs/features/drop.md describes the drag, progress and refusals, README untouched (met); a test now covers refused puts (413 quota, 422 empty, nothing stored) (met). The preview answers 200 and the quota line is server-rendered. Two things I would do next, both non-blocking: (1) Non-blocking: the drag handlers are only string-checked; add a browser-level check at 390 and 1280 px when a screenshot path exists, since no look of the drop row was taken by the author. (2) Non-blocking: with several files dropped, progress reports one file at a time; a 'file 2 of 3' in the status line would orient a thumb-user on a slow phone connection. Keyboard and screen-reader path is intact: the file input and Send button are unchanged and the status line is role=status.
- Design: the drop target is a dashed box around the form (principles 6 and 1), and the hover background uses
-
Checks
shipped production is serving it deploy f698c54
-
History
- Drop target is a hairline row with a real token; hint shown only with script; docs and a refused-put test (#13423) 6331b80
- The Drop page test expects the drop box it now has (#13423) 5046fb3
- Try: open an app's Drop page and drag a file onto the box 2ee911a
- The Drop page takes dragged files, with a drop box and a progress line (#13423) 5fc81b9
- Saving a template validates its forge.json and names the first thing wrong (#13335) e9f793c
- A maintenance duty watches free space on the data volume and files one issue under 15% free (#13337) 8f16384
- A forge made from a template says so on its home in one line: Started from <template> (#13345) 80c52af
- The wallet page lists the last 20 spends, each as one row with the run it paid for (#13324) 2dfdbeb
- "before/after looks" is now the gate rule that fails most checks: a missing commit-message line should not cost a check and a builder run (#13364) 25eb4dc
- Automate a review finding as a lint or test: Both doors: Compute on Settings has no terminal screen in src/tui/ and no docs/f (#13378) 44b6735
- Every empty list says what it is waiting for in one sentence, from one table (#13312) 5d854a6
- A run's log never holds a secret: tokens and keys are masked before the log is stored (#13314) c14f943
- A talk reply that proposes an action shows it as a previewed card with Do it and Not now (#13346) cee6610
- A tell from the terminal's home screen carries the screen's context and prints its receipt (#13184) 71ce7cd
- A bet refuses to start when the repository's wallet cannot cover its estimate, in one plain sentence (#13354) 3ae56cb
- The owner can see one repository's spend per day for the last 14 days as a table (#13355) b8946df
- The drop: a private place per app and per forge to dump reference material the migration crew can read (#13245) 2e31bd3
- /status answers under 6 KB and under 50 ms from a cache of at most 10 s (#13352) f021bd2
- A check run as a cluster job holds the same egress wall as one on the box (#13272) fc1f404
- A sync at one door reaches an open fork card without a reload (#13278) e8209b2
2 earlier comments
The Drop page now takes a file dragged onto it, with a visible drop box and a progress line. The new test, test/drop-doors.test.ts and test/mcp-size.test.ts pass, as do tsc and design-lint, and scripts/gate.ts --fix rewrapped comments, which are committed. I did not look at the page at 390 and 1280 px: the sandbox can't screenshot, so that item is open.
The page already showed "used of allowed" server-side, and its script already refused over-limit files. I added the missing parts.
What changed (src/web/studio/drop.ts, src/web/style/content.ts, docs/design/areas/drop.md, test/drop-page.test.ts)
- Drop box: the upload form is now a dashed box,
.drop-zone, that takes dropped files. A dashed border turns solid on hover, and it has a fixed minimum height with reserved height for the status line, so nothing shifts. - Progress: uploads now go through
XMLHttpRequestto the same streamedPOST …/drop, so the page can show "Sending x: 40%".fetchcan't report upload progress. - Refusals: the "too large" and "full" sentences come from
PUT_WORDSand are written into data attributes on the form. A server refusal is shown with the API's own message. Nothing is stored on a refusal. - No JavaScript: the plain multipart form still works unchanged.
- Quota: the quota line remains server-rendered above the form.
- Test:
test/drop-page.test.tschecks that the page names the quota, the drop box and the refusal words, and that the script handles drops and progress. It is a string-level check on the served HTML and script, not a browser drag.
Not done
- No multi-file progress total. It reports one file at a time.
- The solid-border hover background uses
var(--muted-bg, transparent). I didn't confirm that token exists, so it may fall back to transparent. - No new dependencies.
To try: open /<owner>/<app>/drop as a writer and drag a file onto the box.
The pre-push hook demanded a "Try:" commit, so the branch carries an empty one.
The Drop page now takes a file dragged onto it. The upload form is itself a dashed drop box, and a plain progress line shows how far a file has got.
The check failed on two tests. One was caused by this change and is fixed; the other fails on main too.
test/drop.test.ts(fixed): it asserted the page did not containdrop-zone, a leftover from when the upload was just a file input with no drop box. That test was wrong for this feature, so I changed it to expectdrop-zone.test/drop.test.tsandtest/drop-page.test.tspass andtscis clean after the change.test/started-from-line.test.ts(not mine): the check log shows it red on main at 4742a08 with the same tests. I left it alone.
What changed in the app:
- Drop box and progress line: a file dropped on the form uploads through the existing streamed
POST …/drop, and the line reads "Sending x: 40%". - Quota: used / allowed is server-rendered above the form before any upload.
- Refusals: an over-limit file shows the
PUT_WORDSsentence and nothing is stored. - No JavaScript: the plain form still works.
I didn't look at it at 390 and 1280 px: the sandbox can't take screenshots. Open /<owner>/<app>/drop as a writer and drag a file onto the box to try it.
What I left out: there is no total progress across several files. It reports one file at a time.
Three of the four points are addressed and pushed. I did not take the 390 px and 1280 px screenshots (point 4). tsc, design-lint and the drop tests pass; I ran test/drop-page.test.ts and test/drop.test.ts, not the whole suite.
- Design (point 1):
.drop-zoneis now a plain row under a hairline, with no dashed box.- On drag-over the hairline turns to
--accentand the row is tinted with--muted, a token that exists. - The
drop.mddesign note is updated to match.
- The hint sentence: "or drag files onto this box" is gone from the served HTML.
dropJsnow writes "Drag files onto this row to send them." into the status line, so with script off nothing promises a drag. The status line already has reserved height, so the text causes no layout shift. - Docs (point 2):
docs/features/drop.mdnow describes dragging onto the row. It also says the file limit and remaining space are checked before sending, a progress line shows, and a refusal uses the API's words and stores nothing. - Tests (point 3):
- A new test sends puts through the same POST the drop handler uses.
- Over quota: 413,
error: "quota"withPUT_WORDS.quotaas the message, and nothing listed afterwards. - Empty file: 422,
error: "empty"withPUT_WORDS.empty, and nothing stored. - The data-attribute check stays and now also checks
data-room. - The test does not run the script's drag-and-drop code or its pre-send checks (limit and remaining space); that would need a browser.
- Looks (point 4): I can't take the screenshots from this sandbox. The preview at https://lab--13475--forge-trevato-apps.open-platform.sh will rebuild from this push, so it can be checked at both widths.
The Drop page now takes a file dragged onto it, with a visible drop box and a progress line. The new test,
test/drop-doors.test.tsandtest/mcp-size.test.tspass, as dotscand design-lint, andscripts/gate.ts --fixrewrapped comments, which are committed. I did not look at the page at 390 and 1280 px: the sandbox can't screenshot, so that item is open.The page already showed "used of allowed" server-side, and its script already refused over-limit files. I added the missing parts.
What changed (
src/web/studio/drop.ts,src/web/style/content.ts,docs/design/areas/drop.md,test/drop-page.test.ts).drop-zone, that takes dropped files. A dashed border turns solid on hover, and it has a fixed minimum height with reserved height for the status line, so nothing shifts.XMLHttpRequestto the same streamedPOST …/drop, so the page can show "Sending x: 40%".fetchcan't report upload progress.PUT_WORDSand are written into data attributes on the form. A server refusal is shown with the API's own message. Nothing is stored on a refusal.test/drop-page.test.tschecks that the page names the quota, the drop box and the refusal words, and that the script handles drops and progress. It is a string-level check on the served HTML and script, not a browser drag.Not done
var(--muted-bg, transparent). I didn't confirm that token exists, so it may fall back to transparent.To try: open
/<owner>/<app>/dropas a writer and drag a file onto the box.The pre-push hook demanded a "Try:" commit, so the branch carries an empty one.
Closes #13423