Commit graph

38 commits

Author SHA1 Message Date
Local Dev
57df93fa97 Pithos: list waiting files that lost their copy, with Upload again and Remove
When s3d still lists a file as waiting but its buffered copy is gone,
Upload now fails with a raw admin error and nothing says which files are
behind it. Overview and Drives now list them (waiting, copy missing in
two checks a moment apart, no upload running, older than two minutes),
each with Upload again… (replace it from the original) or Remove, and
Upload now explains the cause instead of passing s3d's error through.
2026-10-06 19:14:43 +02:00
Local Dev
4101bae7c9 Pithos: a clearer Share dialog, pithos.sia/l links, and a restart prompt after in-place updates
The Share dialog showed a bare code box and repeated its own title. It
now lists the links already made for that file, folder or drive as cards
(address, expiry, file count, Copy, Open, Switch off) above one line to
make another, copies a new link straight away, and also shows the
pithos.sia/l/<id>/<name> form, which Theseus and the pithos.sia site send
on to navigate.st/sia.

After an in-place update Theseus swaps an add-on's files but Node keeps
the modules already loaded, so the engine kept running the old version
while the footer showed the new one (a whole-drive link then failed with
'a file is required'). The engine now reports the version it loaded and
the one installed; when they differ the footer offers Restart to finish.
2026-10-06 00:13:11 +02:00
Local Dev
6a14f46657 Pithos: a drive shows whether it is private or public, with Share beside it
Whether a drive was readable by anyone was only visible in the Drives
list or behind the Access button. The drive's path now carries a chip
(Private / Public / Public + list) that changes it in one click, and a
Share button for the folder you are in, or the whole drive at its top
level: a navigate.st/sia page on this computer's s3d, the Share… rules
on Drives on Silent Mode. The public-link route accepts the drive's top
level for that.
2026-10-05 23:39:11 +02:00
Local Dev
251f95cdee Pithos: pithos.sia/app is the app's front door
pithos.sia itself is the website, so people had no obvious address to
type for the app. /app (and /app/<page>) now opens Pithos in Theseus and
through the website's Open my Pithos; it is no longer read as an S3 user
named app.
2026-10-05 02:04:06 +02:00
Local Dev
bd440b1d6f Pithos: open the app in a browser, also from the pithos.sia website
Pithos runs on the user's computer, so the pithos.sia website could only
describe it. Two ways in now:

- Open in browser (Theseus, desktop) opens the current page in the default
  browser with a one-time sign-in link (60 s, single use), unlike the
  host's reusable ?t= link.
- The website links to http://127.0.0.1:47621/open?path=/<user>/<drive>.
  Any page or local program could follow that link, so the host first
  asks the user in its own window (a native dialog on the desktop,
  Theseus's approval prompt with the vault unlocked). Only loopback Host
  names are accepted, one question at a time, and the website learns
  nothing either way.

Sessions started this way are marked external, so the browser does not
get host-only controls such as Back to sidebar.
2026-10-05 01:47:12 +02:00
Local Dev
9cad6eb136 Pithos desktop: update notices per platform
With Linux builds joining Windows in the release list, the check must only
compare builds for its own system, and the link must fetch the Linux
AppImage (or, later, the macOS dmg) rather than the Windows installer.
2026-10-04 22:49:46 +02:00
Local Dev
cb622aa5af Pithos: export a key as JSON for scripts, backup tools and agents
People setting up backups or AI agents want one small file with the
endpoint, key, secret and drive, in the shape scripts read. Export JSON…
in the key dialog writes exactly that, with a drive picker since a key
reaches all of its user's drives. The secret stays masked in the preview,
and the dialog says the file is unencrypted and suggests one S3 user per
agent. The Theseus save dialog now offers .json for it instead of
.pithoskey.
2026-10-04 22:34:55 +02:00
Local Dev
60f6b3b367 Pithos: name an account after the Sia Storage email, and tell desktop users about new builds
Sia Storage never tells an app who signed in, so accounts showed up as
"Sia account" until someone found the label field. The approval step,
where people are signing in to Sia Storage anyway, now asks for that
email and saves it as the label; the sidebar card names the account the
moment approval lands.

The desktop app had no way to learn about updates. Its footer now checks
Silent Mode's release list (through the local server, so the console's
CSP stays same-origin) and offers the matching installer or portable
build.
2026-10-04 22:02:14 +02:00
Local Dev
24709d582d Pithos: public links at navigate.st/sia for files in your own Sia account
A share link from s3d only opened where s3d is reachable, which on a
default setup is this computer. Pithos now makes a Sia shared-object URL
for the file the way the Sia SDK does (the indexer's sealed object, its
data key opened with a key derived from s3d's app key) and registers it
at navigate.st, which streams the file from Sia hosts for anyone, with
seeking, even with this computer off. A shared-object URL reads that one
object and nothing else in the account. Files still waiting on this
computer are uploaded first. A folder gets a page with its files and a
player. Settings lists the links, each one can be switched off.

sia-share is the navigate.st side, in Go on the Sia SDK: it keeps short
ids, checks every URL against an allowed indexer, serves files sandboxed
so a shared page cannot run script on navigate.st, and caps sign-ups per
address and downloads per link per day. Host reads are paid by its own
app on Silent Mode's indexer account.
2026-10-04 16:45:07 +02:00
Local Dev
7fa7f71be4 pithos-hosted: public folders by name, as pages, at navigate.st/s3
Public files were addressed by a 32-character account id, and a public
folder answered with JSON, so a link was unusable to send to anyone.
Accounts that signed up with a BNS name can now be addressed by it
(/p/alice.x/<drive>/<folder>/), a public folder opened in a browser is a
page with its files, small pictures and a player (tools still get JSON),
and every link and redirect on it is relative so navigate.st/s3/ serves
the same pages. Pithos shows the navigate.st/s3 address when a folder is
made public.
2026-10-04 16:10:11 +02:00
Local Dev
db3ebc681c Pithos: switch or add Sia accounts at the top of the Accounts page
Switching to another account, or adding one, was at the bottom of the
page, under the label editor and a long explanation of which account is
which. The page now opens with the accounts on this computer side by
side: the one in use (with its free space), each set-aside account with
Switch to, and Add another account. The account's details follow.
2026-10-04 15:36:27 +02:00
Local Dev
c6c7615ae3 Pithos: the update button applies the new version without a restart
On a Theseus that can apply an extension in place, the footer's update
downloads the new version and reloads Pithos on it straight away. Older
Theseus versions still offer Restart to apply.
2026-10-04 15:28:26 +02:00
Local Dev
f59dced33a Pithos: Cancel closes dialogs again, and Escape works after a menu
Cancel did nothing in the confirm dialogs (delete, switch account) and
in Add another account: the dialog helper read a Cancel result of false
as "keep the dialog open", a meaning meant only for actions like Copy
link. A fixed result now always closes; only an action that returns
false keeps the dialog. Picking an item from a ⋯ menu also left that
menu's Escape listener behind, so Escape no longer closed any dialog
opened from it.
2026-10-04 15:25:45 +02:00
Local Dev
a1c8ed34d5 Pithos: files waiting to upload are shown, and go up by themselves
s3d keeps small uploads in a local buffer until about 40 MB has built
up, so a handful of files could sit there for months, only on this
computer, while the Overview said 0 B on Sia. Overview and Drives now
say how many files are waiting, that they are only on this computer
until then, and offer Upload now; automatic upload of leftovers (after
10 minutes with no new uploads) is on unless turned off.
2026-10-04 14:39:34 +02:00
Local Dev
47c0c27f3d Pithos: Full page as an icon beside the menu button
In the sidebar, Full page had moved into the ☰ menu, two clicks away.
It is now also a ⤢ icon in the top bar beside ☰, where an expand button
is usually found (⇤ Back to sidebar in the full-page view on a narrow
screen). The menu keeps the labelled entry.
2026-10-04 14:25:57 +02:00
Local Dev
11ada7ca98 Pithos: navigation in setup order, with the account on top
The menu listed Overview, Drives, Users & keys, Account, Settings, Logs:
the Sia account that everything depends on came fourth, and Drives came
before the users that own them. It now follows the order you set things
up in: Accounts (a card naming the account, with its free space),
Overview, Users & keys, Drives; Settings and Logs, which are about s3d
itself, sit under an "s3d" heading. Same order on desktop and in the
☰ menu; the card updates when the account is renamed or switched.
2026-10-04 14:12:01 +02:00
Local Dev
05a1941aa3 Pithos: rename drives, folders and files; show free space on Sia
S3 has no rename, so files, folders and drives kept the name they were
made with. s3d copies objects in its own database (the copy points at
the same data on Sia), so a rename is a copy to the new name and a
delete of the old: quick, and it uses no extra storage. A drive rename
makes a new bucket, moves every file, rebuilds public access for the new
name (a policy names its bucket) and removes the old one. Names that
already exist are refused. Drives on Silent Mode encrypt with keys tied
to each name, so their client gets no rename until it can re-encrypt.

The drives page and Overview now show how much of the Sia account is
used and how much is free. s3d does not report it; the indexer's
GET /account does, signed with the app key s3d registered (read from its
database for this one request, BLAKE2b-256 + Ed25519 as indexd expects).
2026-10-04 03:58:21 +02:00
Local Dev
2d9b0a7a5e Pithos: open HTML files as a page, or read them as text
An .html file in a drive could only be read as source. It can now also be
opened as a web page in a new tab (Theseus tab, browser tab, or the system
browser from the desktop app), with the CSS, images, scripts and pages
beside it loading as they would from a website.

The page is served under a sandbox CSP without allow-same-origin, so its
scripts run in an opaque origin: they cannot read the Pithos session or
reach its API, only the files of the folder the page link covers. Links
are random, last an hour from last use (12 hours at most), and refuse
paths that leave the folder. Pages decrypt on the fly for drives hosted
on Silent Mode.
2026-10-04 03:49:23 +02:00
Local Dev
459bcf085a Merge master: Pithos 0.3.10 (pithos.sia/<user>/… paths)
The new site mode recognises a path by the s3d's user names. With drives on
Silent Mode the local s3d has none, so it now asks the server for them;
otherwise pithos.sia/<user> links stop working once drives move.
2026-10-04 03:32:04 +02:00
Local Dev
cbf4ab7a1e Pithos 0.3.10: the app at pithos.sia/<user>/<drive>/<folder>
Full page opened Pithos at a loopback address such as
127.0.0.1:58678/#/buckets/music-house, which means nothing to anyone
reading it and changes every launch. In Theseus the app now lives at
pithos.sia/<S3 user>/<drive>/<folder>, with pages at pithos.sia/settings,
/account and so on; the root page stays the pithos.sia website.

The add-on answers those paths through Theseus's new site routes. It
passes the session to the control server only for pithos.sia's own
requests and the address bar, never another site's fetch, and only
while the vault is unlocked, as the sidebar panel requires. The server
answers its own files, pages and existing S3 users and reports
anything else as not its own, so the website answers it. The sidebar
and the web console keep #/ addresses; an older Theseus still gets the
loopback address.
2026-10-04 03:29:28 +02:00
Local Dev
fcc104a325 Merge master: Pithos 0.3.9 (menu, Account page, views, player) under the hosting work
Pithos moved to 0.3.9 on master while hosting was built here, so the version
stays master's until the next release is cut. The hosted pieces were carried
into master's new layout: Share for folders lives in the item menu, files the
server can read keep their mark in every view, and other accounts show their
key and cannot be switched back to when they moved to Silent Mode.
2026-10-04 03:28:54 +02:00
Local Dev
afb74362b8 Pithos: show which Sia account an s3d is connected to
A person with several sia.storage accounts (or phrases) could not tell
which one a Pithos s3d used: s3d records only the indexer URL. Pithos now
reads the app key s3d stores after login and asks the indexer, with a
request signed the way indexd's app API expects, for the account's key,
storage used and last use. Those match what sia.storage shows for the app,
and the page explains that the login and the phrase together decide the
account. Earlier accounts set aside on this computer show their key too.
2026-10-04 03:19:02 +02:00
Local Dev
9a9d4d4a3f Pithos 0.3.9: player volume, share links made at once
The music player had no volume control; it now has a slider beside a
mute button (a pop-up slider on narrow screens), remembered between
visits.

The share dialog asked for a "public address of s3d" before making a
link, which nobody could fill in usefully. The link is now made as the
dialog opens, with a plain note that it opens only on this computer
while s3d listens on 127.0.0.1; your own public address moved under
"Use my own public address". The Access dialog says the same about
what public means while s3d is local, and that access can be changed
at any time. Dialogs now draw above the player.
2026-10-04 03:18:24 +02:00
Local Dev
606408035c Pithos 0.3.8: ☰ menu, one Account page, compact file rows
In the sidebar the menu now drops down from a ☰ in the top-right
corner, opposite the Pithos name, and holds every page plus Open as
full page, instead of pushing the page down.

Get started and Sia connection become one Account page: the guide
until an account is connected, then the account with its label, Add
another account (the guide, titled Add a Sia account) and the other
accounts on this computer, each one click to switch back to.

On narrow screens file rows show Download and Share as icons, hide
the size, and wrap names to two lines at most.
2026-10-04 03:00:58 +02:00
Local Dev
299c4c069c Pithos 0.3.8: a version footer that updates Pithos in place
Pithos only updated when Theseus happened to check the extension
channel on a restart, and nothing showed which version was running.
A footer now shows pithos.sia and the version, as Aegis's does. In
Theseus it checks the channel when Pithos opens and every six hours;
a newer release shows as "↑ vX", one click downloads and verifies it,
and a second asks Theseus to restart and apply it. ↻ checks on demand.
2026-10-04 02:38:19 +02:00
Local Dev
d31e789c55 Pithos 0.3.7: music keeps playing while you browse
Opening an MP3 used to show it in a dialog, so the music stopped as soon
as you went on looking through your drive. Audio now plays in a player
docked at the bottom of Pithos that stays through folder, drive and page
changes and plays on through the folder it started from, with previous,
next, seek and the keyboard's media keys. An expired view link is
renewed mid-track instead of stopping playback.
2026-10-04 02:23:06 +02:00
Local Dev
ebd5b8ffe6 Pithos 0.3.7: Icons, List and Details views; fits the sidebar
Drives and folders can be shown as icons (pictures preview themselves),
a compact list, or a details table with type and date, remembered per
page. Per-item actions move into a ⋯ menu so rows fit a narrow panel.

In the 400 px Theseus sidebar the navigation folds into a compact bar
with the page name, the s3d status and a menu button, so the page gets
the room. The Widen button is gone: widening squeezed the open tab and
the right sidebar. Full page opens Pithos as an ordinary tab instead.
2026-10-04 02:16:09 +02:00
Local Dev
f924331a1e Pithos UI: choose where your drives live
Settings gains a sign-in, sign-up and move card for Silent Mode; Overview,
the status pill, Access and Share follow the server when drives are hosted.
Folders get their own Share (public, or a key with read/add/edit rights),
since per-folder access is what hosting adds over a bare s3d. Files the
server can still read are marked, and Access can encrypt the ones that
predate the move.
2026-10-04 01:42:55 +02:00
Local Dev
76496fd0ee Pithos 0.3.7: optional automatic upload of leftovers
s3d only sends full ~40 MB blocks to Sia, so a handful of small files can
stay in the local buffer forever (seen: 63 objects, 6 MiB, nothing on Sia).
An opt-in setting now flushes once the pending set has not changed for N
minutes, judged from s3d's upload stats so uploads from any S3 client count.
Failed flushes back off up to an hour instead of hammering a broken indexer.
2026-10-04 01:04:23 +02:00
Local Dev
b399d1be46 Pithos 0.3.6: buckets shown as drives
A bucket is the top level you put folders into, so it reads better as a drive than as a folder: the menu and page say Drives, each tile is a drive icon with the files and size it holds (counted in the background, up to 20,000 files, then shown as N+), and the subtitle says S3 apps call it a bucket. Folders inside a drive stay folders. New usage endpoint: GET /api/s3/:user/buckets/:bucket/usage.
2026-10-04 00:09:54 +02:00
Local Dev
77a29d2ce8 Pithos 0.3.5: s3d stays up, one view at a time, user buckets, a viewer
- s3d kept stopping: Pithos stopped it whenever the extension restarted
  (every update, every Theseus quit) and never started it again. Start
  and Stop now record what the user wants (pithos-prefs.json beside
  s3d.yml); Pithos starts s3d with Theseus and when opened, and retries a
  crash up to three times in ten minutes, logging why it skips. The
  Buckets page also redraws when s3d starts or stops; it used to keep
  saying "not running".
- One view at a time: "Full page" opens Pithos in a tab and closes the
  left panel; the tab has "Back to sidebar", which reopens the panel.
- Every new user gets a bucket of their own, named after them (lowercase,
  hyphens) or as typed in the New user dialog.
- Buckets show as folder tiles. New folders are kept while empty with the
  usual "<name>/" marker object.
- A viewer: images, audio (mp3 and friends), video and text open inside
  Pithos, with Share and Download. The Theseus panel uses 10-minute,
  reusable, inline view links so players can make range requests.
- The Access dialog says what s3d cannot do: per-folder public access and
  write rights for others are not supported, only whole-bucket public read.
2026-10-04 00:05:49 +02:00
Local Dev
a91d2c64b4 Pithos 0.3.4: show the Sia account, label it, switch and restore accounts
"Acting as" read like a choice of Sia account; it picks an S3 user on
this s3d, and every user shares the one Sia account the s3d is connected
to. So:

- The picker is "S3 user", with a tooltip saying all users share one Sia
  account; Buckets explains what a bucket is.
- Buckets and the Overview show "Sia account: <label> (indexer)". Pithos
  cannot see the account's email, so the Sia connection page lets the
  user label it (kept in pithos.json beside the s3d data).
- "Switch Sia account" stops s3d and moves its data (connection, users,
  keys, buckets, upload buffer) into previous-account-<stamp>/ next to
  s3d.yml, never deleting it; the guide then connects another account.
  It warns about uploads still waiting for Sia and offers a flush, and
  refuses while another s3d serves the config.
- "Earlier Sia accounts" lists those folders with Restore, which sets the
  current account aside the same way and swaps the old one back.

Also: a fresh connect now records which indexer it used, and a "not
connected" check is re-run after 30 s so a login made outside Pithos
shows up.
2026-10-03 22:57:46 +02:00
Local Dev
c09872122a Pithos 0.3.2: save access keys to an encrypted file
Wherever a key pair is shown (the guide's last step, the key dialog) a
"Save credentials" button writes it to a .pithoskey file, and Users &
keys gains "Open saved credentials" to read one back.

- With a password (any host): PBKDF2-SHA256, 600k iterations, AES-256-GCM,
  done in the page with WebCrypto.
- With the Theseus vault (default in Theseus): AES-256-GCM under a key the
  add-on derives from the vault (pithos/credentials/v1, now fixed), so
  there is no extra password; a locked vault raises the PIN prompt first.
  The add-on saves through a native dialog, since the sidebar page has no
  download path.

Only the user name and date stay readable, to tell files apart.
2026-10-03 22:10:00 +02:00
Local Dev
46912a74dd Pithos 0.3.1: plain Next on the account step, confirmed by a checkbox
The account step's button read "I have an account — Next", folding a confirmation into navigation. It is a plain Next now, enabled by an explicit "I have created my Sia Storage account and I am signed in" checkbox (or by choosing your own indexer). Pithos cannot see the sia.storage tab to detect the sign-in itself, and the Connect step proves it anyway: approving needs a signed-in account.
2026-10-03 21:25:24 +02:00
Local Dev
cacbdd571f Pithos 0.3.0: PIN gate and a recovery phrase from the Theseus vault
In Theseus, Pithos now opens only with the vault unlocked: it asks
Theseus for the unlock (api.vault.requestUnlock), and Theseus shows its
own PIN prompt, falling back to the master password after three wrong
tries. Pithos never sees either. When the vault locks (Settings > Lock
now) Pithos locks within a few seconds; the add-on watches from the main
process because a hidden panel's timers run about once a minute.

The guide's phrase step gains "Use my Theseus vault" (the default when a
vault exists): the add-on derives the 12-word phrase from the vault
(purpose path pithos/sia-recovery/v1, first 16 bytes as BIP-39 entropy)
and hands it straight to s3d, so there is nothing to write down and the
vault backup restores storage access. The path is now fixed; changing it
would cut users off from their data.

Needs the vault-derive capability. On a Theseus without requestUnlock it
runs ungated, as before.
2026-10-03 20:42:21 +02:00
Local Dev
b9f7e08ae4 Pithos: guided "Get started" setup that opens the approval page itself
First run now lands on a step-by-step guide instead of the overview:
create a Sia Storage account (link out, Pithos never sees the password),
install s3d, choose or generate the recovery phrase, connect, start the
gateway and create the first access key, with Back/Next on every step.
The connect step opens the indexer's approval page on its own and moves
on as soon as the approval lands; where a browser blocks the pop-up it
says so and makes the button the primary action.

Hosts without node-pty (the Theseus add-on) now fetch the one platform
package they need from the npm registry on first login, pinned to its
published sha512 integrity, so the approval link can be read there too.
The console-window login stays only as the fallback when that fails.
A retry after a failed connect with an existing phrase goes back to the
phrase step: the phrase is not kept, and a blank one would make s3d
generate a new one.
2026-10-03 20:23:42 +02:00
Local Dev
c5d6488b7d Pithos 0.2.0: live in the Theseus sidebar, no loopback address
In Theseus the console opened as a tab at http://127.0.0.1:<port>, a raw
local address in the URL bar. It is now a left-sidebar panel instead,
loading the add-on's own ui/index.html: API calls, uploads and live
events cross the add-on IPC bridge and the add-on forwards them to the
control server with an internal session. Downloads go to Theseus's
download manager through single-use 60-second links. The panel can widen
to full window or open as a tab.

The core gains internalSession() and downloadUrl() for that; web and
desktop hosts keep talking HTTP as before. Grids now shrink to fit, so
narrow hosts never scroll sideways.
2026-10-03 19:34:53 +02:00
Local Dev
6b8eeaf82b Pithos: a control panel for s3d, the Sia S3 gateway
s3d is driven entirely by a CLI and a two-route admin API, which keeps
Sia storage out of reach for anyone who does not live in a terminal.
Pithos wraps it: install the pinned s3d release (checksum verified),
start/stop and logs, indexer login, users and access keys, a bucket and
object browser with share links and public-read policies, and the
upload pipeline stats.

One control server (core/) serves one UI (ui/), and three hosts run it:
a web console, an Electron desktop window and a Theseus add-on, so a
feature lands everywhere at once. The server binds loopback, rejects
foreign Host headers, and signs views in with a one-time secret that
becomes a SameSite=Strict cookie. s3d login reads the recovery phrase
with term.ReadPassword, so it is driven through a pty, with a console
window fallback where the pty module is not shipped.
2026-10-03 19:02:50 +02:00