puter shell - #79
Merged
Merged
Conversation
reynaldichernando
commented
Aug 25, 2026
Member
- move remaining things to puter-sh namespace
- fix issue connecting with the shell (revalidate token and username change)
- remove app and site related commands
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
There was a problem hiding this comment.
Pull request overview
This PR rebrands and refocuses the CLI into a “Puter Shell” experience, consolidating state under the profile system, improving session robustness by revalidating identity on startup, and removing app/site-related functionality that no longer belongs in this shell-focused package.
Changes:
- Removed apps/sites/subdomains/deploy/init commands (and associated utilities/tests) to narrow scope to shell + file operations.
- Moved cwd ownership into
ProfileModuleand added identity refresh to handle token invalidation and username renames (with path re-homing). - Added improved error normalization/auth-error detection and global unhandled-rejection handling to prevent noisy
#<Object>crashes.
Reviewed changes
Copilot reviewed 27 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils.test.js | Drops tests for removed utils; keeps tests for formatDateTime/formatSize. |
| tests/subdomains.test.js | Removes subdomain command tests (feature removed). |
| tests/sites.test.js | Removes sites command tests (feature removed). |
| tests/shell.test.js | Updates shell mocks and welcome-message expectation. |
| tests/ProfileModule.test.js | Updates config expectations; adds tests for rehomePaths; adjusts constants mocking. |
| tests/files.test.js | Updates getInfo path resolution expectations; updates showCwd to profile-based cwd. |
| tests/executor.test.js | Mocks ProfileModule to match new cwd storage behavior. |
| tests/ErrorModule.test.js | Adds tests for normalizeError, isAuthError, and formatError. |
| tests/deploy.test.js | Removes deploy command tests (feature removed). |
| tests/commons.test.js | Updates PROJECT_NAME; adds/updates tests for home/path resolution helpers; removes app/site helpers tests. |
| tests/apps.test.js | Removes apps command tests (feature removed). |
| src/utils.js | Removes unused app/site-related helpers (formatDate, arg parsing, UUID helpers, table display). |
| src/modules/ProfileModule.js | Adds config migration, identity refresh, username-rehome, and rekeying onto server UUIDs; moves cwd into profile. |
| src/modules/ErrorModule.js | Adds error normalization and auth-error classification utilities. |
| src/executor.js | Removes app/site commands; routes errors through ErrorModule; prompt now derives cwd via auth/profile. |
| src/commons.js | Renames project; introduces HOME, HOME_PATH, setHomePath, expandHome, isAbsolutePath, improved resolvePath. |
| src/commands/subdomains.js | Removes subdomain commands (feature removed). |
| src/commands/sites.js | Removes site commands (feature removed). |
| src/commands/shell.js | Stores cwd via ProfileModule.setCwd; improves error reporting; updates welcome message. |
| src/commands/init.js | Removes init scaffolding command (feature removed). |
| src/commands/files.js | Routes path handling through new home-aware resolution; updates trash/cwd usage to profile-based home/cwd. |
| src/commands/deploy.js | Removes deploy command (feature removed). |
| src/commands/auth.js | Updates logout cleanup; updates isAuthenticated; makes cwd come from profile + expandHome. |
| src/commands/apps.js | Removes app commands (feature removed). |
| package.json | Bumps major version; removes unused dependencies; adds packageManager field. |
| bin/index.js | Removes app/site/init CLIs; adds unhandled rejection guard; improves top-level error/auth messaging. |
| .github/workflows/npm-publish.yml | Removes hardcoded pnpm v8 setup to align with new packaging/tooling. |
| .github/workflows/npm-build.yml | Removes hardcoded pnpm v8 setup to align with new packaging/tooling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.