Skip to content

Remove "Mark as Reviewed" feature from APIView#13229

Merged
tjprescott merged 2 commits intomainfrom
copilot/remove-mark-as-reviewed-feature
Dec 5, 2025
Merged

Remove "Mark as Reviewed" feature from APIView#13229
tjprescott merged 2 commits intomainfrom
copilot/remove-mark-as-reviewed-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

The "Mark as Reviewed" feature (implemented in PR #7959) was incomplete—it allowed marking revisions as viewed but never implemented the filtering functionality that was its original purpose. This removes the non-functional feature entirely.

Backend

  • Remove ViewedBy property from APIRevisionListItemModel
  • Remove ToggleViewedByAsync endpoint from APIRevisionsController
  • Remove OnPostToggleViewedAsync handler from Review page

Frontend (Razor)

  • Remove "Mark as Viewed" toggle from Review.cshtml
  • Remove reviewViewedSwitch handler from review.ts

Frontend (Angular SPA)

  • Remove viewedBy from APIRevision model
  • Remove toggleAPIRevisionViewedByForUser from revisions service
  • Remove markedAsViewSwitch and related handlers from review-page-options component
  • Remove handleMarkAsViewedEmitter from review-page component

Tests

  • Update APIRevisionsControllerTests and CommentsTokenAuthControllerTests test helpers
  • Update review-page-options.component.spec.ts
Original prompt

This section details on the original issue you should resolve

<issue_title>[APIView] Remove "Mark as Reviewed" feature</issue_title>
<issue_description>This was the original request:
#2101

The purpose was to be able to mark sections of the review as "reviewed" and be able to filter those sections so that you could break up long reviews.

However, as implemented here (#7959) the feature does not even come close to doing this, and effectively does nothing.

We should remove the old implementation and then decide whether or not to reopen and triage issue #2101</issue_description>

<agent_instructions>Remove from the UI and all relevant models. </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@maririos Yes. Remove it

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: tjprescott <5723682+tjprescott@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove 'Mark as Reviewed' feature from API view Remove "Mark as Reviewed" feature from APIView Dec 5, 2025
Copilot AI requested a review from tjprescott December 5, 2025 22:12
@tjprescott tjprescott marked this pull request as ready for review December 5, 2025 23:16
Copilot AI review requested due to automatic review settings December 5, 2025 23:16
Copy link
Copy Markdown
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

This is on UX test and works fine. This seems to appropriately clean up the code, as well. @AlitzelMendez for final approval.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the incomplete "Mark as Reviewed" feature that was originally added in PR #7959. The feature allowed marking revisions as viewed but never implemented the intended filtering functionality, making it non-functional. This change comprehensively removes all traces of the feature from both backend and frontend codebases.

  • Removes the ViewedBy property and associated toggle endpoints from the backend API
  • Removes all "Mark as Viewed" UI controls and handlers from both Angular SPA and Razor frontends
  • Updates test helpers to reflect the model changes

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/dotnet/APIView/APIViewWeb/LeanModels/ReviewListModels.cs Removes ViewedBy property from APIRevisionListItemModel
src/dotnet/APIView/APIViewWeb/LeanControllers/APIRevisionsController.cs Removes ToggleViewedByAsync endpoint that toggled the ViewedBy state
src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Review.cshtml.cs Removes OnPostToggleViewedAsync handler from Review page
src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Review.cshtml Removes "Mark as Viewed" toggle UI from the Razor view
src/dotnet/APIView/APIViewWeb/Client/src/pages/review.ts Removes reviewViewedSwitch event handler
src/dotnet/APIView/ClientSPA/src/app/_models/revision.ts Removes viewedBy property from APIRevision model
src/dotnet/APIView/ClientSPA/src/app/_services/revisions/revisions.service.ts Removes toggleAPIRevisionViewedByForUser service method
src/dotnet/APIView/ClientSPA/src/app/_components/review-page/review-page.component.ts Removes handleMarkAsViewedEmitter handler
src/dotnet/APIView/ClientSPA/src/app/_components/review-page/review-page.component.html Removes markAsViewedEmitter binding from template
src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.ts Removes markedAsViewSwitch property, emitter, and related methods
src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.html Removes "Mark as viewed" toggle from options panel
src/dotnet/APIView/ClientSPA/src/app/_components/review-page-options/review-page-options.component.spec.ts Updates test expectations to remove markedAsViewSwitch assertion
src/dotnet/APIView/APIViewUnitTests/APIRevisionsControllerTests.cs Updates test helper to remove ViewedBy initialization
src/dotnet/APIView/APIViewUnitTests/CommentsTokenAuthControllerTests.cs Updates test helper to remove ViewedBy initialization

@tjprescott tjprescott enabled auto-merge (squash) December 5, 2025 23:29
@tjprescott
Copy link
Copy Markdown
Member

/check-enforcer evaluate

@tjprescott tjprescott merged commit a5e9765 into main Dec 5, 2025
21 checks passed
@tjprescott tjprescott deleted the copilot/remove-mark-as-reviewed-feature branch December 5, 2025 23:29
JiaqiZhang-Dev pushed a commit that referenced this pull request Dec 22, 2025
* Initial plan

* Remove Mark as Reviewed/Viewed feature from APIView

Co-authored-by: tjprescott <5723682+tjprescott@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tjprescott <5723682+tjprescott@users.noreply.github.com>
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.

[APIView] Remove "Mark as Reviewed" feature

4 participants