Repository navigation
fix(appstore): load packages without GITHUB_TOKEN and tolerate optional manifest fields - #180
Merged
dailker merged 1 commit intoDec 4, 2026
Conversation
…al manifest fields Only send the Authorization header when GITHUB_TOKEN is set, default ORBIT_PACKAGES_REPO to codehubbers/OrbitOSPackages and keep manifest.id instead of the folder name. Guard the optional description, author, category and icon fields in the App Store, Taskbar and desktop icons. Closes codehubbers#177
5 of 6 tasks
Ziqian-Huang0607
approved these changes
Dec 4, 2026
Ziqian-Huang0607
left a comment
Member
There was a problem hiding this comment.
Solid fix, verified against the schema and the code.
What I checked:
- orbit.schema.json really does require only id, name, version and entry, so a minimal package crashing the store (category.charAt on undefined) was a real break, not a corner case.
- approved.js: no more 'Authorization: token undefined' (which GitHub 401s), the default repo fallback matches what the README now documents, and manifest.id with folder-name fallback is the right precedence.
- The icon guards in Taskbar and AppIcon match the pattern the launcher already uses, with the same fallback emoji.
- The new tests are honest: each one fails on main for the stated reason and passes here, including the API test asserting no Authorization header when GITHUB_TOKEN is unset.
- CI green, prettier and lint clean.
Thanks for flagging the id change (folder name to manifest.id) explicitly. Existing installs of the example package showing as not installed is acceptable breakage for a dev-stage store, and it is called out clearly for anyone who hits it.
Approve.
dailker
approved these changes
Dec 4, 2026
dailker
left a comment
Member
There was a problem hiding this comment.
Looks good, thanks. Defaulting the repo and only sending the header when the token is set is the right fix, and catching the category.charAt crash was a nice extra. Noted the example package id change to orbit-terminal, that's fine.
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.
Closes #177
What and why
Without
GITHUB_TOKEN(it's optional in.env.example) the App Store sentAuthorization: token undefinedand GitHub answered 401, so local setups saw no packages. And a package that only has the fieldsorbit.schema.jsonrequires (id,name,version,entry) crashed the store and the icons.api/packages/approved.js: theAuthorizationheader is only sent whenGITHUB_TOKENis set;ORBIT_PACKAGES_REPOdefaults tocodehubbers/OrbitOSPackages; the package id ismanifest.id, falling back to the folder name.apps/appstore.js: search no longer calls.toLowerCase()on a missingdescription/author; empty categories are left out of the category list (this one crashed the whole store withcategory.charAtonundefined, which the issue didn't list); empty category/author badges and the "by" line are hidden; opening an app without an icon passes the📱fallback.Taskbar.js/AppIcon.js: same guard as the launcher,typeof icon === 'string' && icon.startsWith('/'), with📱when there's no icon.One thing to be aware of: the example package's id changes from
example-app(folder name) toorbit-terminal(itsmanifest.id), so anyone who installed it under the old id would see it as not installed and need to install it again.How I tested it
New tests, each failing on
mainand passing here:tests/approvedPackages.api.test.js: noAuthorizationheader and the default repo whenGITHUB_TOKENis unset; the token and custom repo when set;manifest.idkept. Onmain:Received string: "https://api.github.com/repos/undefined/contents"andExpected: "orbit-terminal", Received: "example-app".tests/AppStore.test.js: renders and searches a package withoutdescription,author,categoryoricon. Onmain:TypeError: Cannot read properties of undefined (reading 'charAt').tests/Taskbar.hydration.test.js: an open app without an icon renders the fallback. Onmain:Cannot read properties of undefined (reading 'startsWith').Locally:
npm test(37 suites, 423 tests) passes,npm run linthas 0 errors (only warnings that were already there),npx prettier --checkpasses on the changed files, andnpm run buildsucceeds.Checklist
type(scope): summary, for examplefix(calculator): keep history after reloadnpm testpassesnpx prettier --checkpasses on the files I changed