Storage: a file manager App with copy, rename, delete and viewers #3

Closed
opened 2026-10-05 09:34:31 +00:00 by twisla · 3 comments
Owner

Idea

An App to browse the SD card: folders, sizes and dates. It can copy, move, rename and delete files and folders, and open the file types the firmware writes, each with a viewer that suits it.

Why

Today the card can only be looked at with the Debug Console (get/put, Debug Builds only) or by taking it out. Storage Clean-up only deletes whole categories by age, and the Gemini App only shows Saved Pages.

What the firmware writes, and how to show it

Where Type Viewer
/irc IRC logs, text text, opening at the end
/notes text text (or open in the editor, if Notes gets one)
/wifi/scans/*.csv Wi-Fi scans a table: SSID, channel, RSSI, security
/gnss/tracks/*.gpx Tracks summary (start, duration, distance, points), and maybe a simple plot of the path
/gemini/saved, bookmarks.gmi gemtext open in the Gemini App
/gemini/downloads whatever was downloaded text if it's text, otherwise size and a hex dump
/updates/*.ota Update Files header: version, size, and whether the signature checks out, with "Install" handing over to Settings > Firmware
anything else hex dump

What's known

  • Card access. Every card access goes through StorageService's task (runAndWait), and the file manager has to follow the same rule. Copying a big file has to run in pieces on a job, like Gemini's background jobs, with a progress Toast and a way to cancel. It must not block the main loop, whose watchdog bites after 5 s.
  • Reading files. Viewers have to read from the card as you scroll, the way the Gemini App does with large pages (Q88), not load whole files. An IRC log can be megabytes.
  • Files in use.
    • The firmware may have some files open: the IRC log being written, a Track being recorded, and the Gemini cache files.
    • Deleting or renaming those has to be refused or handled.
    • The /gemini/cache and /settings folders are internal: hidden, or shown but protected?
  • Notes stay safe. Notes are never offered by Storage Clean-up. The file manager deleting them is fine, since it's an explicit choice, but it should always ask first.
  • Copy. Check free space before copying (StorageMonitor already tracks it), and ask before overwriting a file.

Questions for the design round

  1. Is it an App of its own, or a part of Settings > Storage?
  2. How does selection work: one file at a time, or marking several for copy and delete? How do you pick where to copy to: a clipboard (copy, browse, paste) or a folder picker?
  3. Should internal folders be hidden, read-only, or shown with a warning?
  4. How much should each viewer do? For example, does the GPX viewer just give a summary, or draw the path? Does the .ota viewer offer to install?
  5. Should text files be editable (the Notes editor), or only viewed for now?
  6. How should it sort: by name, by date or by size? Should it remember the choice per folder?
  7. Should there be a search, or "jump to letter"?

Related

src/services/storage_service.cpp (runAndWait), lib/storage_model (Clean-up categories), src/apps/gemini_app.cpp (windowed reading, Q88), src/apps/firmware_page.cpp (Update from SD), #1 (USB drive: the card can be away while exposed).

## Idea An App to browse the SD card: folders, sizes and dates. It can copy, move, rename and delete files and folders, and open the file types the firmware writes, each with a viewer that suits it. ## Why Today the card can only be looked at with the Debug Console (`get`/`put`, Debug Builds only) or by taking it out. Storage Clean-up only deletes whole categories by age, and the Gemini App only shows Saved Pages. ## What the firmware writes, and how to show it | Where | Type | Viewer | | --- | --- | --- | | `/irc` | IRC logs, text | text, opening at the end | | `/notes` | text | text (or open in the editor, if Notes gets one) | | `/wifi/scans/*.csv` | Wi-Fi scans | a table: SSID, channel, RSSI, security | | `/gnss/tracks/*.gpx` | Tracks | summary (start, duration, distance, points), and maybe a simple plot of the path | | `/gemini/saved`, `bookmarks.gmi` | gemtext | open in the Gemini App | | `/gemini/downloads` | whatever was downloaded | text if it's text, otherwise size and a hex dump | | `/updates/*.ota` | Update Files | header: version, size, and whether the signature checks out, with "Install" handing over to Settings > Firmware | | anything else | | hex dump | ## What's known - **Card access.** Every card access goes through StorageService's task (`runAndWait`), and the file manager has to follow the same rule. Copying a big file has to run in pieces on a job, like Gemini's background jobs, with a progress Toast and a way to cancel. It must not block the main loop, whose watchdog bites after 5 s. - **Reading files.** Viewers have to read from the card as you scroll, the way the Gemini App does with large pages (Q88), not load whole files. An IRC log can be megabytes. - **Files in use.** - The firmware may have some files open: the IRC log being written, a Track being recorded, and the Gemini cache files. - Deleting or renaming those has to be refused or handled. - The `/gemini/cache` and `/settings` folders are internal: hidden, or shown but protected? - **Notes stay safe.** Notes are never offered by Storage Clean-up. The file manager deleting them is fine, since it's an explicit choice, but it should always ask first. - **Copy.** Check free space before copying (StorageMonitor already tracks it), and ask before overwriting a file. ## Questions for the design round 1. Is it an App of its own, or a part of Settings > Storage? 2. How does selection work: one file at a time, or marking several for copy and delete? How do you pick where to copy to: a clipboard (copy, browse, paste) or a folder picker? 3. Should internal folders be hidden, read-only, or shown with a warning? 4. How much should each viewer do? For example, does the GPX viewer just give a summary, or draw the path? Does the `.ota` viewer offer to install? 5. Should text files be editable (the Notes editor), or only viewed for now? 6. How should it sort: by name, by date or by size? Should it remember the choice per folder? 7. Should there be a search, or "jump to letter"? ## Related `src/services/storage_service.cpp` (`runAndWait`), `lib/storage_model` (Clean-up categories), `src/apps/gemini_app.cpp` (windowed reading, Q88), `src/apps/firmware_page.cpp` (Update from SD), #1 (USB drive: the card can be away while exposed).
Author
Owner

M3 was narrowed to the radio (docs/milestones/M3.md, Q89), so the File Browser planned for it now lives here. The first session's decision (Q30) still stands as a starting point: browse, view text and images, rename, delete, show free space, with system folders read-only. Notes moved to #19.

M3 was narrowed to the radio (docs/milestones/M3.md, Q89), so the File Browser planned for it now lives here. The first session's decision (Q30) still stands as a starting point: browse, view text and images, rename, delete, show free space, with **system folders read-only**. Notes moved to #19.
twisla added this to the F1 Files and Notes milestone 2026-10-05 20:14:07 +00:00
Author
Owner

Design round done (docs/milestones/F1.md on the f1 branch, Q128 to Q140). What changed from the text above:

  • The App is called Storage, and it takes over Settings > Storage: usage, Storage Clean-up and "Erase SD card" move into it under Maintenance, behind a warning. Settings loses its Storage row.
  • The user's own data can be deleted (logs, Tracks, Saved Pages, Captures), after a confirmation. Read-only: /gemini/cache, files the firmware has open, and the top-level folders themselves.
  • A copy is checked by size, not by reading it back.
  • A listing holds up to 256 entries.
  • The Clock sets the system time, so files are dated correctly without NTP.
  • Viewers: text read from the card as you scroll, .pcap as a packet list, .gpx as a summary, .ota with its signature check and Install, hex for the rest. No editing (that's #19), no CSV table (#44).

Left out, each with its issue: #41 (several items at once), #42 (find by name), #43 (open a .gmi in the Gemini App), #44 (CSV as a table), #45 (images).

Design round done (`docs/milestones/F1.md` on the `f1` branch, Q128 to Q140). What changed from the text above: - **The App is called Storage**, and it takes over **Settings > Storage**: usage, Storage Clean-up and "Erase SD card" move into it under Maintenance, behind a warning. Settings loses its Storage row. - **The user's own data can be deleted** (logs, Tracks, Saved Pages, Captures), after a confirmation. Read-only: `/gemini/cache`, files the firmware has open, and the top-level folders themselves. - **A copy is checked by size**, not by reading it back. - **A listing holds up to 256 entries.** - **The Clock sets the system time**, so files are dated correctly without NTP. - Viewers: text read from the card as you scroll, `.pcap` as a packet list, `.gpx` as a summary, `.ota` with its signature check and Install, hex for the rest. No editing (that's #19), no CSV table (#44). Left out, each with its issue: #41 (several items at once), #42 (find by name), #43 (open a `.gmi` in the Gemini App), #44 (CSV as a table), #45 (images).
twisla changed title from Files: a file manager App with copy, rename, delete and viewers to Storage: a file manager App with copy, rename, delete and viewers 2026-10-06 05:34:43 +00:00
twisla added
status
ready
and removed
status
needs-design
labels 2026-10-06 05:34:43 +00:00
Author
Owner

Shipped in v0.9.0 (merge 50fcf6b). What was built and the checks on the device: docs/milestones/F1.md. Left out, each with its own issue: #41, #42, #43, #44, #45.

Shipped in v0.9.0 (merge 50fcf6b). What was built and the checks on the device: docs/milestones/F1.md. Left out, each with its own issue: #41, #42, #43, #44, #45.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: twisla/roro9stack#3