Repository navigation
Fix compilation feedback and pending-action recovery - #13
Conversation
DebelToni
left a comment
There was a problem hiding this comment.
Reviewed all eight changed files and the surrounding PDF download/render, compiler cache-repair and request-lifecycle code. The rebased patch is unchanged from the first revision. Required test/analyze and CodeQL checks passed, but one PDF recovery regression remains: sourceHash-only byte reuse suppresses downloading a newly repaired artifact. Leaving this exact head unmerged. This finding is source-traced; no PR code/tests were executed on DGX.
DebelToni
left a comment
There was a problem hiding this comment.
Re-reviewed the full ten-file change through the previously inspected diff, verified unchanged patches and complete incremental source/test review against f506dcb. The earlier PDF repair finding is addressed: cross-job byte reuse now requires an explicit cached:true event and viewer-validated bytes; unknown/rebuilt jobs fetch their own URL; pending downloads coalesce by job identity, and parser/render rejection invalidates only the exact current buffer. Cancelled old parser results cannot invalidate replacement bytes. New regressions cover HTTP-200 rejected data followed by an uncached same-hash repair, superseding a pending same-hash download, rejected-buffer/cache-hit recovery, reconnect without cache provenance and validation callback ownership. The other pending-auth/create/import/list and compile-submission/status-ordering changes remain as reviewed. No remaining blockers. GitHub CI passed 102 frontend tests (21 workspace PDF and 4 viewer tests), 67 server tests, the separate real-Docker compiler test, required test/analyze and CodeQL. Exact head/base/main, protections/settings and resolved threads verified. No PR code/tests or live browser QA were run on DGX by this reviewer; no policy or host automation changes.
Delayed responses could download/render the same PDF twice, overwrite a completed compile with queued status, or redirect users after they dismissed creation or opened another project. Root progress also ended up attached to the wrong authentication/creation attempt. Keep request ownership and compile/PDF ordering explicit, share requests for the same job, and let accepted compilation finish independently of a slow PDF download.
Compile is guarded from the start of source synchronization, with named root progress for saving, submission and compilation. Poll failures remain visible and retry without resubmission. Direct project navigation resets project-specific request state. Dismissed creation retains one tracked draft and reopenable progress; completion refreshes the dashboard instead of stealing navigation. Late create/import/auth/list responses cannot replace a newer context. Startup/offline wording describes connection state accurately.
Reuse bytes across different jobs only after the viewer validates that exact buffer and an explicit cache-hit event confirms reuse. A newly built or repaired artifact downloads again even when its source hash is unchanged. Viewer failures invalidate only their matching buffer; stale parser results or downloads cannot invalidate or replace a newer repair. Cache-hit reuse still rebinds SyncTeX to the new job.
Regressions failed before the fixes for duplicate downloads/submissions, stale job/PDF responses, failed PDF retries, corrupt HTTP-200 PDF recovery, an in-flight same-hash repair, reconnect SyncTeX rebinding, slow PDF transfer, creation dismissal/reopen, late navigation and project-list ordering, and switching authentication routes while pending.
Validation: all 102 frontend tests pass, including real PdfViewer parser callback/cancellation contracts. Full frontend ESLint, TypeScript and production build pass. Chromium QA with an isolated local fixture verified an HTTP-200 invalid PDF visibly failing, then a new same-hash compilation restoring the rendered preview. Other browser checks cover creation draft/progress on close/reopen, dismissal completion without navigation, stale sign-in route switching, root compile feedback at 390px without overflow, and accessible busy button names. Simulated latency is confined to the fixture. Production baseline testing separately verified real TeX failure, last-good PDF reload/recovery and exact source restoration; no production cache was corrupted or production project created/deleted for this change. No authentication, authorization, or dependency changes.