Docs and SDK Updates#7
Conversation
|
Warning Review limit reached
More reviews will be available in 21 minutes and 11 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds a comprehensive DocMD-based documentation site for pyComputer (landing page, getting-started guides, architecture references, SDK API docs, app development guides, shell/pkg command references), the ChangesDocumentation Site and SDK Developer Tooling
Sequence DiagramsSince the changes span documentation, tooling configuration, and CLI implementation without introducing a novel multi-component interactive flow, no sequence diagram is generated. The CLI commands are straightforward linear workflows (init → create files, build → validate → bundle, run → load → execute), and documentation is static content. A diagram would not add clarity beyond the layer summaries. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Docs/docmd.config.js`:
- Around line 4-39: The logo.href property and the footer column links are using
page-relative URLs (like "./" and "./getting-started/quickstart") which resolve
incorrectly from nested documentation pages. Convert these to root-relative URLs
by replacing the "./" prefix with "/" so that the logo and footer navigation
work correctly from any page depth. This applies to the logo.href value and all
url properties within the footer.columns links array.
- Around line 134-138: The baseUrl in the editLink configuration object is
pointing to the repository root but needs to include the path to the docs source
tree. Update the baseUrl value to include the full path Docs/docs/ so that DocMD
generates correct edit links that point to the actual documentation source files
rather than resulting in 404 errors.
In `@Docs/docs/apps/building.md`:
- Around line 61-64: In the build instructions section, the checkout command
incorrectly specifies a nested directory path as `cd pyComputer/pyComputer`.
Remove the duplicate nested directory and change the command to simply `cd
pyComputer` to correctly navigate to the project root directory before running
the uv run python main.py command.
In `@Docs/docs/apps/builtin.md`:
- Around line 8-10: Remove the line-count specification `(1087 lines)` from the
IDE application description in the builtin.md documentation. This specific
number will become outdated as the codebase evolves and requires maintenance to
keep accurate. Keep the rest of the IDE description intact, which adequately
describes the functionality (full TUI code editor with file tree, toolbar,
syntax highlighting, and run output panel) without relying on a specific line
count that will quickly become stale.
In `@Docs/docs/apps/pycapp.md`:
- Around line 31-33: The bash command example showing the path to bundler.py
contains a duplicate directory name where `pycomputer` appears twice in the path
(pyComputer/pycomputer/pycomputer/pkg/bundler.py). Verify the correct
repository-relative path to the bundler.py file and update the example command
to use the correct single path without the duplication, ensuring readers can
actually execute the command successfully.
- Around line 51-56: The validation list in the documentation is overstating the
guarantees for all `pkg install` paths. The path-traversal and HTTPS checks only
apply when extracting a `.pycapp` archive or downloading from a URL, while plain
directory installs only validate the manifest and copy the tree without these
additional checks. Revise the documentation to clearly scope the listed
validations to `.pycapp` and URL-based installations, and either add a separate
note about the limited validations for plain directory installs or restructure
the section to distinguish between installation methods.
In `@Docs/docs/architecture/boot.md`:
- Around line 22-24: The authentication step documentation currently states "If
a password hash is configured" but the actual code checks
_settings.get("password") directly. Update the wording in the Step 3
authentication section to accurately reflect that the runtime gate checks for a
password setting (not specifically a hash) before requiring login, aligning the
documentation with the actual implementation logic.
In `@Docs/docs/architecture/index.md`:
- Around line 38-46: The initialization order documentation is incomplete and
missing critical setup steps that happen in kernel.main() before Kernel() is
constructed. Add two steps between ensure_data_dir() and the Kernel()
constructor: one for theme setup and one for the conditional _require_login()
call. These authentication and theme configuration steps must be documented in
the correct sequence since they occur before the Kernel object is instantiated,
ensuring the documentation accurately reflects the actual initialization flow.
In `@Docs/docs/getting-started/installation.md`:
- Around line 8-43: The prerequisites section mentions both uv and pip as valid
package managers ("uv (recommended) or pip"), but all the installation examples
below only show uv commands. Either narrow the prerequisites copy to only
mention uv since that is what the examples demonstrate, or add pip-equivalent
commands alongside each uv command in the Clone and Run section, Web Demo setup,
and SDK Installation section (such as providing pip install alternatives for the
SDK installation steps) so that the documentation is consistent and readers can
follow the examples regardless of their preferred package manager.
In `@Docs/docs/sdk/input.md`:
- Around line 32-47: The function keys section uses the notation Key.F1 - F4
which is ambiguous and reads like subtraction instead of clearly listing the
available members. Replace this line with explicit listings of each function key
member (Key.F1, Key.F2, Key.F3, Key.F4) on separate lines, each with their
corresponding escape code values, to match the formatting and clarity of the
other key entries in the documentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c61a2041-ccab-44a0-9f7d-7217f4c1adb2
⛔ Files ignored due to path filters (1)
Docs/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (25)
CONTRIBUTING.mdDemo/build.jsDocs/.gitignoreDocs/docmd.config.jsDocs/docs/apps/building.mdDocs/docs/apps/builtin.mdDocs/docs/apps/index.mdDocs/docs/apps/pycapp.mdDocs/docs/architecture/boot.mdDocs/docs/architecture/index.mdDocs/docs/architecture/kernel.mdDocs/docs/architecture/vfs.mdDocs/docs/getting-started/concepts.mdDocs/docs/getting-started/installation.mdDocs/docs/getting-started/quickstart.mdDocs/docs/index.mdDocs/docs/sdk/index.mdDocs/docs/sdk/input.mdDocs/docs/sdk/renderer.mdDocs/docs/sdk/stdlib.mdDocs/docs/sdk/vfs.mdDocs/docs/shell/commands.mdDocs/docs/shell/index.mdDocs/docs/shell/pkg.mdDocs/package.json
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 11
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pages.yml:
- Around line 15-17: In the actions/checkout@v4 action under the with section,
add the parameter persist-credentials set to false. This will disable credential
persistence in git config since the workflow only runs npm ci and npm run build
commands which do not require authenticated git operations, thereby reducing
token exposure risk.
- Line 15: The GitHub Actions workflow uses mutable version tags instead of
immutable commit SHAs, creating supply-chain vulnerability through tag
retargeting. Replace the mutable tags in the actions/checkout,
actions/setup-node, and peaceiris/actions-gh-pages action references with their
full 40-character commit SHAs as specified in the comment, including version
comments (e.g., # v4.2.2) for reference. This pins the workflow to specific
immutable commits and eliminates the risk of unexpected behavior changes from
tag retargeting.
In `@pyComputer/pycomputer/kernel/boot.py`:
- Around line 13-24: The environment variable overrides in both _data_dir() and
_root_dir() functions are returning raw env values without normalizing them to
absolute paths. This can cause path inconsistencies since relative paths depend
on the current working directory, while VFS.__init__ normalizes paths to
absolute paths. Fix this by wrapping the env variable returns with
os.path.abspath() to ensure all paths returned from these functions are absolute
paths, consistent with the default fallback paths.
In `@pyComputerSDK/pyproject.toml`:
- Around line 29-30: The wheel force-include configuration in the
`[tool.hatch.build.targets.wheel.force-include]` section is referencing a
non-existent source path `pycomputer`. Update the source path to use the correct
relative path `../pyComputer/pycomputer` (matching the existing
sdist.force-include configuration), while keeping the target path as
`pycomputer`. This ensures the wheel build correctly includes the pycomputer
package from its actual location in the repository structure.
In `@pyComputerSDK/src/pycomputersdk/cli/commands/init.py`:
- Line 39: The scaffold template in cmd_init creates a <app>/main.py file but
the import statement attempts to import from the {name} package namespace using
from {name} import main, which will fail. Fix the import statement in the
template to import directly from the main module instead, either by changing it
to from main import main or import main, so it correctly references the main.py
file that gets created when scaffolding the new project.
- Around line 70-72: Remove the unnecessary f-string prefixes from the three
print statements on lines 70-72. The strings " pycomp validate .", " pycomp
run .", and " pycomp build ." do not contain any placeholder variables for
interpolation, so the f prefix is redundant. Change each print statement from
f"..." to just "..." to comply with the Ruff F541 rule.
In `@pyComputerSDK/src/pycomputersdk/cli/commands/run.py`:
- Around line 53-54: The exception handler at lines 53-54 catches both
KeyboardInterrupt and SystemExit together, which causes non-zero exit codes from
the app entrypoint to be swallowed and marked as successful runs. Remove
SystemExit from the tuple in the except clause so that only KeyboardInterrupt is
caught and passed, allowing SystemExit exceptions to propagate naturally and
preserve the app's original exit code. Apply this same fix to the other location
mentioned at line 61.
- Around line 18-20: The json.load() call when reading the manifest file at the
beginning of the run command has no error handling for malformed JSON. Wrap the
file opening and json.load() operation in a try-except block to catch
JSONDecodeError and other file-related exceptions, then return a clean CLI error
message to the user instead of letting the exception propagate and crash the
command.
In `@pyComputerSDK/src/pycomputersdk/cli/commands/test.py`:
- Around line 23-27: The sys.path.remove(app_dir) call in the finally block can
raise a ValueError if the path was already removed or mutated during test
execution, which masks the actual pytest result. Wrap the
sys.path.remove(app_dir) call in a try-except block that catches ValueError, or
guard it with a conditional check to verify app_dir exists in sys.path before
attempting removal, ensuring cleanup failures do not overshadow the test
execution results.
In `@pyComputerSDK/src/pycomputersdk/cli/commands/validate.py`:
- Line 31: Remove the unnecessary f-string prefix from the print statement on
line 31 that outputs "entry file: ok". Since this string contains no variable
placeholders or expressions within curly braces, the f-string prefix is
redundant and should be replaced with a regular string literal by changing f"
entry file: ok" to " entry file: ok".
In `@pyComputerSDK/src/pycomputersdk/testing.py`:
- Around line 100-101: The loop variable `l` in the list comprehensions violates
Ruff E741 and reduces code readability since lowercase L can be confused with
numbers or uppercase I. Rename the `l` variable to a more descriptive name like
`line` in both list comprehensions that operate on expected_lines and lines to
improve clarity and comply with linting standards.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cc435452-7a93-4ddb-be30-d148aac08681
⛔ Files ignored due to path filters (2)
pyComputerSDK/uv.lockis excluded by!**/*.lockuv.lockis excluded by!**/*.lock
📒 Files selected for processing (36)
.github/workflows/pages.ymlDocs/docmd.config.jsDocs/docs/apps/building.mdDocs/docs/apps/builtin.mdDocs/docs/apps/pycapp.mdDocs/docs/architecture/boot.mdDocs/docs/architecture/index.mdDocs/docs/architecture/vfs.mdDocs/docs/getting-started/concepts.mdDocs/docs/getting-started/installation.mdDocs/docs/getting-started/quickstart.mdDocs/docs/sdk/index.mdDocs/docs/sdk/input.mdDocs/docs/sdk/vfs.mdpyComputer/pycomputer/fs/vfs.pypyComputer/pycomputer/kernel/boot.pypyComputerSDK/pyproject.tomlpyComputerSDK/src/pycomputersdk/__init__.pypyComputerSDK/src/pycomputersdk/async_utils.pypyComputerSDK/src/pycomputersdk/cli/__init__.pypyComputerSDK/src/pycomputersdk/cli/commands/__init__.pypyComputerSDK/src/pycomputersdk/cli/commands/build.pypyComputerSDK/src/pycomputersdk/cli/commands/init.pypyComputerSDK/src/pycomputersdk/cli/commands/run.pypyComputerSDK/src/pycomputersdk/cli/commands/test.pypyComputerSDK/src/pycomputersdk/cli/commands/validate.pypyComputerSDK/src/pycomputersdk/cli/main.pypyComputerSDK/src/pycomputersdk/cli/root/boot/logo.txtpyComputerSDK/src/pycomputersdk/cli/root/sys/apps.jsonpyComputerSDK/src/pycomputersdk/cli/root/sys/motd.txtpyComputerSDK/src/pycomputersdk/cli/root/usr/apps/.gitkeeppyComputerSDK/src/pycomputersdk/logging.pypyComputerSDK/src/pycomputersdk/net.pypyComputerSDK/src/pycomputersdk/pkg.pypyComputerSDK/src/pycomputersdk/testing.pypyproject.toml
✅ Files skipped from review due to trivial changes (16)
- pyComputerSDK/src/pycomputersdk/cli/root/sys/motd.txt
- pyComputerSDK/src/pycomputersdk/cli/root/boot/logo.txt
- pyComputerSDK/src/pycomputersdk/cli/root/sys/apps.json
- Docs/docs/sdk/input.md
- Docs/docs/apps/builtin.md
- pyComputerSDK/src/pycomputersdk/net.py
- pyComputerSDK/src/pycomputersdk/pkg.py
- Docs/docs/architecture/boot.md
- Docs/docs/getting-started/quickstart.md
- Docs/docs/apps/pycapp.md
- Docs/docs/architecture/index.md
- Docs/docs/apps/building.md
- Docs/docs/getting-started/installation.md
- Docs/docs/sdk/vfs.md
- Docs/docs/sdk/index.md
- Docs/docs/architecture/vfs.md
🚧 Files skipped from review as they are similar to previous changes (2)
- Docs/docs/getting-started/concepts.md
- Docs/docmd.config.js
Summary by CodeRabbit
.pycapppackaging and built-in app listings.pycompCLI commands for init/build/run/validate/test.