Skip to content

Mobile label picker keeps the cached label list while it loads #1198

Closed

Description

@incognitojam

The mobile pull request label picker that upstream added in pingdotgg#24602 (taken in by intake batch 53) reads the repository's label list straight from the server. Every time it opens, it shows a spinner until that read finishes, and an error if the read fails.

The web picker does better because of the fork's pull-request-label-catalogue-cache feature (fork PR 602). It shows the last fetched label list for the repository while the read for the current pull request loads or fails, and keeps that list cached for thirty idle minutes. Applied labels missing from the cached page stay available for removal. Label edits update the chips and checkmarks immediately, roll back on failure, and run in order.

Bring the same behaviour to the mobile picker:

  • apps/mobile/src/features/pull-requests/PullRequestLabelsScreen.tsx reads composerPullRequests.labelCandidates(target) and composerPullRequests.detail(target), and writes through composerPullRequests.setLabels.
  • The web logic lives in apps/web/src/components/pullRequest/pullRequestLabelPicker.logic.ts and packages/client-runtime/src/state/pullRequests.ts. Move whatever mobile needs into client-runtime rather than copying it.
  • Update the ledger entry's invariants and implementation_paths to cover mobile, and add mobile tests.

Until then the ledger entry's invariants apply only to the web picker.


Written by an agent (Claude Code, claude-opus-5-5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions