Skip to content

Conversation

@duck-master
Copy link

@duck-master duck-master commented Aug 6, 2025

This is my first PR in a series of (hopefully!) five PRs, each of which adds roughly the same set of CI checks (namely: prettier, eslint, tsc). I've also commented out the unused variables so that eslint will work and I have avoided touching the repo-level yarn.lock.

Summary by CodeRabbit

  • Chores

    • Added a CI workflow to run formatting, linting, and type checks for the web workspace on relevant changes.
  • Refactor

    • Reformatted various function and prop signatures and reordered CSS class usage for consistency and readability.
    • Simplified destructuring and prop usage across multiple components.
  • Style

    • Disabled or commented out several non-essential UI interactions (submission flows, certain modal/badge states) without changing core display behavior.

@vercel
Copy link

vercel bot commented Aug 6, 2025

@duck-master is attempting to deploy a commit to the polylove Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Aug 6, 2025

Walkthrough

Adds a CI workflow for the web workspace and applies small formatting, prop-usage, and UI/state-commenting changes across multiple web components; no functional control-flow changes are introduced.

Changes

Cohort / File(s) Change Summary
CI Workflow Addition
.github/workflows/ci-web.yml
Adds a GitHub Actions workflow "CI checks for web workspace" that runs Prettier, ESLint, and TypeScript typechecks on pushes and PRs touching web/**/* (excluding .txt/.md).
Component Formatting & Signature Reformatting
web/components/answers/compatibility-questions-display.tsx, web/components/layout/tabs.tsx, web/components/required-lover-form.tsx, web/components/widgets/choices-toggle-group.tsx, web/pages/profile.tsx
Reorders CSS class name tokens, converts single-line signatures to multi-line formatting, and removes an extraneous blank line — purely stylistic/formatting changes.
Prop Destructuring / Usage Removal
web/components/answers/free-response-add-question.tsx, web/components/filters/location-filter.tsx
Stops destructuring/using optional props (isFirstQuestion, youLover) inside components by commenting out or removing their usage; prop types remain unchanged.
UI/Feature Disabling (Commented Out Logic)
web/components/browse-matches-button.tsx, web/components/love-page.tsx, web/components/widgets/user-link.tsx
Comments out state hooks, setters, submission logic, dialog input/submit UI, and a BotBadge component — effectively disabling submission and some modal/badge UI while keeping code in place.
Render Prop Adjustment
web/components/widgets/searchable-select.tsx
Removes open from the Popover render-prop destructuring and retains close plus rest parameters; local bindings adjusted without changing behavior.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant Repo as web workspace

    Dev->>GH: Push/PR to main with web/**/* changes
    GH->>Repo: Checkout & setup node, install deps
    GH->>Repo: Run Prettier check
    GH->>Repo: Run ESLint
    GH->>Repo: Run TypeScript typecheck
    Repo-->>GH: Job results
    GH-->>Dev: CI status (pass/fail)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Possibly related PRs

Poem

A rabbit nudged the files with care,
Tucked props away and trimmed some spare.
CI now watches the web domain,
While commented bits take gentle aim.
Tiny hops, a tidy trail—🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between db43095 and c16d210.

📒 Files selected for processing (1)
  • .github/workflows/ci-web.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci-web.yml
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
.github/workflows/ci-web.yml (1)

15-60: Consider job optimization for future maintenance.

While the current approach works, consider using a matrix strategy to reduce duplication if you add more jobs in future PRs.

Example matrix approach:

jobs:
  ci-checks:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        check: [prettier, eslint, typecheck]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '24.3.0'
          cache: yarn
          cache-dependency-path: 'web/yarn.lock'
      - name: Install yarn
        run: npm install -g yarn
      - name: Install dependencies
        run: yarn install
      - name: Run check
        run: |
          case "${{ matrix.check }}" in
            prettier) yarn prettier . --check --ignore-unknown ;;
            eslint) yarn eslint . ;;
            typecheck) yarn tsc --noEmit --strict ;;
          esac
web/components/browse-matches-button.tsx (1)

44-45: Clarify the commenting approach.

The partial commenting of the introduction variable assignment is unconventional. Consider either fully commenting out the lines or using a cleaner approach.

Apply this diff for cleaner commenting:

-    //const introduction =
-    ;(editor?.getCharacterCount() ?? 0) > 0 ? editor?.getJSON() : undefined
+    // const introduction = (editor?.getCharacterCount() ?? 0) > 0 ? editor?.getJSON() : undefined
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6f1237 and db43095.

📒 Files selected for processing (12)
  • .github/workflows/ci-web.yml (1 hunks)
  • web/components/answers/compatibility-questions-display.tsx (2 hunks)
  • web/components/answers/free-response-add-question.tsx (1 hunks)
  • web/components/browse-matches-button.tsx (2 hunks)
  • web/components/filters/location-filter.tsx (1 hunks)
  • web/components/layout/tabs.tsx (1 hunks)
  • web/components/love-page.tsx (2 hunks)
  • web/components/required-lover-form.tsx (1 hunks)
  • web/components/widgets/choices-toggle-group.tsx (1 hunks)
  • web/components/widgets/searchable-select.tsx (1 hunks)
  • web/components/widgets/user-link.tsx (1 hunks)
  • web/pages/profile.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
web/pages/profile.tsx (2)
common/src/supabase/utils.ts (1)
  • Column (23-23)
common/src/love/lover.ts (1)
  • LoverRow (5-5)
web/components/required-lover-form.tsx (2)
common/src/supabase/utils.ts (1)
  • Column (23-23)
common/src/love/lover.ts (1)
  • LoverRow (5-5)
🔇 Additional comments (15)
.github/workflows/ci-web.yml (2)

3-9: LGTM! Well-configured workflow triggers.

The path filters efficiently target only relevant changes in the web workspace while excluding documentation files from triggering CI checks.


11-13: LGTM! Efficient use of defaults.

Setting the working directory globally eliminates repetition across jobs and ensures consistency.

web/components/widgets/user-link.tsx (1)

101-107: LGTM! Clean temporary disabling of unused component.

The BotBadge function is properly commented out, preserving the implementation while removing it from active use. This aligns with the PR's goal of cleaning up unused code for CI checks.

web/components/widgets/searchable-select.tsx (1)

55-55: LGTM! Appropriate removal of unused variable.

Removing the unused open variable from the destructuring helps clean up the code for ESLint checks while maintaining all functionality.

web/components/layout/tabs.tsx (1)

160-163: LGTM! Improved JSX formatting consistency.

The change from parentheses to curly braces for the multiline clsx() expression follows better JSX conventions and improves code consistency.

web/components/answers/compatibility-questions-display.tsx (1)

410-410: LGTM! CSS class ordering improvements.

The reordering of CSS classes improves consistency and likely aligns with formatting tool preferences (Prettier) without affecting functionality.

Also applies to: 422-422

web/components/filters/location-filter.tsx (1)

31-31: LGTM - Aligns with PR objectives.

Commenting out the unused youLover prop in the destructuring is appropriate for the eslint CI checks while preserving the component interface.

web/components/answers/free-response-add-question.tsx (1)

25-25: LGTM - Consistent with CI cleanup objectives.

Commenting out the unused isFirstQuestion prop follows the established pattern for eslint compliance while maintaining the component interface.

web/components/love-page.tsx (2)

48-48: LGTM - Unused modal state commented out.

Commenting out the unused isModalOpen state is appropriate for eslint compliance.


58-58: LGTM - Clean destructuring pattern.

Using the blank placeholder for the unused isAddFundsModalOpen state while keeping the setter is a clean approach for eslint compliance.

web/components/widgets/choices-toggle-group.tsx (1)

16-18: LGTM - Improved formatting for complex generic types.

The multiline formatting for the generic type constraint improves readability and aligns with the prettier formatting standards being introduced.

web/components/browse-matches-button.tsx (2)

41-41: LGTM - Unused variable commented out.

Commenting out the unused setIsSubmitting in destructuring is appropriate for eslint compliance.


110-114: Verify intentional disabling of submission functionality.

Multiple props related to submission are commented out, which goes beyond simple eslint cleanup. Please confirm this is intentional disabling of match submission functionality.

web/components/required-lover-form.tsx (1)

50-53: LGTM! Formatting improvement for better readability.

The multi-line function signature formatting enhances readability while maintaining identical type constraints and functionality. This change aligns well with the PR objective of adding prettier formatting checks to the CI pipeline.

web/pages/profile.tsx (1)

33-36: LGTM! Consistent formatting improvement.

The multi-line function declaration formatting is consistent with the similar change in web/components/required-lover-form.tsx and enhances code readability. The function logic and behavior remain unchanged.

Comment on lines 22 to 24
node-version: '24.3.0'
cache: npm
cache-dependency-path: 'package.json'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix cache configuration mismatch.

The jobs use npm caching but install and use yarn for package management. This cache configuration won't be effective.

Apply this diff to fix the cache configuration:

-          cache: npm
-          cache-dependency-path: 'package.json'
+          cache: yarn
+          cache-dependency-path: 'web/yarn.lock'

Also applies to: 38-39, 53-54

🤖 Prompt for AI Agents
In .github/workflows/ci-web.yml at lines 22 to 24 (and similarly at lines 38-39
and 53-54), the cache configuration is set for npm while the project uses yarn
for package management. Update the cache configuration to use yarn caching by
changing 'cache: npm' to 'cache: yarn' and update 'cache-dependency-path' to
point to 'yarn.lock' instead of 'package.json' to ensure effective caching.

- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24.3.0'
Copy link

@coderabbitai coderabbitai bot Aug 6, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify Node.js version currency and command availability.

Ensure the specified Node.js version is current and that the expected commands are available in the web workspace.

Also applies to: 37-37, 52-52


🏁 Script executed:

#!/bin/bash
# Check if the specified Node.js version is current and verify package.json scripts

# Check if package.json exists in web directory
if [ -f "web/package.json" ]; then
  echo "=== Checking package.json scripts ==="
  jq '.scripts' web/package.json
  
  echo -e "\n=== Checking if yarn.lock exists ==="
  ls -la web/ | grep -E "(yarn\.lock|package-lock\.json)"
  
  echo -e "\n=== Checking dependencies ==="
  jq '.devDependencies | keys[]' web/package.json | grep -E "(prettier|eslint|typescript)"
else
  echo "web/package.json not found"
fi

Length of output: 1549


CI Web workflow: Pin LTS Node.js and install TypeScript

I verified the CI setup and package scripts in web/package.json:

  • You’re currently pinning node-version: '24.3.0'. That’s a valid current release but not an LTS line—if you need stability across environments, consider switching to the latest LTS (v20.x) or using a matrix to cover both LTS and current.
  • yarn.lock is present and all your custom scripts (serve, ts-watch, dev, etc.) are defined as expected.
  • Missing TypeScript: I didn’t find "typescript" under devDependencies. The tsc command in your ts-watch script will fail in CI unless you install it locally.

Please make the following updates:

  • In .github/workflows/ci-web.yml (lines 22, 37, 52), swap to an LTS version or use a matrix:
    node-version: ['20', '24.3.0']
  • In web/package.json, add TypeScript (and any related types) to devDependencies:
    "devDependencies": {
  • "typescript": "^5.1.6",
    "eslint-config-next": "...",
    "eslint-config-prettier": "...",
    "prettier-plugin-sql": "...",
    "prettier-plugin-tailwindcss": "..."
    }

<details>
<summary>🤖 Prompt for AI Agents</summary>

In .github/workflows/ci-web.yml at lines 22, 37, and 52, update the node-version
field to use a matrix with both the latest LTS version and the current version
by setting node-version to ['20', '24.3.0']. Additionally, in web/package.json,
add "typescript" and any necessary related type packages to the devDependencies
section to ensure the tsc command works correctly in CI.


</details>

<!-- fingerprinting:phantom:poseidon:tarantula -->

<!-- This is an auto-generated reply by CodeRabbit -->

Copy link
Author

Choose a reason for hiding this comment

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

@coderabbitai your comment is formatted wrong. starting immediately after the place where it says "devDependencies": { the code block is rendered as plain markdown and vice versa. please fix this ASAP

Copy link

Choose a reason for hiding this comment

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

@duck-master You're absolutely right - my apologies for the formatting issue! Here's the corrected version:

CI Web workflow: Pin LTS Node.js and install TypeScript

I verified the CI setup and package scripts in web/package.json:

  • You're currently pinning node-version: '24.3.0'. That's a valid current release but not an LTS line—if you need stability across environments, consider switching to the latest LTS (v20.x) or using a matrix to cover both LTS and current.
  • yarn.lock is present and all your custom scripts (serve, ts-watch, dev, etc.) are defined as expected.
  • Missing TypeScript: I didn't find "typescript" under devDependencies. The tsc command in your ts-watch script will fail in CI unless you install it locally.

Please make the following updates:

In .github/workflows/ci-web.yml (lines 22, 37, 52), swap to an LTS version or use a matrix:

node-version: ['20', '24.3.0']

In web/package.json, add TypeScript to devDependencies:

{
  "devDependencies": {
    "typescript": "^5.1.6",
    "eslint-config-next": "...",
    "eslint-config-prettier": "...",
    "prettier-plugin-sql": "...",
    "prettier-plugin-tailwindcss": "..."
  }
}

@duck-master
Copy link
Author

@sipec do you know what version of node.js and yarn we are using in production? This might actually become important.

(Adding typescript to devDependencies and using yarn caching should be easy.)

@sipec
Copy link
Owner

sipec commented Aug 15, 2025

interesting ...
i won't be able to get to this for a few more days. tentatively leaning against :/

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