Repository navigation
Close or reopen the refresh numbers as soon as pullRequests turns off or on - #92
Conversation
A config that turned the environment's pullRequests capability off left T3's refresh subscription open until the next key or read answer, and one that turned it on again waited the same way. update_config now calls read_opened_pull when the capability changes, as the desktop's queries follow the server config on each render. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
PASS+NOTES for head
Regression sweep: 13 of 13 recipes passed on base and head. Tests: formatting, Clippy with warnings denied, and all 935 tests passed locally on Rust 1.95.0. Removing exactly the three-line call block in Desktop reference: RightPanelTabs.tsx:749-760 at f570bd21 reads the current server config and passes a null query when CI: macOS, optional Linux and E2E smoke all passed on this head, run 39163390952. Greptile: passed on this head, zero review threads or inline findings. Notes: Evidence root: Binaries driven:
Both t3v build logs show |
t3term now opens or closes T3's refresh subscription as soon as a config turns the environment's
pullRequestscapability off or on. It used to wait for the next key or read answer.update_configin src/tui/mod.rs callsread_opened_pullwhenpullRequestschanges. That's the same step a key runs, and it callsfollow_refreshes.pullRequests.subscribeRefreshesby the end of the recipe.Nothing on screen changes.
Decision log
What I noticed. Sol's verdict on #90 noted that the linked-pull-requests recipe sometimes ended with one
pullRequests.subscribeRefreshesand sometimes two, on the same build. It suggested a 1500 ms idle wait aftercapability offin the recipe.How I confirmed it.
on_config_eventandupdate_confignever calledfollow_refreshes. Only keys, the live timer and read answers did, throughread_opened_pull.pullRequestswas off only if a read's answer happened to land in that window. In Sol's runs that was thepullRequests.stackanswer.wait --idle 1500after the details open) and ran the recipe five times on master's build (748c6b8's tree). All five counted 1: the first subscription stayed open throughcapability off, and nothing subscribed again afteron. On this branch's build all five counted 2, with the interrupt right afteroffand a new subscription right afteron. The unchanged recipe counted 2 in five runs on each build.capabilities.pullRequestsisn't true, and re-reads the server config on each render (apps/web/src/components/RightPanelTabs.tsx:749-760 at f570bd2), so its reads and their refresh trigger follow the config straight away.Options.
read_opened_pullon every config change. Provider status updates come often and can't change what it decides, so the call runs only whenpullRequestsflips.What review changed. Greptile found nothing. Sol passed it with a note: on either build, line 27 of the recipe can leave the link's details before the host's detail answers, so the fixture fails that read and t3term asks for no stack. That is the recipe's own race, apart from this fix, and a follow-up waits for the host's read there.
Known limits.
pullRequestswas off is still dropped, not kept. Turning it on again doesn't read the open link until you open its details again, as before.threadPullRequestscapability alone doesn't touch the subscription, since reads followpullRequests.Tests
the_refresh_numbers_follow_a_config_that_turns_pull_requests_off_and_onin src/tui/mod.rs: details held, on the list, then a config withpullRequestsoff, on, and on again. It checks that the subscription closes, a second one opens, and a config that leaves it on opens no third. With the three lines inupdate_configremoved, it fails atassert!(app.refreshes.is_none()).🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Makes the refresh subscription follow changes to
pullRequestsimmediately, without waiting for input or a read answer.Known limits acknowledged by
krishhgg:threadPullRequestsalone do not control the refresh subscription, since reads followpullRequests.Reviews (1) · Last reviewed commit: "Say what the refresh count is after the ..." · Reviewed by Greptile