fix(forge): show a filed issue in the list without a refresh
Filing an issue from the repository panel left the list exactly as it was. The issue existed — the panel opened on it — but the row only turned up after hitting refresh by hand. The list had in fact been re-read, and that was the bug. It is served from GitHub's search index, which lags a write by seconds to minutes, while the create goes to the core API and has no such lag. Re-reading the moment an issue is filed therefore answers with a page from before it existed, and landing that page is what took the new row back off the screen. Every other write on this panel already refuses to re-read for exactly this reason; filing was the one still doing it. The row now comes from what the create itself answered with, like the rest of them. What the re-read was really buying was placement — a new issue is not in the pull-request list at all, and under a narrowed filter it may not be in this one either — so that is decided from the filters the page already holds. It declines on the other tab, past page one, under an order that sorts a new issue to the last page, and under any state, assignee, search or label the row cannot match. When it declines the list is left untouched: the detail panel opens on the issue regardless, so nothing filed goes unseen. A list response already in flight when the issue was filed cannot contain it and would drop it, so a note keyed to the exact view — folder, tab, filters, order and page — puts it back. Anything coarser puts it back in the wrong place: keyed to the tab alone, a row filed while nothing was filtered reappears in a filtered page that had correctly left it out. The tab badge moves with it, counted off the reconciled page so the digit and the rows beneath it are the same page. `reachable_count` deliberately does not move — it is the ceiling on what the forge will page through at all rather than a tally, and raising it would number a page that answers 422.
X
xintaofei committed
01508ce5928c124666dcb917d89a4afbca7dc0b7
Parent: 0547d83