Skip to content

Conversation

VyRajaRao
Copy link

@VyRajaRao VyRajaRao commented Sep 24, 2025

This PR updates CONTRIBUTING.md by clear and more structured format of few already exisiting steps and points under contributions section.
The goal is to make onboarding easier for new contributors.

Summary by CodeRabbit

  • Documentation
    • Expanded setup instructions with a concrete git clone example.
    • Clarified dependency installation, recommending Bun with npm/pnpm alternatives and root usage notes.
    • Added detailed guidance for resolving npm workspace errors.
    • Broadened contribution focus areas: accessibility, unit/integration tests, and improved error messages/logging.
    • Updated contribution and PR process: run tests locally, update docs when needed, and guidance on finding good first issues; reordered steps for clarity.
    • Added a note on expected maintainer response times in the community section.

Copy link

netlify bot commented Sep 24, 2025

👷 Deploy request for appcut pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 309dcc7

Copy link

vercel bot commented Sep 24, 2025

@VyRajaRao is attempting to deploy a commit to the OpenCut OSS Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Sep 24, 2025

Walkthrough

Contributing guide updated: expanded installation instructions (including git clone), detailed dependency management with Bun/npm/pnpm, enhanced npm workspace error guidance, augmented focus areas, reordered/expanded contribution and PR steps (tests, docs), and added community response-time note.

Changes

Cohort / File(s) Summary
Documentation: Contributing Guide
\.github/CONTRIBUTING.md
Expanded setup and install sections (git clone, Bun/npm/pnpm), added workspace error handling details, updated focus areas (accessibility, tests, error messages/logging), reordered/added contribution and PR steps (run tests, update docs, good first issues), added maintainers’ response-time note.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers, PRs in sight,
New steps to clone and test just right—
Bun or npm, hop along,
Clearer paths to keep us strong.
With kinder logs and access keys,
We ship with care—now toss me peas! 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description states the high-level goal but does not follow the repository's required template and is missing several required sections from the template such as "Type of change", "How Has This Been Tested" (including test steps and environment), the checklist items, and an optional "Fixes #" issue reference. Because these template fields are absent, reviewers lack information on testing, change classification, and checklist confirmations needed for an efficient review. The description is therefore insufficient as submitted. Please rewrite the PR description using the repository template: include a full "Description" with motivation and any related issue number, mark the appropriate "Type of change" checkboxes, provide detailed "How Has This Been Tested" steps and test configuration (Node version, OS, commands run), and complete the Checklist and Additional context sections. Adding these details will speed review and allow maintainers to verify tests and scope before merging.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Update CONTRIBUTING.md" is concise and accurately reflects the primary change in the changeset, which updates .github/CONTRIBUTING.md to provide clearer setup and contribution guidance. It is specific enough for a teammate scanning commit history to understand the main intent without noise or irrelevant details. No revision of the title is required for clarity.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

Copy link
Contributor

@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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/CONTRIBUTING.md (2)

37-40: Clarify install location and alternatives

Avoid confusion after cd into apps/web by stating explicitly that installation must run from the repository root and list alternatives succinctly.

-5. Install dependencies: We use Bun as our package manager.
-From the project root: `bun install`
-If you prefer, you can also use npm or pnpm, but Bun is the recommended option.
+5. Install dependencies (run from the repository root). We use Bun as our package manager.
+From the repository root: `bun install`
+Alternatively: `pnpm install` or `npm install` (npm v9+). Bun is recommended.

164-167: Rebase against upstream/main and show the exact commands

Be explicit about rebasing against the canonical upstream and how to do it.

-7. Rebase your branch against main before opening a PR
-8. Push to your fork and create a pull request
-9. Look for GitHub issues tagged with good first issue if you’re new
+7. Rebase your branch against the latest upstream main before opening a PR
+8. Push to your fork and create a pull request
+9. Look for GitHub issues tagged with "good first issue" if you’re new

Recommended snippet to include under step 7:

git remote add upstream https://github.com/OpenCut-app/OpenCut.git  # once per clone
git fetch upstream
git rebase upstream/main
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a346bdf and 309dcc7.

📒 Files selected for processing (1)
  • .github/CONTRIBUTING.md (4 hunks)
🔇 Additional comments (3)
.github/CONTRIBUTING.md (3)

57-59: Nice additions to focus areas

Accessibility, tests, and error/observability emphasis are great callouts.


194-195: Community notes LGTM

Clear expectation-setting around maintainer response time and encouraging peer reviews.


184-187: Specify exact test command & working directory — no test scripts found

Searched package.json files (apps/web/package.json, package.json, packages/auth/package.json, packages/db/package.json) — none declare a "test" script. Do not change CONTRIBUTING.md to bun run test yet; either add the appropriate "test" script in the package that owns tests or document the exact invocation and working directory (e.g., bun run test from apps/web or a workspace runner from repo root).

Likely an incorrect or invalid review comment.

Comment on lines +20 to +22
```bash
git clone https://github.com/<your-username>/opencut.git
```
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix fork clone URL casing and add repo cd step

Use the canonical repo name and guide contributors into the repository directory after cloning.

-   git clone https://github.com/<your-username>/opencut.git
+   # HTTPS
+   git clone https://github.com/<your-username>/OpenCut.git
+   # or SSH
+   git clone [email protected]:<your-username>/OpenCut.git
+   cd OpenCut
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```bash
git clone https://github.com/<your-username>/opencut.git
```
🤖 Prompt for AI Agents
In .github/CONTRIBUTING.md around lines 20 to 22, the fork clone URL uses
incorrect casing and is missing the step to change into the repository
directory; update the clone command to use the canonical repo name
(https://github.com/<your-username>/OpenCut.git) and add an immediate `cd
OpenCut` instruction after cloning so contributors are guided into the
repository folder.

Comment on lines +174 to +177
- Use consistent naming conventions for variables, components, and files
- Write self-documenting code but add comments where clarity is needed
- Tests should follow the same conventions (framework: Jest/Vitest, check repo for current usage)
- Aim for sufficient test coverage where relevant
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

🧩 Analysis chain

Resolve test framework ambiguity (Jest vs Vitest)

Specify the actual framework used to avoid confusion.

-• Tests should follow the same conventions (framework: Jest/Vitest, check repo for current usage)
+• Tests should follow the same conventions (framework: <Jest or Vitest> — see package.json/scripts)

Run this to detect which framework is in use:


🏁 Script executed:

#!/bin/bash
# Inspect test tooling across the repo
fd -g package.json -a -E "node_modules" | while read -r f; do
  echo "== $f =="
  jq -r '.scripts.test?, .devDependencies?.jest, .devDependencies?.vitest, .devDependencies?.biome' "$f" 2>/dev/null
done | rg -nP 'jest|vitest|biome|test'

Length of output: 0


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
echo "Searching for package.json files..."
# prefer fd when available
if command -v fd >/dev/null 2>&1; then
  mapfile -t pkgs < <(fd -HI -t f -e json package.json || true)
else
  mapfile -t pkgs < <(find . -type f -iname package.json -not -path '*/node_modules/*' 2>/dev/null || true)
fi

if [ "${#pkgs[@]}" -eq 0 ]; then
  echo "NO_PACKAGE_JSON_FOUND"
  exit 0
fi

for p in "${pkgs[@]}"; do
  echo "== $p =="
  if command -v jq >/dev/null 2>&1; then
    jq -r '{
      testScript: (.scripts.test // "<no test script>"),
      hasJest: ((.dependencies? // {}) | has("jest")) or ((.devDependencies? // {}) | has("jest")),
      hasVitest: ((.dependencies? // {}) | has("vitest")) or ((.devDependencies? // {}) | has("vitest")),
      jestVersion: (.dependencies.jest // .devDependencies.jest // null),
      vitestVersion: (.dependencies.vitest // .devDependencies.vitest // null)
    }' "$p" || cat "$p"
  else
    echo "jq not found; printing file head:"
    sed -n '1,120p' "$p"
  fi
done

echo "Searching repository for Vitest/Jest references and config files (excluding node_modules)..."
if command -v rg >/dev/null 2>&1; then
  rg -n --hidden --no-ignore -S --glob '!node_modules' '(^|\W)(vitest|jest)(\W|$)' || true
else
  grep -RIn --exclude-dir=node_modules -E '(^|\W)(vitest|jest)(\W|$)' . || true
fi

echo "Looking for typical config files in repo root..."
for cfg in vitest.config.ts vitest.config.js vitest.config.mjs vite.config.ts vite.config.js jest.config.js jest.config.ts jest.config.cjs; do
  [ -f "$cfg" ] && echo "FOUND_CONFIG: $cfg"
done

Length of output: 92


🏁 Script executed:

#!/usr/bin/env bash
set -eu
echo "Searching for package.json files..."
tmp="$(mktemp)"
find . -type f -name package.json -not -path '*/node_modules/*' -print0 > "$tmp"
if [ ! -s "$tmp" ]; then
  echo "NO_PACKAGE_JSON_FOUND"
  rm -f "$tmp"
  exit 0
fi

while IFS= read -r -d '' p; do
  echo "== $p =="
  if command -v jq >/dev/null 2>&1; then
    jq -r '
      "testScript: " + (.scripts.test // "<no test script>"),
      "hasJest: " + ( ((.dependencies? // {}) | has("jest")) or ((.devDependencies? // {}) | has("jest")) | tostring ),
      "hasVitest: " + ( ((.dependencies? // {}) | has("vitest")) or ((.devDependencies? // {}) | has("vitest")) | tostring ),
      "jestVersion: " + ((.dependencies.jest // .devDependencies.jest) // "null"),
      "vitestVersion: " + ((.dependencies.vitest // .devDependencies.vitest) // "null")
    ' "$p" || sed -n '1,200p' "$p"
  else
    echo "jq not available; showing package.json head:"
    sed -n '1,200p' "$p"
  fi
done < "$tmp"
rm -f "$tmp"

echo
echo "Searching repository for 'vitest' or 'jest' references (excluding node_modules)..."
if command -v rg >/dev/null 2>&1; then
  rg -n --hidden --no-ignore -S --glob '!node_modules' '(^|\W)(vitest|jest)(\W|$)' || true
else
  grep -RIn --exclude-dir=node_modules -E '(^|\W)(vitest|jest)(\W|$)' . || true
fi

echo
echo "Checking for common config files in repo root..."
for cfg in vitest.config.ts vitest.config.js vitest.config.mjs vite.config.ts vite.config.js jest.config.js jest.config.ts jest.config.cjs; do
  [ -f "$cfg" ] && echo "FOUND_CONFIG: $cfg"
done

Length of output: 833


Specify test framework in CONTRIBUTING.md — no Jest/Vitest detected

Scanned package.json files (./package.json, ./apps/web/package.json, ./packages/auth/package.json, ./packages/db/package.json): none define a test script or list jest/vitest; update .github/CONTRIBUTING.md (lines 174–177) to name the repo's test framework or remove the “Jest/Vitest” hint and point contributors to the actual package.json test scripts or the chosen framework.

🤖 Prompt for AI Agents
.github/CONTRIBUTING.md lines 174–177: the contribution guide currently
references "Tests should follow the same conventions (framework: Jest/Vitest,
check repo for current usage)" but no Jest/Vitest usage or test script exists in
package.json files; update these lines to either state the actual test framework
used in this repo (and the canonical test script path) if there is one, or
remove the "Jest/Vitest" hint and replace it with a directive telling
contributors to run the repository test via the package.json test script(s)
(e.g., "See package.json test script in the project root or package folder")
and/or link to how to discover the framework (npm/yarn pnpm test or check
package.json), so the CONTRIBUTING guidance matches the repo configuration.

@CodiumAI-Agent
Copy link

PR Code Suggestions ✨

CategorySuggestion                                                                                                                                    Impact
General
Provide explicit rebase instructions

Specify the exact rebase commands to minimize contributor mistakes and resolve
common conflicts early. Provide a short, copy-pastable sequence that works for most
forks.

.github/CONTRIBUTING.md [164]

 7. Rebase your branch against main before opening a PR
+   Example:
+   ```bash
+   git fetch upstream
+   git checkout <your-branch>
+   git rebase upstream/main
+   # If conflicts occur, resolve them, then:
+   git add -A
+   git rebase --continue
+   # Push the rebased branch (force-with-lease to avoid overwriting others):
+   git push --force-with-lease origin <your-branch>
+   ```
Suggestion importance[1-10]: 7

__

Why: Adding concrete rebase commands reduces contributor errors and aligns with the new step to rebase before PRs; it's correct and pragmatic, though not a critical bug fix.

Medium
Prevent mixed package manager issues

Clarify that mixing package managers can corrupt lockfiles and cause install/runtime
inconsistencies. Explicitly instruct contributors to stick to one tool per install
and to delete the corresponding lockfile when switching.

.github/CONTRIBUTING.md [37-39]

 5. Install dependencies: We use Bun as our package manager.
-From the project root: `bun install`
-If you prefer, you can also use npm or pnpm, but Bun is the recommended option.
+   From the project root: `bun install`
+   If you prefer, you can also use npm or pnpm, but Bun is the recommended option.
+   Important: Do not mix package managers in the same workspace. If you switch tools, remove the previous lockfile (bun.lockb / package-lock.json / pnpm-lock.yaml) before reinstalling.
Suggestion importance[1-10]: 6

__

Why: The warning about not mixing package managers is accurate and can prevent lockfile and install inconsistencies; it's a useful clarity improvement to the newly added dependency instructions.

Low
Possible issue
Specify correct run directory

Note the required working directory to avoid "script not found" errors when running
scripts from the wrong path. Align with earlier steps that operate in apps/web.

.github/CONTRIBUTING.md [41]

-6. Start the development server: `bun run dev`
+6. Start the development server (from apps/web): `cd apps/web && bun run dev`
Suggestion importance[1-10]: 5

__

Why: Clarifying the working directory can prevent "script not found" issues, but the PR already references running from the project root and apps/web elsewhere; impact is modest and context-dependent.

Low

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.

2 participants