web: Kickstart list select for site-served ROMs#230
Merged
Conversation
Generalise the df0list folder-listing glue (index.json manifest or scraped server directory listing) into a shared helper and add a kicklist select that fills itself from a kick/ folder and fits the picked ROM like the Kickstart picker: queued before boot, power-cycling a running machine. The list enforces fitRomFromUrl's same-origin copyright gate up front - a cross-origin folder or manifest entry is hidden rather than offered and refused pick by pick - and filters to raw .rom/.bin images, since a pick feeds load_rom directly. The hosted page serves no ROMs so the select never appears there; self-hosted shells that serve their owner's ROMs next to the page get a one-click ROM chooser.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new optional browser page-shell hook (#kicklist) to let self-hosted web shells offer a one-click Kickstart ROM chooser from a same-origin folder, mirroring the existing #df0list behavior and reusing shared folder-listing logic.
Changes:
- Generalizes
#df0listfolder listing into a sharedloadFolderListhelper (manifest or directory scraping). - Adds
#kicklistsupport with same-origin enforcement and.rom/.bintargeting, using the existingfitRomFromUrlflow. - Documents the new hook and behavior in
docs/guide/browser.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/guide/browser.md | Documents the new #kicklist page-shell hook and its same-origin/copyright-gate behavior. |
| crates/copperline-web/www/try.js | Refactors folder listing into a shared helper and wires up #kicklist alongside the existing #df0list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The .rom/.bin filter applies when scraping a server directory listing; an index.json manifest is the site's explicit statement of what to list and is trusted as-is (matching the df0list contract), so the kicklist bullet should not read as though manifest entries are filtered too. Cross-origin manifest entries are still dropped by the same-origin gate.
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.
Summary
Adds a
#kicklistpage-shell hook: a<select>that fills itself with the Kickstart ROMs the site serves next to the page and fits the picked one like the ROM picker, mirroring the existing#df0listdisk list.<folder>/index.jsonmanifest, or a scraped server directory listing) is generalised into a sharedloadFolderListhelper; the disk list's behaviour is unchanged.kick/folder (overridable viadata-src), filtered to raw.rom/.binimages since a pick feedsload_romdirectly (uncompressed 256/512 KiB images).fitRomFromUrlpath: queued before boot (the boot button relabels), and a running machine is power-cycled.docs/guide/browser.mddocuments the hook.Testing
node --checkon the modifiedtry.js(as an ES module).python3 -m http.server, with a freshly built wasm pkg:.rom/.binfilter for kick, disk extensions for df0).kick/index.jsonmanifest: friendly labels and bare-string entries listed, a cross-origin entry filtered out.🤖 Generated with Claude Code
https://claude.ai/code/session_015yMn3JdhkQaeep5y3o9L3y