Skip to content

Config updates#1701

Merged
simo6529 merged 5 commits intomainfrom
config-updates
Jan 6, 2026
Merged

Config updates#1701
simo6529 merged 5 commits intomainfrom
config-updates

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Jan 6, 2026

Summary by CodeRabbit

  • Style

    • Updated component styling for the drop creation and grant submission forms.
    • Improved button and error message display formatting.
  • Chores

    • Added formatting scripts for improved code consistency.
    • Enhanced Prettier configuration with additional formatting rules.
    • Expanded development environment setup with enhanced editor settings and pre-commit validation checks.
    • Removed example template documentation.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 6, 2026

📝 Walkthrough

Walkthrough

This PR updates styling and import ordering in React components, adds formatting automation scripts to package.json, expands Prettier and VS Code configuration with Tailwind support, removes a template file, and enhances the worktree setup script with editor settings and pre-commit hooks.

Changes

Cohort / File(s) Summary
React Component Updates
components/drops/create/compact/CreateDropCompact.tsx, components/user/xtdh/UserPageXtdhGrantSubmit.tsx
CreateDropCompact: Reorganized imports, consolidated flex-based layout classes, and updated file item and button styling with no functional changes. UserPageXtdhGrantSubmit: Expanded error detection logic, introduced onSubmitClick handler, adjusted button styling classes, updated error/success message rendering with role="alert" attributes and consistent class ordering.
Development Tooling Configuration
package.json, prettier.config.mjs, scripts/wt-add.sh
package.json: Added format:changed and format:uncommitted npm scripts for automated code formatting. prettier.config.mjs: Added tailwindFunctions and tailwindAttributes options for Tailwind class recognition. scripts/wt-add.sh: Expanded VS Code editor settings (format-on-save, ESLint integration, Tailwind IntelliSense), added pre-commit hook with conditional lint skip (SKIP_LINT=1), and npm install step.
Template Removal
scripts/example_prd.txt
Removed PRD/template document with placeholder sections (Overview, Features, Architecture, etc.).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • #1686: Both PRs modify package.json scripts for formatting and development workflow automation.

Suggested reviewers

  • prxt6529

Poem

🐰 Hop hop, the configs dance,
Tailwind classes get their chance,
Format scripts now spring to life,
Pre-commit hooks end formatting strife,
Whiskers twitch with glee—
A cleaner codebase it shall be!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title "Config updates" is overly vague and generic. While the PR does include config-related changes (prettier.config.mjs, package.json, scripts/wt-add.sh), it also contains significant non-config changes: component styling updates (CreateDropCompact.tsx) and logic refactors (UserPageXtdhGrantSubmit.tsx). The title does not accurately reflect the full scope of the changeset. Revise the title to be more specific and comprehensive, such as "Add formatter scripts and component styling updates" or "Update Prettier config and refactor grant submission form" to better represent all major changes in the PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings

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.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 6, 2026

Copy link
Copy Markdown

@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

🤖 Fix all issues with AI Agents
In @components/user/xtdh/UserPageXtdhGrantSubmit.tsx:
- Line 30: The type guard currently uses Boolean(selection && "type" in
selection) which treats any object with a "type" property as an error; change it
to explicitly check the error case by using selection?.type === "error" (or a
null/object-safe equivalent like selection && typeof selection === "object" &&
selection.type === "error") so only selections whose type equals "error" are
classified as errors; update the expression in the UserPageXtdhGrantSubmit
component wherever Boolean(selection && "type" in selection) appears (variable
name: selection) to the explicit equality check.

In @scripts/wt-add.sh:
- Line 41: Remove the invalid single-slash comment "/ --- Formatting ---" (the
exact line containing "/ --- Formatting ---") and either delete it or replace it
with a valid JSON-safe entry (e.g. a descriptive property like "_comment":
"Formatting" or move the note outside the JSON). Ensure the file contains no
single-slash comments so JSON parsing succeeds.
🧹 Nitpick comments (1)
components/user/xtdh/UserPageXtdhGrantSubmit.tsx (1)

108-108: Remove redundant async wrapper.

The onSubmitClick wrapper unnecessarily wraps onSubmit in an async function. Since onSubmit already returns void | Promise<void>, you can pass it directly to onClick.

🔎 Proposed refactor
- const onSubmitClick = async (): Promise<void> => await onSubmit();
-
   return (
     <div className="tw-flex tw-flex-col tw-gap-2">
       <button
         type="button"
-        onClick={onSubmitClick}
+        onClick={onSubmit}
         disabled={disabled}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b434394 and a69b5ae.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
  • package.json
  • prettier.config.mjs
  • scripts/example_prd.txt
  • scripts/wt-add.sh
💤 Files with no reviewable changes (1)
  • scripts/example_prd.txt
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{ts,tsx,js,jsx}: Do not include any comments in the code; it should be self-explanatory
Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Include all required imports and ensure proper naming of key components
Use NextJS features that match the current version

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects. If the Effect's only job is to derive or sync internal state, calculate during render or use useMemo instead.
Use useEffectEvent for non-reactive logic inside Effects to read the latest props/state without turning them into dependencies or causing unnecessary re-runs.
Use explicit caching with "use cache" directive at the top of Server Components, routes, or functions. Configure cacheComponents: true in next.config.ts as needed.

**/*.{ts,tsx,js,jsx}: Remove unnecessary Effects; if the Effect only derives state, compute during render instead
Use useEffectEvent when listening to external events but needing the latest props/state without re-running the Effect
Move data fetching from client Effects to Server Components; mutations go through Server Actions ('use server')

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{tsx,jsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{tsx,jsx}: Use FontAwesome for icons in React components
Use TailwindCSS for styling in React components
Use react-query for data fetching
Always add readonly before props in React components

**/*.{tsx,jsx}: Use internal links via <Link> component from Next.js instead of <a> tags
Replace <img> elements with <Image /> from next/image

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Run npm run lint to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.

**/*.{js,ts,jsx,tsx}: Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running npm run lint
Do not add eslint-disable comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

**/*.{jsx,tsx}: Replace <img> elements with <Image /> from next/image to comply with Next.js ESLint rule @next/next/no-img-element.
Use <Link href="/path"> from Next.js for internal navigation instead of raw <a> tags to comply with @next/next/no-html-link-for-pages.

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (GEMINI.md)

Use TypeScript with React functional components and hooks. Follow existing code style and naming conventions.

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{tsx,ts}

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript with React functional components and hooks

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
**/*.{tsx,ts,jsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Prefer direct named imports from React (useMemo, useRef, FC) over React. namespace usage

Files:

  • components/drops/create/compact/CreateDropCompact.tsx
  • components/user/xtdh/UserPageXtdhGrantSubmit.tsx
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{tsx,jsx} : Use TailwindCSS for styling in React components
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.994Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions. Do not add `// eslint-disable` comments unless explicitly instructed.
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Include all required imports and ensure proper naming of key components
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript with React functional components and hooks. Follow existing code style and naming conventions.
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Do not add `eslint-disable` comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running `npm run lint`
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Run `npm run lint` to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Write correct, up-to-date, bug-free, fully componentized, secure, and efficient code
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: __tests__/AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:37.293Z
Learning: Applies to __tests__/**/*.{ts,tsx,js},!**/__tests__/**,!**/__mocks__/**,!**/*.d.ts : Use one import per module with ordering: external → internal → types, no duplicates
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{tsx,ts,jsx,js} : Prefer direct named imports from React (`useMemo`, `useRef`, `FC`) over `React.` namespace usage
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Enforce ≥ 80% line coverage for files changed since `main` by running `npm run test`

Applied to files:

  • package.json
📚 Learning: 2025-12-30T14:31:52.993Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Run `npm run lint` to ensure code satisfies ESLint (Next's Core Web Vitals + React Hooks). Code must pass linting before completing any task.

Applied to files:

  • package.json
  • scripts/wt-add.sh
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Code must satisfy ESLint with Next's Core Web Vitals and React Hooks rules by running `npm run lint`

Applied to files:

  • package.json
  • scripts/wt-add.sh
📚 Learning: 2025-12-30T14:31:52.993Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Run `npm run test` to execute all Jest tests and enforce ≥80% line coverage for files changed since `main`. Tests must pass and coverage threshold must be met before completing any task.

Applied to files:

  • package.json
📚 Learning: 2025-12-30T14:32:44.873Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: app/api/AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:44.873Z
Learning: Applies to app/api/**/*.{ts,tsx} : All changes to API routes must pass the commands listed in the top-level AGENTS.md: `npm run test` and `npm run lint`.

Applied to files:

  • package.json
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to {eslint.config.js,next.config.ts} : Use ESLint CLI driven by `eslint-config-next` (flat config) instead of `next lint` (removed in Next.js 16)

Applied to files:

  • package.json
📚 Learning: 2025-12-30T14:31:52.993Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to next.config.{js,ts,mjs,mts} : With Next.js 16, `next lint` is removed. Use the ESLint CLI driven by `eslint-config-next` (flat config). Remove any `eslint` options from `next.config.*`.

Applied to files:

  • package.json
📚 Learning: 2025-12-30T14:32:19.339Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-30T14:32:19.339Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Do not add `eslint-disable` comments unless explicitly instructed; prefer refactors aligned with React 19.2, React Compiler, and Next.js 16 conventions

Applied to files:

  • package.json
  • scripts/wt-add.sh
📚 Learning: 2025-12-30T14:31:52.994Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.994Z
Learning: Do not run tests, build, or lint commands unless explicitly asked. Agents should skip these when only editing documentation or non-code files.

Applied to files:

  • package.json
📚 Learning: 2025-11-25T08:36:24.149Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursor/rules/dev_workflow.mdc:0-0
Timestamp: 2025-11-25T08:36:24.149Z
Learning: When committing code changes, craft comprehensive Git commit messages summarizing the work done including both code implementation and rule adjustments, and consider if a Changeset is needed according to changeset.mdc

Applied to files:

  • scripts/wt-add.sh
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Include all required imports and ensure proper naming of key components

Applied to files:

  • scripts/wt-add.sh
  • components/drops/create/compact/CreateDropCompact.tsx
📚 Learning: 2025-12-30T14:31:52.994Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.994Z
Learning: Fix issues with modernization aligned to React 19.2, React Compiler, and Next.js 16 conventions. Do not add `// eslint-disable` comments unless explicitly instructed.

Applied to files:

  • components/drops/create/compact/CreateDropCompact.tsx
📚 Learning: 2025-12-30T14:31:52.993Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: GEMINI.md:0-0
Timestamp: 2025-12-30T14:31:52.993Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript with React functional components and hooks. Follow existing code style and naming conventions.

Applied to files:

  • components/drops/create/compact/CreateDropCompact.tsx
📚 Learning: 2025-11-25T08:35:58.729Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.729Z
Learning: Applies to **/*.{tsx,jsx} : Use TailwindCSS for styling in React components

Applied to files:

  • prettier.config.mjs
🧬 Code graph analysis (1)
components/user/xtdh/UserPageXtdhGrantSubmit.tsx (1)
helpers/Helpers.ts (1)
  • formatNumberWithCommas (133-150)
🪛 Shellcheck (0.11.0)
scripts/wt-add.sh

[warning] 104-104: Found trailing ] outside test. Add missing [ or quote if intentional.

(SC2171)


[warning] 104-104: This is interpreted as a command name ending with ']'. Double check syntax.

(SC2288)


[error] 104-104: '(' is invalid here. Did you forget to escape it?

(SC1036)


[error] 104-104: Parsing stopped here. Invalid use of parentheses?

(SC1088)


[warning] 104-104: This is a glob used as a command name. Was it supposed to be in ${..}, array, or is it missing quoting?

(SC2211)


[error] 104-104: Parsing stopped here. Is this keyword correctly matched up?

(SC1089)


[error] 105-105: Parsing stopped here. Is this keyword correctly matched up?

(SC1089)


[error] 106-106: Parsing stopped here. Is this keyword correctly matched up?

(SC1089)


[error] 107-107: Parsing stopped here. Is this keyword correctly matched up?

(SC1089)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
prettier.config.mjs (1)

43-51: LGTM! Tailwind plugin configuration is correctly structured.

The added options properly configure the Prettier Tailwind plugin to format class strings within utility functions (clsx, cn, cva) and animation attributes commonly used with Headless UI transitions.

package.json (1)

36-37: LGTM! Formatting scripts follow best practices.

The new scripts properly handle filenames with spaces (using -z and -0 flags), exclude generated files, and use --ignore-unknown to gracefully handle unsupported file types. They integrate well with the existing lint:changed workflow pattern.

components/user/xtdh/UserPageXtdhGrantSubmit.tsx (1)

127-133: Good accessibility improvements with role="alert" and semantic HTML.

Adding role="alert" to error messages and using the <output> element for success messages improves accessibility and semantic correctness.

Also applies to: 136-142, 145-148

components/drops/create/compact/CreateDropCompact.tsx (2)

3-19: Import ordering improved for consistency.

The imports are now better organized with component imports grouped together, which aligns with the coding guidelines for proper import organization.


165-179: Tailwind utility classes standardized to modern shorthands.

Using tw-size-* instead of separate tw-w-* and tw-h-* utilities is the recommended modern Tailwind approach for square dimensions. The className reordering also improves consistency across the codebase.

scripts/wt-add.sh (3)

118-125: Pre-commit hook workflow is well-designed.

The hook provides a safety escape hatch via SKIP_LINT=1, automatically formats uncommitted files, stages the changes, and runs strict linting. This ensures code quality while allowing flexibility when needed.


42-108: Comprehensive VS Code settings enhance developer experience.

The settings provide consistent formatting, linting, and IntelliSense configuration across worktrees. The Tailwind class regex patterns align well with the Prettier config updates in this PR.


131-133: Running npm install ensures worktree dependencies are ready.

This step properly sets up the worktree with its own node_modules, avoiding potential issues from relying on the main worktree's dependencies.

Comment thread components/user/xtdh/UserPageXtdhGrantSubmit.tsx
Comment thread scripts/wt-add.sh
@simo6529 simo6529 merged commit 89ccf66 into main Jan 6, 2026
11 checks passed
@simo6529 simo6529 deleted the config-updates branch January 6, 2026 11:40
@coderabbitai coderabbitai Bot mentioned this pull request Mar 2, 2026
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