Commit Graph
5 Commits
Author SHA1 Message Date
pastilhasandClaude Opus 5 7eec2ec51d Administration is a section, not an overlay
the connection form — where fofos is, and the token — was reached through
`?config=1` and a link in the detail header, because it was not one of the nine
sections. it is now the tenth, called Administration, last in the nav.

that removes the overlay and the second route to it. the two could disagree: the
form covered whatever section was selected underneath, so the nav highlighted one
thing while the panel showed another, and an unconfigured plugin rendered the form
with no header at all — which reads as the selected section being broken rather
than as one setup step not done yet. unconfigured now goes to Administration and
the header says so.

`site` and `administration` are deliberately separate and the file says why. Site
settings is the CLIENT's — partners, social links, contact details, all of it
public copy. Administration is Officer's end: how this plugin reaches fofos, and
whatever else it will need to know. nothing in it ever appears on the site, and
the people who touch the two are not the same people.

`path: null`, alone among the sections: it reads nothing from fofos, which is why
it keeps working when fofos is unreachable and the others do not.

the header's settings link is replaced by the section's own hint, so the row still
says what it is once you are in it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 00:18:13 +01:00
pastilhasandClaude Opus 5 fe77250aa4 the site's own wordmark, flattened onto white
the previous icon came from the bigcartel storefront. this one is the mark the
site itself serves — fofos-logo-black.webp — which is the one that will stay
current when the branding moves.

it is TRANSPARENT, black on nothing, so committing it unchanged would have put a
black mark on a dark dock and shown nothing at all. flattened onto opaque white
instead, and the white travels with the file rather than being something the
theme is trusted to supply: the icon is drawn over a dark tile, a light
marketplace card and the plugin's own header, and only one of those would have
saved it.

trimmed before padding, because the source has the artwork inset in a square and
centring the file centres the wrong thing. 86% inset — the lower line is fine
strokes and stops being readable at dock size with any more air than that.

assets/README.md records where it came from and how to redo it. a binary is the
one thing a diff cannot show, and the last icon arrived with no note about its
source, which is why this one needed replacing rather than updating.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 00:10:31 +01:00
pastilhasandClaude Opus 5 7da2640ce4 the fofos logo as the plugin's icon
`assets/icon.png` — presence is the declaration, so this takes over the dock tile
from the lucide `PenLine` name in the manifest. no manifest change: a file that
is there is the whole mechanism, and there is no field to keep in step with it.

256x256, matching every other plugin's icon rather than the source's 300.

TRANSPARENCY SURVIVED THE RESIZE, which is the part that needed care: the source
is half fully-transparent pixels, and a resize without `-background none`
composites them onto white — a black logo on a white square, on a dark dock.
checked after: alpha min 0, top-left srgba(0,0,0,0).

encoding chosen by measuring rather than by habit. straight PNG32 came out at
44 KB — LARGER than the 300px source — because a forced 32-bit RGBA gets no
palette. PNG8 is 7 KB and bands the anti-aliased edges (RMSE 404). pngquant at
quality 90-100 is 15.5 KB with RMSE 68, six times more faithful than PNG8 and a
third the size of full colour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 23:21:22 +01:00
PastilhasandClaude Opus 5 6b87956e44 Everything needed to be a plugin
manifest, one table, a router and two panels. Discovery is by convention, so
this is the point at which the directory stops being a directory and becomes
something Officer can install.

The manifest holds only what a listing cannot say. One permission, grantable,
with ownerOnly on /_config — reading and editing the site is exactly what a
member might be brought in for, but the token is unrestricted write authority
over everything the public sees, so handing it over is the owner's.

db/schema.ts is ONE table and should stay that way. fofos owns its own Postgres
and its own media store; this holds a URL and a token. That is what makes the
strongest thing about this plugin true: no operation on it can destroy the
client's work, checkbox ticked or not, because none of it was ever here. A cache
would be the thin end of that.

The router mostly forwards. fofos's /api/admin already answers in the shape a
panel wants, so re-wrapping it would be a second place for the contract to drift.
Two things in it are load-bearing rather than style:

  registerProxiedPrefix('/api/fofos-admin/media'). bodyParser calls parseBody on
  multipart across the whole protected router, and Hono then caches the parsed
  FormData — so asking for the bytes afterwards re-serialises them under a NEW
  boundary while the ORIGINAL content-type header is what gets forwarded. Header
  and body disagree and every upload fails with "Unexpected end of form".
  Narrow to the one route: everything else is JSON that is fine to parse.

  The catch-all is LAST in the file. Hono runs matching handlers in registration
  order, so /* above /_config would swallow it and the settings form would
  forward itself to fofos, which has no such endpoint — a 404 from a plugin that
  is working perfectly.

Panels are a nav and a detail pane that never speak to each other: the nav writes
?section=, the detail pane reads it. Real <Link>s rather than the buttons
proxy-manager uses — AGENTS.md says nav items are links, and the file documenting
that pattern says not to copy the older one. <Link> and not <NavLink> because
active state here is a query parameter and NavLink compares paths, which would
light every row at once.

Which component renders which section is a MAP, not a conditional on `built`.
The first version read `built ? <MessagesPanel/> : <Planned/>`, which is correct
only while exactly one section exists — the second one finished would have
rendered Messages under its own name.

Messages is the only section built, chosen because it is one read-only route: it
proves the path from an Officer panel through this proxy to fofos and back with
nothing else able to be wrong at the same time. The other eight are in the nav,
dimmed and labelled, saying what they will do and that the old admin still edits
them. A nav that hides what is unfinished gives no sense of what the thing is for.

Typechecked against the platform — and the typechecker was verified to actually
cover plugins/ by planting an error and watching it fail, because a clean run
that does not include your files is worse than no run.

NOT yet: installed, or run against a live fofos. Nothing here has been through
the permission gate or a real request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 23:05:34 +01:00
PastilhasandClaude Opus 5 0a967bef98 The name, and what it is for
An Officer plugin that puts the fofos admin inside Officer, as panels — so
editing the site uses Officer's accounts and permissions rather than a second
password on a second domain.

Nothing is built. The README says so, and says what the shape will be: nav plus
detail after plugins/proxy-manager, nine sections, messages first because it is
one read-only route and proves the whole path before anything harder.

The API it consumes already exists, at /api/admin in fofos/platform. It is there
rather than here because the query layer is the only thing the site and the admin
share, and a plugin carrying its own copy of that schema would be a second
definition of the same tables in another repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 22:32:23 +01:00