Repository navigation
perf(pr): PR panel paints from saved data and reads ahead on intent #32911
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
Open
Bil0000
wants to merge
46
commits into
pingdotgg:main
Choose a base branch
from
Bil0000:t3/instant-pr-load
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+947
−131
Open
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
9c3c7ee
perf(pr): actions, title edits and labels show at once on every host
Bil0000 4a19a46
perf(web): title editor and label picker stop waiting on the host
Bil0000 d295113
fix(pr): preserve optimistic titles across shared summaries
maria-rcks 8e4a2bc
fix(pr): retain accepted titles when saved summaries tie
maria-rcks fcf73a0
fix(pr): a queued reopen keeps a closed pull request in open lists
Bil0000 b42e869
fix(pr): a stored detail snapshot no longer hides a pending title
Bil0000 3fbca24
fix(pr): a label read still loading restarts when a label change lands
Bil0000 2ca2584
perf(pr): merge shows its result at once where the host says whether …
Bil0000 d9655bf
perf(web): hover on a PR row also reads its activity
Bil0000 2ac76f4
test(pr): fold the unknown-queue merge case into the queue-status table
Bil0000 5839e47
fix(pr): the checks read shows every queued state change
Bil0000 150b938
perf(pr): a saved stack paints at once and merging still waits for th…
Bil0000 098d030
perf(web): PR links, thread rows and the Code tab read ahead on intent
Bil0000 52ad114
fix(pr): an accepted edit ends on the host's own title
Bil0000 bccd49e
perf(pr): a first visit to the PR list paints from a read made ahead
Bil0000 ab5fd5d
fix(web): Code tab reads ahead only after the pointer rests, stale me…
maria-rcks f886923
test(client-runtime): list warm-up test awaits the reconnect read ins…
maria-rcks 5e9b2ca
test(web): read-ahead tests check only the key a click reads
Bil0000 8defad4
fix(pr): a reader opened or still loading during a title save ends on…
Bil0000 bc51211
Merge remote-tracking branch 'github/main' into t3/instant-pr-load
maria-rcks f372d0a
fix(web): a requested PR refresh spins until its read settles
maria-rcks a20daf6
Merge branch 'main' into t3/instant-pr-merge-and-load
maria-rcks 87d2141
Merge remote-tracking branch 'github/main' into t3/instant-pr-load
maria-rcks 138bba6
Merge remote-tracking branch 'origin/main' into rv/32774
Bil0000 2ce33a1
fix(pr): keep pending edits out of retained list rows
Bil0000 30240c5
fix(pr): merge list fixes and wait for host merge results
Bil0000 29d26a9
fix(pr): merge stack updates and preserve host titles on read failure
Bil0000 7f989bc
chore(pr): merge current main into saved pull request reads
Bil0000 342dfe6
fix(pr): a title the host rewrote stays out of shared summaries
Bil0000 7a1d2d3
fix(pr): an accepted edit stays on retained list rows
Bil0000 db380fc
chore(pr): merge retained row fix into rv/32842
Bil0000 327f8a2
Merge branch 'rv/32842' into rv/32911
Bil0000 49ae4f6
fix(pr): the PR page loads again, and a pending title shows over a st…
shivamhwp afbd547
Merge remote-tracking branch 'origin/main' into pr-32774
shivamhwp 697b854
Merge branch 'pr-32774' into pr-32842
shivamhwp c089e6d
Merge branch 'pr-32842' into pr-32911
shivamhwp 37bc21d
Merge remote-tracking branch 'origin/main' into pr-32911
shivamhwp 40fceb5
Merge remote-tracking branch 'origin/main' into pr-32842
shivamhwp 9273ced
Merge commit '40fceb576c' into pr-32911
shivamhwp e80cad7
fix(pr): a failed warm-up no longer sticks, and a title save stops fl…
shivamhwp d74a207
fix(pr): a title the host rewrote reaches every reader, not only the …
shivamhwp 7ace3f3
test(pr): mount the cross-reader rewrite test's readers one at a time
shivamhwp 318dac7
Merge remote-tracking branch 'origin/main' into pr-32911
shivamhwp f4e90f7
Merge remote-tracking branch 'origin/main' into t3/instant-pr-load
juliusmarminge d97655e
chore(pr): keep the panel's look as it was; this change is about data
juliusmarminge 329dfe9
Merge branch 't3/instant-pr-load' of https://github.com/Bil0000/t3cod…
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
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
36 changes: 36 additions & 0 deletions
36
apps/mobile/src/features/pull-requests/PullRequestListWarmup.tsx
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 |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { useAtomMount, useAtomValue } from "@effect/atom-react"; | ||
| import type { EnvironmentId, PullRequestListInput } from "@t3tools/contracts"; | ||
| import { AsyncResult } from "effect/reactivity"; | ||
|
|
||
| import { useProjects } from "../../state/entities"; | ||
| import { mobilePreferencesAtom } from "../../state/preferences"; | ||
| import { composerPullRequests } from "../../state/pull-requests"; | ||
| import { useEnabledNavigationTabs } from "../layout/workspace/navigation-tabs"; | ||
| import { usePullRequestListTargets } from "./usePullRequestListControls"; | ||
|
|
||
| /** Fills an empty saved list for the scope the PRs tab opens on, so its first visit paints. */ | ||
| export function PullRequestListWarmup() { | ||
| // Until the saved filters load, the tab's scope is not known and a read could be wasted. | ||
| const loaded = AsyncResult.isSuccess(useAtomValue(mobilePreferencesAtom)); | ||
| const enabled = useEnabledNavigationTabs().includes("pullRequests"); | ||
| return loaded && enabled ? <WarmLists /> : null; | ||
| } | ||
|
|
||
| function WarmLists() { | ||
| const { targets } = usePullRequestListTargets(""); | ||
| const projects = useProjects(); | ||
| return targets | ||
| .filter((target) => | ||
| projects.some( | ||
| (project) => project.environmentId === target.environmentId && !project.isScratch, | ||
| ), | ||
| ) | ||
| .map((target) => <WarmList key={target.environmentId} target={target} />); | ||
| } | ||
|
|
||
| function WarmList(props: { | ||
| target: { readonly environmentId: EnvironmentId; readonly input: PullRequestListInput }; | ||
| }) { | ||
| useAtomMount(composerPullRequests.warmList(props.target)); | ||
| return null; | ||
| } |
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.