Skip to content

Added knowledge bases and explainers for containers and metadata tags - #12

Open
CodyCBakerPhD wants to merge 3 commits into
mainfrom
claude/metadata-tags-copyright-0ty2em
Open

Added knowledge bases and explainers for containers and metadata tags#12
CodyCBakerPhD wants to merge 3 commits into
mainfrom
claude/metadata-tags-copyright-0ty2em

Conversation

@CodyCBakerPhD

Copy link
Copy Markdown
Member

Added comprehensive knowledge bases that turn cryptic container and metadata tag names into readable, educational explainers shown in the Inspect tab.

Key changes:

  • Created metadataTagKb.ts with a knowledge base covering 70+ metadata tags across MP4/QuickTime, ID3v2, Vorbis/Matroska, and RIFF formats, plus mediabunny's normalized field names. Includes case-insensitive fallback matching for container formats that vary capitalization.
  • Created containerKb.ts documenting 10 container formats (MP4, QuickTime, Matroska, WebM, Ogg, MP3, WAVE, FLAC, ADTS, MPEG-TS) with their extensions, supported codecs, and playback compatibility notes.
  • Added infoIcon() DOM helper that renders an ⓘ button with a popover explainer. Popovers auto-position to stay on-screen, close on Escape or outside click, and support keyboard focus and touch interaction.
  • Enhanced gridItem() to optionally display an info button next to field labels, with support for raw (case-sensitive) tag name styling.
  • Updated Inspect tab to use the new knowledge bases, replacing the generic "Format" label with "Container" and adding explainers to bitrate fields.
  • Renamed "Encode Test" tab to "Compare Quality" throughout the codebase for clarity.
  • Added appUrl.ts module for managing shareable state in the query string (tab and src parameters), with URL validation and history management.
  • Added comprehensive unit tests for DOM utilities, metadata tag lookup, container descriptions, and URL parameter handling.
  • Updated styling to support themed links, info popovers, and raw tag name display.

The knowledge bases are author-authored and trusted; they explain why ©too is the encoding tool (not a typo), what the container-vs-codec distinction means, and which codecs each format can carry.

https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN

Inspect's "Format" is now "Container", with an ⓘ explainer covering the
container-vs-codec distinction and, per container, which codecs it can
carry. The bitrate fields explain themselves too, including why the
Overview's is "overall" (whole file, every track plus container overhead).

Metadata tags get a knowledge base of MP4/QuickTime atoms, ID3v2 frames,
Vorbis comments and RIFF INFO chunks, so a tag shows a readable label with
its raw name and meaning behind an ⓘ. That answers what ©too is (the
encoding tool; the leading © is byte 0xA9, QuickTime's text-atom marker),
and recognizable encoder signatures such as Lavf60.16.100 are decoded too.

Also: every tab now has a URL (?tab=…), restored on load and navigable with
back/forward, and a video loaded from a remote URL is recorded as ?src=…
and re-opened automatically, so a link carries both the file and the tab.
The CLI card opens with a plain-language description of re-encoding,
transcoding and remuxing, the GOP explainer moved under its heading to
match the Atom Map tab, "Encode Test" is now "Compare Quality", and links
use the theme accent instead of the browser default blue, which was
unreadable in dark mode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
@chromatic-com

chromatic-com Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

UI Tests need review – Review now

🟡 UI Tests: encoding-helper-storybook: 2 changes must be accepted as baselines
🟡 UI Review: encoding-helper-storybook: Go review the new and updated UI
Storybook icon Storybook Publish: encoding-helper-storybook: 5 stories published

@chromatic-com

chromatic-com Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

UI Tests need review – Review now

🟡 UI Tests: encoding-helper-playwright: 1 change must be accepted as baseline
🟡 UI Review: encoding-helper-playwright: Go review the new and updated UI
Storybook icon Test suite publish: encoding-helper-playwright: 2 tests published

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://brain-bbqs.github.io/encoding-helper/pr-preview/pr-12/

Built to branch gh-pages at 2026-08-10 05:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@CodyCBakerPhD CodyCBakerPhD self-assigned this Aug 10, 2026
@CodyCBakerPhD
CodyCBakerPhD marked this pull request as ready for review August 10, 2026 05:20
Fixes the lint failure on the first commit (an unnecessary `??` on a
regex capture; the version groups now always participate in the match).

The Inspect tab's first card is "Video Container Overview", with the
container explainer as a description under the heading instead of an ⓘ
popover, and the field itself relabelled "Type". The GOP explainer breaks
its I/P/B-frame definitions into bullets and links the sleap-io note to
the sio reencode CLI reference. "CLI Command Builder" is now "FFmpeg
Command Builder", links to ffmpeg's install page, and says why running
ffmpeg natively beats the in-browser engines for real work.

The in-browser engines move out of that tab into their own "Re-encode
In-Browser" tab, to the right of Compare Quality. Both already encoded the
whole video and saved it wherever you chose; the new tab states that up
front. Their descriptions were also being inserted as text rather than
markup, so "&mdash;" was showing literally.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdEBU5WYKLXj9weEfFKQfN
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.69264% with 137 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ui/reencodeTab.ts 0.00% 83 Missing ⚠️
src/ui/inspectTab.ts 0.00% 18 Missing ⚠️
src/ui/tabs.ts 0.00% 14 Missing ⚠️
src/ui/fileLoading.ts 0.00% 6 Missing ⚠️
src/lib/metadataTagKb.ts 84.84% 2 Missing and 3 partials ⚠️
src/ui/reportTab.ts 0.00% 4 Missing ⚠️
src/lib/dom.ts 95.34% 1 Missing and 1 partial ⚠️
src/lib/appUrl.ts 95.45% 1 Missing ⚠️
src/ui/compareTab.ts 0.00% 1 Missing ⚠️
src/ui/encodeTab.ts 0.00% 1 Missing ⚠️
... and 2 more
Files with missing lines Coverage Δ
src/lib/containerKb.ts 100.00% <100.00%> (ø)
src/lib/state.ts 0.00% <ø> (ø)
src/ui/cliControls.ts 0.00% <ø> (ø)
src/ui/elements.ts 0.00% <ø> (ø)
src/lib/appUrl.ts 95.45% <95.45%> (ø)
src/ui/compareTab.ts 0.00% <0.00%> (ø)
src/ui/encodeTab.ts 0.00% <0.00%> (ø)
src/ui/formControls.ts 0.00% <0.00%> (ø)
src/ui/seekTab.ts 0.00% <0.00%> (ø)
src/lib/dom.ts 66.66% <95.34%> (+66.66%) ⬆️
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants