Skip to content

Feature: refresh the current tab's data #33

Description

@nianshou555qiansui

Problem

Most queries are cached aggressively (refetchOnMount / refetchOnReconnect / refetchOnWindowFocus all disabled), which keeps the app fast and API-quota friendly — but it also means most tabs have no way to show fresh data. Inbox, Activity, and Action-run pages have their own refresh affordances, but Issue / PR / repository tabs only refetch after you perform a mutation. If someone comments on an issue you have open in a background tab, that tab stays stale until you interact with it or restart the app.

Proposal

A "refresh current tab" action that invalidates the currently active queries and refetches them in place (e.g. queryClient.invalidateQueries({ refetchType: 'active' })).

Notably, remounting the page component would not work as a refresh here: with refetchOnMount: false the remounted page just reads the stale cache back. In-place refetch is the correct lever, and it also preserves scroll position and any draft state (half-written comments), which a browser-style full reload would destroy.

Suggested entry points:

Open questions

  1. Scope: invalidating active queries refreshes everything currently mounted (sidebar lists included), not just the tab view. Is that acceptable, or would you prefer targeting queries per tab type?
  2. Shortcut: Primary+R vs F5 — any conflict concerns with Electron defaults you'd want to avoid?

Happy to implement once the shape is agreed — I'd start after #29 lands, since the context-menu entry point touches the same files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions