Skip to content

a#457

Merged
theg1239 merged 16 commits into
devfrom
main
Jun 29, 2026
Merged

a#457
theg1239 merged 16 commits into
devfrom
main

Conversation

@theg1239

@theg1239 theg1239 commented Jun 29, 2026

Copy link
Copy Markdown
Member

spent a lot of water and tokens to review your slop

Greptile Summary

This PR carries saved paper page edits into the PDF viewing flow. The main changes are:

  • Adds pageEdits to course paper list data and split-view items.
  • Passes saved page edits into the PDF viewer client.
  • Updates PDF viewer state reconciliation for locally saved edits.
  • Renders moderation thumbnails relative to baseline page edits.
  • Filters note detail loading to cleared notes.
  • Tightens service-worker cache checks for private and uncacheable responses.

Confidence Score: 4/5

The PDF page-edit reconciliation needs attention before merging because stale local edits can continue to override newer server state.

The changed flow is focused and the issue is localized to viewer state reconciliation, while the surrounding data plumbing and service-worker changes appear coherent.

app/components/pdfviewer.tsx

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex attempted the verification, but the run was blocked by reaching the agent's maximum steps before Playwright could rerun and verify final artifacts, and the team prepared a focused Playwright harness, installed dependencies, and attempted Chromium installation after the initial Node failure.
  • T-Rex ran the requested verification, but its local artifact references were not uploaded.
  • The note-clear-filter test ran, producing before and after logs and a runner harness that captures the execution used for both revisions.
  • The navigation and caching scenario showed base prefetching multiple routes with cache.put calls, while head prefetching limited navigations and adjusted cache.put behavior, with a JavaScript harness and related logs captured.
  • The PDF page render reconciliation showed head outputs with runtimeExportType and corrected pageIndex/rotation values, compared to the base values, with accompanying logs and a JavaScript artifact.

View all artifacts

T-Rex Ran code and verified through T-Rex

Fix All in Codex Fix All in Claude Code Fix All in Cursor

Reviews (1): Last reviewed commit: "Merge pull request #438 from ACM-VIT/cur..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

cursoragent and others added 16 commits June 16, 2026 11:08
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
fix: update npm configuration and remove unused dependencies
Keep the most recent local page-edit save active until server props catch up to that exact serialized value. This prevents a delayed refresh for an earlier save from regressing a moderator's newer consecutive save.
Bump the service-worker cache version to evict previously cached personalized HTML, exclude exact personalized routes such as / and /auth, and honor Cache-Control/Set-Cookie on every cache write path so background refreshes cannot store private responses.
Add the same isClear=true guard used by the rest of the note queries so direct note-detail URLs cannot render moderator-unapproved notes.
Store saved page edits against the current server prop generation so a refresh that returns stale props cannot immediately replace the moderator's just-saved page order or rotations.
…n-926b

fix: protect unpublished notes and saved page edits
Keep main's v6 service-worker policy while preserving cache-control and Set-Cookie guards so stale personalized responses are not written to Cache Storage.
…n-74e6

fix: prevent stale personalized cache and preserve page edits
Keep the current mainline service-worker behavior and retain the PDF viewer guard that prevents stale refreshes from overwriting newly saved page edits.
…n-f100

fix: prevent stale PWA documents and PDF page edits
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examcooker-dev Error Error Jun 29, 2026 1:13am

@theg1239
theg1239 merged commit 611b090 into dev Jun 29, 2026
3 of 5 checks passed
Comment on lines +2069 to +2074
if (
prev.pendingValueKey &&
prev.pendingValueKey !== normalizedInitialPageEditsKey
) {
return prev;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Pending Edits Block Props

When a local save leaves pendingValueKey set and the server later sends a different serialized pageEdits value, this branch keeps returning prev without updating propKey or clearing the pending key. The viewer then keeps rendering savedPageEditsState.value instead of the authoritative prop, so a rejected, normalized, or superseded save can leave the PDF buffer and editor stuck on stale page edits.

Fix in Codex Fix in Claude Code Fix in Cursor

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