Skip to content

chore: update devcontainer config#62

Merged
thephez merged 4 commits intomainfrom
chore/devcontainer-update-2026-03
Mar 14, 2026
Merged

chore: update devcontainer config#62
thephez merged 4 commits intomainfrom
chore/devcontainer-update-2026-03

Conversation

@thephez
Copy link
Collaborator

@thephez thephez commented Mar 14, 2026

Summary

  • Replace unused JSHint feature with ESLint, Prettier, and DotENV extensions matching the project's actual tooling
  • Switch npm install to npm ci for deterministic installs aligned with CI
  • Auto-create .env from .env.example on first container launch (cp -n)
  • Add VS Code settings (default formatter, tab size, EOL normalization)
  • Run as non-root node user to prevent file permission issues
  • Display a welcome message with next steps on container start
  • Add "Quick Start with Dev Containers" section to README with Open in Codespaces badge

Summary by CodeRabbit

  • Documentation

    • Added a Quick Start guide for Codespaces/VS Code Dev Containers with setup steps (first-launch install, create .env from example, generate a wallet mnemonic) and a badge linking to Codespaces.
    • Added a welcome/next-steps message displayed on container attach.
  • Chores

    • Updated dev container configuration: renamed container to "Dash Platform Tutorials", automated setup commands, and preconfigured VS Code extensions and editor settings.

thephez and others added 2 commits March 14, 2026 13:24
Replace unused JSHint feature with ESLint/Prettier/DotENV extensions,
switch to npm ci, auto-create .env from template, add VS Code settings,
run as non-root user, and display onboarding steps on container start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

📝 Walkthrough

Walkthrough

Dev container configuration updated for "Dash Platform Tutorials" with lifecycle commands, VS Code extensions, and editor settings. README gains a "Quick Start with Dev Containers" section describing Codespaces/Dev Containers setup and initial steps. A new .devcontainer/welcome.sh script prints a welcome and next-steps message.

Changes

Cohort / File(s) Summary
Dev Container Configuration
​.devcontainer/devcontainer.json
Renamed container to "Dash Platform Tutorials"; set remoteUser: "node"; replaced forwardPorts and old postCreateCommand with onCreateCommand: cp -n .env.example .env, postCreateCommand: npm ci, postAttachCommand: .devcontainer/welcome.sh; added VS Code extensions and editor settings; removed older comments and reorganized structure.
Dev Container Welcome Script
​.devcontainer/welcome.sh
Added POSIX shell script that prints a welcome message and brief next steps (verification, wallet creation, env var note, docs link, tutorial pointer).
Quick Start Documentation
README.md
Added "Quick Start with Dev Containers" section and Codespaces badge; documents the pre-configured environment, first-launch steps (create .env from .env.example, run npm ci), running node create-wallet.mjs to generate a mnemonic, and setting PLATFORM_MNEMONIC in .env to start tutorials.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰✨ In a cozy dev burrow, configs aligned,
Node boots, extensions hum, and envs are defined.
A welcome script chirps next steps to begin,
Hop in Codespaces—let the tutorials spin!
— Your Friendly CodeRabbit 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: update devcontainer config' is partially related to the changeset. While it accurately describes updates to devcontainer.json, it omits significant changes: a new welcome.sh script, README additions with Codespaces setup instructions, and tooling configuration—making the title incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/devcontainer-update-2026-03
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@thephez
Copy link
Collaborator Author

thephez commented Mar 14, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.devcontainer/welcome.sh (1)

2-2: Optional: switch to heredoc for easier maintenance.

Current output is correct, but a heredoc is easier to update and review than a long escaped printf string.

♻️ Proposed readability refactor
-printf '\n=== Dash Platform Tutorials ===\n\nNext steps:\n  1. Verify connection: node connect.mjs\n  2. Create a wallet:   node create-wallet.mjs\n  3. Edit .env with your mnemonic (PLATFORM_MNEMONIC)\n  4. Start tutorials in 1-Identities-and-Names/\n\nDocs: https://docs.dash.org/projects/platform/en/stable/docs/tutorials/introduction.html\n\n'
+cat <<'EOF'
+
+=== Dash Platform Tutorials ===
+
+Next steps:
+  1. Verify connection: node connect.mjs
+  2. Create a wallet:   node create-wallet.mjs
+  3. Edit .env with your mnemonic (PLATFORM_MNEMONIC)
+  4. Start tutorials in 1-Identities-and-Names/
+
+Docs: https://docs.dash.org/projects/platform/en/stable/docs/tutorials/introduction.html
+
+EOF
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.devcontainer/welcome.sh at line 2, Replace the long escaped printf string
in .devcontainer/welcome.sh with a heredoc for readability and easier
maintenance: locate the printf invocation in the script and change it to a
here-doc style output (e.g., use cat <<'EOF' ... EOF) so the multi-line message
is written verbatim without escapes, preserving the exact content and line
breaks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.devcontainer/welcome.sh:
- Line 2: Replace the long escaped printf string in .devcontainer/welcome.sh
with a heredoc for readability and easier maintenance: locate the printf
invocation in the script and change it to a here-doc style output (e.g., use cat
<<'EOF' ... EOF) so the multi-line message is written verbatim without escapes,
preserving the exact content and line breaks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 10bdcb83-8f28-4258-841c-d312a347789e

📥 Commits

Reviewing files that changed from the base of the PR and between f2f2244 and 0c2bd9a.

📒 Files selected for processing (2)
  • .devcontainer/devcontainer.json
  • .devcontainer/welcome.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • .devcontainer/devcontainer.json

@thephez thephez merged commit 5b85735 into main Mar 14, 2026
3 checks passed
@thephez thephez deleted the chore/devcontainer-update-2026-03 branch March 14, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant