@devries-cameron20 / t3code-1 / commits / bac1b71567
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(mobile): posting a comment works after a refresh drops a loading older page (#38657)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Wout Stiens committed Nov 19, 2026 at 05:33 UTC bac1b715670000543154afb10524afd87701c0bd
1 file changed +9 -8
apps/mobile/src/features/issues/IssueRouteScreen.tsx
+9 -8
@@ -488,7 +488,8 @@ function IssueRoute({ params }: { readonly params: IssueParams }) {
488 const postComment = useAtomCommand(issueEnvironment.comment, { reportFailure: false });
489 const setState = useAtomCommand(issueEnvironment.setState, { reportFailure: false });
490 const [busy, setBusy] = useState<"comment" | "state" | null>(null);
491 - const [error, setError] = useState<string | null>(null);
491 + const [mutationError, setMutationError] = useState<string | null>(null);
492 + const [olderCommentsError, setOlderCommentsError] = useState<string | null>(null);
493 const [composerHeight, setComposerHeight] = useState(0);
494
495 const timeline = detail
@@ -512,12 +513,12 @@ function IssueRoute({ params }: { readonly params: IssueParams }) {
513 kind: NonNullable<typeof busy>,
514 command: () => Promise<AsyncResult.AsyncResult<unknown, unknown>>,
515 ) => {
515 - if (busy !== null || registry.get(pager.view).loadingOlder) return false;
516 + if (busy !== null) return false;
517 setBusy(kind);
517 - setError(null);
518 + setMutationError(null);
519 const failure = issueCommandError(await command());
520 setBusy(null);
520 - setError(failure);
521 + setMutationError(failure);
522 // The list beside this issue shows its state and comment count, and reads only when asked.
523 if (failure === null) refreshIssueLists(target.environmentId);
524 return failure === null;
@@ -525,10 +526,10 @@ function IssueRoute({ params }: { readonly params: IssueParams }) {
526 const loadOlder = async () => {
527 if (busy !== null) return;
528 const failure = await pager.loadOlder(registry, (cursor) => {
528 - setError(null);
529 + setOlderCommentsError(null);
530 return loadComments({ ...target, input: { ...target.input, cursor } });
531 });
531 - if (failure) setError(gt("Older comments could not be read."));
532 + if (failure) setOlderCommentsError(gt("Older comments could not be read."));
533 };
534 const submitComment = (body: string) =>
535 access?.comment === true
@@ -657,9 +658,9 @@ function IssueRoute({ params }: { readonly params: IssueParams }) {
658 onEditLabels={() => navigation.navigate("IssueLabels", identity)}
659 onEditAssignees={() => navigation.navigate("IssueAssignees", identity)}
660 />
660 - {error || (detail && detailQuery.error) ? (
661 + {mutationError || olderCommentsError || (detail && detailQuery.error) ? (
662 <Text selectable className="text-sm text-danger-foreground">
662 - {error ?? detailQuery.error}
663 + {mutationError ?? olderCommentsError ?? detailQuery.error}
664 </Text>
665 ) : null}
666 {!detail ? (