Queue executable speed and peer-to-peer sharing plans with tested patches and harnesses
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
# ytplayer — Speed & Features Plan (2026-09-29)
|
||||
|
||||
Scope: **make the app faster** (startup, search, pressing play, moving around)
|
||||
and **add new features**. Hardening/refactor work is intentionally out of scope.
|
||||
and **add new features**, led by **peer-to-peer video sharing**. Hardening/refactor
|
||||
work is intentionally out of scope.
|
||||
|
||||
## Integrated roadmap (what is queued and executable today)
|
||||
|
||||
Everything below is broken into step-by-step plans a smaller model can execute
|
||||
without exploring the code — see `plans/INDEX.md`. All 19 were dry-run end to end.
|
||||
|
||||
| Order | Plans | What it delivers | Source |
|
||||
|-------|-------|------------------|--------|
|
||||
| 1 | `001` | Timing marks (`ytp:boot`, `ytp:search`, `ytp:tap-to-play`) + yt-dlp duration logs | A "Measuring" |
|
||||
| 2 | `002`–`003` | Compressed + ETagged shell (app.js 426 → 94 KB), self-hosted fonts | A1.1–A1.3 |
|
||||
| 3 | `004`–`005` | One yt-dlp resolve per video at a time; resolve likely next plays before the tap | A3.1–A3.2 |
|
||||
| 4 | `006`–`007` | Search via InnerTube (~0.8 s, yt-dlp fallback); long-lived yt-dlp workers | A2.1, A3.3 |
|
||||
| 5 | `008`–`019` | **Peer-to-peer sharing** — design and rules in `docs/p2p-architecture.md` | Part B0 |
|
||||
|
||||
Not queued yet (write plans for them with `/plan-queue` when reached): A1.4 minify,
|
||||
A1.5 deferred boot work, A1.6 lazy modules, A2.2 suggestions, A2.3/A2.4, A3.4/A3.5,
|
||||
A4 (VPS media cache), A5 polish, and the Part B feature list.
|
||||
|
||||
## Where the time goes today (measured against prod)
|
||||
|
||||
@@ -99,6 +117,21 @@ before the user taps.**
|
||||
|
||||
## Part B — New features
|
||||
|
||||
### B0. Peer-to-peer video sharing (queued: plans 008–019)
|
||||
|
||||
The server keeps the user list, the video list and metadata; every validated copy
|
||||
gets a content id = SHA-256 of its bytes; devices that save a video become persistent
|
||||
**holders**; when YouTube and the server copy are gone, devices serve each other over
|
||||
WebRTC and can restore the server's copy. Rules the owner set (2026-09-29):
|
||||
**P2P is on by default**, the **server malware scan is off by default** (hashing +
|
||||
media validation always run), and holder records are **persistent** — the UI shows
|
||||
when each was last verified and marks old ones **stale** instead of dropping them.
|
||||
Full design, data model, flows and security rules: `docs/p2p-architecture.md`.
|
||||
The earlier phase 02–06 draft is superseded; its differences are listed at the end of
|
||||
that document.
|
||||
|
||||
### Other features (not queued yet)
|
||||
|
||||
Ranked by fit with how the app is actually used (worship sets, sing-alongs,
|
||||
offline playback). Each is sized; most reuse machinery that already exists.
|
||||
|
||||
@@ -144,16 +177,15 @@ offline playback). Each is sized; most reuse machinery that already exists.
|
||||
|
||||
## Suggested order
|
||||
|
||||
1. **Week 1 — quick speed wins:** add the timing marks (Measuring), A1.1
|
||||
compression, A1.2 ETags, A1.3 fonts, A3.1 coalescing, A3.2 warm-on-intent,
|
||||
A3.4 instant UI. These are all small, and together they fix most of what
|
||||
feels slow today.
|
||||
2. **Week 2:** A2.1 InnerTube search + A2.2 suggestions, A1.4 defer/minify.
|
||||
3. **Week 3:** A3.3 persistent yt-dlp worker, A1.5 deferred boot work, then
|
||||
measure the WireGuard link (A4) and decide on the VPS media cache.
|
||||
4. **Then features**, starting with the small high-fit ones: section loops,
|
||||
1. **Run the queue** (`/run-queue`): plans `001`–`007` (speed), then `008`–`019`
|
||||
(peer-to-peer). Deploy after `007` and measure with the `ytp:*` marks and the
|
||||
`[ytdlp]` log lines before starting P2P.
|
||||
2. **Next speed plans to write:** A3.4 instant UI on tap, A2.2 suggestions,
|
||||
A1.5 deferred boot work, then measure the WireGuard link (A4) and decide on the
|
||||
VPS media cache.
|
||||
3. **Then features**, starting with the small high-fit ones: section loops,
|
||||
confidence monitor, count-in, lyrics search, stats wrap-up — then
|
||||
service plans and chord charts.
|
||||
|
||||
Each row is sized to be one commit (CLAUDE.md commit rules) and can be queued
|
||||
with the `plan-queue` skill.
|
||||
Each item is sized to be one commit (CLAUDE.md commit rules); queue new ones with
|
||||
the `plan-queue` skill.
|
||||
|
||||
Reference in New Issue
Block a user