Repository navigation
feat(chat): a one-file handle folder is drawn as its file (files.list only) - #2222
Conversation
…ts file (only) and drawn as one row files.list of attached/ reads each handle folder through the same reader and, when it holds exactly one entry and that entry is a file, carries it as `only`: a FileListEntry gated as any other (over the hub its shown name alone; realName, hiddenBy and unhide only with detail), never with an `only` of its own. The worker rebuilds it by the same field rule and drops it off attached/, on a file, or when it is not a file. The panel draws the pair as the file's row with the handle dim after the name; its notes and menu are the file's, on the file's stored path. A listing code reads (ml.fs, Python's mount) never carries it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…row each Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Spec text read at 0f06417 ( Both conditions are in the text: code's listings never carry
|
|
Reviewed at A handle folder with zero entries is untested: Checked and held:
Not asked:
|
…n a handle folder stays removable, and a listing reads the forms once
- tests: a handle folder with zero entries carries no `only`.
- panel: a handle folder hidden by a rule on exactly its path is drawn as a folder, so its menu removes that rule; a file's show would leave it standing. UPGRADE row over the fake host, removing the rule for real.
- ranged-reader: `openChannel(volume, { formsOnce })` keeps the secrets' forms for the channel's life; the files.list server's channel uses it, so a listing of attached/ asks once, not once per handle folder. Code's channels still ask at each call (tested).
- FILE_ATTACHMENTS.md item 9 says both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Named
|
The files panel draws a handle folder under
attached/that holds one file as that file's row, with the handle dim after the name, instead of a folder per attachment around a single row. Ruled by the coordinator, 2026-11-29.Contract (SESSION_CONTRACT.md,
files.list): on a page ofpath: "attached", adirentry holding exactly one entry, a file, on one page carriesonly, that file's entry. It is gated as any entry: to a hub sender the shownnamealone, neverrealName,hiddenByorunhide. It never nests. It is read from stored metadata (opendirwithlimit: 2), never bytes. Any other content (two entries, a folder inside, a second page, a refused read) or a runtime that does not set it draws as a folder. Code's listings (ml.fs, Python's mount) never carry it, so errors andml.dereferencestill nameattached/<handle>/<name>(FILE_ATTACHMENTS.md, file browser item 9).Changes:
files-list-serve.ts: setsonlyon the attached page, with the samedetailgate as the entry.sw-files-list.ts: the worker rebuildsonlyfield by field like every other entry, and drops it offattached/, on a file, when it is not a file, or when it is not an entry's shape.files-panel.tsx,chat.css: onetreeitemrow; the menu acts on the file's stored path; the handle shrinks before the name.fake-host.ts:filesOnlyswitch (default on) for the web build and the upgrade test.Tests:
files-list-serve.test.mjs, new section: six fields, no bytes read; none at the root or inside a handle folder; gated without detail (shown name only); forged channels (two entries, nested folder, next page, EACCES) carry none; a channel's ownopendir("attached")has noonlyand no stored name.files-list-command.test.mjs: kept and rebuilt with no nestedonly; dropped in each malformed case with the entry kept.files-panel.test.mjs, new section: one row with the handle and size; the menu sends/files/attached/9b20e11/quarterly report.txt; UPGRADE: a runtime withoutonlydraws folders; anonlythat is not a file draws a folder. Five older panel tests whose trees held one-file folders now give those folders two entries.FilesPanelViewexample "one-file handle folders".npm testexit 0;tsc --noEmitclean; chat-web and chat-page e2e 166 passed, 1 failed: the files panel desktop row, which still opened each handle folder. Changed in 52791f2; the "files panel" section then passed 9/9 at--repeat-each 3.🤖 Generated with Claude Code