feat: federation and admin UI pass, sync on selection, sortable listing - #11
Merged
Merged
Conversation
…isting - POST selected-artefacts queues a background sync of that artefact only (pendingSync on the registry doc, drained under the sync lock so quick successive selections are never lost) - sync mirrors upstream thumbnails under the same id (add, replace, remove) - GET remote-artefacts forwards category/format to the upstream and annotates each row with its local mirror state (synced, upToDate, conflict) - GET remote-thumbnails/:id/data proxies upstream thumbnails for the admin table, restricted to image/webp and image/svg+xml with nosniff + CSP sandbox - GET artefacts accepts a whitelisted sort key with a leading dash for descending; unknown keys are 400, admin-only keys fall back for others - store the package.json description as packageDescription (read-only, mirrored by the sync)
- home: sortable column headers bound to the sort search param (three-state), table in a card, edit pencil for admins, count in the card title - artefact page: editable metadata form ahead of the technical sections, with the thumbnail staged and saved by the same button (fixes lost edits when uploading an image first); tarball and download cards merged into the metadata card; technical description from package.json - remote registry page: artefacts table aligned on the home list with category/format filters, pagination, per-row sync state fed by the ws channel, proxied upstream thumbnails, conflict rows, error notifications, confirmations before unselecting; url/name and key/new key rows - admin sections: full-height admin button, Manage button and delete confirmation for remote registries, account avatars and type in the grants picker and table, localized capitalized status chips, plural rules - form fields default to comfortable density and hide-details auto; remaining schema cols use the sm breakpoint so they apply inside the form width - api key fields are masked text instead of type=password so Chrome stops autofilling them
Not part of the requested scope; the artefact keeps only its editable, localized description.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UI pass on the registry, centered on federation and the artefact page.
API
pendingSync, drained under the sync lock so quick successive selections are never lost); progress goes through the existing ws channel.GET …/remote-artefactsforwards category/format and annotates each row with its local state (synced, up to date, conflict with a local artefact).GET …/remote-thumbnails/:id/dataproxies upstream thumbnails for the admin table (the browser cannot load them from the upstream: internal URL,Cross-Origin-Resource-Policy: same-origin). Restricted to webp/svg, served withnosniffand a CSP sandbox.GET /api/v1/artefacts?sort=accepts a whitelisted key with a leading-for descending; unknown keys are 400, admin-only keys fall back silently for others.UI
sortsearch param (three-state), table in a card, edit pencil for admins.hide-details: autoapp-wide; API key fields are masked text instead oftype=passwordso Chrome stops autofilling them.Why: the federation flow gave no feedback after selecting an artefact, the remote table lacked search/filters and icons, uploading a thumbnail lost unsaved metadata (koumoul/plateforme#1766), and a series of admin screens needed ergonomic fixes.
Heads-up
?sort=with an unknown key now returns 400 instead of the default order.lastSyncStatus: erroron the registry, not as an error on the POST.