Uh oh!
There was an error while loading. Please reload this page.
feat(web): pull request files can be marked as viewed - #7721
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
There was a problem hiding this comment.
Reviewed the changed web UI: the new viewed-file checkbox in the diff header, the counter in the toolbar, and the fold/overlay logic modules. Two findings, both on changed lines in PullRequestCodeTab.tsx.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces a substantial cross-provider viewed-file workflow with persistent state, new authenticated RPCs, provider integrations, and a newly enabled Azure DevOps diff path. It also changes authorization behavior and provider capability defaults, so the production blast radius warrants human review. You can add or adjust custom eligibility rules. Learn more. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Reviewed the web UI changes (PullRequestCodeTab.tsx, pullRequestDiff.logic.ts, pullRequestFilesViewed.logic.ts, usePullRequestFilesViewed.ts) for shared-primitive use, Tailwind/CSS ownership and virtualizer behavior.
Both findings from the previous run are resolved: the Checkbox no longer carries a partial size-* override, and truncated is now threaded through the hook and surfaced in the meta line with the same Tooltip + TriangleAlertIcon treatment the withheld-diff caveat uses. Two remaining items below — one virtualizer regression risk, one accessible-name issue on the new control.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
A review spread over an afternoon, or picked up on a second machine, started again from the top every time, so large changes were read in the browser and only small ones stayed here. The marks are the host's rather than ours because a checkbox only this app remembers is worse than none: it looks like the one GitHub shows, disagrees with it, and leaves a reviewer unsure which of the two knows what they have actually read. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…he window resets Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…since Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…at it is partial Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…he wrong way Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…count Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…carries Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
A press moved the whole viewed view, and every file header on screen was memoized on it, so one tick cost a rebuild of all of them. The same mark also has to say whether the control is offered at all, or a capability arriving after the first paint leaves the headers without a box. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
It borrowed its name from the label beside it, and that label turns into "Changed" once the file has been pushed to, leaving a reader who cannot see it with no idea what the box does. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1296cb6 to
6b44e51CompareGitHubScreen.Recording.2026-08-20.at.6.15.29.PM.mov |
The branch had drifted behind main far enough to conflict, which blocked review of the change itself. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
The button exists for a reader who can see that what they are looking at is behind, so leaving one part of the page on the last read defeats the point of pressing it. A push since that read is exactly when the mark beside a ticked file stops being true. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
An error the reader cannot act on, about a press they have already replaced, reads as their current tick having been lost when it has not. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
There was a problem hiding this comment.
One finding on the new viewed-files hook: the command-failure path surfaces an error toast for interrupt-only failures, which diverges from the repo's established useAtomCommand failure convention. Everything else in the web scope (Checkbox/Tooltip primitive use, the amber caveat icon matching the adjacent meta-line pattern, header portal render-prop stability via refs, explicit environmentId threading) looks consistent.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…equest GitLab keeps viewed files in one browser's local storage, so there was nothing to read or write there. The marks are this environment's instead, and the surface says whose they are rather than implying gitlab.com will show them. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The only signal that GitLab's own site would never show these ticks was a tooltip on a small icon, and the first reader to use it went looking for the marks on gitlab.com instead. The count says it now. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
yordis
commented
Aug 30, 2026
GitLabScreen.Recording.2026-08-30.at.10.59.33.AM.mov |
The server derives a ref's repository from the project identity, and Azure DevOps is the one host where that is not the recorded path. Clients spelled it the other way, so the server turned their refs away at the door and the link fell through to the browser. The rule now lives where both sides can read it. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Bitbucket records nothing about what a reviewer has already read, so the marks are this environment's own. Without a revision to compare against they could not tell a file still as it was read from one pushed to since, which is the distinction that makes the marks worth keeping at all. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
The adapter never read what a pull request changed, so the panel reported no files and the Code tab was hidden outright. Azure serves no patch of its own, and its record of what a reviewer has read sits behind an endpoint it has never released, so both are answered from what it does state: the files an iteration changed, and the blob each side holds. Reading the conversation moved off `az rest` in the process. It mints its own token against whichever tenant `az` defaults to, which is not the one an organisation necessarily lives in, so that read had been failing wherever the two differ. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
yordis
commented
Aug 30, 2026
Azure DevOpsCleanShot.2026-08-30.at.18.22.41.mp4 |
yordis
commented
Aug 30, 2026
BitbucketCleanShot.2026-08-30.at.18.30.34.mp4 |
The marks are this environment's own rows and cost nothing to read, but every read of them blocked on a host call that only the Changed badge needed, and a press paid for that call twice over. On Azure, where each one is a process spawn, coming back to a review left the checkboxes empty for seconds at a time. Correcting a badge a moment late is cheaper than making a reader wait for it, so a held answer now stands while the next one is fetched. The press itself still asks outright, since it stamps what it stores. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Azure pages its change list and answers for a binary file in an encoding of its own, so a large pull request came back as part of a change presented as the whole of it, and a file whose contents az would not hand over took the rest of the slice down with it. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
A host that answers for part of a change said nothing about the rest, and that silence was read as deletion, so every file past the cut was cleared over a version nobody ever looked at. Two presses on one file could also finish in the other order, and two Azure repositories of the same name shared one row of ticks. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 75c0bb8. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…f it A page Azure names but the read stops at was reported as the end of the change, so files it never listed read as removed from the pull request. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
One finding: the Azure-safe repository selector is applied to the right-panel branch but not to the sibling /pull-requests navigation in the same function, so an Azure DevOps link still opens a ref the server refuses.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
… per file One file's diff was bounded but a slice of them was not, and the page opening a review passed the URL's spelling of a repository where the panel passed the server's. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
…th no hunks A failed side read was degraded to a file listed without its hunks whatever the reason, so a signed-out or throttled host produced a whole change of empty files instead of a failure the app pauses on. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
There was a problem hiding this comment.
One finding: the new "viewed" segment in the Code tab toolbar cannot shrink, which makes the already-tight meta strip overflow sooner in narrow panels. Everything else in scope looks consistent — the checkbox uses the shared Checkbox primitive with the same label-wrapping pattern as the other call sites, the render props stay identity-stable through refs with the marks folded into item.version, and usePullRequestFilesViewed resolves its environment from the explicit environmentId prop.
Posted via Macroscope — UI Consistency
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
One convention finding: a known-tag recovery is expressed with Effect.catchIf instead of Effect.catchTags. Everything else in the new Effect service code (the PullRequestFilesViewed repository module's Context.Service/make/layer shape, namespace imports, dependency acquisition via yield*, and the new structured error mappings) matches the conventions.
Posted via Macroscope — Effect Service Conventions
Uh oh!
There was an error while loading. Please reload this page.
…strip The count was spelled out at a fixed width beside controls that cannot give way, and the Azure per-file recovery named its failures through a predicate where the tags say it plainly. Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

Note
Medium Risk
Large cross-provider pull-request surface area (new persistence, caching, and Azure diff assembly); regressions could affect diff accuracy, viewed-state correctness, or Azure/GitHub API behavior under rate limits.
Overview
Adds per-file “viewed” tracking for pull requests end-to-end on the server: new
filesViewed/setFilesViewedonPullRequestService, RPC auth forpullRequestsFilesViewedandpullRequestsSetFilesViewed, and provider support split byviewedFiles: "host"(GitHub GraphQL read/write) vs"environment"(SQLite marks plus host file revision lookups to detect pushes).For environment-backed providers, migration 044 creates
pull_request_files_viewedandPullRequestFilesViewedRepositorystores cleared paths with a revision stamp; the service compares revisions (with caching, stale-while-revalidate, per-PR write ordering, and invalidation) so re-pushed files show as dismissed without re-fetching the whole diff on every checkbox.Azure DevOps gains a real Code tab:
capabilities.diffflips on, REST moves fromaz resttoaz devops invoke, iteration changes are paged and turned into unified patches via the newdiffdependency andazureDevOpsDiff.ts, plusgetFileRevisionsfor viewed-state staleness. Bitbucket and GitLab addgetFileRevisions(patch index lines / head blob GraphQL). Extensive unit tests cover paging limits, truncated diffs, and mark isolation across repos and PR numbers.Reviewed by Cursor Bugbot for commit 6e9d61c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add ability to mark pull request files as viewed across providers
044_PullRequestFilesViewed.AzureDevOpsRepositoryLocationinstead ofthreadsUrl.normalizeGitRemoteUrlnow normalizes Azure DevOps SSH remotes to web spelling.Macroscope summarized 6e9d61c.