Skip to content

feat: show uploaded papers and review status in account - #551

Draft
divyamagrawal06 wants to merge 6 commits into
ACM-VIT:devfrom
divyamagrawal06:feat/account-upload-status
Draft

divyamagrawal06 wants to merge 6 commits into
ACM-VIT:devfrom
divyamagrawal06:feat/account-upload-status

Conversation

@divyamagrawal06

@divyamagrawal06 divyamagrawal06 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an authenticated /account page listing the current user's past-paper uploads
  • expose upload and moderation state as Uploaded, In review, Needs changes, Duplicate detected, Published, or Rejected
  • show submitted metadata, upload time, AI review summary, source file, and published-paper link
  • add a My uploads entry to the existing Account menu

Status model

This reuses the existing PastPaper fields rather than introducing a second status column:

  • isClear → Published
  • no AI review yet → Uploaded
  • active AI review → In review / Needs changes / Duplicate detected
  • moderationArchivedAt → Rejected, or Duplicate when the review identifies one

Data and security

  • the page requires an authenticated session
  • the database query is scoped to PastPaper.authorId === session.user.id
  • no migration or new environment variable is required
  • the page is marked non-indexable and dynamically rendered

Validation

  • compared the branch against main; only the new account page and Account-menu link are included
  • verified published links use the existing course-scoped paper route
  • full local build and screenshots are still required before this draft is ready for review

spent a lot of water and tokens to review your slop

Greptile Summary

The account page now distinguishes withdrawn uploads from rejected submissions and preserves published-paper navigation when a course has been deleted. Rendered checks confirmed both behaviors.

Confidence Score: 5/5

No blocking failure remains.

The reviewed account-history and deleted-course navigation paths behaved as intended in rendered checks.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the withdrawn-visibility-validation script and observed that the parent result was Rejected and the current result Withdrawn, with pass: true, and the correction-report query mapped visibility to withdrawn and displayed Withdrawn before the Rejected fallback.
  • T-Rex verification ran, but its local artifact references were not uploaded.
  • Reran the withdrawn-visibility-validation script and saved the Playwright renders locally; the run again showed the parent Rejected and current Withdrawn with pass: true, and the correction-report query mapped visibility to withdrawn.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix: preserve withdrawn and unassigned p..." | Re-trigger Greptile

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@divyamagrawal06 is attempting to deploy a commit to the theg1239's projects Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread app/(app)/account/page.tsx
Comment thread app/(app)/account/page.tsx Outdated

Copy link
Copy Markdown
Contributor Author

Follow-up applied in a8c45a4: archived papers created by an approved correction now distinguish Withdrawn and Moved to notes, and published papers use the shared getPastPaperDetailPath helper so deleted courses fall back to the canonical unassigned route. The automated review threads are resolved.

@theg1239

Copy link
Copy Markdown
Member

"export const dynamic = "force-dynamic";" is not compatible with cache components, please test your changes

@theg1239
theg1239 changed the base branch from main to dev August 17, 2026 18:15
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