Repository navigation
fix: re-ticking a file after a push no longer shows it Viewed #24151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
juliusmarminge
merged 19 commits into
pingdotgg:main
from
only21mil:r13/n012-refresh-file-revisions-before-recording-
Nov 14, 2026
+142
−69
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c6f382a
test(server): pin a re-cleared file to the head's current revision
only21mil 8ca2b70
fix(server): refresh file revisions before recording viewed marks
only21mil 2d6909a
fix: record the file version a viewed press was shown
only21mil f1e6b70
fix(web): a viewed tick in one commit's diff records the head's version
only21mil 6b1388e
Merge remote-tracking branch 'upstream/main' into babysit-24151
only21mil da14baf
fix(pull-request): merge main into viewed revision fix
maria-rcks 94fcb56
refactor(pull-request): simplify viewed revision regression coverage
maria-rcks 079989b
fix(pull-request): refresh comparisons after displayed revision marks
maria-rcks 63749ff
fix: let bitbucket revision comparisons read fresh pushes
maria-rcks 14c7b19
fix(pull-request): merge main and preserve viewed revisions
maria-rcks 5f60c38
fix(web): settle viewed presses after completed reads
maria-rcks 37ce86b
fix(pull-request): merge main and preserve viewed range revisions
maria-rcks e322095
fix(web): settle viewed marks only from server answers
maria-rcks 1095cd7
Merge branch 'main' into r13/n012-refresh-file-revisions-before-recor…
only21mil 4a6c69a
Merge branch 'main' into r13/n012-refresh-file-revisions-before-recor…
only21mil ba76528
chore(server): keep main's held head read for presses without a revision
only21mil 390dfa3
chore(bitbucket): keep main's revision-patch cache
only21mil 78c31db
Merge remote-tracking branch 'origin/main' into r13/n012-refresh-file…
juliusmarminge 917fd01
fix(mobile): settle viewed presses on completed reads
juliusmarminge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
18 changes: 5 additions & 13 deletions
18
apps/mobile/src/features/pull-requests/pullRequestFilesViewed.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,16 @@ | ||
| import type { PullRequestFilesViewedResult } from "@t3tools/contracts"; | ||
| import { describe, expect, it } from "vite-plus/test"; | ||
| import { viewedOverlay } from "./pullRequestFilesViewed"; | ||
|
|
||
| // The overlay compares reads by identity, so each call is a distinct read. | ||
| const read = (): PullRequestFilesViewedResult => ({ files: [], truncated: false }); | ||
|
|
||
| describe("viewedOverlay", () => { | ||
| it("keeps a press while its write is in flight", () => { | ||
| const before = read(); | ||
| expect( | ||
| viewedOverlay({ "a.ts": { viewed: true, version: 1, awaitingReadAfter: undefined } }, before), | ||
| viewedOverlay({ "a.ts": { viewed: true, version: 1, awaitingReadAfter: undefined } }, 3), | ||
| ).toEqual({ "a.ts": true }); | ||
| }); | ||
|
|
||
| it("keeps a landed press until a read newer than the one current at the write", () => { | ||
| const before = read(); | ||
| const presses = { | ||
| "a.ts": { viewed: true, version: 1, awaitingReadAfter: { read: before } }, | ||
| }; | ||
| expect(viewedOverlay(presses, before)).toEqual({ "a.ts": true }); | ||
| expect(viewedOverlay(presses, read())).toEqual({}); | ||
| it("yields a landed press to the next completed read, even one with unchanged data", () => { | ||
| const presses = { "a.ts": { viewed: true, version: 1, awaitingReadAfter: 3 } }; | ||
| expect(viewedOverlay(presses, 3)).toEqual({ "a.ts": true }); | ||
| expect(viewedOverlay(presses, 4)).toEqual({}); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.