From 5466d975441d90904e2656f12d9b009c6d6b4e5f Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Thu, 2 Jul 2026 15:18:10 -0400 Subject: [PATCH] [ui] Remove NIP-71 authoring sections from upload/edit modals (#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bitvid authors kind-30078 and MIRRORS to NIP-71; it never authors NIP-71 directly. Verified before removing: the My Videos mirror (buildNip71MirrorEvent) derives everything from the bitvid note itself (duration/dims are auto-captured at upload, contentWarning comes from the NSFW toggle, imeta is built from the video), and the only consumer of the form's NIP-71 metadata (publishNip71Video) is gated behind FEATURE_PUBLISH_NIP71: false — the fields fed a dead path and confused uploaders. Removed from the upload modal: "NIP-71 Technical" (content warning, duration, summary + Customize toggle) and the IMETA variant editor. Removed from the edit modal: kind (21/22) selector, published_at, alt, duration, content warning, summary, IMETA, text tracks, segments, participants, references. KEPT in both: hashtags (they feed hashtag feeds, the suggestion chips, and the mirror's t tags) and the web seeds / torrent (xs) inputs (bitvid-note fields, not NIP-71). All the JS plumbing is missing-DOM tolerant, so no wiring changes were needed to collect. Compatibility: existing videos' NIP-71 extras survive a save. EditModal keeps the video's full stored metadata (storedNip71Metadata) and merges the edited hashtags into it on submit instead of replacing it with the reduced form's empty output (t mirror key kept in sync). Also fixes a latent pre-existing bug the reduction exposed: nip71Edited compared the submit-side copy AFTER publishedAt normalization (string→timestamp, delete-empty) against an UN-normalized original, so any video with publishedAt made every save look "edited". Both sides now share normalizeCollectedNip71. Tests: +2 in edit-modal-submit-state (stored extras survive a hashtag edit; untouched save keeps nip71Edited false). Modal/payload/mirror suites green (39 + 7). Lint + build green. Co-Authored-By: Claude Opus 4.8 --- components/edit-video-modal.html | 572 +------------------------ components/upload-modal.html | 51 +-- js/ui/components/EditModal.js | 77 +++- tests/edit-modal-submit-state.test.mjs | 117 +++++ todo/TODO_2026-06-20_pre-launch.md | 29 ++ 5 files changed, 220 insertions(+), 626 deletions(-) diff --git a/components/edit-video-modal.html b/components/edit-video-modal.html index 74fa9e5e..e2a13671 100644 --- a/components/edit-video-modal.html +++ b/components/edit-video-modal.html @@ -57,492 +57,14 @@ - -
-
- - NIP-71 event type - -

- Choose the video format. Kind 21 is a full video, while - Kind 22 is a short. -

-
- -
-
- -
-
- - -

- Set the canonical publish time for cross-client ordering. -

-
-
- - -

- Plain-language fallback shown when the media cannot load. -

-
-
- - -

- Optional legacy fallback in seconds (fractions allowed) for clients that expect a top-level duration. -

-
-
- - -

- Leave blank if the video is safe for all audiences. -

-
-
- -
- - -

- This becomes the event content. Keep it concise for Nostr readers. -

-
-
- -
- - NIP-71 tags - -

- Use the controls below to describe media variants, captions, chapters, participants, and references. -

- -
-
-

Image metadata (imeta)

- -
-

- Provide dimensions, MIME type, and resource links for each variant. Nested repeaters let you attach multiple - image, fallback, or service values. -

-
- -
- -
-
-

- Caption & subtitle tracks (text-track) -

- -
-

- Supply caption or subtitle URLs along with file type and language so players can surface accessibility features. -

-
- -
- -
-
-

Chapters & segments (segment)

- -
-

- Outline chapters with start and end times, titles, and optional thumbnails. -

-
- -
- + +
-

Hashtags (t)

+

Hashtags

- Enter keywords; leading # characters are stripped automatically when saving. + Tag your video so it shows up in hashtag feeds. Leading # characters are stripped automatically.

- -
-
-

Participants (p)

- -
-
- -
- -
-
-

Reference links (r)

- -
-
- -
-
+