Skip to content

fix(project): resolve build errors and restore form autosave (#248, #252) - #319

Open
Sulamoney222 wants to merge 2 commits into
HubDApp:mainfrom
Sulamoney222:fix/248-252-comparison-autosave
Open

fix(project): resolve build errors and restore form autosave (#248, #252)#319
Sulamoney222 wants to merge 2 commits into
HubDApp:mainfrom
Sulamoney222:fix/248-252-comparison-autosave

Conversation

@Sulamoney222

Copy link
Copy Markdown

Overview

This PR fixes build errors blocking the comparison view feature and restores the form autosave draft restoration for project descriptions. Both features were already partially implemented in the codebase but had regressions that prevented them from working correctly.

Related Issues

Closes #248 — Add comparison view for selected projects
Closes #252 — Add form autosave for long project descriptions

Changes

🐛 Comparison View Build Fixes (#248)

  • [FIX] app/projects/[id]/page.tsx

    • Removed duplicate Bookmark, BookmarkCheck, Bug, Shield imports from lucide-react
    • Removed duplicate reviewReportService import
    • Fixed TypeScript error: removed authorAddress from addUpdate() data object (it is passed as a separate argument)
  • [FIX] app/admin/page.tsx

    • Fixed missing ), 0; closing for setTimeout call (was preventing compilation)
    • Fixed broken JSX nesting: moved pendingProjectReports.map() into the ternary's else branch
    • Added missing type imports: ProjectReport, ProjectClaimRequest, ProjectModerationAction
    • Added reviewsById state initialization with review data fetch for getReviewForReport() helper

🐛 Form Autosave Draft Restoration (#252)

  • [FIX] components/projects/ProjectForm.tsx
    • Added reset(draft.loadedDraft) call in the useEffect that detects when a saved draft is loaded, so the form fields are actually populated with the previously saved data instead of remaining empty

Verification Results

npm run build
✅ Compiled successfully
✅ TypeScript checks passed
✅ All routes generated: /, /compare, /discover, /projects/new, /projects/[id], /projects/[id]/edit, /admin, /reviews, /verify, and more
Acceptance Criteria Status
Comparison view renders without build errors ✅ Project compiles successfully
Projects can be added/removed from comparison ✅ Integration already exists via ProjectCard + ComparisonContext
Comparison view works on desktop and mobile ✅ Already implemented in compare/page.tsx
Empty and max-selection states are handled ✅ Already implemented (0, 1, 4 project states)
Autosave runs only after fields change ✅ Already implemented with 1s debounce in draft.service.ts
Restored drafts are clearly indicated ✅ Banner shows "Your previous draft has been restored"
Users can clear saved drafts ✅ Already implemented via DraftIndicator discard button

Timeline

…#248, HubDApp#252)

- Fix duplicate import errors in project detail page
- Fix broken JSX nesting and missing types in admin page
- Fix form autosave draft restoration in ProjectForm
- Fix TypeScript type errors across changed files
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Sulamoney222 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Sulamoney222

Copy link
Copy Markdown
Author

@Naomi-Gift Done ✅ .
Closes #248 — Add comparison view for selected projects
Closes #252 — Add form autosave for long project descriptions

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.

Add form autosave for long project descriptions Add comparison view for selected projects

1 participant