Skip to content

feat: create, edit, view package collections - #3422

Draft
serhalp wants to merge 9 commits into
serhalp/collections/1-data-modelfrom
serhalp/collections/2-create-view-edit
Draft

serhalp wants to merge 9 commits into
serhalp/collections/1-data-modelfrom
serhalp/collections/2-create-view-edit

Conversation

@serhalp

@serhalp serhalp commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

See #78, #2890. See also #2568.

🧭 Context

This implements the first part of the package collections feature as described in the ADR in #3421. (📘 Read the rendered ADR here.)

📚 Description

/collections/<handle>/<rkey> shows one collection: packages missing from the registry are struck through, included collections link to their own page, and anything unrecognized is shown so its author can fix it. The page notes that collections are the user's own public atproto data.

The editor orders items, adds packages through the package typeahead or by pasting a package or collection link, and takes an optional short note per item. It says up front that everything is public, and why a record from another app can't be saved yet. Saving an edit made stale by a change elsewhere fails with a conflict message instead of clobbering it.

Writes go to the signed-in user's PDS through their OAuth session, which now asks for the collections scope. Edits are read-modify-write with swapRecord, so a concurrent change fails with 409 instead of being clobbered. Fields other apps added are kept. Our own writes update the record cache, so the next read sees them right away; it would be confusing UX otherwise.

Also:

  • Show your collections on your profile. When viewing your own profile, show a "Create new collection" CTA.
  • Jump to your collections from the command palette.
  • When viewing a package, add it to a collection from the command palette.

Stack created with GitHub Stacks CLI • Give Feedback 💬

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Nov 14, 2026 10:48pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Nov 14, 2026 10:48pm UTC
npmx-lunaria Ignored Ignored Nov 14, 2026 10:48pm UTC

Request Review

@serhalp
serhalp added this pull request to stack #3427 November 9, 2026 00:36
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

Failed Failed checks: 2 inconclusive

Check name Status Explanation Resolution
Title check Pending (Error) This assessment has not completed. The check will be retried on the next pre-merge check run.
Description check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the tracking.ignoredKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/fr-FR.json Localization changed, will be marked as complete. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
3650 1 3649 6
View the top 1 failed test(s) by shortest run time
test/unit/a11y-component-coverage.spec.ts > a11y component test coverage > should have accessibility tests for all components (or be explicitly skipped)
Stack Traces | 0.0175s run time
AssertionError: Missing a11y tests for 1 component(s):
  - Collection/ItemNote.vue

To fix: Add tests in test/nuxt/a11y.spec.ts or add to SKIPPED_COMPONENTS in test/unit/a11y-component-coverage.spec.ts with justification.: expected 1 to equal +0

- Expected
+ Received

- 0
+ 1

 ❯ test/unit/a11y-component-coverage.spec.ts:186:12

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 83dc5a3 to a4de3dd Compare November 9, 2026 01:32
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from a4de3dd to ecef573 Compare November 11, 2026 14:42
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from ecef573 to 5956197 Compare November 11, 2026 15:33
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 5956197 to 20cc985 Compare November 11, 2026 15:40
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 20cc985 to bc7d9b5 Compare November 11, 2026 15:43
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from bc7d9b5 to 8a24415 Compare November 11, 2026 15:56
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 8a24415 to b2e034f Compare November 11, 2026 16:19
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from b2e034f to e6b5bb2 Compare November 11, 2026 16:52
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 6802449 to 0b6479c Compare November 11, 2026 17:00
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 0b6479c to d61a138 Compare November 11, 2026 17:13
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from d61a138 to 7f06ed7 Compare November 11, 2026 17:43
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 7f06ed7 to bc93de4 Compare November 11, 2026 22:24
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from bc93de4 to 5113bdb Compare November 11, 2026 22:44
@serhalp
serhalp force-pushed the serhalp/collections/2-create-view-edit branch from 5113bdb to cf7c4b4 Compare November 14, 2026 22:03
Throws on anything but a 404, so a registry outage isn't cached as
"doesn't exist".
parseSubjectRef classifies an item as a package URL or a collection
AT-URI. The body schemas are stricter than the lexicon: npmx.dev only
writes items it can render.
Records come from the owner's PDS and are validated on read, since any
client can write them. Package items are checked against the registry,
and included collections resolve to summaries without being expanded.
Writes go to the signed-in user's PDS through their OAuth session, which
now asks for the collections scope. Edits are read-modify-write with
swapRecord, so a concurrent change fails with 409 instead of being
clobbered. Fields other apps added are kept. Our own writes update the
record cache, so the next read sees them.
/collections/<handle>/<rkey> shows one collection: packages missing from
the registry are struck through, included collections link to their own
page, and anything unrecognized is shown so its author can fix it. The
page notes that collections are the user's own public atproto data.

The editor orders items, adds packages through the package typeahead or
by pasting a package or collection link, and takes a short note per item.
It says up front that everything is public, and why a record from
another app can't be saved yet. Saving an edit made stale by a change
elsewhere fails with a conflict message instead of clobbering it.
Profiles list the account's collections, newest first, with a "New
collection" link on your own.
Adds New collection, and while searching, a jump to any of your own
collections by name.
The guide covers making and editing collections, their URLs and palette
commands. A new integrations page shows how any atproto app can read and
write dev.npmx.collection records.
Card metadata comes from the same lookup as org pages. Notes sit under each card, and packages without metadata keep the plain row.

This branch was successfully deployed

2 active (1 outdated) deployments
Preview – npmx.dev — eb6fcf14 Deployed Nov 14, 2026 by vercel[bot]
Preview – docs.npmx.dev — 5113bdb0 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant