feat: adds coffee shop app store - #17
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new Coffee Shop backend has confirmed robustness issues (malformed URL decoding and unhandled download stream errors) that can crash or destabilize the server.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces Coffee Shop as BeanWeb’s integrated app store (Browse + Installed in one window), adds a standalone coffeeshop/ backend that serves a package catalogue at /api/coffeeshop, and updates the package format and tooling to support richer listings (notably description and inlined icon SVG for browsing).
Changes:
- Add Coffee Shop frontend app (tabs, catalogue browsing, install/remove, upload install) and remove the legacy Installer app.
- Add
coffeeshop/Node backend (index scan + HTTP server) plus Vite dev proxy and supporting docs. - Extend package metadata (
description,iconSvgin listings) and update tests, docs, and scaffolding/build tooling.
File summaries
| File | Description |
|---|---|
| vite.config.ts | Adds dev proxy for /api/coffeeshop to a local backend. |
| tests/pkgs.test.ts | Updates wording and adds coverage for optional manifest description during scaffolding. |
| tests/packages-install.test.tsx | Refocuses tests on install/uninstall pipeline; removes Installer window UI tests. |
| tests/coffeeshop.test.tsx | New UI tests covering Coffee Shop Browse/Installed behaviors and menu wiring. |
| tests/coffeeshop-source.test.ts | New unit tests for the Coffee Shop PackageSource URL building + error handling. |
| src/store/packages.ts | Updates comments to refer to Coffee Shop as the package UI. |
| src/store/fs.ts | Seeds /boot/apps/Coffee Shop instead of Installer. |
| src/lib/transfer.ts | Updates docs/comments for .pkg file picker usage now owned by Coffee Shop. |
| src/lib/packages/types.ts | Adds manifest description and updates InstalledPackage comment. |
| src/lib/packages/source.ts | Expands listing shape with description and iconSvg; updates narrative for Coffee Shop. |
| src/lib/packages/manifest.ts | Parses description from manifest.json. |
| src/lib/packages/install.ts | Retitles alerts from “Installer” to “Coffee Shop” and updates comments. |
| src/lib/packages/coffeeshop.ts | New Coffee Shop PackageSource implementation (list + fetch). |
| src/lib/icons.tsx | Replaces Installer icon with Coffee Shop icon. |
| src/apps/SandboxHost.tsx | Imports new shared sandbox host CSS. |
| src/apps/sandboxhost.css | New shared CSS ensuring sandbox iframe fills its window. |
| src/apps/Installer.tsx | Removes legacy Installer app. |
| src/apps/installer.css | Removes legacy Installer styles (and moves sandbox sizing to sandboxhost.css). |
| src/apps/index.ts | Registers Coffee Shop instead of Installer. |
| src/apps/CoffeeShop.tsx | New Coffee Shop app UI (tabs, search, list/detail/actions, install/remove). |
| src/apps/coffeeshop.css | New Coffee Shop UI styling. |
| README.md | Updates feature list and package install instructions to Coffee Shop. |
| pkgs/README.md | Updates install instructions to Coffee Shop; documents new --description. |
| pkgs/mushroom-command/manifest.json | Updates package id and adds manifest description. |
| pkgs/init.mjs | Scaffolder emits description only when provided. |
| pkgs/iconedit/manifest.json | Adds manifest description. |
| pkgs/build.mjs | Adds --description flag and updates wording to Coffee Shop. |
| docs/packages.md | Documents manifest description and updates UI references to Coffee Shop. |
| coffeeshop/server.mjs | New HTTP server for catalogue + downloads. |
| coffeeshop/README.md | Documents backend usage, dev proxy, Docker, and endpoints. |
| coffeeshop/package.json | Defines backend package scripts and dependency on fflate. |
| coffeeshop/package-lock.json | Locks backend dependencies. |
| coffeeshop/index.test.mjs | New node --test suite for backend index scanning/search logic. |
| coffeeshop/index.mjs | New index scanner for .pkg directory, including optional icon inlining. |
| coffeeshop/Dockerfile | Container image for backend service. |
| coffeeshop/docker-compose.yml | Example compose setup serving ../pkgs/dist read-only. |
| coffeeshop/.dockerignore | Keeps build context small. |
| CLAUDE.md | Updates internal architecture documentation to reflect Coffee Shop + backend. |
| .github/workflows/packages.yml | Updates workflow text to “Coffee Shop” and keeps verification step. |
| .claude/skills/run-beanweb/SKILL.md | Documents new upload driver command usage for Coffee Shop flow. |
| .claude/skills/run-beanweb/driver.mjs | Implements upload command to drive file chooser in a real browser. |
| .claude/skills/create-pkg/SKILL.md | Updates instructions to reference Coffee Shop instead of Installer. |
Review details
Files not reviewed (1)
- coffeeshop/package-lock.json: Generated file
- Files reviewed: 41/42 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+83
to
+88
| const segments = pathname | ||
| .slice(BASE_PATH.length) | ||
| .split('/') | ||
| .filter(Boolean) | ||
| .map(decodeURIComponent) | ||
|
|
| 'Content-Length': record.sizeBytes, | ||
| 'Content-Disposition': `attachment; filename="${id}.pkg"`, | ||
| }) | ||
| createReadStream(join(PKG_DIR, record.filename)).pipe(res) |
Comment on lines
+150
to
+152
| return [listing.id, listing.name, listing.summary, listing.publisher].some((field) => | ||
| field?.toLowerCase().includes(q), | ||
| ) |
| ...(typeof r.summary === 'string' ? { summary: r.summary } : {}), | ||
| ...(typeof r.description === 'string' ? { description: r.description } : {}), | ||
| ...(typeof r.publisher === 'string' ? { publisher: r.publisher } : {}), | ||
| ...(typeof r.sizeBytes === 'number' ? { sizeBytes: r.sizeBytes } : {}), |
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.
Changes