Skip to content

fix(dashboard): replace any types with proper project data interfaces#312

Open
angelina-2206 wants to merge 1 commit into
piyushdotcomm:mainfrom
angelina-2206:fix/project-table-types
Open

fix(dashboard): replace any types with proper project data interfaces#312
angelina-2206 wants to merge 1 commit into
piyushdotcomm:mainfrom
angelina-2206:fix/project-table-types

Conversation

@angelina-2206
Copy link
Copy Markdown
Contributor

@angelina-2206 angelina-2206 commented May 26, 2026

Summary

  • what changed:
    • Replaced the callback properties (onUpdateProject, onDeleteProject, and onDuplicateProject) in ProjectTableProps (modules/dashboard/components/project-table.tsx) and CompactProjectTableProps (modules/profile/components/CompactProjectTable.tsx) to return strongly-typed promises (Promise<void> and Promise<Playground>) instead of Promise<any>.
    • Imported the generated Playground model type from @prisma/client to represent the duplication callback's return value.
  • why it changed:
    • To eliminate generic any types from the dashboard project table component interfaces, ensuring compile-time type safety and cleaner interface definitions.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Test or CI improvement
  • Starter template change

Related issue

Closes #294

Validation

  • npm run lint
  • npm test
  • npm run build

List any additional manual verification you performed:

  • Verified type compatibility and strict compilation using npx tsc --noEmit.

Screenshots or recordings

(No UI changes)

Checklist

  • I kept this PR focused on one primary change
  • I updated documentation if behavior changed
  • I did not commit secrets, local logs, or scratch files
  • I am requesting review on the correct scope

Summary by CodeRabbit

  • Refactor
    • Enhanced type safety for internal component callbacks to improve code reliability and maintainability.

Review Change Stack

Signed-off-by: Angelina <angelinachatterjee2206@gmail.com>
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions
Copy link
Copy Markdown

👋 Thanks for opening a PR, @angelina-2206!

Your PR has entered the 🚦 PR Review Pipeline.

Standard PR detected — your PR will follow the standard review pipeline.


What happens next

Stage Reviewer Checks
Stage 1 — Automated Validation 🤖 Bot DCO · Format · AI/Slop · Duplicate
Stage 2 — Human Review 👥 Maintainer Code + Quality Review
Stage 3 — PA / Maintainer Review 🔑 Project Admin Final Merge Decision

A pipeline status comment will appear below and update automatically as your PR progresses.


While you wait

  • Sign all commits (git commit -s)
  • Link your issue (Closes #123)
  • Use a feature branch (not main)
  • Avoid unrelated changes

This comment is posted only once.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7b439cbf-0c99-432f-907c-6edc43b34c1d

📥 Commits

Reviewing files that changed from the base of the PR and between f12b223 and a640d28.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • modules/dashboard/components/project-table.tsx
  • modules/profile/components/CompactProjectTable.tsx

Walkthrough

Two project table components tighten their TypeScript callback signatures. ProjectTable and CompactProjectTable now import Playground from @prisma/client and specify precise callback return types: onUpdateProject and onDeleteProject resolve to Promise<void>, while onDuplicateProject resolves to Promise<Playground> instead of generic Promise<any>.

Changes

Type-safe project callback signatures

Layer / File(s) Summary
Callback return types in project tables
modules/dashboard/components/project-table.tsx, modules/profile/components/CompactProjectTable.tsx
Both components import Playground and update callback prop types: onUpdateProject and onDeleteProject now return Promise<void>, and onDuplicateProject now returns Promise<Playground> instead of Promise<any>.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hopping through the types with care,
Any banished from the air,
Playground dances, void takes flight,
Callbacks typed so crisp and bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: replacing generic any types with specific project data interfaces in dashboard components.
Description check ✅ Passed The description comprehensively covers what changed, why it changed, follows the template structure with all required sections completed, and includes validation results.
Linked Issues check ✅ Passed The pull request successfully addresses issue #294 by replacing Promise return types with Promise and Promise in ProjectTable and CompactProjectTable components as requested.
Out of Scope Changes check ✅ Passed All changes are focused on type refinement in the two specified component files with no unrelated modifications introduced.
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 unit tests (beta)
  • Create PR with unit tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript: Replace any types in Project Table component

1 participant