Commit Graph
2 Commits
Author SHA1 Message Date
HomerandClaude Fable 5.2 a249b516fd A review of the file manager: nothing new is sent behind the lock, a share's addresses are not believed
CI / check (push) Canceled after 0s
1. One gate (InstanceGate) before every request that carries the account's
   files: uploads, downloads, the copies for Share and Open with, the share
   sheet's sends, a viewer's and a player's copy. The request under way
   finishes; the next waits until the app is in front of an unlocked phone,
   and the dialog says it is waiting.
2. The share target takes only content: addresses of other apps' providers,
   and refuses one that opens onto this app's own files; each file is shown
   with its provider's name and size; the instance is asked nothing before
   the person has chosen.
3. New file reads the directory first and never asks for a name it holds,
   besides create: true.
4. A PDF's renderer is closed off the main thread, and one made while the
   viewer was closing is closed too; at most 100 MB and 2000 pages.
5. Shared cache copies go by their age (an hour), not at every start; a
   name is capped by UTF-8 bytes and keeps its extension.
6. A model name the server said as a model_ref is looked up as a ref alone
   in the picker, the assistant's sheet and the schedule form.
7. A second "Save to Files" goes on from the file that failed.
8. A notebook is parsed off the main thread; a download given up cancels
   its call.

Also: "Open in Files" asks where the node is now (GET /files/node), and an
archive's entries are listed in the viewer.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 07:38:26 +00:00
HomerandClaude Fable 5.2 5d1e36868c Files is a file manager, and the viewer draws a file by what it is
CI / check (push) Canceled after 0s
Files listed and showed text. It now does what the web's explorer does,
through the server's /api/v2/files routes: upload (the system picker,
several at once, each streamed from where it is with its progress, one
request a file so a 413 for one does not take the others), new folder, new
text file (never over one that is there), rename, move and copy through a
folder picker that is walked rather than typed into, delete to the trash,
a long press to choose and a bar that moves, copies, downloads, shares or
deletes all that is chosen through /files/batch -- which answers path by
path, and what it refused is said in its own sentences. The trash: list,
restore, remove for good, empty. A file's versions: list, restore.

Leaving the instance: a download goes into a document the person chose
(ACTION_CREATE_DOCUMENT), streamed, several things or a folder as the
server's zip. Open with and Share hand another app a copy in the private
cache through the FileProvider the camera already uses (one more
cache-path, read-only, per grant); the copies go when Files is left, when
the app starts and at sign-out. No permission is added.

The viewer goes by file_kind. Text kinds as before, now editable up to the
server's 1 MB: a save says the sha it opened, a 409 shows the server's
sentence with Reload and Save anyway, and leaving with unsaved text asks.
The text being edited lives in a ViewModel: a megabyte does not fit a saved
instance state. A picture is copied to the cache, decoded with its edge and
pixel count capped whatever the file claims, and zooms and pans. A PDF is
drawn page by page by the platform's PdfRenderer from a cache copy. Sound
and video are played by the platform's MediaPlayer through a
MediaDataSource that asks the app's own HTTP client for each piece with a
Range request: the token stays in the Authorization header and the player
is never given an address, so no player library is added. CSV and TSV are a
grid with a row and column cap; a notebook is its cells' text, outputs as
plain text only. Archives, 3D models and binaries are their details with
Download, Open with and Share. An SVG is its source: the app has no WebView
and draws nothing a file could script. Nothing is rendered as HTML.

The share sheet has a third place to send to: Save to Files, into a folder
chosen with the same picker; shared text is kept as a note.

Strings: 61 new keys, 49 worded as the server's explorer words them and
translated from its catalogues at the pinned commit, 12 the app's own in
all eight languages.

An instance without these routes still lists and shows text; what it
cannot do says so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-18 21:24:39 +00:00