Split: directory admin from ipx #206

Closed
opened 2026-10-11 20:01:40 -07:00 by rays · 2 comments
Owner

Part of splitting ipx into a directory service, a backend and a frontend (see the tracking issue).

Admin of the directory is done from ipx, not the directory. When the token in an ipx server's settings is rwa (from GET /v1/me), its admins see:

  • a Remove from directory action on a Directory feed's page, which removes and blocks it (DELETE /v1/feeds/{id});
  • a Blocked list in the admin page, with Unblock;
  • a way to drop one instance's snapshot and to refresh a feed now.

The ipx handlers check user.is_admin (403 otherwise), and the directory checks the token's access in turn.

New UI: mockups on this issue for approval before it merges.

Part of splitting ipx into a directory service, a backend and a frontend (see the tracking issue). Admin of the directory is done from ipx, not the directory. When the token in an ipx server's settings is `rwa` (from `GET /v1/me`), its admins see: * a **Remove from directory** action on a Directory feed's page, which removes and blocks it (`DELETE /v1/feeds/{id}`); * a **Blocked** list in the admin page, with Unblock; * a way to drop one instance's snapshot and to refresh a feed now. The ipx handlers check `user.is_admin` (403 otherwise), and the directory checks the token's access in turn. New UI: mockups on this issue for approval before it merges.
rays added the enhancement label 2026-10-11 20:01:40 -07:00
Author
Owner

Built on the branch directory-admin (2cb45e6), not merged or deployed: new UI for approval. All suites pass (Rust 117 + 11 + 30 on Postgres, Playwright 74 with a new test for this).

A Directory feed's page, for an admin whose directory token is rwa: two buttons after Subscribe, Check now and Remove from the directory (asks first; blocks it so no snapshot brings it back). Anyone else sees only Subscribe, and the API refuses them (403).

Glass, 390px Glass, desktop

Admin, Directory, under the settings, again only with an rwa token: Servers (each sharing server by its token's name, feeds and subscribers, with Drop) and Blocked (by title, never the address, since a feed is often blocked for a key in it; with Unblock).

Glass, 390px Glass, desktop

Notes:

  • The directory gained GET /v1/instances (rwa) for the Servers list. It keeps no time per snapshot, so the list shows no "last shared".
  • Unblocking, or dropping a snapshot, makes this server send its snapshot again at once; since #211 an unchanged one would wait half an hour, and the unblocked feed with it.
  • An admin's own subscriptions open as their feeds, not as Directory pages, so the buttons show on feeds the admin does not subscribe to. A feed of their own is kept out by marking it private.
  • Found while taking these: on a phone the Subscribe button there was squashed to 18px (#212), fixed and deployed separately.

On approval I merge, deploy ipx and ipx-directory, and close this and #207.

Built on the branch `directory-admin` (2cb45e6), **not merged or deployed**: new UI for approval. All suites pass (Rust 117 + 11 + 30 on Postgres, Playwright 74 with a new test for this). **A Directory feed's page**, for an admin whose directory token is `rwa`: two buttons after Subscribe, Check now and Remove from the directory (asks first; blocks it so no snapshot brings it back). Anyone else sees only Subscribe, and the API refuses them (403). | Glass, 390px | Glass, desktop | |---|---| | ![](https://git.sdf1.net/attachments/b93cd90d-73c8-4db8-9f46-d7351f8ef8ae) | ![](https://git.sdf1.net/attachments/f24475c5-0d8e-4478-bc31-eb753501b8ac) | **Admin, Directory**, under the settings, again only with an `rwa` token: **Servers** (each sharing server by its token's name, feeds and subscribers, with Drop) and **Blocked** (by title, never the address, since a feed is often blocked for a key in it; with Unblock). | Glass, 390px | Glass, desktop | |---|---| | ![](https://git.sdf1.net/attachments/d0317a9a-a6dc-4f92-97be-e3633b3999db) | ![](https://git.sdf1.net/attachments/1c994f78-1e51-4b81-9819-c3dc735e8cef) | Notes: * The directory gained `GET /v1/instances` (rwa) for the Servers list. It keeps no time per snapshot, so the list shows no "last shared". * Unblocking, or dropping a snapshot, makes this server send its snapshot again at once; since #211 an unchanged one would wait half an hour, and the unblocked feed with it. * An admin's own subscriptions open as their feeds, not as Directory pages, so the buttons show on feeds the admin does not subscribe to. A feed of their own is kept out by marking it private. * Found while taking these: on a phone the Subscribe button there was squashed to 18px (#212), fixed and deployed separately. On approval I merge, deploy ipx and ipx-directory, and close this and #207.
Author
Owner

Approved, merged as 954399e, deployed (ipx, ipx-directory, ipx-web). In production: Admin, Directory lists tower with 1471 feeds and 143 subscribers, nothing blocked; a Directory feed's page reports can_admin for the admin. Suites: Rust 116 + 12 + 30 on Postgres, Playwright 74.

Approved, merged as 954399e, deployed (ipx, ipx-directory, ipx-web). In production: Admin, Directory lists tower with 1471 feeds and 143 subscribers, nothing blocked; a Directory feed's page reports can_admin for the admin. Suites: Rust 116 + 12 + 30 on Postgres, Playwright 74.
rays closed this issue 2026-10-12 09:56:20 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#206