Repository navigation
Playground: a file panel for themes, kinds, data files and media - #32
Merged
Merged
Conversation
tannevaled
force-pushed
the
feat/playground-files
branch
from
October 22, 2026 17:49
311203f to
4348374
Compare
The deck's project, left of the editor: a go-widgets toolkit.FileTree (v0.335.0) over the draft project of the store (#28), in the layout the slides command and the VS Code extension read: deck.md, slides.yaml, themes/, kinds/, media/. - A file opens in the editor with its language (Markdown, YAML, HCL, JSON, CSS) and its diagnostics; rename (F2), new file or folder, delete with confirmation, drag to move, context menu, APG treeview keys, Seti icons. - The Project menu makes a theme built on default, gaia or uncover (@import), a kind and a data file from templates, lists them in slides.yaml; project themes join the Theme list. - Media dropped or pasted on the editor go into media/ as bytes and the deck names them () instead of holding a data: URI. The preview's opaque-origin frame cannot load a blob: URL made by the page (measured), so the page posts the bytes and the frame makes its own blob: URLs (media.go); CSP otherwise unchanged (blob: in media-src/font-src). Download HTML inlines them. Bounds: 8 MiB a file, 64 MiB a project, shown under the panel. - Download project (.zip) and Open project (.zip or folder: File System Access API, else <input webkitdirectory>). The importer refuses paths that leave the project, symlinks, >256 files, >1024 entries, oversize files (read through a limit), and archives inflating >100x; fuzzed (2.3M execs, no finding). - Share link says the link holds the deck only and offers the .zip. Verified in headless Chrome (browsertest/files.cjs, added to CI) and with `slides build deck.md` on an exported, unzipped project. 20 MiB of media: an edit reaches the preview in 17 ms with and without them; a new document posts them again in ~270 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tannevaled
force-pushed
the
feat/playground-files
branch
from
October 22, 2026 17:57
4348374 to
afc694e
Compare
tannevaled
added a commit
to go-slides/docs
that referenced
this pull request
Oct 22, 2026
) The Playground page describes the project panel of go-slides/go-slides.github.io#32: files in the slides command's layout, New theme / New kind / New data file, media in media/ instead of data: URIs, Download and Open project (.zip or folder) and its bounds, Share with a project, and how media reach the sandboxed preview. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The deck's project, left of the editor: themes, kinds, data files and media, laid out the way the
slidescommand and the VS Code extension read them.The panel. It is a
toolkit.FileTree(go-widgets/toolkit v0.335.0, go-widgets/toolkit#498) over the draft project of the store from #28.deck.md,slides.yaml,themes/,kinds/,media/.Project menu.
@import. The new theme joins the Theme list.slides.yaml. Renames and deletions are followed there too.Media. Media dropped or pasted on the editor are stored as bytes in
media/, and the deck names them (). The deck no longer holds them asdata:URIs.blob:URLs from the page: I checked in Chrome. Ablob:URL made by the page is refused in the opaque-origin sandbox ("Not allowed to load local resource").blob:null/…URLs and puts them in place of the paths.blob:tomedia-srcandfont-src.data:URIs.Project in and out.
<input webkitdirectory>otherwise..., absolute paths, backslashes)FuzzImportZip, 2.3M runs, no finding.Share link. When the project holds more than the deck, Share says the link carries only the deck and offers the
.zipinstead.Verified.
browsertest/files.cjs(added to CI) runs in headless Chrome:#4f46e5invert)blob:null/…and decodes.zipand reopened from that file with the same filesdrive.cjspasses, updated for the drop going intomedia/.slides build deck.mdon the exported project, unzipped, builds it with the project theme.Cost of 20 MiB of media.
Load average was about 10–14 during these runs. Both edit rows were measured in the same run.
Not in this PR. The PDF, PPTX and ODP exports from #29 still render the deck alone, without the project's themes, kinds or media. That is a follow-up:
exporter.Exporthas to take the project's files.🤖 Generated with Claude Code