Skip to content

The intro should be an ordinary project, present in Recents #602

Description

@maboa

The intro transcript and its audio are markup, not a project. #hypertranscript carries 166 inline data-m spans, the player points at HLEintroAudio.mp3, and boot "leaves the demo" whenever the library is empty. The panel says "No projects yet." while a document sits on screen.

Why this is worth doing. Editing the intro today autosaves nowhere: session.active is false and session.projectId is null, so isDirty() returns false and nothing is written. It cannot be renamed, starred, duplicated, deleted, exported as a project, or given a poster in the list. Every "is there a project?" branch carries a second case for the document that isn't one. Making the intro a project removes a special case rather than adding one — which is why this will flow downstream.

Shape. On first boot with an empty library, seed it the way a transcription birth already works: the DOM is the transcript, commitInitialState signs it as v0 so it is born clean, and its media is recorded as kind: "link" to the URL already on the player — the format supports that, and it keeps first boot free of a download.

Seeding from the document rather than from a constant is what makes this portable: an embedder shipping its own index.html substitutes its own intro transcript, media and poster there and gets its own intro project, with no API to add. Glider currently ships this editor's intro verbatim and will want its own video; that becomes a markup change on their side. A host wanting no intro at all ships no inline transcript.

Decisions:

  1. If the user deletes it, does it come back? It must not, or deleting is futile — so seeding needs a "done once" marker rather than an "is the library empty?" test.
  2. Offline first run shows no audio, since the media is a link. Already true today.
  3. The empty state ("No projects yet.") becomes reachable only after someone deletes the intro.
  4. Title: "How to use the Editor", carried in the markup beside the transcript rather than in code, so an embedder's intro names itself. Without an explicit title the project would fall back to its media filename and appear as "HLEintroAudio.mp3".

Expected downstream: 26 e2e specs boot on the demo transcript (#hypertranscript [data-m]) and several assert no-project states; two assert "No projects yet."; the #473 has-projects hint and anti-flash logic are built on "no projects → demo"; and images/poster.png stops being a floating default and becomes this project's own poster, which incidentally settles the note in #575 about a user's audio project wearing hyperaudio branding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions