Skip to content

Stop live status banners flickering during polling - #10

Merged
bubblegump30 merged 1 commit into
mainfrom
fix/polling-status-flicker
Oct 9, 2026
Merged

bubblegump30 merged 1 commit into
mainfrom
fix/polling-status-flicker

Conversation

@bubblegump30

Copy link
Copy Markdown
Owner

Telemetry and process polling previously rebuilt read-status banners twice per sample by switching Ready → Loading → Ready. Keep the previous visible state during recurring reads, refresh unchanged timestamps at most every 30 seconds, and show errors, changed details, and recovery immediately. Sampling frequency and measurements are unchanged.

Validated with status regression tests, including repeated samples, immediate failures/recovery, timestamp cadence, and existing stale-result ordering checks; syntax check passed. Native Windows visual acceptance is still pending.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T03:15:21.266074Z 7de4346 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7de4346d4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

states.set(method,{...old,method,label,view,state:'loading',detail:'Reading…',token});onChange(states.get(method));
try{const result=await base[method].apply(base,args);if(states.get(method)?.token===token){const status=resultStatus(result);states.set(method,{...states.get(method),...status,checkedAt:Date.now(),lastSuccessAt:status.state==='success'?Date.now():old.lastSuccessAt});onChange(states.get(method));}return result;}
catch(error){if(states.get(method)?.token===token){states.set(method,{...states.get(method),state:'error',detail:String(error?.message||error),checkedAt:Date.now()});onChange(states.get(method));}throw error;}
states.set(method,{...old,method,label,view,state:'loading',detail:'Reading…',token});publish(states.get(method));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep suppressed polling state out of the rendered state map

When a recurring getProcesses call starts, this still changes its public state to loading even though publish() suppresses its callback. If getInstalledApps changes while that process read is pending, its callback makes renderReadStatus('apps') rebuild the entire banner from statusTracker.states, exposing the suppressed loading state. If the app read finishes before the process read, the unchanged process success is also suppressed, so the banner can remain visibly stuck on Loading until another status publication (up to 30 seconds). Preserve the last published state separately from the in-flight state, or ensure rendering reads published snapshots.

Useful? React with 👍 / 👎.

@bubblegump30
bubblegump30 merged commit f637505 into main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant