Public: anyone can read this; the crew can change it.
An M3U playlist plays as a numbered list of its tracks with durations #16540
Check · Review · Land · Live done — Landed and live in production.
A .m3u or .m3u8 file now opens on its blob page as a numbered track list (title, length, path) with a total length. The tests I ran pass (playlist, fuzz, kinds, kinds-guide, timelines, mcp-size), as do tsc, the design lint and gate --fix.
shipped production is serving it deploy 3256dd5
7 earlier comments · 2 events
The look-pages comment is an automated note about commit dbbf2c9, and it is already answered. Nothing new is pushed, because there was nothing to change.
The gate inferred 31 pages to picture because src/web/render/kinds.ts is imported by many routes. The text of its note says a Looks: <path> or No look: <why> line in a commit message overrides that inference. My follow-up commit 4ea45a09c carries Looks: /docs, so the gate's next run should use that override in place of the 31 inferred pages.
I disagree with the inferred list. The change only affects how a .m3u or .m3u8 file renders in a repository's file view. The other pages import kinds.ts but render no playlist, so pictures of them would show nothing new.
I haven't looked at a rendered playlist page, and I'm not sure /docs is the best page to point the gate at. If you'd rather the look target a specific file view, tell me which path and I'll change the Looks: line.
Nothing to change and nothing pushed. This comment is the gate confirming that my Looks: /docs line was taken: look pages (named): … a commit names /docs. The override worked and the gate is no longer inferring the 31 pages. It doesn't report a problem with the code.
I still haven't looked at a rendered playlist page, and /docs isn't the page that shows one. A page that does would need a repository holding an .m3u file, and I don't know a stable path for one. If you want the look aimed at a specific file view, give me the path and I'll update the Looks: line.
Renderer is sound on security: every value escaped, remote/absolute/drive/climbing paths never linked, rows and bytes bounded, no new dependency, MCP branch added to the existing tool. Changes needed, all in one round:
- Both doors (fix first): playlists have no terminal screen. Add a screen in
src/tui/with its entry where AGENTS.md says, gated like the page, showing the numbered tracks, durations and total. The commit lineNo door: ...does not satisfy this. - One way to do a thing:
clockinsrc/web/render/m3u.tsduplicatesclockinsrc/text/mp4.ts(the gate said so). Import the existing one (extend it if it lacks the h:mm:ss form) and delete the copy. - Before/after screenshots are missing; the
reviewblock is there but the box asks for the pictures. TheLooks: /docsoverride pictures a page that shows no playlist; name a blob page that holds an.m3u8(add a small sample file to the repo if needed) and attach before/after. - Tests: the MCP branch in
read_file.tsis only tested throughaboutM3u. Add a test that callsread_fileon a.m3uand checksabout, and one for a playlist over the 1 MB cap returning noabout(that cap check inaboutFilehas no test that fails without it). Also add a test that a file over the render cap keeps its source. - Design (principles 1, 8): check the 'Showing 2,000 of N tracks ... left out' note and the empty-file fallback against the plain wording of docs/WRITING.md, and run
bun scripts/design-lint.tsagain after the change.
A .m3u or .m3u8 file now opens as a numbered track list in both the file page and the terminal workspace. Before/after screenshots are the one request I did not meet: I can't render pages in this sandbox.
What changed
- Terminal door:
src/tui/screens/workspace_playlist.tsdraws the table: #, Title, Length, Path, with a Total row last. It uses the page's parser, the same 1 MB cap and the same 2,000-row limit. Control characters are stripped, and a refusal shows as a toast with the source kept. It follows the same pattern as the tfstate view inworkspace.ts. This replaces theNo door:line. - One clock:
m3u.tsno longer has its ownclock. It imports the one insrc/text/mp4.tsand rounds to the nearest second before calling it, since that one rounds down. - Wording: the cap note is now "Showing 2,000 of 2,005 tracks. The other 5 are in the raw file." The unknown-length placeholder is
-instead of an em dash, perdocs/WRITING.md. The empty-file message is unchanged. - Sample file:
docs/examples/mix.m3u8, with a "Try it" line indocs/features/playlist.md. The commit'sLooks:line now names/trevato/forge/blob/main/docs/examples/mix.m3u8. That path will 404 on main until this merges, so check that the gate and preview resolve it from the branch.
Tests
- MCP:
read_fileon a.m3ureturnsaboutwith the counts, and a playlist over the 1 MB cap returns noabout. - Page: a file over the render cap keeps its source.
- Terminal:
test/playlist-tui.test.tscovers rows, total, escape characters, other file types and the empty list.
The playlist tests, doorless, feature-doors, kinds-guide, security-floor-kinds, tui-workspace and tui-workspace-formats all pass: 70 tests in the run covering the terminal and page changes, and 186 in the earlier run covering the render, MCP read-file and fuzz changes. tsc, gate --fix (comments rewrapped and committed) and design-lint are clean. I did not run the full suite: scripts/fast.ts could not narrow the diff to a few files, so I chose these by hand and left the rest to the forge's check.
To try it: open docs/examples/mix.m3u8 in the repository's file view, or in the terminal workspace.
I merged main into the branch, resolved the one conflict, and pushed.
The conflict was the doc string in src/http/mcp/tools/read_file.ts. main had added .torrent {name, size, infoHash, trackers, files} and this branch had added .m3u {tracks, seconds}. The string now lists both.
- Tests: I ran
test/mcp-read-file.test.ts,test/render-kinds.test.tsandtest/fuzz-renderers.test.ts: 189 pass, 0 fail. I did not run the full suite, becausescripts/fast.tscould not narrow it (3676 of 4381 files). The forge's check runs it on the push. - Type check:
bun x tsc --noEmitprinted no errors. - Gate:
bun scripts/gate.ts --fixchanged nothing. It only noted one comment line over 100 columns intest/mcp-read-file.test.ts, which the nightly rewrap handles onmain.
Nothing needed changing: the gate comment is a note that the look rule passed, not a failure. look pages (named) means the rule was satisfied by a commit naming /docs, a page of app.looks in forge.json. The gate only says such notes and never refuses on them (src/kernel/look_rule.ts).
I made no commit and no push, so there is nothing new on the branch.
One caveat for the reviewer: /docs is the nearest pictured page, not one that shows a playlist. No page in app.looks renders a repository file view, so the before/after pictures won't show the numbered track list. To see it, open a .m3u or .m3u8 file in a repository's file view on the preview at https://lab--16540--forge-trevato-apps.open-platform.sh. If you would rather have a No look: line in the commit message, say so and I'll amend it.
Earlier asks are met: the terminal door exists (workspace_playlist.ts, tested), the page and terminal share one parser and the one clock, the MCP facts carry a cap test, the how-to is in docs/features/playlist.md (not README), and the placeholder is a plain -. I found nothing new on the lines that changed: values are escaped, only same-repository relative paths link, remote and absolute paths stay text, input is bounded by the render cap and 2,000 rows, and the terminal strips control characters. Non-blocking: in src/web/render/m3u.ts the doc comment Rows drawn, whatever the file holds. sits above clock instead of TRACK_CAP; move it. Non-blocking: the before/after screenshots box stays open, because the pull still has none. Add them when a preview can show docs/examples/mix.m3u8.
Left #16026 open: 1 unticked item remain (The new test file is found by the gate list; bun scripts/design-lint.ts is clean; the pull carries a review block with before/after screenshots.).
A
.m3uor.m3u8file now opens on its blob page as a numbered track list (title, length, path) with a total length. The tests I ran pass (playlist, fuzz, kinds, kinds-guide, timelines,mcp-size), as dotsc, the design lint andgate --fix. I did not run the full suite, andscripts/fast.tssaid the diff was too broad to name tests for. I took no before/after screenshots because the sandbox cannot reach a preview.What changed
src/web/render/m3u.tsdraws a newplaylistkind. It is registered inkinds.ts(.m3u,.m3u8, 1 MB render cap) andrenderers.ts, with no dependency and no script.#EXTINF:<secs>[ attrs],<title>names the next entry. A length of-1or none shows "—" and is left out of the total, which says how many were left out. Without an#EXTINFline the title is the file name.read_filetool addsabout: {kind: "playlist", tracks, seconds, unknownLengths, says}. It is a new branch on the same tool, andtest/mcp-size.test.tspasses with the ceilings untouched.test/render-playlist.test.tscovers registration, parse, escaping and links, the row cap, a malformed file, and the MCP facts.test/fuzz-renderers.test.ts..m3uand.m3u8are added totest/render-kinds.test.ts.docs/features/playlist.md, plus the regenerateddocs/features/file-kinds.mdand a label inscripts/kinds-guide.ts.Reuse: the table markup follows
lcov.ts. I did not runscripts/similar.ts.Left out
#EXT-X-*lines are ignored.file://links.Try it: push a
.m3u8to a repository, for example#EXTM3U,#EXTINF:61,One,a.mp3, then open it from the file view.Closes #16026